diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 86b77f8c6b..f4f973d6c8 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -6,6 +6,7 @@ /types/abbrev/ @BendingBender /types/abs/ @AyaMorisawa /types/absolute/ @AyaMorisawa +/types/abstract-leveldown/ @MeirionHughes @danwbyrne /types/acc-wizard/ @cyrilschumacher /types/accept-language-parser/ @kampfgnom /types/accepts/ @bomret @brikou @@ -16,6 +17,7 @@ /types/acorn/ @RReverser @e-cloud /types/actioncable/ @zhu1230 /types/actions-on-google/ @joelhegg +/types/activedirectory2/ @pasthelod /types/activex-access/ @zspitz /types/activex-adodb/ @zspitz /types/activex-adox/ @zspitz @@ -46,13 +48,17 @@ /types/adone/ @s0m3on3 @maxveres /types/aframe/ @devpaul @bertoritger @twastvedt /types/agenda/ @meirgottlieb @princjef +/types/agent-base/ @Shinigami92 /types/aggregate-error/ @BendingBender +/types/agora-rtc-sdk/ @menthays +/types/ajv-errors/ @afshawnlotfi /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 @samouss /types/allure-js-commons/ @zaqqaz +/types/almost-equal/ @cmaddalozzo /types/alt/ @Shearerbeard /types/amazon-cognito-auth-js/ @scottescue /types/amazon-product-api/ @MattiLehtinen @alien35 @@ -64,14 +70,15 @@ /types/amplify-deferred/ @joeriks @laurentiustamate94 /types/amplitude-js/ @Asido /types/amqp/ @seikho @jonnysparkplugs +/types/amqp-connection-manager/ @rogierschouten /types/amqp-rpc/ @wokim /types/amqplib/ @mnahkies @abreits @nfantone @zelein /types/analytics-node/ @fongandrew @thomasthiebaud /types/anchor-js/ @xt0rted -/types/angular/ @diegovilar @thorn0 @calebstdenis @leonard-thieu +/types/angular/ @diegovilar @thorn0 @calebstdenis @leonard-thieu @scipper /types/angular-agility/ @rolandzwaga /types/angular-animate/ @michelsalib @adidahiya @rasch @codyschaaf -/types/angular-block-ui/ @lassebn @sclassen +/types/angular-block-ui/ @lassebn @sclassen @renjfk /types/angular-bootstrap-calendar/ @Odrin /types/angular-bootstrap-lightbox/ @rolandzwaga /types/angular-breadcrumb/ @marctalary @@ -106,15 +113,16 @@ /types/angular-material/ @blbigelow @PeterHajdu @Dona278 @geertjansen @eknowles /types/angular-media-queries/ @jpmnteiro /types/angular-meteor/ @pgrm -/types/angular-mocks/ @diegovilar @daltin +/types/angular-mocks/ @diegovilar @daltin @thorn0 /types/angular-modal/ @paullessing /types/angular-oauth2/ @anteriovieira /types/angular-pdfjs-viewer/ @bastienmoulia /types/angular-permission/ @vmishevski /types/angular-promise-tracker/ @rufusl +/types/angular-q-extras/ @mistic100 /types/angular-q-spread/ @rafw87 /types/angular-resource/ @diegovilar @miffels -/types/angular-route/ @park9140 +/types/angular-route/ @park9140 @gkalpak /types/angular-sanitize/ @diegovilar /types/angular-scenario/ @RomanoLindano /types/angular-scroll/ @samherrmann @@ -126,7 +134,7 @@ /types/angular-toasty/ @muenchdo /types/angular-tooltips/ @leonard-thieu /types/angular-translate/ @michelsalib @GabrielGil -/types/angular-ui-bootstrap/ @xt0rted @ry8806 +/types/angular-ui-bootstrap/ @xt0rted @ry8806 @alfiej /types/angular-ui-router/ @michelsalib @matiishyn @mikehaas763 /types/angular-ui-scroll/ @marknadig /types/angular-ui-sortable/ @thgreasi @@ -142,10 +150,12 @@ /types/animejs/ @A-Babin /types/annyang/ @hisham @theluk /types/ansi-colors/ @rogierschouten +/types/ansi-escape-sequences/ @aomarks /types/ansi-escapes/ @jacobbubu /types/ansi-regex/ @mvachhar /types/ansi-styles/ @brynbellomy @plylrnsdy /types/ansicolors/ @rogierschouten +/types/antlr4/ @mcchatman8009 /types/any-db/ @rogierschouten /types/any-db-transaction/ @rogierschouten /types/anybar/ @khoomeister @@ -155,14 +165,15 @@ /types/api-error-handler/ @tkrotoff /types/apicache/ @danielsogl /types/apigee-access/ @CasperSkydt -/types/apollo-codegen/ @bradleyayers +/types/apollo-codegen/ @bradleyayers @kostspielig +/types/apollo-upload-client/ @Slessi /types/app-root-dir/ @chenyang-biu /types/app-root-path/ @shantmarouti /types/appdmg/ @unindented /types/appframework/ @kyo-ago /types/applepayjs/ @martincostello /types/appletvjs/ @brainded -/types/applicationinsights-js/ @kamilszostak +/types/applicationinsights-js/ @kamilszostak @markwolff /types/aqb/ @Athenkosi-Mase /types/arangodb/ @pluma /types/arbiter/ @arash16 @@ -174,17 +185,19 @@ /types/archy/ @vvakame /types/are-we-there-yet/ @brianloveswords /types/argon2-browser/ @ivangabriele -/types/argparse/ @arcticwaters @tlaziuk +/types/argparse/ @arcticwaters @tlaziuk @eps1lon /types/args/ @Slessi /types/argv/ @hookclaw /types/arr-union/ @mrmlnc /types/array-find-index/ @samverschueren /types/array-foreach/ @skysteve +/types/array-sort/ @DanielMSchmidt /types/array-uniq/ @DanielRosenwasser /types/array-unique/ @CSLTech /types/arrify/ @wanganjun /types/artillery/ @kmccoan-allocadia /types/asana/ @tkqubo +/types/asap/ @fpascutti /types/ascii2mathml/ @RagibHasin /types/asenv/ @remisery /types/asn1js/ @microshine @@ -205,6 +218,7 @@ /types/atlaskit__inline-edit/ @lstanden /types/atlaskit__layer/ @lstanden /types/atlaskit__single-select/ @lstanden +/types/atlassian-crowd-client/ @mtgto /types/atmosphere.js/ @toedter @Mory1879 @Scipion /types/atob/ @johngeorgewright /types/atom/ @GlenCFL @smhxx @lierdakil @@ -216,8 +230,9 @@ /types/auth0-angular/ @homesar /types/auth0-js/v7/ @advancedrei /types/auth0-js/ @adrianchia @mdurrant @peterblazejewicz -/types/auth0-lock/ @carusology @goldcaddy77 @lfaudreejr +/types/auth0-lock/ @carusology @goldcaddy77 @lfaudreejr @willcaul /types/auth0.widget/ @advancedrei +/types/auto-bind/ @sseppola /types/auto-launch/ @rhysd @unindented /types/auto-sni/ @janwo /types/autobahn/ @darkl @valepu @@ -227,10 +242,12 @@ /types/autosuggest-highlight/ @senukartur /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 @repl-chris @aneilbaboo +/types/aws-lambda/ @skarum @tobyhede @buggy @y13i @wwwy3y3 @OrthoDex @MichaelMarner @daniel-cottone @kostya-misura @coderbyheart @palmithor @daniloraisi @simonbuchan @Haydabase @repl-chris @aneilbaboo @jeznag @louislarry @dpapukchiev /types/aws-serverless-express/ @threesquared @jcaffey @mattmeye @albertovasquez /types/aws4/ @ajcrites +/types/axe-webdriverjs/ @JoshuaKGoldberg /types/axel/ @ruslan-molodyko +/types/axios-token-interceptor/ @innovation-team /types/axon/ @jewbre /types/azure/ @AndrewGaspar @antiveeranna @SomaticIT /types/azure-mobile-services-client/ @dmorosinotto @@ -242,28 +259,35 @@ /types/babel-plugin-react-pug/ @jpap /types/babel-plugin-syntax-jsx/ @marvinhagemeister /types/babel-template/ @yortus @marvinhagemeister -/types/babel-traverse/ @yortus @marvinhagemeister +/types/babel-traverse/ @yortus @marvinhagemeister @rpetrich /types/babel-types/ @yortus @baxtersa @marvinhagemeister @bcherny /types/babel-webpack-plugin/ @j-f1 /types/babel__code-frame/ @mohsen1 @ForbesLindesay +/types/babel__core/ @yortus @marvinhagemeister @mgroenhoff +/types/babel__generator/ @yortus @johnnyestilles @mgroenhoff +/types/babel__parser/ @yortus @marvinhagemeister @mgroenhoff +/types/babel__template/ @yortus @marvinhagemeister @mgroenhoff +/types/babel__traverse/ @yortus @marvinhagemeister @rpetrich @mgroenhoff /types/babelify/ @TeamworkGuy2 @marvinhagemeister /types/babylon/ @yortus @marvinhagemeister /types/babylon-walk/ @czbuchi /types/babyparse/ @cdiddy77 -/types/backbone/ @borisyankov @nvivo +/types/backbone/ @borisyankov @nvivo @kenjiru /types/backbone-associations/ @craigbrett17 /types/backbone-fetch-cache/ @delphinus35 /types/backbone-relational/ @eirikhm /types/backbone.layoutmanager/ @hejiang2000 /types/backbone.localstorage/ @lgrignon -/types/backbone.marionette/ @zhamid @nvivo @sventschui @razorness +/types/backbone.marionette/ @zhamid @nvivo @sventschui @razorness @confususs /types/backbone.paginator/ @Nyamazing /types/backbone.radio/ @alphaleonis /types/backgrid/ @jlujan /types/backlog-js/ @vvatanabe +/types/backo2/ @Retsam /types/backoff/ @BendingBender /types/baconjs/ @alexander-matsievsky @gekkio /types/bagpipes/ @micmro +/types/barbellweights/ @evelijn /types/barcode/ @pvomhoff /types/bardjs/ @TepigMC /types/base-64/ @dolanmiu @@ -280,12 +304,16 @@ /types/bazinga-translator/ @alexndlm /types/bcrypt/ @codeanimal @IOAyman @dstapleton92 /types/bcryptjs/ @RafaelKr +/types/bdfjs/ @jeremejevs /types/beats/ @urish /types/bech32/ @micksatana /types/behavior3/ @carrrywu /types/bell/ @SimonSchick /types/bem-cn/ @selkinvitaly +/types/bencode/ @tobenna /types/better-curry/ @pocesar +/types/better-queue/ @maozedong +/types/better-scroll/ @stoneChen /types/better-sqlite3/ @Morfent @matrumz /types/bezier-easing/ @ptlis /types/bezier-js/ @danmarshall @@ -296,6 +324,7 @@ /types/bigint/ @Evgenus /types/bignum/ @Patman64 /types/bigscreen/ @dduugg +/types/bin-pack/ @orentrutner /types/binary-parser/ @riggs @dolanmiu /types/bind-ponyfill/ @skysteve /types/bindings/ @unindented @@ -319,6 +348,7 @@ /types/blocked/ @l-jonas /types/blockies/ @LogvinovLeon /types/blocks/ @ksmigiel +/types/bloem/ @danwbyrne /types/bloomfilter/ @slawiko /types/blue-tape/ @sodatea /types/bluebird/v1/ @Bartvds @@ -327,7 +357,7 @@ /types/bluebird-global/ @d-ph /types/bluebird-retry/ @pvomhoff /types/blueimp-md5/ @rmartone @mkohlmyr -/types/bn.js/ @LogvinovLeon +/types/bn.js/ @LogvinovLeon @HenryNguyen5 /types/body-parser/ @santialbo @vilic @dreampulse @blendsdk @tlaziuk @jwalton /types/body-parser-xml/ @tbounsiar /types/bonjour/ @quentin-ol @octo-sniffle @@ -359,12 +389,14 @@ /types/bootstrap3-dialog/ @nakupanda @cnboland /types/bounce.js/ @cherrry /types/box2d/ @jbaldwin +/types/bpmn-moddle/ @haydos89 /types/brace-expansion/ @BendingBender /types/braces/ @vemoo /types/braft-editor/ @me /types/braintree-web/ @chlela /types/breeze/ @borisyankov /types/bricks.js/ @kondi +/types/bro-fs/ @ffflorian /types/brorand/ @chrootsu /types/browser-bunyan/ @PaulLockwood @kryops /types/browser-fingerprint/ @LKay @@ -380,11 +412,13 @@ /types/bucks/ @zaneli /types/buffer-compare/ @chrootsu /types/buffer-equal/ @Bartvds +/types/buffer-from/ @burnnat +/types/buffer-reader/ @nrlquaker /types/buffers/ @rhencke /types/bufferstream/ @Bartvds /types/builtin-modules/ @ajafff /types/bull/v2/ @bgrieder @JProgrammer -/types/bull/ @bgrieder @JProgrammer @marshall007 @weeco @blaugold @iamolegga +/types/bull/ @bgrieder @JProgrammer @marshall007 @weeco @blaugold @iamolegga @koblas @bondz @wuha-team @aleccool213 /types/bump-regex/ @silkentrance /types/bunnymq/ @cyrilschumacher /types/bunyan/ @amikhalev @@ -416,6 +450,7 @@ /types/canvas-gauges/ @Mikhus /types/canvasjs/ @brutalimp /types/capitalize/ @frederickfogerty +/types/capture-console/ @AustonZ /types/card-validator/ @ChanceM /types/case-sensitive-paths-webpack-plugin/ @r3nya /types/caseless/ @downace @mastermatt @@ -424,13 +459,15 @@ /types/cassandra-driver/ @Svjard @pc-jedi /types/catbox/v7/ @jasonswearingen @AJamesPhillips /types/catbox/ @jasonswearingen @AJamesPhillips @saboya +/types/catbox-redis/ @SimonSchick /types/cbor/ @pushplay /types/ccap/ @taoqf +/types/cesium/ @Zuzon @hnipps @szechyjs @golyalpha /types/chai/v2/ @Bartvds @AGBrown /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 +/types/chai-datetime/ @cliffburger @mattbishop /types/chai-dom/ @mattlewis92 /types/chai-enzyme/ @asvetliakov /types/chai-fuzzy/ @Bartvds @@ -439,7 +476,8 @@ /types/chai-jquery/ @kazimanzurrashid /types/chai-json-schema/ @ulrichheiniger /types/chai-oequal/ @mizunashi-mana -/types/chai-spies/ @kuzn-ilya +/types/chai-roughly/ @swist +/types/chai-spies/ @kuzn-ilya @harm-less @jounisuo /types/chai-string/ @nmalaguti /types/chai-subset/ @delta62 @AGBrown /types/chai-uuid/ @harm-less @@ -450,14 +488,15 @@ /types/chardet/ @Gebatzens /types/charm/ @Xananax /types/charset/ @cspotcode -/types/chart.js/ @anuti @FabienLavocat @KentarouTakeda @larrybahr @mernen @josefpaij @danmana @guillaume-ro-fr @chicoxyzzy @archy-bold @braincore -/types/chartist/ @mtgibbs @psimonski @clottman @affilnost +/types/chart.js/ @anuti @FabienLavocat @KentarouTakeda @larrybahr @mernen @josefpaij @danmana @guillaume-ro-fr @chicoxyzzy @archy-bold @braincore @gebeto @frabnt @alexdor @mahnuh +/types/chartist/ @mtgibbs @psimonski @clottman @affilnost @sunnyrjuneja +/types/chartmogul-node/ @chartmogul /types/chayns/ @HenningKuehl /types/check-sum/ @BendingBender /types/check-types/ @idchlife /types/checkstyle-formatter/ @mhegazy /types/checksum/ @rogierschouten -/types/cheerio/ @blittle @wmaurer @umarniz @LiJinyao +/types/cheerio/ @blittle @wmaurer @umarniz @LiJinyao @chennakrishna8 /types/chessboardjs/ @sliverb @davidmpaz /types/chmodr/ @BendingBender /types/chokidar/ @reppners @felixfbecker @bayssmekanique @@ -466,6 +505,9 @@ /types/chroma-js/v0/ @invliD /types/chroma-js/ @invliD @mpacholec /types/chrome/ @matthewkimber @otiai10 @couven92 @rreverser @sreimer15 +/types/chrome-apps/ @niikoo @AdamLay @pine613 @mzsm @RReverser @pyle @matthewkimber @otiai10 @couven92 @rreverser @sreimer15 +/types/chromecast-caf-receiver/ @craigrbruce +/types/chromecast-caf-sender/ @samuelmaddock /types/chromedriver/ @pe8ter /types/circuit-breaker-js/ @DeTeam /types/circular-json/ @jpevarnek @@ -489,6 +531,7 @@ /types/cli-spinner/ @janslow /types/cli-table/ @arylo /types/cli-table2/ @mgroenhoff +/types/cli-truncate/ @danwbyrne /types/client-sessions/ @netroy /types/clientjs/ @icopp /types/cliff/ @brynbellomy @@ -509,7 +552,7 @@ /types/co-body/ @geoffreak /types/co-views/ @devlee @geoffreak /types/code/ @prashaantt -/types/codemirror/ @mihailik @nrbernard @Pr1st0n +/types/codemirror/ @mihailik @nrbernard @Pr1st0n @rileymiller /types/codependency/ @morphatic /types/coffeeify/ @tkQubo /types/coinbase/ @rogierschouten @@ -525,6 +568,7 @@ /types/color-string/ @BendingBender @danmarshall /types/colorbrewer/ @mtraynham /types/com.darktalker.cordova.screenshot/ @akarienta +/types/com.wikitude.phonegap.wikitudeplugin/ @zbarbuto /types/combine-source-map/ @TeamworkGuy2 /types/combined-stream/ @felixge @tlaziuk /types/combokeys/ @iclanton @@ -536,7 +580,9 @@ /types/commangular/ @hiraash /types/comment-json/ @Jason3S /types/common-errors/ @icopp +/types/common-prefix/ @seangenabe /types/common-tags/ @zuzusik @tzupengwang +/types/commondir/ @leonard-thieu /types/commonmark/ @nicojs @leonard-thieu /types/compare-version/ @jpevarnek /types/compare-versions/ @LogvinovLeon @@ -553,6 +599,7 @@ /types/conf/ @SamVerschueren @BendingBender /types/confidence/ @jppellerin /types/config/ @RWander @forrestbice @jndonald3 @albertovasquez +/types/config-yaml/ @me /types/configstore/ @ArcticLight /types/configurable/ @jewbre /types/confit/ @ethanresnick @@ -564,11 +611,13 @@ /types/connect-livereload/ @SomaticIT /types/connect-modrewrite/ @tinganho /types/connect-mongo/ @Syati +/types/connect-mongodb-session/ @NattapongSiri /types/connect-pg-simple/ @pasieronen /types/connect-redis/ @xstoudi @morcerf /types/connect-slashes/ @samherrmann /types/connect-timeout/ @cyrilschumacher -/types/console-stamp/ @ericbyers +/types/console-log-level/ @ofrobots +/types/console-stamp/ @ericbyers @guusdegraeve /types/consolidate/ @soywiz @theosherry @nicolashenry /types/consul/ @chrootsu /types/content-disposition/ @bomret @@ -585,6 +634,7 @@ /types/cookie-session/ @borislavjivkov /types/cookie-signature/ @lith-light-g /types/cookie_js/ @slawiko +/types/cookiejar/ @paroxp /types/cookies/ @WangZishi @jkeylu @BendingBender /types/copy-paste/ @SrTobi /types/copy-text-to-clipboard/ @BendingBender @@ -615,9 +665,9 @@ /types/correlation-id/ @natemara /types/cors/ @pluma /types/cosmiconfig/v4/ @ozum -/types/cosmiconfig/ @ozum @szeck87 @saadq +/types/cosmiconfig/ @ozum @szeck87 @saadq @jinwoo /types/cote/ @makepost -/types/couchbase/ @maouida +/types/couchbase/ @maouida @fluggo /types/countdown/ @gjuchault /types/counterpart/ @santiagodoldan /types/countries-and-timezones/ @zero51 @@ -645,6 +695,7 @@ /types/crossroads/ @diullei /types/cryptiles/ @awendland /types/crypto-js/ @misak113 +/types/crypto-random-string/ @MrManny /types/cryptojs/ @giabao /types/cson/ @stpettersens /types/csprng/ @winksaville @@ -652,7 +703,10 @@ /types/css/ @ilich /types/css-font-loading-module/ @slikts /types/css-modules/ @NeekSandhu +/types/css-to-style/ @bengry /types/cssbeautify/ @rictic +/types/cssnano/ @odnamrataizem +/types/csso/ @screendriver /types/csurf/ @horiuchi /types/csv-parse/ @davidm77 @obi-jan-kenobi /types/csv-stringify/ @rogierschouten @arjenvanderende @@ -689,12 +743,12 @@ /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-hierarchy/ @tomwanzek @gustavderdrache @borisyankov @denisname /types/d3-hsv/ @arrayjam @denisname /types/d3-interpolate/ @tomwanzek @gustavderdrache @borisyankov /types/d3-path/ @tomwanzek @gustavderdrache @borisyankov /types/d3-polygon/ @tomwanzek @gustavderdrache @borisyankov -/types/d3-quadtree/ @tomwanzek @gustavderdrache @borisyankov +/types/d3-quadtree/ @tomwanzek @gustavderdrache @borisyankov @denisname /types/d3-queue/ @tomwanzek @gustavderdrache @borisyankov /types/d3-random/ @tomwanzek @gustavderdrache @borisyankov /types/d3-request/ @Ledragon @gustavderdrache @borisyankov @tomwanzek @@ -732,24 +786,26 @@ /types/datatables.net-fixedheader/ @szechyjs @Silver-Connection /types/datatables.net-rowgroup/ @maixiu /types/datatables.net-rowreorder/ @baywet +/types/datatables.net-scroller/ @RohdeK /types/datatables.net-select/ @szechyjs /types/date-arithmetic/ @HeeL /types/date.format.js/ @balrob /types/dateformat/ @aicest /types/datejs/ @rupertavery /types/daterangepicker/ @SirMartin @smasala @nertzy +/types/dav/ @ToastHawaii /types/db-migrate-base/ @nickiannone /types/db-migrate-pg/ @nickiannone /types/db.js/ @cgwrench /types/dc/ @hansrwindhoff @mtraynham @MatthiasJobst -/types/dd-trace/ @ColinBradley +/types/dd-trace/ @ColinBradley @alloy /types/deasync/ @Sicilica /types/debessmann/ @vkorehov /types/debounce/ @denis-sokolov /types/debug/ @swook @galtalmor @zamb3zi /types/decamelize/ @samverschueren /types/decay/ @enaeseth -/types/decompress/ @plantain-00 +/types/decompress/ @plantain-00 @jbethke /types/decompress-response/ @DanielRosenwasser /types/decorum/ @dflor003 /types/dedent/ @douglasduteil @@ -772,6 +828,7 @@ /types/delaunator/ @DenisCarriere /types/delay/ @BendingBender /types/deline/ @iarroyo5 +/types/deluge/ @Diasiare /types/denodeify/ @joaomoreno /types/deoxxa-content-type/ @pine613 /types/depcheck/ @ark120202 @@ -787,16 +844,20 @@ /types/detect-indent/ @Bartvds @BendingBender /types/detect-it/ @thomastilkema /types/detect-newline/ @BendingBender +/types/detect-node/ @LogvinovLeon /types/detect-passive-events/ @thomastilkema /types/detect-pointer/ @thomastilkema /types/detect-port/ @lith-light-g /types/detect-touch-events/ @thomastilkema /types/detox/ @TareqElMasri +/types/devexpress-aspnetcore-bootstrap/ @devexpress @skubarenko /types/df-visible/ @Litee /types/dhtmlxgantt/ @mkozhukh @chriscamicas /types/dhtmlxscheduler/ @mkozhukh +/types/di/ @johnjbarton /types/di-lite/ @dcrusader /types/diacritics/ @otociulis +/types/dialogflow/ @dyladan /types/diff/ @vvakame @szdc /types/diff2html/ @rtfpessoa /types/dir-resolve/ @andy-ms @@ -804,16 +865,18 @@ /types/discourse-sso/ @championswimmer /types/dispatchr/ @Ragg- /types/disposable-email-domains/ @geoffreak -/types/dnssd/ @angelmerino +/types/dnssd/ @angelmerino @Maxr1998 /types/doccookies/ @jonegerton /types/dockerode/ @seikho @nlaplante @isac322 @lazarusx @meisenzahl @thegecko /types/docopt/ @giggio /types/doctrine/ @rictic /types/document-promises/ @NotWoods +/types/document-ready/ @Jack-Works /types/documentdb/ @NoelAbrahams @brettferdosi @ctstone @yifanwu /types/documentdb-server/ @lith-light-g /types/documentdb-session/ @DanielRosenwasser /types/dojo/ @vansimke +/types/dom-clipboard-api/ @43081j /types/dom-inputevent/ @diagramatics /types/dom-to-image/ @JipSterk /types/dom4/ @adidahiya @giladgray @@ -847,7 +910,7 @@ /types/dropboxjs/ @Steve-Fenton @xperiments /types/dropkickjs/ @VorobeY1326 /types/dropzone/v4/ @nvivo @outring @renuo @Hikariii -/types/dropzone/ @nvivo @outring @renuo @Hikariii @tedbcsgpro +/types/dropzone/ @nvivo @outring @renuo @Hikariii @tedbcsgpro @dwaxweiler /types/dts-generator/ @mtraynham /types/duplexer2/ @Goldsmith42 /types/duplexer3/ @BendingBender @@ -866,6 +929,7 @@ /types/each/ @misak113 /types/earcut/ @NaridaL /types/easeljs/ @evilangelist +/types/eases/ @MathiasPaumgarten /types/easy-api-request/ @DeadAlready /types/easy-jsend/ @DeadAlready /types/easy-session/ @DeadAlready @@ -873,7 +937,8 @@ /types/easy-xapi/ @DeadAlready /types/easy-xapi-utils/ @DeadAlready /types/ebongarde-root/ @Ebongarde -/types/echarts/ @xieisabug @AntiMoron @liveangela +/types/echarts/ @xieisabug @AntiMoron @liveangela @Ovilia +/types/ecma-proposal-math-extensions/ @ksm2 /types/ecurve/ @mhegazy /types/ed25519/ @erikma /types/ed2curve/ @ffflorian @@ -893,45 +958,52 @@ /types/electron-json-storage/ @stpettersens @nrlquaker @jbw91 /types/electron-notifications/ @djpereira /types/electron-notify/ @djpereira -/types/electron-packager/ @SomaticIT @cortopy @jkleinsc +/types/electron-packager/ @SomaticIT @cortopy @jkleinsc @shiftkey /types/electron-settings/v2/ @leonard-thieu /types/electron-settings/ @icopp @nrlquaker /types/electron-spellchecker/ @unindented /types/electron-store/ @unindented @jsynowiec +/types/electron-unhandled/ @jeremejevs /types/electron-util/ @kputh /types/electron-window-state/ @rhysd /types/electron-winstaller/ @shiftkey @unindented +/types/elegant-spinner/ @danwbyrne /types/element-ready/ @BendingBender /types/element-resize-detector/ @saranshkataria /types/element-resize-event/ @rogierschouten @plgregoire +/types/elementtree/ @dwieeb /types/elm/ @thSoft /types/email-templates/ @cyrilschumacher @gurisko @blankstar85 /types/ember/v1/ @jedmao -/types/ember/ @jedmao @bttf @dwickern @chriskrycho @theroncross @mfeckie @alexlafroscia +/types/ember/ @jedmao @bttf @dwickern @chriskrycho @theroncross @mfeckie @alexlafroscia @mike-north /types/ember-data/ @dwickern @mike-north @chriskrycho /types/ember-feature-flags/ @tansongyang -/types/ember-mocha/ @dwickern +/types/ember-mocha/ @dwickern @simonihmig /types/ember-modal-dialog/ @tansongyang /types/ember-qunit/v2/ @dwickern /types/ember-qunit/ @dwickern +/types/ember-resolver/ @dfreeman /types/ember-test-helpers/ @dwickern /types/ember-testing-helpers/ @chriskrycho +/types/ember__test-helpers/ @dfreeman @jamescdavis /types/emissary/ @vvakame -/types/emoji-mart/ @Kovensky +/types/emoji-mart/ @Kovensky @Nicell +/types/emoji-regex/ @iKBAHT /types/emojione/ @dbrgn /types/empower/ @vvakame /types/emscripten/ @zakki @periklis /types/end-of-stream/ @strax /types/engine.io/ @KentarouTakeda /types/engine.io-client/ @KentarouTakeda -/types/enhanced-resolve/ @e-cloud @onigoetz +/types/enhanced-resolve/ @e-cloud @onigoetz @johnnyreilly /types/enigma.js/ @konne /types/enquire.js/ @screendriver /types/ent/ @rogierschouten /types/entities/ @aliceklipper +/types/env-paths/ @danwbyrne /types/env-to-object/ @MugeSo /types/envify/ @tkQubo -/types/enzyme/ @MarianPalkus @NoHomey @jwbay @huhuanming @MartynasZilinskas @thovden +/types/enzyme/ @MarianPalkus @NoHomey @jwbay @huhuanming @MartynasZilinskas @thovden @hotell /types/enzyme-adapter-react-15/ @tkrotoff /types/enzyme-adapter-react-15.4/ @nali /types/enzyme-adapter-react-16/ @tkrotoff @@ -942,7 +1014,9 @@ /types/epilogue/ @micksatana /types/epub/ @julien-c /types/eq.js/ @stephenlautier +/types/error-subclass/ @fitbit /types/errorhandler/ @santialbo +/types/es-feature-detection/ @Jack-Works /types/es6-collections/ @rbuckton /types/es6-promisify/ @harryshipton @bschlenk /types/es6-shim/ @rbuckton @@ -959,12 +1033,14 @@ /types/esprima/v2/ @teppeis @RReverser /types/esprima/ @teppeis @RReverser @peter-scott /types/esprima-walk/ @tswaters -/types/espruino/ @stasberkov +/types/espruino/ @stasberkov @createdbyjurand /types/esri-leaflet/ @strajuser /types/esri-leaflet-geocoder/ @BendingBender /types/estraverse/ @sanex3339 /types/estree/ @RReverser /types/etag/ @BendingBender +/types/eth-lightwallet/ @LogvinovLeon +/types/ethereum-protocol/ @LogvinovLeon /types/ethereumjs-abi/ @LogvinovLeon /types/ethereumjs-tx/ @LogvinovLeon /types/ethereumjs-util/ @cortopy @@ -979,8 +1055,9 @@ /types/event-stream/ @flcdrg /types/event-to-promise/ @flying-sheep /types/events/ @yasupeke -/types/eventsource/ @scottleedavis +/types/eventsource/ @scottleedavis @afroozeh /types/evernote/ @corps +/types/ex-react-native-i18n/ @maplerichie /types/excel-style-dataformatter/ @SanderDeWaal1992 /types/exceljs/ @rogierschouten @alitaheri /types/execa/ @douglasduteil @BendingBender @borekb @mickdekkers @@ -989,13 +1066,16 @@ /types/exit-hook/ @BendingBender /types/exorcist/ @TeamworkGuy2 /types/expect/ @jmreidy @merrywhether -/types/expect-puppeteer/ @JoshuaKGoldberg +/types/expect-puppeteer/ @JoshuaKGoldberg @tkrotoff /types/expect.js/ @teppeis /types/expectations/ @vvakame +/types/expired-storage/ @intolerance /types/expo/v23/ @KonstantinKai /types/expo/v24/ @KonstantinKai @martynaskadisa @janaagaard75 @ssanchezmarc @fhelwanger /types/expo/v25/ @KonstantinKai @martynaskadisa @janaagaard75 @ssanchezmarc @fhelwanger @umidbekkarimov -/types/expo/ @KonstantinKai @martynaskadisa @janaagaard75 @ssanchezmarc @fhelwanger @umidbekkarimov +/types/expo/v26/ @KonstantinKai @martynaskadisa @janaagaard75 @ssanchezmarc @fhelwanger @umidbekkarimov @tinaroh +/types/expo/ @KonstantinKai @martynaskadisa @janaagaard75 @ssanchezmarc @fhelwanger @umidbekkarimov @moshfeu @prokopcm @tinaroh @binki +/types/expo__status-bar-height/ @dawnmist /types/expo__vector-icons/ @incleaf /types/express/ @borisyankov /types/express-brute/ @cyrilschumacher @@ -1010,7 +1090,7 @@ /types/express-domain-middleware/ @hookclaw /types/express-ejs-layouts/ @erikma /types/express-enforces-ssl/ @kevinstubbs -/types/express-fileupload/ @Naktibalda +/types/express-fileupload/ @Naktibalda @silkimen /types/express-flash/ @iMobs /types/express-flash-2/ @mathsalmi /types/express-flash-notification/ @Mister4Eyes @@ -1031,6 +1111,7 @@ /types/express-partials/ @jt000 /types/express-promise-router/ @wanganjun /types/express-rate-limit/ @cyrilschumacher @makepost +/types/express-redis-cache/ @ajliv /types/express-route-fs/ @kripod /types/express-routemap/ @icopp /types/express-sanitized/ @cjbarth @@ -1039,21 +1120,23 @@ /types/express-socket.io-session/ @AylaJK /types/express-to-koa/ @xiaohanzhang /types/express-unless/ @wokim +/types/express-wechat-access/ @simmons8616 /types/express-winston/ @bricka /types/express-ws/ @ajliv -/types/express-xml-bodyparser/ @noticeMaker +/types/express-xml-bodyparser/ @noticeMaker @macedigital /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/extsprintf/ @AlexHankins /types/eyes/ @brynbellomy /types/ez-plus/ @AndersonFriaca /types/f1/ @neolwc /types/fabric/ @oklemencic @joewashear007 @mrand01 @NotWoods @bmartinson @RogerioTeixeira /types/facebook-instant-games/ @menushka @oyvindjam -/types/facebook-js-sdk/ @amritk +/types/facebook-js-sdk/ @amritk @mahmoudzohdi /types/facebook-pixel/ @noctishsu /types/faker/v3/ @Kuniwak /types/faker/ @bensw @basp @Kuniwak @mattbishop @@ -1099,11 +1182,14 @@ /types/fetch-jsonp/ @tkrotoff /types/fetch-mock/ @asvetliakov @tamird @merrywhether @chrissinclair @matttennison @quentinbouygues /types/fetch.io/ @newraina -/types/ffi/ @loyd +/types/ffi/ @loyd @waitingsong +/types/ffi-napi/ @keerthi16 @KiranNiranjan /types/ffmpeg-static/ @iamstevetran /types/ffprobe-static/ @iamstevetran /types/fhir-js-client/ @rmchndrng /types/fibers/ @soywiz +/types/fibjs/ @richardo2016 +/types/figlet/ @Ailrun /types/figures/ @BendingBender /types/file-exists/ @BendingBender /types/file-saver/ @cyrilschumacher @DaIgeb @chrismbarr @@ -1116,6 +1202,8 @@ /types/finalhandler/ @chrootsu /types/finch/ @DavidSichau /types/find/ @andypyrope +/types/find-parent-dir/ @ikatyang +/types/find-project-root/ @ikatyang /types/find-root/ @Alorel /types/find-up/ @BendingBender /types/find-versions/ @LogvinovLeon @@ -1141,6 +1229,7 @@ /types/flot/ @burlandm @Anticom @admiralsmaster /types/flowjs/ @ryan10132 /types/fluent-ffmpeg/ @tcaesvk @DingWeizhe +/types/flush-write-stream/ @djcsdy /types/flux/ @stkb @GiedriusGrabauskas /types/fluxible/ @xbim /types/fluxible-router/ @xbim @@ -1153,8 +1242,8 @@ /types/forever-agent/ @yavanosta /types/forever-monitor/ @shuntksh @wrboyce /types/forge-di/ @adamcarr -/types/fork-ts-checker-webpack-plugin/ @JounQin /types/form-data/ @soywiz @leonyu @BendingBender +/types/form-serialize/ @tyler-johnson /types/form-serializer/ @flqw /types/form-urlencoded/ @alepee /types/format-duration/ @Roaders @@ -1167,6 +1256,7 @@ /types/foundation/ @borisyankov /types/fpsmeter/ @alampros /types/framebus/ @kbukum +/types/frctl__fractal/ @pmccloghrylaing /types/freedom/ @jpevarnek /types/freeport/ @atd-schubert /types/fresh/ @BendingBender @@ -1190,7 +1280,7 @@ /types/fs-promise/ @tarruda /types/fs-readdir-recursive/ @pscanf /types/fs-readfile-promise/ @mtsg -/types/fscreen/ @joscha +/types/fscreen/ @joscha @terrymun /types/fsevents/ @BendingBender /types/ftdomdelegate/ @dotnetnerd /types/ftp/ @rogierschouten @@ -1199,12 +1289,14 @@ /types/fullpage.js/ @jodiwarren /types/fusioncharts/ @rohitkr @shivarajkv /types/fuzzaldrin/ @mhegazy -/types/fuzzaldrin-plus/ @jeancroy @jkillian +/types/fuzzaldrin-plus/ @jeancroy @jkillian @reyronald /types/fuzzyset/ @lgrignon @narainsagar /types/fuzzyset.js/ @lgrignon @narainsagar /types/fxn/ @charrondev /types/gae.channel.api/ @vvakame +/types/gamedig/ @ivansieder /types/gamequery/ @Laubi +/types/ganache-core/ @LogvinovLeon /types/gandi-livedns/ @xstoudi /types/gapi/ @sgtfrankieboy /types/gapi.analytics/ @gatsbimantico @@ -1344,9 +1436,11 @@ /types/gapi.youtube/ @sgtfrankieboy /types/gapi.youtubeanalytics/ @sgtfrankieboy /types/gaussian/ @scttcper +/types/gc-stats/ @vfernandestoptal /types/geetest/ @plantain-00 /types/gen-readlines/ @CodeAnimal /types/generate-changelog/ @ffflorian +/types/generate-json-webpack-plugin/ @rynclark /types/generic-functions/ @stpettersens /types/generic-pool/ @jerray @wrboyce /types/gently/ @bonnici @@ -1356,7 +1450,9 @@ /types/geokdbush/ @DenisCarriere /types/geometry-dom/ @nakakura /types/geopattern/ @Gaelan +/types/gestalt/ @serranoarevalo /types/get-caller-file/ @ajafff +/types/get-folder-size/ @mszczepanczyk /types/get-node-dimensions/ @vincekovacs /types/get-stdin/ @DanielRosenwasser /types/get-stream/ @douglasduteil @BendingBender @@ -1368,8 +1464,11 @@ /types/gijgo/ @atatanasov /types/giraffe/ @darthapo /types/git/ @vvakame +/types/git-branch/ @rynclark /types/git-config/ @stpettersens /types/git-remote-origin-url/ @janslow +/types/git-url-parse/ @ajafff +/types/github-url-to-object/ @ajafff /types/github-username-regex/ @BehindTheMath /types/gitlab/ @yanqing6628780 @Arylo /types/gl-matrix/ @mattijskneppers @tatchx @nbabanov @auzmartist @surtr-isaz @@ -1382,8 +1481,9 @@ /types/glob-expand/ @vvakame /types/glob-parent/ @mrmlnc /types/glob-stream/ @Bartvds @mrmlnc +/types/glob-to-regexp/ @whatasoda /types/global-tunnel-ng/ @BendingBender -/types/globalize/ @gcastre @afromogli +/types/globalize/ @gcastre @afromogli @bryanforbes /types/globalize-compiler/ @iclanton /types/globby/ @douglasduteil @ikatyang /types/globule/ @durad @@ -1393,9 +1493,9 @@ /types/google-adwords-scripts/ @jafaircl /types/google-apps-script/ @motemen @grant /types/google-apps-script-oauth2/ @dhayab -/types/google-cloud__datastore/ @beaulac -/types/google-cloud__pubsub/ @pheromonez -/types/google-cloud__storage/ @blove @nbperry +/types/google-cloud__datastore/ @beaulac @ogawa0071 @ThomasdenH +/types/google-cloud__pubsub/ @pheromonez @LunaPg @msiviero +/types/google-cloud__storage/ @blove @nbperry @welkie @ogawa0071 /types/google-earth/ @icholy /types/google-images/ @dolanmiu /types/google-libphonenumber/ @leonyu @winfinit @@ -1408,15 +1508,17 @@ /types/google.geolocation/ @vbortone /types/google.picker/ @grapswiz /types/google.visualization/ @danludwig @gmoore-sjcorg @danmana @mlcheng @IvanBisultanov @glebm -/types/googlemaps/ @cgwrench @nertzy @xaolas @mrmcnerd @martincostello @svenkreiss +/types/googlemaps/ @cgwrench @nertzy @xaolas @mrmcnerd @martincostello @svenkreiss @bolatovumar @gauthierm /types/googlemaps.infobubble/ @Dashue -/types/googlepay/ @Fluccioni +/types/googlepay/ @Fluccioni @Radu-Raicea /types/got/ @BendingBender @LinusU @ikokostya /types/graceful-fs/v2/ @Bartvds /types/graceful-fs/ @Bartvds @BendingBender +/types/gradient-string/ @Ailrun /types/graham_scan/ @hberntsen +/types/gramps__rest-helpers/ @claude /types/graphite-udp/ @EricByers -/types/graphql/ @TonyPythoneer @calebmer @intellix @firede @kepennar @freiksenet @IvanGoncharov @DxCx @rportugal @tgriesser @dyst5422 @adnsio @divyenduz @bradzacher +/types/graphql/ @TonyPythoneer @calebmer @intellix @firede @kepennar @freiksenet @IvanGoncharov @DxCx @rportugal @tgriesser @dyst5422 @adnsio @divyenduz @bradzacher @clayne11 /types/graphql-date/ @enaeseth /types/graphql-deduplicator/ @lfades /types/graphql-depth-limit/ @eritikass @@ -1431,7 +1533,7 @@ /types/gravatar-url/ @ivangabriele /types/greasemonkey/ @kotas /types/grecaptcha/v0/ @brentj73 -/types/grecaptcha/ @DethAriel +/types/grecaptcha/ @DethAriel @rafaeltavares /types/gregorian-calendar/ @cwalv /types/grid-styled/ @antonvasin @vittorio @lhache /types/gridfs-stream/ @liorm @@ -1472,6 +1574,7 @@ /types/gulp-if/ @joeskeen /types/gulp-image/ @Aankhen /types/gulp-image-resize/ @Aankhen +/types/gulp-imagemin/ @romain-faust /types/gulp-inject/ @k-kagurazaka /types/gulp-insert/ @shantmarouti /types/gulp-install/ @peterjuras @@ -1479,6 +1582,7 @@ /types/gulp-jasmine/ @andypyrope /types/gulp-jasmine-browser/ @tkrotoff /types/gulp-json-editor/ @peterjuras +/types/gulp-jsonmin/ @romain-faust /types/gulp-jsonminify/ @pine /types/gulp-jspm/ @peterjuras /types/gulp-less/ @k-kagurazaka @@ -1492,6 +1596,7 @@ /types/gulp-plumber/ @joeskeen /types/gulp-protractor/ @tkrotoff /types/gulp-pug/ @remisery +/types/gulp-pug-i18n/ @romain-faust /types/gulp-remember/ @tomc974 /types/gulp-responsive-images/ @aankhen /types/gulp-rev/ @tkrotoff @@ -1500,10 +1605,12 @@ /types/gulp-shell/ @tkqubo /types/gulp-size/ @tkrotoff @remisery /types/gulp-sort/ @joeskeen +/types/gulp-strip-comments/ @Aqours /types/gulp-strip-debug/ @peterjuras /types/gulp-svg-sprite/ @tkqubo /types/gulp-svgmin/ @Aankhen /types/gulp-task-listing/ @joeskeen +/types/gulp-template/ @pe8ter /types/gulp-tsd/ @k-kagurazaka /types/gulp-uglify/ @ChristopherHaws @leonard-thieu /types/gulp-useref/ @tkrotoff @@ -1522,21 +1629,24 @@ /types/hapi/v12/ @jasonswearingen /types/hapi/v15/ @jasonswearingen /types/hapi/v16/ @jasonswearingen @AJamesPhillips -/types/hapi/ @BorntraegerMarc @rafaelsouzaf @jhsimms @SimonSchick +/types/hapi/ @rafaelsouzaf @jhsimms @SimonSchick /types/hapi-auth-basic/ @AJamesPhillips @saboya /types/hapi-auth-jwt2/v7/ @warrenseymour /types/hapi-auth-jwt2/ @warrenseymour @SimonSchick /types/hapi-decorators/ @kenhowardpdx /types/har-format/ @micmro /types/hard-rejection/ @BendingBender +/types/hard-source-webpack-plugin/ @woitechen /types/harmony-proxy/ @remojansen /types/has-ansi/ @BendingBender /types/hash-file/ @HiromiShikata /types/hash-stream/ @BendingBender +/types/hash-sum/ @DanielRosenwasser /types/hasha/ @BendgingBender /types/hasher/ @flyfishMT /types/hashids/ @pocesar /types/hashmap/ @outring +/types/hat/ @tup1tsa /types/haversine/ @screendriver /types/hbs/ @davidm77 /types/hdkey/ @LogvinovLeon @@ -1556,9 +1666,10 @@ /types/hexo-bunyan/ @segayuu /types/hexo-fs/ @segayuu /types/hexo-log/ @segayuu +/types/hexo-util/ @segayuu /types/highcharts/ @damianog @baltie @AlbertOzimek @hanssens /types/highcharts-ng/ @scatcher -/types/highland/ @Bartvds @hgwood @iwllyu @alvis +/types/highland/ @Bartvds @hgwood @iwllyu @alvis @notbobthebuilder /types/highlight.js/ @nikeee @sourrust @joshuakgoldberg /types/hiredis/ @titan /types/history/v2/ @sergey-buturlakin @ngbrown @@ -1569,6 +1680,7 @@ /types/hjson/ @crunchie84 /types/hls.js/ @jgainfort /types/hoek/ @prashaantt +/types/hoist-non-react-statics/ @JounQin /types/holderjs/ @renjfk /types/hooker/ @misak113 /types/hopscotch/ @pimterry @Aurimas1 @@ -1592,9 +1704,12 @@ /types/http-codes/ @mhegazy /types/http-context/ @mtraynham /types/http-errors/ @tkrotoff @BendingBender +/types/http-graceful-shutdown/ @dlee-nvisia +/types/http-link-header/ @screendriver /types/http-proxy/ @SomaticIT @Raigen @DanielMSchmidt /types/http-proxy-agent/ @mrmlnc /types/http-proxy-middleware/ @zebMcCorkle @BendingBender +/types/http-rx/ @L2jLiga /types/http-server/ @plantain-00 /types/http-status/ @misak113 /types/http-string-parser/ @pine613 @@ -1617,10 +1732,12 @@ /types/i18next-browser-languagedetector/v0/ @cyrilschumacher @GiedriusGrabauskas /types/i18next-browser-languagedetector/ @cyrilschumacher @GiedriusGrabauskas /types/i18next-express-middleware/ @cyrilschumacher +/types/i18next-ko/ @dwaxweiler /types/i18next-node-fs-backend/ @cyrilschumacher /types/i18next-sprintf-postprocessor/ @cyrilschumacher /types/i18next-xhr-backend/ @jamuhl @GiedriusGrabauskas /types/i2c-bus/ @101100 +/types/iarna__toml/ @ajafff /types/iban/ @cyrilschumacher /types/ibm-mobilefirst/ @nacho4d /types/ibm_db/ @agov @@ -1635,19 +1752,26 @@ /types/iframe-resizer/ @arminbaljic /types/ignite-ui/ @IgniteUI /types/ignore-styles/ @tai2 -/types/iltorb/ @Alorel +/types/iltorb/ @Alorel @reconbot /types/image-size/ @elisee /types/imagemagick/ @soywiz /types/imagemagick-native/ @horiuchi /types/imagemapster/ @delphinus35 +/types/imagemin/ @romain-faust +/types/imagemin-gifsicle/ @romain-faust +/types/imagemin-jpegtran/ @romain-faust +/types/imagemin-optipng/ @romain-faust +/types/imagemin-svgo/ @romain-faust /types/images/ @DingWeizhe /types/imagesloaded/ @coldacid @apexskier /types/imap/ @psnider /types/imap-simple/ @pushplay /types/imgur-rest-api/ @lukewestby +/types/imperium/ @gaetansenn /types/impress/ @borisyankov /types/in-app-purchase/ @l-jonas /types/in-range/ @DanielRosenwasser +/types/inboxsdk/ @rdoursenaud @amiram /types/incremental-dom/ @basarat @lanthaler @vvakame /types/indent-string/ @mhegazy /types/inert/v4/ @nycdotnet @AJamesPhillips @@ -1659,27 +1783,31 @@ /types/iniparser/ @chrootsu /types/inline-css/ @philipisapain /types/inline-style-prefixer/ @ahz @dpetrezselyova -/types/inquirer/ @tkQubo @ppathan @jouderianjr @bang88 @bitjson @synarque @jrockwood +/types/inquirer/ @tkQubo @ppathan @jouderianjr @bang88 @bitjson @synarque @jrockwood @kwkelly @Ailrun /types/insert-module-globals/ @leonard-thieu /types/insight/ @vvakame /types/integer/ @Morfent -/types/interact.js/ @dduugg @adidahiya @thasner -/types/intercom-client/ @jineshshah36 +/types/intercom-client/ @jineshshah36 @peping /types/intercom-web/ @fongandrew @salbahra @onatm /types/intercomjs/ @spencerwi /types/internal-ip/ @BendingBender /types/intl/ @RagibHasin +/types/intl-locales-supported/ @Slessi /types/intl-messageformat/ @mhegazy +/types/intl-relativeformat/ @mohsen1 /types/intl-tel-input/ @fdnhkj @leonard-thieu /types/into-stream/ @BendingBender +/types/intrinsic-scale/ @shalomdotnet /types/intro.js/ @anahkiasen /types/invariant/ @bennett000 /types/inversify-devtools/ @inversify -/types/ion.rangeslider/v1/ @dduugg -/types/ion.rangeslider/ @sixinli -/types/ioredis/ @plantain-00 @chrisleck @aliarham11 @br8h @shaharmor +/types/ion-rangeslider/v1/ @dduugg @Karel-van-de-Plassche +/types/ion-rangeslider/ @Karel-van-de-Plassche +/types/ioredis/v3/ @plantain-00 @chrisleck @aliarham11 @br8h @shaharmor @palindrom615 @reconbot +/types/ioredis/ @plantain-00 @chrisleck @aliarham11 @br8h @shaharmor @palindrom615 @reconbot /types/iota.lib.js/ @fogsh /types/ip/ @codeanimal +/types/ip-address/ @danwbyrne /types/ip-regex/ @unindented /types/ipcheck/ @bengry /types/irc/ @phillips1012 @@ -1690,6 +1818,7 @@ /types/is-archive/ @mhegazy /types/is-array/ @pine /types/is-binary-path/ @DanielRosenwasser +/types/is-callable/ @nieltg /types/is-ci/ @atd-schubert /types/is-color/ @VitorLuizC /types/is-compressed/ @mhegazy @@ -1709,12 +1838,15 @@ /types/is-relative-url/ @mhegazy /types/is-root/ @mhegazy /types/is-root-path/ @mhegazy +/types/is-running/ @danwbyrne /types/is-scoped/ @postcrafter /types/is-stream/ @me /types/is-svg/ @BendingBender /types/is-text-path/ @mhegazy +/types/is-touch-device/ @screendriver /types/is-url/ @RyotaMurohoshi /types/is-url-superb/ @kryops +/types/is-uuid/ @tedre191 /types/is-windows/ @mizunashi-mana /types/isbn-utils/ @elhaard /types/iscroll/ @csrakowski @devlato @@ -1750,7 +1882,7 @@ /types/jasmine-promise-matchers/ @matthewjh /types/jasmine_dom_matchers/ @devoto13 /types/jasminewd2/ @sjelin -/types/java/ @jimlloyd @hrl7 +/types/java/ @jimlloyd @hrl7 @darti /types/java-applet/ @cyrilschumacher /types/javascript-astar/ @ptlis /types/javascript-bignum/ @sandersn @@ -1761,11 +1893,11 @@ /types/jdataview/ @RReverser /types/jdenticon/ @mtr /types/jest/v16/ @NoHomey @jwbay -/types/jest/ @NoHomey @jwbay @asvetliakov @alexjoverm @epicallan @ikatyang @wsmd @JamieMason @douglasduteil @AhnpGit @joshuakgoldberg @bradleyayers +/types/jest/ @NoHomey @jwbay @asvetliakov @alexjoverm @epicallan @ikatyang @wsmd @JamieMason @douglasduteil @ahnpnl @joshuakgoldberg @UselessPickles @r3nya @hotell @sebald /types/jest-axe/ @JoshuaKGoldberg /types/jest-diff/ @myabc /types/jest-docblock/ @ikatyang -/types/jest-each/ @theutz +/types/jest-each/ @theutz @nickmccurdy /types/jest-environment-puppeteer/ @joshuakgoldberg /types/jest-get-type/ @myabc /types/jest-image-snapshot/ @dawnmist @@ -1775,16 +1907,19 @@ /types/jest-matchers/ @joscha /types/jest-specific-snapshot/ @dawnmist /types/jest-validate/ @ikatyang +/types/jexl/ @m-tomczyk /types/jfs/ @tlaziuk +/types/jira-client/ @KOPTE3 @orta /types/jjv/ @Nemo157 /types/jjve/ @Nemo157 /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 @aconanlai -/types/joi/ @Bartvds @laurence-myers @cglantschnig @DavidBR-SW @GaelMagnan @ralekna @schfkt @rokoroku @dankraus @wanganjun @rafaelkallis @aconanlai +/types/joi/ @Bartvds @laurence-myers @cglantschnig @DavidBR-SW @GaelMagnan @ralekna @schfkt @rokoroku @dankraus @wanganjun @rafaelkallis @aconanlai @zaphoyd /types/joigoose/ @boothwhack /types/josa/ @vichyssoise +/types/jotform-css.js/ @pandawood /types/jpeg-js/ @DanielRosenwasser /types/jpegtran-bin/ @hikoma /types/jpm/ @github-account-because-they-want-it @@ -1795,6 +1930,7 @@ /types/jquery/ @leonard-thieu @borisyankov @choffmeister @Steve-Fenton @Diullei @tasoili @jasons-novaleaf @seanski @Guuz @ksummerlin @basarat @nwolverson @derekcicerone @AndrewGaspar @seikichi @benjaminjackman @s093294 @JoshStrobl @johnnyreilly @DickvdBrink @King2500 /types/jquery-ajax-chain/ @humana-fragilitas /types/jquery-alertable/ @stever +/types/jquery-animate-scroll/ @AndersonFriaca /types/jquery-awesome-cursor/ @zskovacs /types/jquery-backstretch/ @dkulyk /types/jquery-countdown/ @AndersonFriaca @@ -1808,6 +1944,7 @@ /types/jquery-focusable/ @AndersonFriaca /types/jquery-fullscreen/ @bgrieder /types/jquery-galleria/ @rimig +/types/jquery-gray/ @AndersonFriaca /types/jquery-handsontable/ @intelorca /types/jquery-jcrop/ @joeskeen /types/jquery-jsonrpcclient/ @Ty3uK @@ -1817,7 +1954,8 @@ /types/jquery-mask-plugin/ @avidenic @AndersonFriaca /types/jquery-maskmoney/ @AndersonFriaca /types/jquery-match-height/ @kbytesys -/types/jquery-mockjax/ @laszlojakab @vladeck +/types/jquery-mockjax/ @laszlojakab @vladeck @hasaki +/types/jquery-mouse-exit/ @AndersonFriaca /types/jquery-mousewheel/ @xt0rted /types/jquery-next-id/ @AndersonFriaca /types/jquery-notifier/ @allipierre @@ -1828,6 +1966,7 @@ /types/jquery-sticky/ @maixiu /types/jquery-tags-input/ @AndersonFriaca /types/jquery-timeentry/ @marknadig +/types/jquery-toast-plugin/ @viqashussain @astegmaier /types/jquery-toastmessage-plugin/ @joeskeen /types/jquery-truncate-html/ @abraaoalves /types/jquery-urlparam/ @stpettersens @@ -1851,7 +1990,7 @@ /types/jquery.dropotron/ @cyrilschumacher /types/jquery.dynatree/ @fdecampredon /types/jquery.elang/ @sumegizoltan -/types/jquery.fancytree/ @alphaleonis @abedi-ir @Nitecube +/types/jquery.fancytree/ @alphaleonis @abedi-ir @niikoo @Nitecube /types/jquery.filtertable/ @totpero /types/jquery.finger/ @maxackley /types/jquery.flagstrap/ @felipedgarcia @@ -1864,6 +2003,7 @@ /types/jquery.jsignature/ @pjmagee /types/jquery.leanmodal/ @FinelySliced /types/jquery.livestampjs/ @vbortone +/types/jquery.nicescroll/ @Wkalmar /types/jquery.notify/ @evil-shrike /types/jquery.notifybar/ @zaneli /types/jquery.noty/ @kingdango @thelfensdrfer @@ -1932,7 +2072,8 @@ /types/jsend/ @CaselIT /types/jsesc/ @Bartvds /types/jsfl/ @soywiz -/types/jsforce/ @dolanmiu @netes @amphro @tnoonan-salesforce +/types/jsforce/ @dolanmiu @netes @amphro @tnoonan-salesforce @whiteabelincoln +/types/jsgraph/ @rosinbum /types/jshamcrest/ @dharkness /types/jsmockito/ @shiver-me-timbers /types/jsnox/ @stkb @DovydasNavickas @@ -1940,18 +2081,20 @@ /types/json-merge-patch/ @senyaarseniy /types/json-parse-better-errors/ @DanielRosenwasser /types/json-patch/ @vvakame +/types/json-patch-gen/ @RohdeK /types/json-pointer/ @Bartvds /types/json-query/ @mtraynham /types/json-rpc-ws/ @npenin @mlamp -/types/json-schema/ @bcherny @cyrilletuzi @lucianbuzzo +/types/json-schema/ @bcherny @cyrilletuzi @lucianbuzzo @rolandjitsu /types/json-socket/ @svi3c /types/json-stable-stringify/ @mhfrantz /types/json-stringify-safe/ @BendingBender /types/json2csv/ @juanjoDiaz /types/json2md/ @MartynasZilinskas /types/json3/ @NN--- +/types/json5/ @Esemesek /types/jsonata/ @nick121212 -/types/jsoneditor/ @alejo90 +/types/jsoneditor/ @alejo90 @errietta /types/jsoneditor-for-react/ @joshuakgoldberg /types/jsoneditoronline/ @vbortone /types/jsonfile/ @dbowring @@ -1969,12 +2112,13 @@ /types/jsqrcode/ @lordazzi /types/jsrender/ @zakki /types/jsreport-core/ @taoqf +/types/jsreport-html-to-xlsx/v1/ @me /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 @pelotom +/types/jss/ @appsforartists @kof @pelotom @eps1lon /types/jssha/ @randombk @SrTobi /types/jstimezonedetect/ @olamothe /types/jstorage/ @dflor003 @@ -2003,13 +2147,14 @@ /types/karma-chai/ @JayAndCatchFire /types/karma-chai-sinon/ @vasek17 /types/karma-coverage/ @tkrotoff -/types/karma-fixture/ @evictor +/types/karma-fixture/ @evictor @afshawnlotfi /types/karma-jasmine/ @michelsalib /types/karma-viewport/ @karak /types/karma-webpack/ @mtraynham /types/katex/ @mrand01 /types/kcors/ @Xstoudi @izayoiko /types/kdbush/ @DenisCarriere +/types/keen-tracking/ @rui-ferreira /types/kefir/ @AyaMorisawa @HitoriSensei /types/kendo-ui/ @telerik /types/keyboardjs/ @vbortone @piranha771 @@ -2025,7 +2170,7 @@ /types/klaw/ @mceachen /types/klaw-sync/ @shiftkey /types/kms-json/ @sunnyone -/types/knex/ @tkQubo @baronfel @MeLlamoPablo @mastermatt @micksatana @shreyjain1994 +/types/knex/ @tkQubo @MeLlamoPablo @mastermatt @micksatana @shreyjain1994 /types/knex-postgis/ @vesse /types/knockback/ @borisyankov /types/knockout/ @borisyankov @Igorbek @moonpyk @EnableSoftware @BenjaminEckardt @ffMathy @@ -2048,18 +2193,22 @@ /types/ko.plus/ @conficient /types/koa/ @DavidCai1993 @jkeylu @brikou /types/koa-basic-auth/ @Tobias4872 -/types/koa-bodyparser/ @hellopao +/types/koa-better-body/ @danwbyrne +/types/koa-bodyparser/ @hellopao @anup-2s /types/koa-cache-control/ @pe8ter /types/koa-compose/ @jkeylu /types/koa-compress/ @hellopao /types/koa-conditional-get/ @wingsbob +/types/koa-convert/ @danwbyrne +/types/koa-cors/ @romain-faust /types/koa-csrf/ @haskaalo /types/koa-etag/ @wingsbob /types/koa-favicon/ @hellopao /types/koa-generic-session/ @nsimmons @Ragg- /types/koa-hbs/ @jcbmln @mudkipme /types/koa-helmet/ @me -/types/koa-joi-router/ @wingsbob +/types/koa-html-minifier/ @romain-faust +/types/koa-joi-router/ @wingsbob @move-zig /types/koa-json/ @brooklyndev /types/koa-json-error/ @mudkipme /types/koa-logger/ @geoffreak @tlaziuk @@ -2072,23 +2221,26 @@ /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-redis-cache/ @dimamukhin +/types/koa-response-time/ @thorsedeke @sjmcdowall +/types/koa-route/ @migstopheles @jacogr +/types/koa-router/ @hellopao @schfkt @JounQin @romain-faust /types/koa-send/ @pe8ter @tlaziuk /types/koa-session/ @kerol2r20 @tlaziuk /types/koa-session-minimal/ @longztian /types/koa-sslify/ @wingsbob /types/koa-static/ @hellopao @tlaziuk +/types/koa-static-cache/ @JounQin /types/koa-views/ @brooklyndev -/types/koa-webpack/ @malj -/types/koa-websocket/ @me +/types/koa-webpack/ @malj @leebenson @miZyind @tlaziuk +/types/koa-websocket/ @moimael @jacogr @zdila /types/koa-xml-body/ @uwinkelvos /types/koa2-cors/ @xialeistudio -/types/koa__cors/ @Xstoudi @izayoiko @stevehipwell +/types/koa2-session-redis/ @DimaMukhin +/types/koa__cors/ @Xstoudi @izayoiko @stevehipwell @sjmcdowall /types/kolite/ @borisyankov /types/konami.js/ @mareek -/types/kraken-js/ @darkwebdev +/types/kraken-js/ @darkwebdev @micksatana /types/kramed/ @tonicblue /types/kss/ @giladgray /types/kue/ @drudge @amiram @pc-jedi @deerawan @@ -2136,23 +2288,27 @@ /types/leapmotionts/ @logotype /types/legal-eagle/ @j-f1 /types/lerna-get-packages/ @LogvinovLeon -/types/less/ @thasner @pranaygp +/types/less/ @thasner @pranaygp @dwaxweiler /types/less-middleware/ @federicobond /types/less2sass/ @gatimus /types/lestate/ @thelambdaparty /types/level-sublevel/ @basp -/types/leveldown/ @tarruda +/types/leveldown/ @tarruda @LinusU /types/levelup/ @blittle @tarruda /types/leven/ @jmalonzo /types/levenshtein/ @geoffreak /types/libpq/ @Lodin -/types/libxmljs/ @fdecampredon +/types/libsodium-wrappers/ @ffflorian +/types/libxmljs/ @fdecampredon @ComFreek /types/libxslt/ @alejo90 /types/license-checker/ @rogierschouten @unindented /types/lil-uuid/ @Pr1st0n /types/lime-js/ @arthur-xavier /types/line-by-line/ @etomsen /types/line-reader/ @stpettersens +/types/linear-gradient/ @Jack-Works +/types/lingui__core/ @huan086 +/types/lingui__react/ @huan086 /types/linkify-it/ @praxxis /types/listr/ @durad /types/lls/ @borislavjivkov @@ -2163,6 +2319,7 @@ /types/loadware/ @ALyman /types/lobibox/ @itboy87 /types/local-dynamo/ @Sicilica +/types/local-storage/ @tup1tsa /types/localized-countries/ @coderslagoon /types/localizejs-library/ @salbahra /types/locate-path/ @me @@ -2499,12 +2656,15 @@ /types/main-bower-files/ @k-kagurazaka /types/make-dir/ @ikatyang @BendingBender /types/maker.js/ @danmarshall +/types/mali/ @danwbyrne /types/mandrill-api/ @pocesar /types/map-obj/ @BendingBender /types/mapbox/ @anahkiasen /types/mapbox-gl/ @dobrud @patrickr /types/mapbox-gl-leaflet/ @agorshkov23 +/types/mapbox__geo-viewport/ @fnberta /types/mapbox__geojson-area/ @n0nick +/types/mapbox__polyline/ @Kern0 @mklopets /types/mapbox__shelf-pack/ @Perlmint /types/mapnik/ @ipv4sec /types/mapsjs/ @davismj @@ -2513,19 +2673,22 @@ /types/markdown-it/ @rapropos /types/markdown-it-anchor/ @seryl /types/markdown-it-container/ @hronex +/types/markdown-pdf/ @MonsieurMan /types/markdownlint/ @ark120202 -/types/marked/ @worr @BendingBender +/types/marked/ @worr @BendingBender @CrossR /types/marker-animate-unobtrusive/ @viskin /types/markerclustererplus/ @enanox @mxl /types/markitup/ @drillbits +/types/marko/ @darkwebdev /types/maskedinput/ @lokeshpeta /types/masonry-layout/ @m-a-wilson @warriorrocker /types/massive/v3/ @swissspidy @clarenceh /types/massive/ @swissspidy @clarenceh @AmazingTurtle /types/match-media-mock/ @asvetliakov +/types/match-sorter/ @claasahl /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 @samwalshnz +/types/material-ui/ @ngbrown @theigor @alitaheri @herrmanno @DaIgeb @allienna @schlesingermatthias @InsidersByte @artyomsv @dan-j @minodisk @samwalshnz @reggino /types/material-ui-datatables/ @coding2012 /types/material__animation/ @BrentDouglas @ckosti /types/material__auto-init/ @BrentDouglas @ckosti @@ -2557,7 +2720,7 @@ /types/materialize-css/ @huww98 @MaximBalaganskiy @MonizDave @broccoliarchy /types/math3d/ @laszlojakab @jimsmart /types/mathjax/ @rolandzwaga -/types/mathjs/ @siavol @andnp +/types/mathjs/ @siavol @andnp @bradbesserman /types/matter-js/ @piranha771 @hasparus /types/maxmind/ @geoffreak /types/mcustomscrollbar/ @flurg @@ -2570,16 +2733,18 @@ /types/mem-fs/ @MyFoodBag /types/mem-fs-editor/ @MyFoodBag /types/memcached/ @KentarouTakeda -/types/memoize-one/ @karol-majewski +/types/memjs/ @leizongmin +/types/memoize-one/ @karol-majewski @franklixuefei /types/memoizee/ @juanpicado /types/memory-cache/ @jedigo @thieman /types/memory-fs/ @e-cloud /types/memwatch-next/ @cyrilschumacher /types/meow/ @KnisterPeter @praxxis @bitjson /types/merge-descriptors/ @danny8002 -/types/merge-stream/ @k-kagurazaka @daniel-zazula +/types/merge-stream/ @k-kagurazaka @tomxtobin @daniel-zazula @djcsdy /types/merge2/ @tkrotoff @smac89 /types/merkle/ @kerol2r20 +/types/mermaid/ @ggilmore /types/mersenne-twister/ @KentarouTakeda /types/meshblu/ @fnipo /types/mess/ @Nemo157 @@ -2592,12 +2757,13 @@ /types/meteor-prime8consulting-oauth2/ @vangorra /types/meteor-publish-composite/ @vangorra /types/meteor-roles/ @vangorra @mattmm3d -/types/meteor-univserse-i18n/ @mathewmeconry +/types/meteor-universe-i18n/ @mathewmeconry /types/method-override/ @santialbo /types/methods/ @cprecioso /types/metric-suffix/ @davidm77 /types/mfiles/ @avonwyss /types/micro/ @kaoDev +/types/micro-cors/ @CallumDenby /types/micromatch/v2/ @glen-84 /types/micromatch/ @glen-84 @vemoo /types/microrouter/ @mathieudutour @@ -2607,16 +2773,18 @@ /types/microsoftteams/ @WrathOfZombies @jayongg @ydogandjiev /types/microtime/ @vincekovacs /types/milkcocoa/ @odangosan +/types/millisecond/ @xeoneux /types/mime/ @jedigo @dhritzkiv /types/mime-db/ @AJamesPhillips /types/mime-types/ @Perlmint /types/mimos/ @AJamesPhillips /types/mina/ @lhk @mattanja @kant2002 /types/mini-css-extract-plugin/ @JounQin +/types/minimal-bit-array/ @jeremejevs /types/minimatch/ @vvakame @shantmarouti /types/minimist/ @Bartvds @Necroskillz @kamranayub /types/minimist-options/ @ikatyang -/types/minio/ @barinbritva @castorw +/types/minio/ @barinbritva @castorw @loremaps /types/minipass/ @BendingBender /types/mirrorx/ @aaronphy /types/mithril/ @spacejack @andraaspar @isiahmeadows @@ -2630,7 +2798,7 @@ /types/mkpath/ @optical /types/mobx-apollo/ @pselden /types/mobx-devtools-mst/ @pluma -/types/mocha/ @kazimanzurrashid @otiai10 @jt000 @enlight @cspotcode +/types/mocha/ @kazimanzurrashid @otiai10 @jt000 @enlight @cspotcode @1999 /types/mocha-each/ @magnostherobot /types/mocha-phantomjs/ @ErikSchierboom /types/mocha-steps/ @Arylo @@ -2653,13 +2821,17 @@ /types/moment-jalaali/ @alitaheri /types/moment-range/ @Burgov @wilgert @franjuan @MartynasZilinskas /types/moment-round/ @jacobbaskin +/types/moment-shortformat/ @whatasoda /types/moment-strftime2/ @dex4er /types/moment-timezone/ @michelsalib @alanblins +/types/money-math/ @taoqf /types/mongo-sanitize/ @CedricCazin -/types/mongodb/v2/ @CaselIT @alanmarcell @kikar @bitjson @dante-101 @mcortesi -/types/mongodb/ @CaselIT @alanmarcell @kikar @bitjson @dante-101 @mcortesi @EnricoPicci @AJCStriker @julien-c @daprahamian +/types/mongodb/v2/ @CaselIT @alanmarcell @bitjson @dante-101 @mcortesi +/types/mongodb/ @CaselIT @alanmarcell @bitjson @dante-101 @mcortesi @EnricoPicci @AJCStriker @julien-c @daprahamian @denys-bushulyak @BastienAr @sindbach @geraldinelemeur @jishi +/types/mongodb-memory-server/ @dmitryrogozhny +/types/mongodb-uri/ @mernxl /types/mongoose/v4/ @simonxca @horiuchi @sindrenm @lukasz-zak -/types/mongoose/ @horiuchi @sindrenm @lukasz-zak @Alorel @jendrikw @ethanresnick @vologab +/types/mongoose/ @horiuchi @sindrenm @lukasz-zak @Alorel @jendrikw @ethanresnick @vologab @jussikinnula @ondratra @alfirin @idandrd /types/mongoose-auto-increment/ @AyaMorisawa /types/mongoose-deep-populate/ @AyaMorisawa /types/mongoose-geojson-schema/ @bondz @@ -2676,6 +2848,8 @@ /types/morgan/ @staticfunction @pscanf /types/morphdom/ @arvitaly /types/morris.js/ @mareek @sindilevich +/types/mosca/ @GabrielGouv @jerray +/types/motor-hat/ @muntyan /types/mousetrap/ @qcz /types/move-concurrently/ @mgroenhoff /types/moviedb/ @basarat @0x6368656174 @@ -2689,7 +2863,7 @@ /types/msgpack5/ @wokim @heycalmdown /types/msnodesql/ @borisyankov @SomaticIT /types/msportalfx-test/ @julioct -/types/mssql/ @jaminfarr @buzinas @mrrichar @elhaard @pkeuter +/types/mssql/ @jaminfarr @buzinas @mrrichar @elhaard @pkeuter @mcdado /types/mu2/ @jedigo /types/muicss/ @samuelneff /types/multer/ @jt000 @DavidBR-SW @mxl @hyunseob @@ -2707,15 +2881,18 @@ /types/murmurhash-js/ @cvle /types/murmurhash3js/ @dlee-nvisia /types/musicmetadata/ @Xstoudi -/types/mustache/ @markashleybell +/types/mustache/ @markashleybell @manuth /types/mv/ @nenadalm /types/mysql/ @wjohnsto @kacepe @kpping @jdmunro /types/mz/ @ThomasHickman -/types/n3/ @phreed +/types/n3/ @phreed @rubensworks /types/named-regexp-groups/ @jewbre +/types/named-routes/ @qqilihq /types/nano/ @timjacobi @vincekovacs /types/nanoajax/ @nathancahill -/types/nanoid/ @bash +/types/nanoevents/ @nju33 +/types/nanographql/ @cdaringe +/types/nanoid/ @bash @fadezhanger /types/nanomsg/ @titan /types/nanoscroller/ @zihark17 /types/nanp/ @karn @@ -2740,15 +2917,17 @@ /types/negotiator/ @BendingBender /types/neo4j/ @cyrilschumacher /types/nes/ @NoHomey @saboya +/types/nested-error-stacks/ @woutervh- /types/net-keepalive/ @hertzg /types/netmask/ @mhfrantz /types/network-interfaces/ @anderswestberg /types/new-relic-browser/ @renehamburger @piotrkubisa /types/newline-remove/ @OpenByteDev +/types/newman/ @LogvinovLeon /types/newrelic/ @mastermatt /types/nexpect/ @vvakame -/types/next/ @dru89 @brikou -/types/next-redux-wrapper/ @stevegeek +/types/next/ @dru89 @brikou @jthegedus @resir014 @scottdj92 @joaovieira +/types/next-redux-wrapper/ @stevegeek @Jungwoo-An /types/ng-command/ @stephenlautier /types/ng-cordova/ @ksachdeva /types/ng-dialog/ @stephenlautier @@ -2775,26 +2954,27 @@ /types/nightwatch/ @rkavalap @schlesiger /types/nivo-slider/ @AndersonFriaca /types/noble/ @swook @shantanubhadoria @lukel99 @bioball @keton @thegecko -/types/nock/ @bonnici @horiuchi @afharo @mastermatt @damour +/types/nock/ @bonnici @horiuchi @afharo @mastermatt @damour @paambaati /types/nodal/ @charrondev -/types/node/v4/ @eps1lon -/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/v4/ @eps1lon @Archcry +/types/node/v6/ @WilcoBakker @inlined @eps1lon @Alorel @KSXGitHub @Archcry +/types/node/v7/ @parambirs @tellnes @WilcoBakker @eps1lon @KSXGitHub @Archcry +/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 @r3nya +/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 @r3nya @eyqs +/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 @r3nya @ZaneHannanAU @ThomasdenH @eyqs @matthieusieben /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-cron/ @maximelkin +/types/node-dijkstra/ @nokutu /types/node-dir/ @panuhorsmalahti /types/node-dogstatsd/ @chrisbobo /types/node-emoji/ @jonestristand @styu /types/node-fetch/ @torstenwerner @nikcorg /types/node-fibers/ @caryhaynie -/types/node-forge/ @westy92 @flynetworks @a-k-g @rafal2228 +/types/node-forge/ @westy92 @flynetworks @a-k-g @rafal2228 @beenotung /types/node-gcm/ @horiuchi /types/node-geocoder/ @rosek86 /types/node-getopt/ @kcauchy @@ -2802,9 +2982,10 @@ /types/node-horseman/ @apratheek /types/node-hue-api/ @fjmorel /types/node-int64/ @x3cion @kevin-greene-ck -/types/node-ipc/ @arvitaly +/types/node-ipc/ @arvitaly @gjurgens /types/node-jsfl-runner/ @mrand01 /types/node-json-db/ @kuzn-ilya +/types/node-memwatch/ @Kroisse /types/node-mysql-wrapper/ @kataras /types/node-notifier/ @tkQubo /types/node-polyglot/ @timjk @@ -2817,9 +2998,10 @@ /types/node-slack/ @tkQubo /types/node-snap7/ @heilingbrunner /types/node-sprite-generator/ @Perlmint +/types/node-ssdp/ @OrionNebula /types/node-static/ @Morfent /types/node-statsd/ @alexturek @convoyinc -/types/node-telegram-bot-api/ @ammuench @agadar @Dabolus @Kallu609 +/types/node-telegram-bot-api/ @ammuench @agadar @Dabolus @Kallu609 @XC-Zhang /types/node-uuid/ @jeffmay /types/node-validator/ @kengorab /types/node-vault/ @YuJianrong @@ -2827,11 +3009,13 @@ /types/node-xmpp-client/ @PJakcson /types/node-xmpp-core/ @PJakcson /types/node-zookeeper-client/ @plantain-00 @jessezhang91 +/types/node-zopfli/ @Alorel +/types/node-zopfli-es/ @Alorel /types/node_redis/ @borisyankov /types/nodecredstash/ @migstopheles -/types/nodegit/ @dolanmiu +/types/nodegit/ @dolanmiu @tniessen /types/nodemailer/v3/ @rogierschouten -/types/nodemailer/ @rogierschouten @dex4er +/types/nodemailer/ @rogierschouten @dex4er @bioball /types/nodemailer-direct-transport/ @rogierschouten /types/nodemailer-mailgun-transport/ @otociulis /types/nodemailer-pickup-transport/ @psnider @@ -2857,14 +3041,15 @@ /types/npm/ @SomaticIT /types/npm-package-arg/ @mgroenhoff /types/npm-packlist/ @ajafff -/types/npmlog/ @DanielMSchmidt +/types/npmlog/ @DanielMSchmidt @littlepiggy03 /types/ns-api/ @Archcry /types/nslog/ @unindented /types/nsqjs/ @cezaryrk +/types/nuka-carousel/ @Romic /types/number-is-nan/ @mhegazy /types/number-to-words/ @frederickfogerty -/types/numeral/ @vbortone -/types/numjs/ @taoqf +/types/numeral/ @vbortone @BehindTheMath @klujanrosas +/types/numjs/ @taoqf @mattmm3d /types/nunjucks/ @RubenSlabbert /types/nunjucks-date/ @kruncher /types/nvd3/ @PjMitchell @@ -2873,29 +3058,34 @@ /types/o.js/ @IceOnFire @bradzacher @janhommes @jcchalte /types/oauth/ @nonAlgebraic /types/oauth.js/ @nobuoka -/types/oauth2-server/ @vangorra @cirick +/types/oauth2-server/ @vangorra @cirick @d-fischer /types/oauth2orize/ @wokim @heycalmdown @stevehipwell /types/obelisk.js/ @bdrupieski +/types/obj-file-parser/ @benc-uk /types/object-assign/ @chbrown /types/object-diff/ @rogierschouten /types/object-hash/ @misak113 /types/object-inspect/ @demurgos +/types/object-keys/ @VitorLuizC /types/object-map/ @wolfgang42 /types/object-merge/ @OpenByteDev /types/object-path/ @pocesar /types/object-refs/ @3fd +/types/object.getownpropertydescriptors/ @VitorLuizC /types/oblo-util/ @Oblosys /types/oboe/ @optical /types/observe-js/ @herrmanno /types/oclazyload/ @rolandzwaga /types/odata/ @janhommes @jcchalte /types/ofe/ @Morfent -/types/office-js/ @OfficeDev @LanceEA @Zlatkovsky @kbrandl @Rick-Kirkham +/types/office-js/ @OfficeDev @LanceEA @Zlatkovsky @kbrandl @Rick-Kirkham @AlexJerabek @ElizabethSamuel-MSFT /types/offline-js/ @cgwrench /types/oibackoff/ @geoffreak /types/oidc-token-manager/ @rosieks +/types/oja/ @buffcode /types/okta__okta-vue/ @innovation-team /types/ol/ @yairtawil +/types/omggif/ @ffflorian /types/on-finished/ @czechboy0 @BendingBender /types/on-headers/ @jjeffery @BendingBender /types/once/ @denis-sokolov @BendingBender @@ -2910,7 +3100,8 @@ /types/openjscad/ @danmarshall /types/openlayers/v2/ @bolhovsky /types/openlayers/v3/ @osechet @matthiasdailey-ccri -/types/openlayers/ @osechet @wb14123 @ailrun @mylen @iamthechad @danmana @yairtawil @pierremarc @hauke96 +/types/openlayers/ @osechet @wb14123 @ailrun @mylen @iamthechad @danmana @yairtawil @pierremarc @hauke96 @gberaudo +/types/openpgp/ @errietta /types/openstack-wrapper/ @sanjaymadane /types/opentok/ @westy92 @CatGuardian /types/opentype.js/ @danmarshall @edzis @@ -2918,7 +3109,7 @@ /types/optics-agent/ @crevil /types/optimist/ @soywiz @chbrown /types/optimize-css-assets-webpack-plugin/ @odnamrataizem -/types/ora/v0/ @screendriver +/types/ora/v0/ @basarat @screendriver /types/ora/ @basarat @screendriver @BendingBender @azasypkin /types/oracledb/ @Bigous /types/orchestrator/ @tkQubo @TeamworkGuy2 @@ -2933,12 +3124,14 @@ /types/osmtogeojson/ @tkqubo /types/osrm/ @DenisCarriere /types/otplib/ @renjfk +/types/overwatch-api/ @JoshuaHall /types/owasp-password-strength-test/ @stephtr /types/owl.carousel/ @igorissen @KennethanCeyer /types/owlcarousel/ @dpiatkowski /types/p-all/ @BendingBender /types/p-any/ @BendingBender /types/p-cancelable/ @BendingBender +/types/p-catch-if/ @LinusU /types/p-debounce/ @BendingBender /types/p-defer/ @SamVerschueren /types/p-do-whilst/ @BendingBender @@ -2946,7 +3139,7 @@ /types/p-event/ @BendingBender /types/p-every/ @BendingBender /types/p-lazy/ @BendingBender -/types/p-limit/ @BendingBender +/types/p-limit/ @BendingBender @LinusU /types/p-loading/ @renjfk /types/p-locate/ @BendingBender /types/p-log/ @BendingBender @@ -2965,18 +3158,20 @@ /types/p-tap/ @BendingBender /types/p-throttle/ @BendingBender /types/p-timeout/ @BendingBender -/types/p-try/ @BendingBender +/types/p-try/ @BendingBender @LinusU /types/p-wait-for/ @BendingBender /types/p-whilst/ @BendingBender /types/p2/ @clark-stevenson /types/package-json/ @jinwoo /types/packery/ @piraveen @hanssens /types/pad/ @mhegazy +/types/page/ @43081j /types/paho-mqtt/ @amikhalev /types/pako/ @cappellin @calebegg /types/pangu/ @plantain-00 -/types/papaparse/ @torpedro @rainshen49 @jfloff @johnnyreilly -/types/paper/ @clark-stevenson @Xakaloz +/types/papaparse/ @torpedro @rainshen49 @jfloff @johnnyreilly @albertorestifo @BehindTheMath @3af +/types/paper/ @clark-stevenson @Xakaloz @sebaswebdev @rfried +/types/parallel-transform/ @djcsdy /types/paralleljs/ @jbaldwin /types/parcel-env/ @fathyb /types/parent-package-json/ @sgmccli @@ -2985,6 +3180,7 @@ /types/parity-poe/ @leovujanic /types/parse/ @dpoetzsch @jaeggerr @flavionegrao @wesleygrimes @owsas /types/parse-git-config/ @leonard-thieu @deltaidea +/types/parse-github-url/ @ajafff /types/parse-glob/ @glen-84 /types/parse-json/ @mrmlnc /types/parse-link-header/ @zelein @@ -2993,16 +3189,25 @@ /types/parse-torrent/ @niieani @tlaziuk /types/parse-torrent-file/ @tlaziuk /types/parse-unit/ @Jack-Works +/types/parse5/v4/ @inikulin @andnp +/types/parse5/ @inikulin +/types/parse5-htmlparser2-tree-adapter/ @inikulin +/types/parse5-parser-stream/ @inikulin +/types/parse5-plain-text-conversion-stream/ @inikulin +/types/parse5-sax-parser/ @inikulin +/types/parse5-serializer-stream/ @inikulin +/types/parsecurrency/ @cristianrgreco /types/parseurl/ @bomret -/types/parsimmon/ @Bartvds @mizunashi-mana @bcherny @bvanreeven @leonard-thieu +/types/parsimmon/ @Bartvds @mizunashi-mana @bcherny @bvanreeven @leonard-thieu @MrJohz /types/passport/ @horiuchi @enaeseth @theigor @tlaziuk @danielpa9708 /types/passport-anonymous/ @0x6368656174 /types/passport-beam/ @AtlasDev +/types/passport-cognito/ @mbutsykin /types/passport-discord/ @kzay /types/passport-facebook/ @staticfunction @lucasmacosta /types/passport-facebook-token/ @rmartone @mrand01 /types/passport-github/ @yasupeke -/types/passport-github2/ @yasupeke @mthmulders +/types/passport-github2/ @yasupeke @mthmulders @codepunkt /types/passport-google-oauth/ @staticfunction /types/passport-google-oauth2/ @bluehatbrit /types/passport-http/ @krizalys @tlaziuk @cjbarth @@ -3015,7 +3220,7 @@ /types/passport-oauth2/ @pasieronen @WangZishi /types/passport-oauth2-client-password/ @akaNightmare /types/passport-remember-me-extended/ @AylaJK -/types/passport-saml/ @cjbarth +/types/passport-saml/ @cjbarth @dassennato /types/passport-steam/ @kzay /types/passport-strategy/ @liorm /types/passport-twitter/ @staticfunction @@ -3034,6 +3239,7 @@ /types/paypal-cordova-plugin/ @Justin-Credible /types/paypal-rest-sdk/ @trainerbill /types/pbf/ @cschwarz +/types/pbkdf2/ @timonegk /types/pdfjs-dist/ @jbaldwin /types/pdfkit/ @erichillah /types/pdfmake/ @m1llen1um @radziksh @@ -3043,6 +3249,7 @@ /types/peerjs/ @nakakura /types/pegjs/ @vvakame @SrTobi @siegebell /types/pem/ @tony19 @DethAriel +/types/pem-jwk/ @alessiopcc /types/persona/ @Nycto /types/pet-finder-api/ @me /types/pg/v6/ @pspeter3 @@ -3050,6 +3257,7 @@ /types/pg-ears/ @bradleyayers /types/pg-escape/ @khell /types/pg-format/ @zopf +/types/pg-large-object/ @mateuszkrupa /types/pg-pool/ @aleung /types/pg-query-stream/ @asmarques /types/pg-types/ @waratuman @@ -3071,19 +3279,21 @@ /types/pick-weight/ @rsxdalv /types/pickadate/ @theodorejb @leonard-thieu /types/picturefill/ @alaz -/types/pidusage/ @cyrilschumacher +/types/pidusage/ @cyrilschumacher @mx601595686 /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 @screendriver +/types/pino/ @psnider @BendingBender @screendriver @paambaati /types/pino-multi-stream/ @JakeGinnivan /types/pinterest-sdk/ @adamburmister /types/pinyin/ @wanganjun /types/piwik-tracker/ @lbguilherme /types/pixelmatch/ @iamolegga +/types/pixi.js/ @clark-stevenson +/types/pkg-conf/ @jorgegonzalez /types/pkg-dir/ @NK-WEB-Git /types/pkijs/ @microshine /types/platform/ @JakeH @@ -3091,17 +3301,19 @@ /types/playerframework/ @ricardosabino /types/playmusic/ @nickp10 /types/pleasejs/ @nakakura -/types/plotly.js/ @chrisgervang @martinduparc @frederikaalund @taoqf @Dadstart @szechyjs @MercifulCode @soorajpudiyadath +/types/plotly.js/ @chrisgervang @martinduparc @frederikaalund @taoqf @Dadstart @szechyjs @MercifulCode @soorajpudiyadath @jonfreedman @meganrm /types/plugapi/ @BNedry /types/plugin-error/ @rogierschouten /types/plupload/ @patrickbussmann -/types/pluralize/ @ukyo +/types/pluralize/ @ukyo @karol-majewski /types/png-async/ @kanreisa +/types/png.js/ @ffflorian /types/pngjs/ @jason0x43 /types/pngquant-bin/ @hikoma /types/podcast/ @nikeee /types/podium/ @AJamesPhillips /types/point-in-polygon/ @dyst5422 @kogai +/types/polyfill-service/ @Alorel /types/polylabel/ @DenisCarriere /types/polyline/ @Kern0 /types/polymer/ @lgrignon @laco0416 @@ -3123,12 +3335,12 @@ /types/pouchdb-adapter-websql/ @spaulg @geppy @fredgalvao /types/pouchdb-browser/ @spaulg @geppy @fredgalvao /types/pouchdb-core/ @spaulg @trubit @geppy @fredgalvao @TobiasBales @tiangolo -/types/pouchdb-find/ @trubit +/types/pouchdb-find/ @trubit @tiangolo /types/pouchdb-http/ @spaulg @geppy @fredgalvao /types/pouchdb-mapreduce/ @spaulg @geppy @fredgalvao /types/pouchdb-node/ @spaulg @geppy @fredgalvao /types/pouchdb-replication/ @trubit @tiangolo -/types/pouchdb-upsert/ @keithdmoore @hotforfeature @apolkingg8 +/types/pouchdb-upsert/ @keithdmoore @hotforfeature @apolkingg8 @zamb3zi /types/power-assert/ @vvakame /types/power-assert-formatter/ @vvakame /types/powerbi-visuals-tools/ @zBritva @Microsoft @@ -3137,12 +3349,13 @@ /types/preloadjs/ @endel /types/prelude-ls/ @AyaMorisawa /types/prettier/ @ikatyang -/types/pretty-bytes/ @plantain-00 +/types/pretty-bytes/v4/ @plantain-00 +/types/pretty-bytes/ @plantain-00 @danielasy /types/pretty-format/ @ikatyang -/types/pretty-ms/ @BendingBender +/types/pretty-ms/ @BendingBender @ocboogie /types/printf/ @AluisioASG /types/priorityqueuejs/ @geoffreak -/types/prismic-dom/ @nickw444 +/types/prismic-dom/ @nickw444 @sbilstein /types/prismjs/ @eriklieben @andrewiggins @mmiszy /types/private-ip/ @coderslagoon /types/procfs-stats/ @cyrilschumacher @@ -3153,12 +3366,15 @@ /types/proj4leaflet/ @BendingBender /types/project-oxford/ @scsouthw /types/promise-dag/ @OSjoerdWie +/types/promise-ftp/ @coolreader18 +/types/promise-ftp-common/ @coolreader18 /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-sftp/ @coolreader18 /types/promise-timeout/ @Aankhen /types/promise.prototype.finally/ @slavik57 @BendingBender /types/promised-temp/ @rokadias @@ -3167,7 +3383,7 @@ /types/prompt-sync/ @MugeSo /types/prompt-sync-history/ @MugeSo /types/promptly/ @danrspencer -/types/prop-types/ @DovydasNavickas +/types/prop-types/ @DovydasNavickas @ferdaber /types/proper-lockfile/ @qlonik /types/properties-reader/ @Goldsmith42 /types/prosemirror-collab/ @bradleyayers @davidka @timjb @patsimm @@ -3206,7 +3422,7 @@ /types/pumpify/ @JustinBeckwith @aoberoi /types/pupa/ @nju33 /types/puppeteer/v0/ @marvinhagemeister @cdeutsch -/types/puppeteer/ @marvinhagemeister @cdeutsch @jwbay +/types/puppeteer/ @marvinhagemeister @cdeutsch @ksm2 /types/pure-render-decorator/ @seansfkelley /types/purl/ @danfma /types/pusher-js/ @tkqubo @cainlevy @@ -3217,27 +3433,30 @@ /types/q-io/ @Bartvds /types/q-retry/ @vilic /types/qhistory/ @Kovensky +/types/qiniu-js/ @taoqf /types/qlik/ @RubenSlabbert @AginicX /types/qlik-engineapi/ @konne /types/qlik-visualizationextensions/ @konne /types/qr-image/ @taoqf +/types/qrcode/ @plantain-00 /types/qrcode.react/ @mleko /types/qs/ @RWander @leonyu @tehbelinda @zyml @artursvonda @CarlosBonetti /types/qtip2/ @Seltzer @leonard-thieu -/types/query-string/ @SamVerschueren @tkrotoff @huhuanming @MadaraUchiha +/types/query-string/ @SamVerschueren @tkrotoff @huhuanming @MadaraUchiha @shssoichiro +/types/querystringify/ @ilich /types/quick-lru/ @BendingBender -/types/quill/ @sumitkm @guillaume-ro-fr @43081j +/types/quill/ @sumitkm @guillaume-ro-fr @43081j @AnielloFalcone @mhamri /types/quixote/ @greybax /types/qunit/v1/ @diullei -/types/qunit/ @waratuman +/types/qunit/ @waratuman @mike-north /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/radium/ @alexgorbatchev @nupplaphil @asvetliakov /types/radius/ @codeanimal -/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/ramda/ @donnut @tycho01 @mdekrey @mrdziuban @sbking @afharo @teves-castro @1M0reBug @hojberg @samsonkeung @angeloocana @raynerd @googol @moshensky @ethanresnick @leighman @CaptJakk @deftomat @deptno @blimusiek @biern @rayhaneh @rgm /types/random-js/ @pistacchio /types/random-number/ @OpenByteDev /types/random-seed/ @endel @@ -3265,47 +3484,56 @@ /types/rbac-a/ @tlaziuk /types/rc/ @DanielRosenwasser /types/rc-select/ @DenisTirilis -/types/rc-slider/ @mantasmarcinkus @mattoni @paustint @j-fro +/types/rc-slider/ @mantasmarcinkus @mattoni @paustint @j-fro @Deanna2 /types/rc-tree/ @johnnyreilly @Methuselah96 /types/rcloader/ @panuhorsmalahti /types/rdf-data-model/ @rubensworks /types/rdf-js/ @rubensworks +/types/rdflib/ @cenotelie +/types/re-base/ @jordandrako +/types/reach__router/ @kingdaro /types/react/v15/ @bbenezech @pzavolinsky @digiguru @ericanderson @morcerf @tkrotoff @DovydasNavickas @onigoetz -/types/react/ @johnnyreilly @bbenezech @pzavolinsky @digiguru @ericanderson @morcerf @tkrotoff @DovydasNavickas @onigoetz @theruther4d @guilhermehubner @ferdaber @jrakotoharisoa +/types/react/ @johnnyreilly @bbenezech @pzavolinsky @digiguru @ericanderson @morcerf @tkrotoff @DovydasNavickas @onigoetz @theruther4d @guilhermehubner @ferdaber @jrakotoharisoa @pascaloliv @hotell @franklixuefei +/types/react-adal/ @dkorolev1 +/types/react-albus/ @sseppola /types/react-alert/ @ssyrell /types/react-alice-carousel/ @endigo +/types/react-amplitude/ @rayzor65 /types/react-animate-on-scroll/ @ralbuque /types/react-app/ @prakarshpandey /types/react-aria-menubutton/ @forabi @crohlfs +/types/react-aria-modal/ @forabi /types/react-autocomplete/ @lstanden /types/react-autosuggest/ @nicolas-schmitt @pjo256 @robessog @tbayne @cdeutsch @rosskevin /types/react-avatar-editor/ @diogocorrea @gabsprates -/types/react-beautiful-dnd/ @varHarrie @bradleyayers @paustint -/types/react-big-calendar/ @piotrwitek @paustint @pikpok +/types/react-beautiful-dnd/ @varHarrie @bradleyayers @paustint @marknelissen +/types/react-big-calendar/ @piotrwitek @paustint @pikpok @eps1lon /types/react-body-classname/ @mhegazy -/types/react-bootstrap/ @walkerburgin @vsiao @danilojrr @Batbold-Gansukh @octatone @chengsieuly @mretolaza @katbusch @vitosamson @LKay @aaronbeall @jrakotoharisoa +/types/react-bootstrap/ @walkerburgin @vsiao @danilojrr @Batbold-Gansukh @octatone @chengsieuly @mretolaza @katbusch @vitosamson @LKay @aaronbeall @jrakotoharisoa @r3nya @t49tran /types/react-bootstrap-date-picker/ @LKay @ssi-hu-antal-bodnar /types/react-bootstrap-daterangepicker/ @ianks /types/react-bootstrap-table/v2/ @flaub @alelode @UJosue10 /types/react-bootstrap-table/ @flaub @alelode @UJosue10 @dawnmist @Ogglas -/types/react-bootstrap-typeahead/ @Guymestef @radziksh +/types/react-bootstrap-typeahead/ @Guymestef @radziksh @PaitoAnderson /types/react-breadcrumbs/ @KostyaEsmukov /types/react-breadcrumbs-dynamic/ @mitsuruog /types/react-broadcast/ @kandros /types/react-burger-menu/ @radziksh /types/react-calendar-heatmap/ @9renpoto -/types/react-calendar-timeline/ @radziksh +/types/react-calendar-timeline/ @radziksh @acemac /types/react-cartographer/ @trevonmckay /types/react-circular-progressbar/ @lstanden /types/react-click-outside/ @screendriver /types/react-codemirror/ @velveret @rudi-c +/types/react-coinhive/ @sktbcbbs /types/react-collapse/ @Kimahriman /types/react-collapsible/ @knegusen /types/react-color/ @LKay @markspolakovs @mntdn /types/react-confirm/ @santiagodoldan /types/react-content-loader/ @alaatm @samwalshnz /types/react-copy-to-clipboard/ @mabels @BernabeFelix -/types/react-credit-cards/ @vstrimaitis +/types/react-copy-write/ @samhh @davej +/types/react-credit-cards/ @vstrimaitis @olefrank /types/react-cropper/ @stepancar /types/react-css-modules/ @KostyaEsmukov @skirsdeda /types/react-css-transition-replace/ @LKay @@ -3315,21 +3543,20 @@ /types/react-data-grid/ @SupernaviX @KieranPeat @martinnov92 /types/react-datagrid/ @stephenjelfs /types/react-date-range/ @Junbong -/types/react-datepicker/ @radziksh @andrewBalekha @smrq @Rogach @royxue @KoalaHuman +/types/react-datepicker/ @radziksh @andrewBalekha @smrq @Rogach @royxue @KoalaHuman @seansfkelley /types/react-daterange-picker/ @uncovertruth @MartynasZilinskas -/types/react-dates/ @Artur-A +/types/react-dates/ @ArturAmpilogov @NathanNZ /types/react-daum-postcode/ @Sa-ryong -/types/react-dnd-html5-backend/ @oizie -/types/react-dnd-multi-backend/ @dawnmist -/types/react-dnd-test-backend/ @gustavohenke -/types/react-dnd-touch-backend/ @mleko @dawnmist +/types/react-dnd-multi-backend/ @dawnmist @beeequeue +/types/react-dnd-touch-backend/ @mleko @dawnmist @beeequeue /types/react-document-title/ @cleverguy25 /types/react-dom/v15/ @MartynasZilinskas /types/react-dom/ @MartynasZilinskas @theruther4d /types/react-dom-factories/ @jgoz +/types/react-dragtastic/ @nscarcella /types/react-dropzone/v2/ @matdube @LynxEyes @goblindegook @benbayard /types/react-dropzone/v3/ @matdube @LynxEyes @goblindegook @benbayard @LKay -/types/react-dropzone/ @matdube @LynxEyes @goblindegook @benbayard @LKay @codeaid @jurosh +/types/react-dropzone/ @matdube @LynxEyes @goblindegook @benbayard @LKay @codeaid @jurosh @ekilah /types/react-dynamic-number/ @eugrdn /types/react-easy-chart/ @danzel /types/react-event-listener/ @asvetliakov @@ -3338,6 +3565,7 @@ /types/react-faux-dom/ @alitaheri @cleverguy25 @deviousm @hanai /types/react-file-input/ @dmitryrogozhny /types/react-file-reader-input/ @dmitryrogozhny @alitaheri +/types/react-flag-icon-css/ @jonfreedman /types/react-flags-select/ @senukartur /types/react-flatpickr/ @begincalendar /types/react-flex/ @pushplay @@ -3346,6 +3574,7 @@ /types/react-form/v1/ @cameron-mcateer /types/react-form/ @cameron-mcateer @TiuSh /types/react-foundation/ @danielearwicker +/types/react-gateway/ @jsonunger /types/react-geosuggest/ @brmenchl /types/react-google-maps-loader/ @vasilysn /types/react-google-places-suggest/ @vasilysn @@ -3353,17 +3582,19 @@ /types/react-gravatar/ @invliD /types/react-grid-layout/ @abirkholz @alitaheri @ZheyangSong @andrewhathaway /types/react-hamburger-menu/ @grzesie2k +/types/react-hammerjs/ @jsonunger /types/react-helmet/v4/ @evanbb @isman-usoh /types/react-helmet/ @evanbb @isman-usoh @lith-light-g @sammkj @yuit /types/react-helmet-async/ @forabi -/types/react-highlight-words/ @mhegazy +/types/react-highlight/ @joshuakgoldberg +/types/react-highlight-words/ @mhegazy @diogodca /types/react-highlighter/ @oizie /types/react-holder/ @isman-usoh /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-i18next/v4/ @GiedriusGrabauskas @netanelgilad +/types/react-i18next/ @GiedriusGrabauskas @chnoch @beheh @whtsky /types/react-icon-base/ @apare @LKay /types/react-icons/ @apare @johnnyreilly @LKay /types/react-image-crop/ @danielasy @@ -3371,26 +3602,31 @@ /types/react-imageloader/ @stephenjelfs /types/react-infinite/ @rhysd /types/react-infinite-calendar/ @christianchown +/types/react-infinite-scroll-component/ @sroy3 @burtek @davidkevork /types/react-infinite-scroller/ @Lapanti @psrebniak +/types/react-input-autosize/ @jsonunger @franklixuefei /types/react-input-calendar/ @stepancar -/types/react-input-mask/ @apare +/types/react-input-mask/v1/ @apare +/types/react-input-mask/ @apare @dima7a14 /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-js-pagination/ @netoisc /types/react-json/ @spielc /types/react-json-pretty/ @LKay /types/react-json-tree/ @gnestor -/types/react-jsonschema-form/ @iamdanfox @sirreal @iplus26 @KurtPreston +/types/react-jsonschema-form/ @iamdanfox @sirreal @iplus26 @KurtPreston @phbou72 @LucianBuzzo /types/react-lazyload/ @m0a +/types/react-lazylog/ @benjaminRomano /types/react-leaflet/ @danzel @davschne @yuit /types/react-list/ @buptyyf @tomshen /types/react-loadable/ @Kovensky @odensc @ianks @tlaziuk @iMobs /types/react-loader/ @artfuldev /types/react-mailchimp-subscribe/ @osdiab -/types/react-map-gl/ @rimig +/types/react-map-gl/ @rimig @fnberta /types/react-maskedinput/ @LKay @lavoaster @CarlosBonetti /types/react-mce/ @morphologue /types/react-mdl/ @bradzacher @@ -3399,13 +3635,19 @@ /types/react-modal/ @radziksh @drewnoakes @homburg @ttamminen @hallowatcher @peterblazejewicz /types/react-motion/ @stepancar @asvetliakov @dimitarnestorov /types/react-motion-slider/ @asvetliakov -/types/react-native/ @alloy @huhuanming @iRoachie @timwangdev @kamal @nelyousfi @alexdunne @swissmanu @bm-software @tkrotoff +/types/react-motion-ui-pack/ @jsonunger +/types/react-native/ @alloy @huhuanming @iRoachie @timwangdev @kamal @nelyousfi @alexdunne @swissmanu @bm-software @tkrotoff @a-tarasyuk @mvdam /types/react-native-android-taskdescription/ @christianchown /types/react-native-auth0/ @ascariandrea /types/react-native-autocomplete-input/ @ifiokjr +/types/react-native-background-timer/ @chillkroeteTTS /types/react-native-bluetooth-serial/ @RodrigoAWeber +/types/react-native-calendars/ @Tyler-Zhang @DavidNorena /types/react-native-communications/ @huhuanming @PaitoAnderson +/types/react-native-custom-tabs/ @philnova /types/react-native-datepicker/ @jacobbaskin +/types/react-native-dialog/ @MrLuje +/types/react-native-dialogflow/ @jasonmerino /types/react-native-doc-viewer/ @iRoachie /types/react-native-document-picker/ @plantain-00 /types/react-native-drawer/ @jnbt @suniahk @@ -3425,51 +3667,63 @@ /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-textfield/ @mindhivefi @iRoachie /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-navbar/ @ryokik /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-popup-dialog/ @PaitoAnderson @connectdotz @bm-software /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 @gazaret +/types/react-native-settings-list/ @MrLuje +/types/react-native-share/ @marknelissen +/types/react-native-snap-carousel/ @jnbt @j-fro @gazaret @VitorLuizC /types/react-native-sortable-grid/ @j-fro /types/react-native-sortable-list/ @sivolobov @RookY2K -/types/react-native-sqlite-storage/ @dryganets +/types/react-native-sqlite-storage/ @dryganets @cavarzan /types/react-native-star-rating/ @iRoachie +/types/react-native-svg-charts/ @krzysztof-miemiec /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-tab-view/ @kaoDev @iRoachie @timwangdev /types/react-native-text-input-mask/ @RodrigoAWeber -/types/react-native-touch-id/ @huhuanming @gazaret +/types/react-native-toast-native/ @bm-software +/types/react-native-touch-id/ @huhuanming @gazaret @jinshin1013 /types/react-native-vector-icons/ @iRoachie @timwangdev /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-navigation/v1/ @huhuanming @mhcgrq @fangpenlin @petejkim @iRoachie @phanalpha @charlesfamu @timwangdev @bang88 @svbutko @levito @YourGamesBeOver @ArmandoAssuncao @cliedeman @Slessi +/types/react-navigation/ @huhuanming @mhcgrq @fangpenlin @petejkim @iRoachie @phanalpha @charlesfamu @timwangdev @bang88 @svbutko @levito @YourGamesBeOver @ArmandoAssuncao @cliedeman @Slessi @magrinj @TizioFittizio @stigi @LinusU @jshosomichi @jakebooyah @brunoro @DenisFrezzato +/types/react-navigation-material-bottom-tabs/ @iRoachie +/types/react-no-ssr/ @rafalfilipek /types/react-notification-system/ @GiedriusGrabauskas @DeividasBakanas @LKay @sztobar /types/react-notification-system-redux/ @LKay -/types/react-numeric-input/ @heatherbooker +/types/react-notify-toast/ @klaascuvelier +/types/react-numeric-input/ @heatherbooker @akx /types/react-onclickoutside/v5/ @LKay /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-paginate/v4/ @deevus @wouterhardeman @pegel03 @archy-bold +/types/react-paginate/ @deevus @wouterhardeman @pegel03 @archy-bold @yasupeke +/types/react-places-autocomplete/ @guilhermehubner @r3nya +/types/react-plotly.js/ @jonfreedman /types/react-pointable/ @istefo @mdibyo /types/react-popover/ @jacoporicare -/types/react-portal/ @shuntksh +/types/react-portal/v3/ @shuntksh +/types/react-portal/ @shuntksh @HorusGoul +/types/react-primitives/ @aghoneim92 /types/react-props-decorators/ @tkqubo +/types/react-qr-reader/ @davidkevork /types/react-radio-group/ @jsonunger /types/react-recaptcha/ @mhegazy @zzanol /types/react-redux/v5/ @tkqubo @thasner @kenzierocks @clayne11 @tansongyang @nicholasboll @mdibyo @pdeva @@ -3477,18 +3731,20 @@ /types/react-redux-epic/ @forabi /types/react-redux-i18n/ @clementdevos /types/react-redux-toastr/ @Smiche @artyomsv @kulmajaba -/types/react-relay/ @graphcool @voxmatt @alloy @npirotte @ckknight -/types/react-resize-detector/ @matthew-matvei @aMoniker +/types/react-relay/ @graphcool @voxmatt @alloy @npirotte @ckknight @kastermester +/types/react-request/ @dannycochran +/types/react-resize-detector/ @matthew-matvei @aMoniker @rdrgn /types/react-resolver/ @forabi /types/react-responsive/v1/ @asvetliakov /types/react-responsive/ @asvetliakov @alechill @xaviergonz -/types/react-rnd/ @Ragg- +/types/react-rnd/ @Ragg- @fsubal /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 @rraina @pret-a-porter +/types/react-router/ @sergey-buturlakin @mrk21 @vasek17 @ngbrown @awendland @KostyaEsmukov @johnnyreilly @LKay @DovydasNavickas @tkrotoff @huy-nguyen @grmiade @DaIgeb @egorshulga @neuoy @rraina @pret-a-porter @t49tran /types/react-router-bootstrap/ @vlesierse @LKay @olmobrutall /types/react-router-config/ @lith-light-g /types/react-router-dom/ @tkrotoff @huy-nguyen @p-jackson +/types/react-router-hash-link/ @zoompie /types/react-router-native/ @ezintz @fhelwanger /types/react-router-navigation/ @kaoDev /types/react-router-navigation-core/ @kaoDev @@ -3499,22 +3755,27 @@ /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 @darkartur +/types/react-select/v1/ @Hesquibet @giladgray @iebaker @skirsdeda @vujevits @devrelm @MartynasZilinskas @onatm @ninjaferret @tehbi4 @misantronic @darkartur @eps1lon @endurance @RCGuillaume +/types/react-select/ @claasahl @jonfreedman /types/react-share/ @icopp -/types/react-side-effect/ @remojansen +/types/react-show-more/ @naortor +/types/react-side-effect/ @remojansen @0xcaff /types/react-sidebar/ @jeroenvervaeke /types/react-sketchapp/ @ricokahler @DomiR /types/react-slick/ @andrewBalekha @GiedriusGrabauskas @r3nya +/types/react-slider/ @jsonunger /types/react-smooth-scrollbar/ @asvetliakov /types/react-sortable-hoc/ @NoHomey @charlesrey /types/react-sortable-pane/ @rhysd -/types/react-sortable-tree/ @wouterhardeman @jzoric @kevinsperrine +/types/react-sortable-tree/ @wouterhardeman @jzoric @kevinsperrine @acemac +/types/react-sound/ @koss-lebedev /types/react-spinkit/v1/ @tkqubo @mleko @pelotom /types/react-spinkit/ @tkqubo @mleko @pelotom @zzanol -/types/react-sticky/ @curtisw0 +/types/react-sticky/ @curtisw0 @ajhyndman +/types/react-sticky-el/ @jbraithwaite /types/react-stickynode/ @tstirrat /types/react-stripe-elements/ @dan-j @santiagodoldan @sonnysangha @9y5 @thchia -/types/react-svg/ @viccrubs @chrisgarber +/types/react-svg-inline/ @kiyopikko /types/react-svg-pan-zoom/ @huy-nguyen /types/react-swf/ @stepancar /types/react-swipe/ @DeividasBakanas @@ -3523,35 +3784,36 @@ /types/react-syntax-highlighter/ @NoHomey /types/react-table/ @royxue @psakalo @Havret /types/react-tabs/ @danez -/types/react-tag-input/ @Ogglas @jankarres +/types/react-tag-input/ @Ogglas @jankarres @matthewberryman /types/react-tagcloud/ @wassname /types/react-tagsinput/ @mykter /types/react-tap-event-plugin/ @mxl /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 @cavarzan +/types/react-text-mask/ @guilhermehubner @cavarzan @needpower /types/react-textarea-autosize/ @asvetliakov @zry656565 /types/react-timeout/ @kerwynrg /types/react-toastify/ @icopp /types/react-toastr/ @shssoichiro @DanRegazzi -/types/react-toggle/v2/ @LKay +/types/react-toggle/v2/ @LKay @jsonunger /types/react-toggle/ @LKay /types/react-tooltip/ @DeividasBakanas /types/react-touch/ @grzesie2k /types/react-tracking/ @alloy /types/react-transition-group/v1/ @LKay -/types/react-transition-group/ @LKay +/types/react-transition-group/ @LKay @Epskampie @ybiquitous /types/react-treeview/ @janslow /types/react-truncate/ @mattvperry -/types/react-twitter-auth/ @paulfasola +/types/react-twitter-auth/ @paulfasola @loginwashere /types/react-user-tour/ @ccancellieri +/types/react-vertical-timeline-component/ @stephane-monnot /types/react-virtual-keyboard/ @bsurai -/types/react-virtualized/ @kaoDev @guntherjh @wasd171 @szabolcsx @kraenhansen @Stevearzh @mgoszcz2 +/types/react-virtualized/ @kaoDev @guntherjh @wasd171 @szabolcsx @kraenhansen @Stevearzh @mgoszcz2 @brandonhall /types/react-virtualized-select/ @seansfkelley /types/react-webcam/ @squat /types/react-weui/ @tairan -/types/react-widgets/ @rogierschouten @sanyatuning @frodehansen2 @r3nya +/types/react-widgets/ @rogierschouten @sanyatuning @frodehansen2 @r3nya @MBillemaz /types/react-widgets-moment/ @dawnmist /types/react-youtube/ @kgtkr /types/react-youtube-embed/ @charles-salmon @@ -3571,9 +3833,10 @@ /types/reapop/ @Barrokgl /types/recaptcha2/ @l-jonas /types/recase/ @18steps -/types/recharts/ @mthmulders @rapmue @royxue @ZheyangSong @richbai90 @caspeco-dan +/types/recharts/ @mthmulders @rapmue @royxue @ZheyangSong @richbai90 @caspeco-dan @pkeuter @jrsaunde @paulmelnikow @crusectrl @apalugniok /types/recluster/ @dex4er /types/recompose/ @iskandersierra @mrapogee @clayne11 @Pajn @lucasterra +/types/reconnect-core/ @thw0rted /types/reconnectingwebsocket/ @nguarracino /types/recursive-readdir/v1/ @elisee /types/recursive-readdir/ @elisee @MicahZoltu @@ -3584,11 +3847,12 @@ /types/redis-scripto/ @westy92 /types/redlock/v2/ @chrootsu /types/redlock/ @chrootsu @BendingBender -/types/redom/ @RauliL +/types/redom/ @RauliL @nemoinho /types/reduce-reducers/ @huy-nguyen /types/redux-action/ @newraina /types/redux-action-utils/ @tkqubo /types/redux-actions/ @jaysoo @alexgorbatchev @alechill @alexey-pelykh +/types/redux-async-queue/ @andreiho /types/redux-auth-wrapper/v1/ @LKay /types/redux-auth-wrapper/ @LKay /types/redux-batched-subscribe/ @mDibyo @@ -3597,12 +3861,13 @@ /types/redux-devtools-dock-monitor/ @mc-petry /types/redux-devtools-log-monitor/ @mc-petry /types/redux-doghouse/ @BendingBender -/types/redux-first-router/ @Valbrand @viggyfresh @janb87 @corydeppen +/types/redux-first-router/ @Valbrand @viggyfresh @janb87 @corydeppen @jscinoz /types/redux-first-router-link/ @janb87 /types/redux-first-router-restore-scroll/ @icopp +/types/redux-first-routing/ @tlaziuk /types/redux-form/v4/ @aikoven /types/redux-form/v6/ @carsonf @aikoven @LKay @bancek -/types/redux-form/ @carsonf @aikoven @LKay @bancek @alsiola @tehbi4 @huwmartin +/types/redux-form/ @carsonf @aikoven @LKay @bancek @alsiola @tehbi4 @huwmartin @ethanresnick @reggino @maddijoyce /types/redux-immutable/ @oizie @sebald @gavingregory /types/redux-immutable-state-invariant/ @remojansen @highflying /types/redux-infinite-scroll/ @silkyfray @@ -3612,8 +3877,10 @@ /types/redux-localstorage-debounce/ @LKay /types/redux-localstorage-filter/ @LKay /types/redux-logger/ @arusakov @kgroat +/types/redux-mock-store/v0/ @MarianPalkus /types/redux-mock-store/ @MarianPalkus /types/redux-optimistic-ui/ @asvetliakov +/types/redux-orm/ @keenondrums /types/redux-pack/ @tansongyang @quicksnap @no-stack-dub-sack /types/redux-persist-transform-encrypt/ @LKay @dante-101 /types/redux-persist-transform-filter/ @LKay @@ -3621,31 +3888,41 @@ /types/redux-promise-middleware/ @ianks /types/redux-recycle/ @LKay /types/redux-router/ @stepancar +/types/redux-saga-tester/ @BenLorantfy /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-testkit/ @Bookler96 /types/redux-ui/ @andyshuxin /types/ref/ @loyd /types/ref-array/ @loyd +/types/ref-array-di/ @keerthi16 @KiranNiranjan +/types/ref-napi/ @keerthi16 @KiranNiranjan /types/ref-struct/ @loyd +/types/ref-struct-di/ @keerthi16 @KiranNiranjan /types/ref-union/ @loyd -/types/reflux/ @mauricedb +/types/ref-union-di/ @keerthi16 @KiranNiranjan +/types/reflux/v0/ @mauricedb +/types/reflux/ @mauricedb @LiangZugeng +/types/registry-auth-token/ @mauricedb @LiangZugeng /types/relateurl/ @tkrotoff /types/relaxed-json/ @18steps /types/relay-runtime/ @voxmatt @alloy /types/remarkable/ @makepost -/types/remote-redux-devtools/ @ColinEberhardt @unindented +/types/remote-redux-devtools/ @ColinEberhardt @unindented @mamodom @colindekker /types/remove-markdown/ @RagibHasin /types/rename/ @Aankhen /types/replace-ext/ @DeividasBakanas -/types/request/ @soywiz @bonnici @Bartvds @joeskeen @ccurrens @lookfirst @mastermatt +/types/req-cwd/ @Alorel +/types/request/ @soywiz @bonnici @Bartvds @joeskeen @ccurrens @lookfirst @mastermatt @josecolella /types/request-as-curl/ @atd-schubert /types/request-ip/ @mrhen /types/request-promise/ @cglantschnig @joeskeen @AyaMorisawa @mastermatt /types/request-promise-native/ @gustavohenke @mastermatt +/types/requestidlecallback/ @hax /types/requestretry/ @EricByers @trainerbill /types/require-dir/ @weekens /types/require-directory/ @Igmat @@ -3663,7 +3940,8 @@ /types/restangular/ @borisyankov /types/restful.js/ @tkqubo /types/restify/v4/ @blittle @stevehipwell -/types/restify/ @blittle @stevehipwell @leanazulyoro +/types/restify/v5/ @blittle @stevehipwell @leanazulyoro +/types/restify/ @blittle @stevehipwell @leanazulyoro @mgebundy /types/restify-cookies/ @weekens /types/restify-cors-middleware/ @dthunell /types/restify-errors/ @stevehipwell @@ -3696,11 +3974,13 @@ /types/roads/ @dancespiele /types/roads-server/ @dancespiele /types/roll/ @icopp -/types/rollup-plugin-json/ @asmockler +/types/rolling-rate-limiter/ @l-jonas +/types/rollup-plugin-json/ @asmockler @hotell /types/ronomon__crypto-async/ @BendingBender /types/rosie/ @abner @subvertallchris @abukurov /types/roslib/ @Pro @skycoop @dgorobopec /types/rot-js/ @atiaxi +/types/round-to/ @seangenabe /types/route-parser/ @ianks @bobbuehler /types/routie/ @Adilson /types/royalslider/ @csrakowski @@ -3713,7 +3993,9 @@ /types/rsync/ @philippstucki /types/rtree/ @oefirouz /types/run-parallel/ @mrmlnc +/types/run-parallel-limit/ @mrmlnc /types/run-sequence/ @k-kagurazaka +/types/runes/ @viralpickaxe /types/rword/ @icopp /types/rx/ @Igorbek /types/rx-angular/ @mickdelaney @@ -3747,8 +4029,9 @@ /types/sanctuary/ @davidchambers @cortopy @piq9117 /types/sandboxed-module/ @svi3c /types/sane/ @BendingBender +/types/sane-email-validation/ @ForbesLindesay /types/sanitize-filename/ @Nemo157 -/types/sanitize-html/ @rogierschouten @afshin @BehindTheMath +/types/sanitize-html/ @rogierschouten @afshin @BehindTheMath @biermeester /types/sap__xsenv/ @mad-mike /types/sass-graph/ @marvinhagemeister /types/sass-webpack-plugin/ @AepKill @@ -3758,6 +4041,7 @@ /types/scalike/ @ryoppy /types/schema-registry/ @bonzzy /types/schwifty/ @ozum +/types/scoped-http-client/ @mattvperry @rianadon /types/screenfull/ @icholy @lionelb @joelshepherd /types/screeps/ @MarkoSulamagi @NhanHo @bryanbecker @resir014 @Arcath @apemanzilla /types/screeps-profiler/ @ramblurr @@ -3766,8 +4050,10 @@ /types/scroller/ @haskellcamargo /types/scrollreveal/ @Davidblkx /types/scrolltofixed/ @bmdixon +/types/scrypt/ @WhiteAbeLincoln /types/scrypt-async/ @xStrom @stesix /types/scryptsy/ @micksatana +/types/sdp-transform/ @loc /types/seamless/ @danmana /types/seamless-immutable/ @alex3165 @xsburg @geirsagberg /types/secp256k1/ @anler @@ -3779,6 +4065,7 @@ /types/select2/ @borisyankov @denisname /types/selectables/ @renjfk /types/selectize/ @adidahiya @naBausch +/types/selenium-standalone/ @SanderDeWaal1992 /types/selenium-webdriver/v2/ @BillArmstrong @Kuniwak @cnishina /types/selenium-webdriver/ @BillArmstrong @Kuniwak @cnishina @SupernaviX @bendxn /types/semantic-ui/ @leonard-thieu @@ -3811,24 +4098,30 @@ /types/send/ @MikeJerred /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 @nrschultz +/types/sequelize/ @samuelneff @codeanimal @drinchev @babolivier @kukoo1 @oktapodia @morpheusxaut @TitaneBoy @zjy01 @nidzov @Raigen @todd @nrschultz @thomas-b +/types/sequelize-cursor-pagination/ @pilagod /types/sequelize-fixtures/ @cschwarz /types/sequencify/ @npenin /types/sequester/ @Strate +/types/serialize-error/ @thomasthiebaud /types/serialize-javascript/ @lith-light-g /types/serialport/v4/ @codefoster /types/serialport/ @codefoster @apearson /types/serve-favicon/ @urossmolnik /types/serve-index/ @tkrotoff /types/serve-static/ @urossmolnik @LinusU +/types/server/ @sant123 @iddan /types/server-destroy/ @gyszalai +/types/servicenow/ @bryceg /types/session-file-store/ @blendsdk @rokt33r /types/set-cookie-parser/ @nickp10 /types/set-value/ @DanielRosenwasser /types/settings/ @shreyjain1994 /types/sha1/ @arcdev1 +/types/shallow-equals/ @rsolomon /types/shallowequal/ @seansfkelley -/types/shapefile/ @DenisCarriere +/types/shapefile/ @DenisCarriere @Thw0rted +/types/sharedb/ @soney /types/sharedworker/ @nakakura /types/sharepoint/ @gandjustas @andrei-markeev @baywet @teroarvola @dennispg /types/sharp/ @lith-light-g @wooseopkim @@ -3840,7 +4133,7 @@ /types/shimmer/ @kjin /types/shipit/ @cyrilschumacher /types/shipit-utils/ @cyrilschumacher -/types/shopify-buy/ @openminder +/types/shopify-buy/ @openminder @straiforos @totemika /types/shortid/ @stpettersens @despairblue /types/shot/ @AJamesPhillips /types/should-sinon/ @Arylo @@ -3850,15 +4143,17 @@ /types/siesta/ @bquarmby /types/sigmajs/ @qinfchen /types/sigmund/ @BendingBender +/types/signale/ @resir014 @kingdaro @rjoydip /types/signalr/ @borisyankov @keesey @GiedriusGrabauskas /types/signalr-no-jquery/ @gjoshevski /types/signals/ @diullei -/types/signature_pad/ @AbubakerB @jrmihalick +/types/signature_pad/ @AbubakerB @jrmihalick @leejaedus /types/simple-assign/ @NoHomey /types/simple-cw-node/ @vvakame /types/simple-lru/ @NN--- /types/simple-mock/ @leonyu -/types/simple-oauth2/ @mad-mike @troy-lamerton +/types/simple-oauth2/v1/ @mad-mike @troy-lamerton @netux +/types/simple-oauth2/ @mad-mike @troy-lamerton @netux /types/simple-peer/ @tlaziuk /types/simple-url-cache/ @a-lucas /types/simple-websocket/ @dex4er @@ -3869,9 +4164,11 @@ /types/simplesmtp/ @rogierschouten /types/simplestorage.js/ @axelcostaspena @mxl /types/single-line-log/ @ffflorian +/types/single-spa-react/ @Garrett-Smith-iq /types/sinon/ @mrbigdog2u @rationull @lumaxis @nicojs @43081j @joshuakgoldberg /types/sinon-as-promised/ @igrayson -/types/sinon-chai/ @kazimanzurrashid @jedmao +/types/sinon-chai/v2/ @kazimanzurrashid @jedmao +/types/sinon-chai/ @kazimanzurrashid @jedmao @elpdpt /types/sinon-chrome/ @pimterry @crimx @kobanyan /types/sinon-express-mock/ @jpchip @tlaziuk /types/sinon-mongoose/ @stevehipwell @@ -3880,16 +4177,23 @@ /types/sip.js/ @decyrus /types/sipml/ @chookies /types/sitemap2/ @shundy +/types/six-runtime/ @493636333 /types/sizzle/ @leonard-thieu /types/sjcl/ @Evgenus /types/skatejs/ @Hotell /types/ski/ @AyaMorisawa /types/skyway/ @nakakura +/types/slack-mock/ @kkalavantavanich /types/slack-node/ @geoffreak /types/slack-winston/ @BlueHatbRit /types/slackdown/ @nju33 /types/slackify-html/ @hypexr +/types/slate/ @andykent @majelbstoat @JanLoebel @YangusKhan @kalley @Kornil +/types/slate-base64-serializer/ @YangusKhan +/types/slate-html-serializer/ @YangusKhan /types/slate-irc/ @elisee +/types/slate-plain-serializer/ @YangusKhan +/types/slate-react/ @andykent @majelbstoat @JanLoebel @PatrickSachs @YangusKhan /types/sleep/ @rajarz /types/slickgrid/ @jbaldwin /types/slideout/ @ToastHawaii @@ -3901,22 +4205,24 @@ /types/smtp-server/v1/ @markisme @Taisiias /types/smtp-server/ @markisme @Taisiias @dex4er /types/smtpapi/ @a-morales +/types/snappy/ @reconbot /types/snapsvg/ @lhk @mattanja @kant2002 /types/snazzy-info-window/ @milosd92 -/types/snekfetch/ @DarkerTV @ShayBox @Dev-Yukine +/types/snekfetch/ @ANekoIsFineToo @ShayBox @Dev-Yukine /types/snoowrap/ @vitosamson @TheAppleFreak /types/snowboy/ @dolanmiu -/types/socket.io/ @progre @divillysausages @florentpoujol @KentarouTakeda @gigi +/types/socket.io/ @progre @divillysausages @florentpoujol @KentarouTakeda @gigi @BrainMaestro /types/socket.io-client/ @progre @divillysausages @florentpoujol /types/socket.io-parser/ @plantain-00 /types/socket.io-redis/ @nupplaphil @seeLuck /types/socket.io.users/ @kataras +/types/socketio-jwt/ @ehallander9591 /types/socketio-jwt-auth/ @codeanimal /types/socketio-wildcard/ @BendingBender /types/socketty/ @Nax /types/sockjs/ @pmccloghrylaing /types/sockjs-client/ @vladev @arusakov @BendingBender @renjfk -/types/solidity-parser-antlr/ @LogvinovLeon +/types/solidity-parser-antlr/ @LogvinovLeon @albrow /types/solr-client/ @liul85 /types/solution-center-communicator/ @dami-gg /types/sort-array/ @mrmlnc @@ -3938,23 +4244,26 @@ /types/speakeasy/ @legendecas @mrOlorin @xeoneux /types/speakingurl/ @Goldsmith42 /types/spectacle/ @zmaybury -/types/spectrum/ @M-Zuber +/types/spectrum/ @M-Zuber @Ailrun /types/split/ @marcinporebski /types/split.js/ @icholy /types/split2/ @mugeso +/types/splunk-bunyan-logger/ @bricka +/types/splunk-logging/ @bricka /types/spotify-api/ @skovmand /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/sqlanywhere/ @pkeuter /types/sqlite3/ @nmalaguti @dpyro @BehindTheMath /types/sqlstring/ @marvinhagemeister /types/squirejs/ @bradleyayers /types/srp/ @Patman64 /types/ssh-key-decrypt/ @BendingBender /types/ssh2/ @tkQubo @rbuckton -/types/ssh2-sftp-client/ @igrayson @ascariandrea +/types/ssh2-sftp-client/ @igrayson @ascariandrea @kartik2406 /types/ssh2-streams/ @rbuckton /types/sshpk/ @mabels /types/stack-mapper/ @rogierschouten @@ -3963,8 +4272,9 @@ /types/stacktrace-js/ @exceptionless @pilagod /types/stale-lru-cache/ @cxcorp /types/stampit/v2/ @koresar -/types/stampit/ @koresar +/types/stampit/ @koresar @lummish /types/stamplay-js-sdk/ @ridermansb +/types/starwars-names/ @claasahl /types/stat-mode/ @BendingBender /types/stats.js/ @gregolai @hberntsen @danvk /types/statsd-client/ @peterkooijmans @chrisleck @@ -3972,46 +4282,59 @@ /types/std-mocks/ @jdxcode /types/steam/ @kant2002 /types/steam-client/ @Slessi +/types/steam-login/ @Nicell /types/steam-totp/ @phenomax /types/steamid/ @Slessi /types/steed/ @Paul-Isache -/types/stellar-sdk/ @carl-foster @tristonj +/types/stellar-sdk/ @carl-foster @tristonj @pselden @maxbause /types/stemmer/ @will-ockmore /types/sticky-cluster/ @paustint /types/stompjs/ @jimic @Dr4k4n /types/stoppable/ @EricByers -/types/storejs/ @vbortone @harry0000 +/types/store/ @vbortone @harry0000 @Ky6uk +/types/storybook-addon-jsx/ @jameslnewell /types/storybook__addon-a11y/ @hyunseob -/types/storybook__addon-actions/ @joscha +/types/storybook__addon-actions/ @joscha @jicjjang /types/storybook__addon-backgrounds/ @hyunseob +/types/storybook__addon-centered/ @kiyopikko /types/storybook__addon-info/ @mkornblum @fyrkant -/types/storybook__addon-knobs/ @joscha @martynaskadisa +/types/storybook__addon-jest/ @halfmatthalfcat +/types/storybook__addon-knobs/ @joscha @martynaskadisa @amacleay /types/storybook__addon-links/ @joscha @jessepinho -/types/storybook__addon-notes/ @joscha -/types/storybook__addon-options/ @joscha @simonhn +/types/storybook__addon-notes/ @joscha @amacleay +/types/storybook__addon-options/ @joscha @simonhn @amacleay /types/storybook__addon-storyshots/ @bradleyayers /types/storybook__react/ @joscha @wapgear +/types/storybook__react-native/ @joscha @wapgear @alechill @iRoachie /types/storybook__vue/ @pntgupta /types/stream-buffers/ @Jason3S +/types/stream-chain/ @uhop +/types/stream-csv-as-json/ @uhop +/types/stream-each/ @djcsdy +/types/stream-json/ @uhop /types/stream-meter/ @mugeso /types/stream-series/ @k-kagurazaka +/types/stream-shift/ @djcsdy /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/streamtest/ @lummish /types/strftime/ @cyrilschumacher /types/strict-uri-encode/ @hoishin /types/string/ @basp +/types/string-format/ @lal12 /types/string-hash/ @ethanrubio /types/string-similarity/ @ragtime /types/string-template/ @TonyPythoneer +/types/string-width/ @jacobbubu /types/string_score/ @marcinporebski /types/stringify-object/ @khoomeister /types/strip-ansi/ @mhegazy /types/strip-bom/ @mhegazy /types/strip-json-comments/ @dmoonfire -/types/stripe/ @wjohnsto @codeanimal @sampsonjoliver @LinusU @brannon @kkamperschroer @starhoshi @bruun +/types/stripe/ @wjohnsto @codeanimal @sampsonjoliver @LinusU @brannon @kkamperschroer @starhoshi @bruun @galtalmor @htunnicliff @squirly @tzarger /types/stripe-checkout/ @cgwrench /types/stripe-v2/ @ejsmith @amritk @adamcmiel @jleider @galuszkak /types/stripe-v3/ @ejsmith @amritk @adamcmiel @jleider @galuszkak @@ -4020,7 +4343,10 @@ /types/strong-log-transformer/ @azasypkin /types/strophe/ @DavidKDeutsch /types/structured-source/ @azu +/types/styled-components/ @Igorbek /types/styled-jsx/ @R1ZZU +/types/styled-system/ @maxdeviant @phobon @zephraph @damassi @alloy @maoueh @lavoaster +/types/stylelint/v7/ @alan-agius4 /types/stylelint/ @alan-agius4 /types/stylelint-webpack-plugin/ @bahlo /types/stylus/ @SomaticIT @@ -4029,12 +4355,16 @@ /types/succinct/ @EnableSoftware /types/sudo-block/ @BendingBender /types/suitescript/ @darrenhillconsulting +/types/summernote/ @wstaelens @nusantara-cloud /types/sumo-logger/ @forabi @clementallen +/types/suncalc/ @horiuchi /types/superagent/v2/ @varju @NicoZelaya @mxl -/types/superagent/ @NicoZelaya @mxl @paplorinc @shreyjain1994 @zopf +/types/superagent/ @NicoZelaya @mxl @paplorinc @shreyjain1994 @zopf @beeequeue +/types/superagent-bunyan/ @bricka /types/superagent-no-cache/ @mxl /types/superagent-prefix/ @mxl /types/supercluster/ @DenisCarriere +/types/superstruct/ @edwardsnare /types/supertest/ @varju /types/supertest-as-promised/ @tkrotoff /types/supports-color/v3/ @mgroenhoff @@ -4042,7 +4372,9 @@ /types/svg-injector/ @poke /types/svg-parser/ @mrmlnc /types/svg-path-bounding-box/ @NotWoods +/types/svg-path-parser/ @tyru /types/svg-sprite/ @tkqubo +/types/svg-sprite-loader/ @rynclark /types/svg2png/ @hansrwindhoff @sccgithub /types/svg4everybody/ @BendingBender /types/svgjs.draggable/ @LiFeleSs @@ -4062,6 +4394,8 @@ /types/swagger-sails-hook/ @micmro /types/swagger-schema-official/ @mohsen1 @bsouthga @nimerritt /types/swagger-tools/ @bricka +/types/swagger-ui-dist/ @haowen737 +/types/swagger-ui-express/ @dmitryrogozhny /types/swaggerize-express/ @mugeso @nickmorton /types/swe-validation/ @hjalmers /types/swfobject/ @rou @@ -4085,13 +4419,15 @@ /types/tabulator/ @euginio /types/tail/ @spacejack /types/tapable/v0/ @e-cloud -/types/tapable/ @e-cloud +/types/tapable/ @e-cloud @johnnyreilly /types/tape/ @Bartvds @sodatea @DennisSchwartz @mikehenrty /types/tar/ @SomaticIT @connor4312 /types/tar-fs/ @Umoxfo /types/tar-stream/ @glicht +/types/task-graph-runner/ @mgroenhoff /types/tcp-ping/ @stegano -/types/tedious/ @rogierschouten @cjthompson +/types/teddy/ @lannonbr +/types/tedious/ @rogierschouten @cjthompson @v-suhame /types/tedious-connection-pool/ @sandorfr /types/telebot/ @mariotsi /types/temp/ @DanielRosenwasser @@ -4099,20 +4435,26 @@ /types/tempfile/ @SamVerschueren @BendingBender /types/tempy/ @douglasduteil /types/terminal-menu/ @aravindarun +/types/test-listen/ @stephenmathieson /types/testingbot-api/ @timbru31 /types/tether/ @adidahiya /types/tether-drop/ @adidahiya /types/tether-shepherd/ @mtgibbs /types/text-buffer/ @GlenCFL -/types/text-encoding/ @pine613 +/types/text-encoding/ @pine613 @mohsen1 /types/text-encoding-utf-8/ @trxcllnt /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/textract/ @lal12 +/types/textversionjs/ @aaronosher +/types/tgfancy/ @Dabolus +/types/theming/ @eps1lon +/types/thepiratebay/ @jsorrell +/types/three/ @gyohk @florentpoujol @SereznoKot @omni360 @ivoisbelongtous @piranha771 @qszhusightp @nakakura @s093294 @Pro @efokschaner @PsychoSTS @dhritzkiv @apurvaojas @NotWoods @sethk @elk941 @Methuselah96 /types/thrift/ @kamek-pf @kevin-greene-ck @jessezhang91 /types/throng/ @cyrilschumacher @tatethurston /types/throttle/ @BendingBender -/types/throttle-debounce/ @czbuchi +/types/throttle-debounce/ @czbuchi @franklixuefei /types/through/ @AndrewGaspar /types/through2/v0/ @Bartvds @jedmao /types/through2/ @Bartvds @jedmao @valotas @TeamworkGuy2 @@ -4124,18 +4466,24 @@ /types/timelinejs3/ @MikeMatusz /types/timer-machine/ @dolanmiu /types/timezone-js/ @bonnici +/types/tinajs__tina/ @Jimexist +/types/tinajs__tina-redux/ @Jimexist /types/tinder/ @pingec +/types/tingle.js/ @ajafff /types/tiny-slider-react/ @screendriver -/types/tinycolor2/ @M-Zuber @geertjansen @nvh +/types/tinycolor2/ @M-Zuber @geertjansen @nvh @Ailrun +/types/tinycon/ @dwaxweiler /types/tinycopy/ @vvatanabe /types/tinymce/ @martinduparc @ipoul @nicohartto /types/titanium/ @appcelerator @janvennemann /types/title/ @fa7ad /types/tldjs/ @geoffreak +/types/tlds/ @ajshres /types/tmp/ @optical @Perlmint /types/to-absolute-glob/ @ajafff /types/to-camel-case/ @j-f1 /types/to-markdown/ @SuperPaintman +/types/to-snake-case/ @LogvinovLeon /types/to-title-case-gouch/ @stpettersens /types/toastr/ @borisyankov /types/tocktimer/ @evanshortiss @@ -4146,6 +4494,7 @@ /types/topojson-client/ @denisname @ricardo-mello /types/topojson-simplify/ @denisname @ricardo-mello /types/topojson-specification/ @denisname +/types/toposort/ @danwbyrne /types/torrent-stream/ @xstoudi /types/touch/ @mizunashi-mana @BendingBender /types/touch-events/ @kevinb7 @@ -4162,9 +4511,12 @@ /types/trayballoon/ @korve /types/tress/ @sindilevich /types/trim/ @skysteve +/types/triple-beam/ @danwbyrne +/types/triplesec/ @threesquared /types/trunk8/ @niemyjski /types/tryer/ @bengry /types/tspromise/ @soywiz +/types/ttf2woff2/ @ThomasdenH /types/tunnel/ @BendingBender /types/tus-js-client/ @kevhiggins /types/tv4/ @Bartvds @psnider @@ -4173,7 +4525,8 @@ /types/tweezer.js/ @praxxis /types/twig/ @soywiz @enko /types/twilio/ @nickiannone @ashleybrener -/types/twit/ @Volox @lostfictions @sapphiredev +/types/twit/ @Volox @sapphiredev @abraham @siwalikm @plhery +/types/twitch-ext/ @beheh /types/twitter/ @chitoku-k /types/twitter-stream-channels/ @adrianbardan /types/twitter-text/ @rhysd @@ -4184,14 +4537,14 @@ /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-es/ @alan-agius4 /types/uglify-js/v2/ @tkrotoff -/types/uglify-js/ @alan-agius4 @tkrotoff +/types/uglify-js/ @alan-agius4 @tkrotoff @johnnyreilly /types/uglifycss/ @blendsdk /types/uglifyjs-webpack-plugin/ @vajkayrene /types/ui-grid/ @btesser @joeskeen @pbojanczyk @@ -4203,12 +4556,13 @@ /types/ultra-strftime/ @dex4er /types/umbraco/ @DeCareSystemsIreland /types/umd/ @TeamworkGuy2 -/types/umzug/ @drinchev @mlamp @trodi -/types/underscore/ @borisyankov @jbaldwin @ccurrens @clottman +/types/umzug/ @drinchev @mlamp @trodi @emmanuelgautier +/types/underscore/ @borisyankov @jbaldwin @ccurrens @clottman @confususs /types/underscore-ko/ @MagicMau /types/underscore.string/ @rygine /types/undertaker/ @tkqubo @GiedriusGrabauskas /types/undertaker-registry/ @GiedriusGrabauskas +/types/unidecode/ @vfernandestoptal /types/uniq/ @hansrwindhoff /types/uniqid/ @idchlife /types/unique-hash-stream/ @BendingBender @@ -4216,26 +4570,27 @@ /types/unist/ @bizen241 /types/unity-webapi/ @jmvrbanac /types/universal-analytics/ @Bartvds @DarkerTV -/types/universal-router/ @jtmthf +/types/universal-cookie/ @tomi +/types/universal-router/ @jtmthf @tlaziuk @Lodin /types/unorm/ @chbrown /types/untildify/ @BendingBender /types/unused-filename/ @BendingBender /types/unzip/ @coding2012 -/types/unzipper/ @s73obrien @natemara +/types/unzipper/ @s73obrien @natemara @bartje321 /types/update-notifier/v1/ @vvakame @nchen63 /types/update-notifier/ @vvakame @nchen63 @bitjson /types/upng-js/ @plantain-00 /types/uppercamelcase/ @plantain-00 /types/urbanairship-cordova/ @Justin-Credible -/types/uri-templates/ @Bartvds +/types/uri-templates/ @Bartvds @barnski /types/urijs/ @RodneyJT @xt0rted @petejohanson /types/uritemplate/ @teyc @rubensworks /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-parse/ @ChernenkoPaul @harisiva @DimitryDushkin +/types/url-regex/ @unindented @sosukesuzuki /types/url-safe-base64/ @johngeorgewright /types/url-search-params/ @nick121212 @nrathi /types/url-template/ @marcinporebski @@ -4255,17 +4610,20 @@ /types/uuid/ @iamolivinius @felipeochoa @cjbarth /types/uuid-1345/ @mugeso /types/uuid-js/ @mhegazy +/types/uuid-parse/ @screendriver /types/uuid-validate/ @HiromiShikata /types/uws/ @plantain-00 @orblazer /types/valdr/ @ilbertz /types/valdr-message/ @ilbertz /types/valerie/ @conficient /types/vali-date/ @SamVerschueren +/types/valiant/ @whatasoda /types/valid-url/ @stevehipwell /types/validator/ @tgfjt @chrootsu @IOAyman @louy @kacepe @deptno @builtinnya @qqilihq /types/validatorjs/ @LKay @danmana /types/vanilla-modal/ @samnau /types/vanilla-tilt/ @BrunnerLivio +/types/varint/ @dbrockman /types/vary/ @BendingBender /types/vast-client/ @jgainfort /types/vec3/ @xstoudi @@ -4275,16 +4633,18 @@ /types/verror/ @svi3c @max4t /types/vertx3-eventbus-client/ @oddeirik /types/vex-js/ @gdcohan -/types/vexflow/ @rquiring @sebastianhaas @bohoffi +/types/vexdb/ @MayorMonty +/types/vexflow/ @rquiring @sebastianhaas @bohoffi @sschmidTU /types/vfile/ @bizen241 @rokt33r /types/vfile-location/ @ikatyang -/types/victory/ @asvetliakov @snerks @Havret -/types/video.js/ @vbortone @scleriot @SWBennett06 @IgelCampus @giofreitas +/types/victory/ @asvetliakov @snerks @Havret @alredyExist +/types/video.js/ @vbortone @scleriot @SWBennett06 @IgelCampus @giofreitas @gjanblaszczyk @sroucheray @AkxeOne /types/viewability-helper/ @lironzluf /types/viewerjs/ @lrh3321 +/types/viewport-mercator-project/ @fnberta /types/viewporter/ @borisyankov /types/vimeo/ @DazWilkin -/types/vimeo__player/ @denisyilmaz @timc13 +/types/vimeo__player/ @denisyilmaz @timc13 @terrymun /types/vinyl/v0/ @jedmao /types/vinyl/ @vvakame @jedmao @thorn0 /types/vinyl-buffer/ @tkQubo @@ -4292,7 +4652,7 @@ /types/vinyl-paths/ @tkQubo /types/virtual-dom/ @chbrown /types/virtual-keyboard/ @bsurai -/types/vis/ @MichaelBitard @macleodbroad-wf @adripanico @seveves @kaktus40 @mmaitre314 @supercargo @takato1314 +/types/vis/ @MichaelBitard @macleodbroad-wf @adripanico @seveves @kaktus40 @mmaitre314 @supercargo @takato1314 @alex-kachura @dcop @avrahamcool /types/vision/v4/ @jasonswearingen @AJamesPhillips /types/vision/ @jasonswearingen @AJamesPhillips @lenovouser /types/vitalsigns/ @cyrilschumacher @@ -4304,10 +4664,13 @@ /types/voronoi-diagram/ @michaelneu /types/vortex-web-client/ @Pro /types/voximplant-websdk/ @aylarov +/types/vue-color/ @me /types/vue-markdown/ @neodon /types/vue-resource/ @kaorun343 /types/vue-scrollto/ @vincekovacs -/types/vuex-i18n/ @jaeggerr +/types/vue-select/ @silh +/types/vue2-datepicker/ @ChristianStornowski +/types/vuex-i18n/ @jaeggerr @noamkfir /types/w2ui/ @Ptival /types/w3c-generic-sensor/ @kenchris /types/w3c-image-capture/ @cosium @@ -4331,8 +4694,12 @@ /types/weapp-api/ @vargeek /types/web-animations-js/ @kritollm /types/web-bluetooth/ @urish +/types/web3/ @simon-jentzsch @nitzantomer @zurbo @yxliang01 @phra @naddison36 @icaroharry @linusnorton @jpeletier @anneau @matrushka @andrevmatos @levino @zlumer @archangel-irk +/types/web3-eth-abi/ @LogvinovLeon +/types/web3-provider-engine/ @LogvinovLeon /types/webappsec-credential-management/ @iainmcgin /types/webassembly-js-api/ @periklis +/types/webassembly-web-api/ @jhenninger /types/webcl/ @NCARalph /types/webcomponents.js/ @adidahiya /types/webcrypto/ @iislucas @@ -4342,44 +4709,59 @@ /types/webgl2/ @nkemnitz @karhu /types/webidl2/ @saschanaz /types/webmidi/ @lostfictions -/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/v3/ @tkqubo @bumbleblym @bcherny @tommytroylin @mohsen1 @jcreamer898 @alan-agius4 @elliottsj @jason0x43 @christophehurpeau +/types/webpack/ @tkqubo @bumbleblym @bcherny @tommytroylin @mohsen1 @jcreamer898 @alan-agius4 @elliottsj @jason0x43 @dennispg @christophehurpeau @ZSkycat @johnnyreilly +/types/webpack-assets-manifest/ @FranklinWhale /types/webpack-bundle-analyzer/ @kryops /types/webpack-chain/ @eirikurn @psachs21 /types/webpack-chunk-hash/ @mtraynham /types/webpack-cleanup-plugin/ @malj +/types/webpack-config-utils/ @hotell /types/webpack-dev-middleware/v1/ @bumbleblym @reduckted -/types/webpack-dev-middleware/ @bumbleblym @reduckted -/types/webpack-dev-server/ @maestroh @daveparslow @ZheyangSong @alan-agius4 +/types/webpack-dev-middleware/ @bumbleblym @reduckted @chrisabrams +/types/webpack-dev-server/ @maestroh @daveparslow @ZheyangSong @alan-agius4 @arturovt /types/webpack-dotenv-plugin/ @kryops /types/webpack-env/ @use-strict @rhonsby /types/webpack-fail-plugin/ @deevus -/types/webpack-hot-middleware/ @bumbleblym @icylace +/types/webpack-hot-client/ @rynclark @ZSkycat +/types/webpack-hot-middleware/ @bumbleblym @icylace @chrisabrams /types/webpack-manifest-plugin/ @r3nya /types/webpack-merge/v0/ @deevus /types/webpack-merge/ @deevus @mtraynham /types/webpack-node-externals/ @mtraynham /types/webpack-notifier/ @bumbleblym +/types/webpack-serve/v1/ @rynclark @Jokcy @ZSkycat +/types/webpack-serve/ @rynclark @Jokcy @ZSkycat /types/webpack-sources/ @e-cloud @chriseppstein /types/webpack-stream/ @iclanton @bumbleblym /types/webpack-validator/ @deevus +/types/webpackbar/ @rynclark +/types/webpagetest/ @ksm2 /types/webrtc/ @nakakura +/types/webscopeio__react-textarea-autocomplete/ @michauzo +/types/websequencediagrams/ @ffflorian +/types/website-scraper/ @screendriver /types/websocket/ @loyd @flynetworks @zhaoleimxd @jdneo -/types/webspeechapi/ @saschanaz +/types/websocket-async/ @bigbeno37 /types/websql/ @TeamworkGuy2 /types/webtorrent/ @niieani @tlaziuk /types/webvr-api/ @efokschaner /types/week/ @sindrenm +/types/wegame-api/ @jcyuan /types/weighted/ @ccitro -/types/weixin-app/ @taoqf @AlexStacker +/types/weixin-app/ @taoqf @AlexStacker @Jimexist /types/wellknown/ @yairtawil +/types/wepy/ @Jimexist +/types/wepy-redux/ @Jimexist /types/whatwg-mimetype/ @petejohanson -/types/whatwg-streams/ @saschanaz @ksm2 +/types/whatwg-streams/ @saschanaz @ksm2 @MattiasBuelens /types/whatwg-url/ @aomarks /types/wheel/ @BTOdell /types/when/ @derekcicerone @Nemo157 /types/which/ @vvakame @cspotcode +/types/which-pm/ @jorgegonzalez /types/wicg-mediasession/ @jucrouzet +/types/wif/ @danwbyrne /types/wiiu/ @mzsm /types/window-or-global/ @vvakame /types/window-size/ @pmkary @@ -4389,17 +4771,21 @@ /types/winjs/v1/ @adamhewitt627 @craigktreasure @xirzec /types/winjs/v2/ @adamhewitt627 @craigktreasure @xirzec /types/winjs/ @adamhewitt627 @craigktreasure @xirzec +/types/wink-tokenizer/ @lal12 /types/winreg/ @RX14 @BobBuehler /types/winrt-uwp/ @saschanaz @taylor224 -/types/winston/ @bonnici @codeanimal @DABH /types/winston-dynamodb/ @nickiannone -/types/winston-syslog/ @cjbarth +/types/winston-mail/ @idono87 +/types/winston-syslog/v1/ @cjbarth +/types/winston-syslog/ @cjbarth @felix-hoc /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/workbox-sw/ @wessberg +/types/workerpool/ @Alorel /types/wpapi/ @guoyunhe /types/wrap-ansi/v2/ @kayahr /types/wrap-ansi/ @kayahr @@ -4421,7 +4807,7 @@ /types/xdg-basedir/ @tlaziuk /types/xml/ @YuJianrong /types/xml-parser/ @mhfrantz -/types/xml2js/ @michelsalib @jasonrm @ccurrens @edwardhinkle @BehindTheMath +/types/xml2js/ @michelsalib @jasonrm @ccurrens @edwardhinkle @BehindTheMath @claasahl /types/xml2json/ @dolanmiu /types/xmlbuilder/ @wallymathieu /types/xmldoc/ @Xstoudi @ajsheehan @notlaforge @@ -4443,15 +4829,20 @@ /types/yargs/v8/ @poelstra @mizunashi-mana @pushplay @jeffkenney /types/yargs/v10/ @poelstra @mizunashi-mana @pushplay @jeffkenney @JimiC /types/yargs/ @poelstra @mizunashi-mana @pushplay @jeffkenney @JimiC +/types/yargs-interactive/ @szeck87 /types/yauzl/ @ffflorian +/types/yauzl-promise/ @dlee-nvisia /types/yayson/ @Codesleuth /types/yazl/ @taoqf /types/ydn-db/ @yathit @gabrielmaldi /types/yeoman-generator/ @armorik83 @janslow @ikatyang /types/yeoman-test/ @ikatyang +/types/yesql/ @Sumolari +/types/yoctodelay/ @seangenabe /types/yog-bigpipe/ @ssddi456 /types/yog-log/ @ssddi456 /types/yog2-kernel/ @ssddi456 +/types/yoga-layout/ @tnobody /types/yosay/ @armorik83 /types/youtube/ @DazWilkin @JoshuaKGoldberg @eliotfallon213 /types/youtube-dl/ @bsurai @@ -4460,18 +4851,20 @@ /types/z-schema/ @pgonzal /types/zapier-platform-core/ @bradleyayers /types/zeit__next-typescript/ @icopp -/types/zen-observable/ @aicest +/types/zen-observable/ @aicest @JounQin @itomtom /types/zen-push/ @daprahamian /types/zenscroll/ @HamedFathi /types/zepto/ @jbaldwin /types/zeroclipboard/v1/ @ejsmith @niemyjski @balassy @leonyu /types/zeroclipboard/ @ejsmith @niemyjski @balassy @leonyu /types/zeromq/ @davemckeown @erikma @TitaneBoy +/types/zip-webpack-plugin/ @blaise-io /types/zip.js/ @lgrignon -/types/zipcodes/ @headdetect +/types/zipcodes/ @headdetect @dobesv /types/zipkin-context-cls/ @plantain-00 /types/zipkin-instrumentation-express/ @plantain-00 /types/zipkin-instrumentation-fetch/ @plantain-00 +/types/zipkin-javascript-opentracing/ @laurentgilly /types/zipkin-transport-http/ @plantain-00 /types/zmq/ @davemckeown /types/zookeeper/ @xialeistudio diff --git a/README.ko.md b/README.ko.md new file mode 100644 index 0000000000..224967a9dc --- /dev/null +++ b/README.ko.md @@ -0,0 +1,338 @@ +# DefinitelyTyped [![Build Status](https://travis-ci.org/DefinitelyTyped/DefinitelyTyped.svg?branch=master)](https://travis-ci.org/DefinitelyTyped/DefinitelyTyped) + +[![깃터(https://gitter.im/borisyankov/DefinitelyTyped)에서 대화에 참여해보세요](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/borisyankov/DefinitelyTyped?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) + +> 이 저장소는 고품질의 타입스크립트(TypeScript) 자료형 정의(Type definition)를 위한 저장소입니다. + +이 문서가 가장 최신 내용을 담고있긴 하지만, [공식 사이트(definitelytyped.org)](http://definitelytyped.org)도 확인해보시면 좋습니다. + +## 선언 파일(Declaration file)이 뭔가요? + +[타입스크립트 안내서(TypeScript handbook)](http://www.typescriptlang.org/docs/handbook/declaration-files/introduction.html)를 읽어보세요. + +## 선언 파일(Declaration file)을 어떻게 받을 수 있나요?? + +### npm 사용하기 + +아래 방법은 타입스크립트(TypeScript) 2.0+ 이상의 버전을 사용하는 사람들만 사용할 수 있는 방법이기는 합니다만, 이 방법을 사용하기를 장려합니다. + +```sh +npm install --save-dev @types/node +``` + +`node` 를 위한 자료형(Typing)이 컴파일 과정에 자동으로 포함될 겁니다. +더 자세한 내용은 [안내서(Handbook)](http://www.typescriptlang.org/docs/handbook/declaration-files/consumption.html)에서 확인해보실 수 있습니다. + +NPM 의 "foo" 패키지에 대응되는 자료형 패키지는 "@types/foo" 입니다. +원하시는 패키지를 찾을 수 없는 경우, [타입서치(TypeSearch)](https://microsoft.github.io/TypeSearch/) 사이트에서 한 번 찾아보세요. + +타입서치(TypeSearch)에서도 찾을 수 없는 경우, 찾고 있는 패키지가 자료형(Typing)을 +[함께 제공](http://www.typescriptlang.org/docs/handbook/declaration-files/publishing.html)하고 있지는 않은지 확인해보세요. +패키지에 포함된 자료형(Typing)은 주로 `package.json` 파일의 `"types"` 나 `"typings"` 필드(Field)를 통해 제공되지만, +`/// ` 같은 주석을 사용하여 패키지 안의 ".d.ts" 파일들을 직접 가져와야 할 수도 있습니다. + + +### 그 외의 방법들 + +타입스크립트(TypeScript) 1.0 버전에서 사용할 수 있는 방법은 다음과 같습니다. + +* [Typings](https://github.com/typings/typings) 을 사용하기 +* ~~[NuGet](http://nuget.org/packages?q=DefinitelyTyped) 을 사용하기~~ (다른 방법을 사용해주세요. NuGet 은 더 이상 DT 자료형(Typing)을 제공하지 않습니다.) +* 이 저장소의 `master` 브랜치를 직접 내려받기 + +위 방법을 사용할 경우 수동으로 [참조(Reference)](http://www.typescriptlang.org/docs/handbook/triple-slash-directives.html)를 추가해주어야 할 수 있습니다. + + +## 어떻게 이곳에 기여할 수 있나요? + +여러분과 같은 많은 기여자들의 도움 덕분에 이 저장소가 돌아가고 있습니다. 감사합니다. + +### 테스트 + +여러분이 만든 자료형 선언(Type declation)을 세상에 공유하기에 앞서, 여러분이 스스로 여러분의 자료형 선언(Type declation)을 사용하고 확인해주세요. + +#### 이미 존재하는 자료형 패키지를 임시로 수정하기 + +이미 존재하는 패키지의 자료형 선언(Type declaration)에 새로운 기능을 추가하려면 [모듈 증강(module augmentation)](http://www.typescriptlang.org/docs/handbook/declaration-merging.html#module-augmentation)를 사용할 수 있습니다. +물론 `node_modules/@types/foo/index.d.ts` 를 직접 수정하실 수도 있으며, 이 파일을 복사한 다음 아래의 과정을 따라하실 수도 있습니다. + + +#### 새 자료형 패키지를 임시로 추가하기 + +사용하고 계신 `tsconfig.json` 에 다음 내용을 추가해주세요. + +```json +"baseUrl": "types", +"typeRoots": ["types"], +``` + +(`types` 대신 `src/types` 을 사용하실 수도 있습니다.) +그리고 "foo" 모듈(Module)에 대한 선언(Declaration)을 포함하는 `types/foo/index.d.ts` 파일을 만들어주세요. +이제 코드 안에서 여러분의 새 자료형 선언(Type declaration)을 사용하는 `"foo"` 모듈(Module)을 임포트(Import)하실 수 있을 겁니다. +코드를 컴파일하고 실행시켜서 여러분의 자료형(Typing)이 실행 중에 실제로 벌어지는 일과 잘 맞아떨어지는지 확인해주세요. +실제 코드를 통한 확인이 끝나면, [풀 리퀘스트(Pull request)](#풀-리퀘스트pull-request-만들기)를 만들어주세요. +[이미 존재하는 패키지를 수정](#이미-존재하는-패키지를-수정하기)하거나 [새 패키지를 만들기](#새-패키지-만들기)위한 과정들을 따라하시면 됩니다. + + +### 풀 리퀘스트(Pull request) 만들기 + +여러분의 자료형 선언이 잘 작동하는지 확인하셨다면, DefinitelyTyped 에 공유해주세요. + +우선, 이 저장소를 [포크(fork)](https://guides.github.com/activities/forking/)해 주시고, [node](https://nodejs.org/) 를 설치하신 뒤, `npm install` 명령을 실행해주세요. + + +#### 이미 존재하는 패키지를 수정하기 + +* `cd types/my-package-to-edit` 명령을 실행합니다. +* 자료형(Typing) 파일들을 수정합니다. 테스트를 추가하는 것도 잊지마세요! + 만약 브레이킹 체인지(Breaking change)를 만드셨다면, [메이저 버전(major version)](#i-want-to-update-a-package-to-a-new-major-version)을 꼭 올려주세요. +* 패키지 머릿주석의 "Definitions by" 부분에 여러분의 이름을 추가하실 수도 있습니다. + - 이름을 추가하시면 다른 사람들이 그 패키지에 대한 풀 리퀘스트(Pull request)나 이슈(Issue)를 만들 때 여러분에게 알람이 갑니다. + - `// Definitions by: Alice , Bob ` 와 같이 여러분의 이름을 줄의 맨 마지막에 추가할 수 있습니다. + - 사람이 너무 많을 경우엔, 다음과 같이 여러 줄로 쓰실 수도 있습니다. + ```typescript + // Definitions by: Alice + // Bob + // Steve + // John + ``` +* `tslint.json` 파일이 있는 경우에는, `npm run lint package-name` 명령을 실행시키고 결과를 확인해주세요. 그렇지 않은 경우에는, 해당 패키지가 있는 디렉토리 안에서 `tsc` 명령을 실행시키고 결과를 확인해주세요. + +이미 존재하는 패키지에 대한 풀 리퀘스트(Pull request)를 만들었을 경우에는, `dt-bot` 이 이전 저자들을 자동으로 호출하는지 확인해주세요. +그렇지 않은 경우에는, 여러분이 직접 풀 리퀘스트(Pull request)와 관계있는 사람들을 호출할 수도 있습니다. + + +#### 새 패키지를 만들기 + +만약 라이브러리를 만드는 중이고 라이브러리가 타입스크립트(TypeScript)로 쓰여있다면, DefinitelyTyped 에 선언(Declaration)을 올리는 대신 패키지에 [자동생성된 선언(Declaration) 파일을 포함](http://www.typescriptlang.org/docs/handbook/declaration-files/publishing.html)시킬 수 있습니다. + +NPM 패키지를 위한 자료형(Typing) 패키지를 만드시려면, 패키지의 이름과 같은 이름의 디렉토리를 만들어주세요. +NPM 에 올라가 있지 않은 패키지를 위한 자료형(Typing) 패키지를 만드시려면, 그 패키지가 NPM 에 올라와 있는 패키지와 이름이 겹치지 않는지 확인해주세요. +(`npm info foo` 명령어를 사용하여 `foo` 패키지가 NPM 에 있는지 확인할 수 있습니다.) + +새 자료형 패키지는 다음과 같은 구조로 구성되어있어야만 합니다. + +| 파일 이름 | 용도 | +| --- | --- | +| index.d.ts | 패키지를 위한 자료형(Typing)을 포함하는 파일입니다. | +| foo-tests.ts | 자료형(Typing)의 테스트를 위한 파일입니다. 이 파일의 코드는 실행되지는 않지만, 자료형 검사(Type checking)를 통과해야 합니다. | +| tsconfig.json | `tsc` 명령을 돌릴 수 있게 해주는 파일입니다. | +| tslint.json | 린터(Linter)를 사용할 수 있게 해주는 파일입니다. | + +이 파일들은, npm ≥ 5.2.0 에서는 `npx dts-gen --dt --name my-package-name --template module` 명령으로, +그 이하 경우에는 `npm install -g dts-gen` 와 `dts-gen --dt --name my-package-name --template module` 명령으로 만들 수 있습니다. +`dts-gen` 의 모든 옵션(Option)을 보고싶으시면 [dts-gen](https://github.com/Microsoft/dts-gen) 저장소를 확인해주세요. + +자료형(Typing) 패키지에 새 파일을 추가하거나, `async` 키워드를 사용하기 위해 `"target"` 을 `"es6"` 로 설정하거나, `"lib"` 를 추가하거나, `jsx` 지원을 추가하기 위해서 `tsconfig.json` 파일을 변경해야 할 수도 있습니다. + +DefinitelyTyped 의 관리자들이 주기적으로 새로운 풀 리퀘스트(Pull request)들을 확인하기는 하지만, +다른 풀 리퀘스트(Pull request)가 많을 경우 확인이 느려질 수 있다는 걸 알아주세요. + +[base64-js](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/base64-js) 패키지는 좋은 예시 중 하나입니다. + + +#### 많이 저지르는 실수들 + +* 우선, [안내서(Handbook)](http://www.typescriptlang.org/docs/handbook/declaration-files/do-s-and-don-ts.html)에 나와있는 내용들을 따라주세요. +* 코드에서는 모든 곳에서 탭(Tab)을 사용하거나, 항상 4 개의 띄어쓰기를 사용해주세요. +* `function sum(nums: number[]): number`의 경우, 만약 함수가 인자를 변경하지 않는다면 `ReadonlyArray` 를 사용해주세요. +* `interface Foo { new(): Foo; }`의 경우, + 이런 선언은 이 형(Type)을 가진 객체(Object)에 `new` 를 사용할 수 있도록 만듭니다. 많은 경우 여러분은 `declare class Foo { constructor(); }` 를 사용하려는 것일 겁니다. +* `const Class: { new(): IClass; }`의 경우, + `new` 를 사용할 수 있는 상수를 만드는 대신, `class Class { constructor(); }` 와 같이 클래스 선언(Class declaration)을 사용하는 게 더 좋습니다. +* `getMeAT(): T`의 경우, + 만일 자료형 매개변수(Type parameter)가 함수의 매개변수에 등장하지 않는다면, 그런 제너릭(Generic) 함수를 사용할 필요가 없습니다. + 그 제너릭(Generic) 함수는 단순히 자료형 단언(Type assertion)을 위장시킨 것뿐입니다. 이 경우 `getMeAT() as number` 와 같이 진짜 자료형 단언(Type assertion) 을 사용하는 게 더 좋습니다. + 다음은 괜찮은 제너릭(Generic)의 예시입니다. `function id(value: T): T;`. + 다음은 문제가 있는 제너릭(Generic)의 예시입니다. `function parseJson(json: string): T;`. + 예외적으로, `new Map()` 와 같은 경우는 괜찮습니다. +* `Function` 이나 `Object` 와 같은 형(Type)을 사용하는 것은 대부분의 경우 문제를 일으킵니다. 99% 의 경우 더 구체적인 형(Type)을 사용하는게 가능합니다. [함수(Function)](http://www.typescriptlang.org/docs/handbook/functions.html#function-types) 를 위해서는 `(x: number) => number` 와 같은, 객체를 위해서는 `{ x: number, y: number }` 와 같은 형(Type)들을 사용할 수 있습니다. 형(Type)에 대한 정보가 전혀 없을 경우에는, `Object` 형(Type)이 아니라 [`any`](http://www.typescriptlang.org/docs/handbook/basic-types.html#any) 형(Type)을 사용해야 합니다. 만일 어떤 형(Type)이 객체라는 사실만 알고 있는 경우, `Object` 나 `{ [key: string]: any }` 가 아니라 [`object`](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-2-2.html#object-type) 를 사용해주세요. +* `var foo: string | any`의 경우, + `any` 가 합 자료형(Union type)의 안에서 사용될 경우, 결과 형(Type)은 언제나 `any` 가 됩니다. 따라서 형(Type)의 `string` 부분이 유용해 보인다 하더라도, 사실은 자료형 검사(Type checking)의 측면에서 `any` 와 다른 것이 없습니다. + 대신, `any`, `string`, 나 `string | object` 중 하나를 필요에 맞게 골라서 사용해주세요. + + +#### 패키지 삭제하기 + +패키지가 스스로의 형(Type)을 [포함](http://www.typescriptlang.org/docs/handbook/declaration-files/publishing.html)하게 되면, DefinitelyTyped 에 있는 자료형(Typing) 패키지를 삭제하는 것이 좋습니다. + +`npm run not-needed -- typingsPackageName asOfVersion sourceRepoURL [libraryName]` 명령어를 사용하여 자료형(Typing) 패키지를 삭제할 수 있습니다. +- `typingsPackageName` 는 삭제할 디렉토리의 이름입니다. +- `asOfVersion` 는 새 스텁(Stub) 용 `@types/foo` 를 퍼블리시(Publish)할 버전입니다. 이 버전은 현재 NPM 에 올라간 버전보다 더 높은 버전이어야 합니다. +- `sourceRepoURL` 는 자료형(Typing)을 포함하게 된 저장소의 주소입니다. +- `libraryName` 는 패키지의 이름을 읽기 쉽게 쓴 것입니다. 즉, "angular2" 대신에 "Angular 2" 와 같이 쓰는 것이 좋습니다. (생략했을 경우에는 "typingsPackageName" 와 같은 것으로 취급됩니다.) + +DefinitelyTyped 의 다른 패키지들이 삭제된 자료형(Typing) 패키지를 사용하고 있을 경우, 형(Type)을 포함하기 시작한 원래 패키지를 사용하도록 수정해야합니다. 삭제된 자료형(Typing) 패키지를 사용하는 각 DefinitelyTyped 패키지들의 `package.json` 파일에 `"dependencies": { "foo": "x.y.z" }` 를 추가해주시면 됩니다. + +DefinitelyTyped 에 한 번도 올라온 적 없는 패키지가 형(Type)을 포함하게 되었다면, `notNeededPackages.json` 파일에 추가할 필요도 없습니다. + + +#### 린트(Lint)하기 + +자료형(Typing) 패키지를 린트(Lint)하려면, 패키지 디렉토리에 `{ "extends": "dtslint/dt.json" }` 를 포함하고 있는 `tslint.json` 파일을 추가해주시면 됩니다. 모든 새 패키지는 해당 파일을 가지고 있어야 합니다. +고쳐야 하지만 아직 고쳐지지 않은 린트(Lint) 결과가 있을 때에만 `tslint.json` 에서 린트 규칙(Lint rule)을 사용하지 않도록 설정할 수 있습니다. 예를 들어, + +```js +{ + "extends": "dtslint/dt.json", + "rules": { + // 이 패키지는 Function 형을 사용하고 있으며, 고치는 게 쉽지 않다. + "ban-types": false + } +} +``` + +(린트 규칙(Lint rule)이 절대로 적용되서는 안되는 경우에는, `// tslint:disable rule-name` 나 `//tslint:disable-next-line rule-name` 를 사용하는 것이 좋습니다. 후자가 더 나은 방식입니다.) + +어떤 표현식(Expression)이 특정한 형(Type)을 가진다고 단언(Assert)하고 싶을 때에는 `$ExpectType` 를 사용하시면 됩니다. 어떤 표현식(Expression)이 컴파일에 실패해야하는 경우에는 `$ExpectError` 를 하시면 됩니다. + +```js +// $ExpectType void +f(1); + +// $ExpectError +f("one"); +``` + +[dtslint](https://github.com/Microsoft/dtslint#write-tests) 저장소의 README 파일에서 더 자세한 내용을 확인하실 수 있습니다. + +이런 테스트들은 `npm run lint package-name` 명령으로 실행해볼 수 있습니다. 이 때, `package-name` 은 테스트하고 싶은 패키지의 이름입니다. +테스트 스크립트는 [dtslint](https://github.com/Microsoft/dtslint) 를 사용하고 있습니다. + + +## 자주 하는 질문들 + +#### 이 저장소와 `@types` 패키지들이 대체 무슨 관계가 있는 건가요? + +`master` 브랜치(Branch)의 내용들이 [types-publisher](https://github.com/Microsoft/types-publisher) 를 사용해 자동으로 `@types` 퍼블리시(Publish)됩니다. + +#### 풀 리퀘스트(Pull request)를 제출했습니다. 이게 합쳐질 때까지 얼마나 걸리나요? + +상황에 따라 다르지만, 대부분의 풀 리퀘스트(Pull request)들은 일주일 안에 합쳐집니다. 머릿주석에 있는 저자 중 한명에 의해 승인된 풀 리퀘스트(Pull request)는 보통 더 빨리 합쳐집니다. 새로운 패키지에 대한 풀 리퀘스트(Pull request)는 관리자의 세세한 코드 리뷰를 필요로 하기 때문에 더 오래 걸리는 경우가 많습니다. 각 PR 들은 합쳐지기 전에 TypeScript or DefinitelyTyped 팀 구성원의 코드 리뷰를 받아야 하며, 이는 사람이 하는 일이기 때문에 느려질 수도 있으니 양해를 바랍니다. [풀 리퀘스트 번다운 보드(PR Burndown Board)](https://github.com/DefinitelyTyped/DefinitelyTyped/projects/3?card_filter_query=is%3Aopen)에서 열린 풀 리퀘스트에 대한 관리자들의 진행도를 확인하실 수 있습니다. + +#### 내 풀 리퀘스트(Pull request)는 합쳐졌습니다. 언제 NPM 에 `@types` 패키지가 갱신되나요? + +NPM 의 패키지들은 수시간 안에 갱신될 겁니다. 만약 24 시간이 지나도 갱신되지 않으면, 문제를 파악하기 위해 @RyanCavanaugh 나 @andy-ms 를 풀 리퀘스트(Pull request)에서 호출해주세요. + +#### 다른 자료형 정의(Type definition)에 의존하는 자료형 정의(Type definition)을 만들고 있습니다. `` 와 임포트(import) 중 무엇을 사용해야하나요? + +외부 모듈(`export` 를 사용하는 모듈)을 사용할 경우, 임포트(import)를 사용해주세요. +환경과 관련된 모듈(ambient module)(`declare module` 를 쓰거나 전역 변수들을 선언한 모듈)을 사용할 경우, `` 를 사용해주세요. + +#### `package.json` 파일이 가끔 보이던데? + +일반적으로는 `package.json` 파일을 사용할 필요가 없습니다. 패키지가 퍼블리시(Publish)될 때 패키지를 위한 `package.json` 파일은 자동으로 생성됩니다. +가끔 보이는 `package.json` 파일은 의존하는 것들을 표시하기 위해 사용됩니다. [예시](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/pikaday/package.json)를 한 번 보세요. +의존성을 제외한 다른 필드(Field)들, 그러니까 `"description"` 같은 것들은 사용해서는 안됩니다. +옛날 `@types` 패키지를 사용하고 싶으실 경우에도 `"dependencies": { "@types/foo": "x.y.z" }` 와 같은 내용을 `package.json` 파일에 넣으셔야 합니다. + +#### 어떤 패키지들에 `tslint.json` 이 없거나, `tsconfig.json` 에 `"noImplicitAny": true`, `"noImplicitThis": true`, 나 `"strictNullChecks": true` 가 없어요. + +그럼 그 패키지들이 잘못된 겁니다. 고쳐서 풀 리퀘스트(Pull request)를 제출해주시면 고맙겠습니다. + +#### 자료형 정의(Type definition)을 요청할 수 있나요? + +이미 요청된 자료형 정의(Type definition)들을 [여기서](https://github.com/DefinitelyTyped/DefinitelyTyped/labels/Definition%3ARequest) 보실 수 있습니다. + +#### DOM 을 위한 자료형 정의(Type definitions)는요? + +웹 표준(Web standard)과 관련이 있는 자료형(Typing)들은 [TSJS-lib-generator](https://github.com/Microsoft/TSJS-lib-generator) 저장소에 기여해서 고치실 수 있습니다. 고쳐진 자료형(Typing)은 `lib.dom.d.ts` 파일에 포함될 겁니다. + +#### 어떤 패키지가 `export =` 를 쓰고 있는데, 저는 디폴트 임포트(Default import)가 더 좋습니다. `export =` 를 `export default` 로 바꿔도 되나요? + +타입스크립트(TypeScript) 2.7 이상을 사용하고 계시면 프로젝트 안에서 `--esModuleInterop` 를 사용해주세요. +그 이하의 경우, 디폴트 임포트(Default import)가 동작하는 환경(Webpack, SystemJS, esm)에서 작업 중이시면 [`--allowSyntheticDefaultImports`](http://www.typescriptlang.org/docs/handbook/compiler-options.html) 를 사용하는 걸 고려해보세요. +자료형 정의(Type definition)가 맞는 경우에는 자료형 정의(Type definition)을 수정하지 마세요. +NPM 패키지의 경우, `node -p 'require("foo")'` 가 원하는 값이라면 `export =` 이 맞고, `node -p 'require("foo").default'` 이 원하는 값이라면 `export default` 이 맞습니다. + +#### 자료형 선언(Type declaration)에서 타입스크립트(TypeScript) 2.1 이상의 기능을 사용하고 싶습니다. + +정의(Definition) 머릿주석(`// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped`) 뒤에 `// TypeScript Version: 2.1` 를 추가해주시면 됩니다. + +#### 타입스크립트(TypeScript)에 기본으로 포함되지 않은 DOM API 를 추가하고 싶어요. + +[TSJS-Lib-Generator](https://github.com/Microsoft/TSJS-lib-generator#readme) 저장소가 관련되어있을 가능성이 있습니다. 해당 저장소의 안내를 따라주세요. +해당 표준이 아직 초안인 상태라면, 이 저장소와 관련된 일입니다. +`dom-` 으로 시작하는 패키지를 만드신 뒤, "Project" 머릿주석 부분에 해당 표준의 링크를 써 주세요. +다만 표준이 초안을 벗어나면 DefinitelyTyped 에서 삭제되고 `@types` 패키지가 지원이 중단된(Deprecated) 것으로 표시될 수도 있습니다. + +#### 패키지를 새 메이저 버전(major version)에 맞게 갱신하고 싶어요. + +옛날 버전도 계속해서 수정할 예정이라면, 이전 버전에 해당하는 새 디렉토리(예를 들어 `2.` 버전을 위해서는 `v2`)를 만들고 현재 파일들을 그 디렉토리로 옮겨야 합니다. 새 디렉토리로 옮긴 뒤에는 + +1. `tsconfig.json` 와 `tslint.json` 에 포함된 상대경로들을 수정해주어야 합니다. +2. 경로 대응 규칙(Path mapping rule)을 추가하여 테스트가 올바른 버전을 검사하도록 해야합니다. + +예를 들어, [history 패키지의 2 버전의 `tsconfig.json`](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/history/v2/tsconfig.json) 파일은 다음과 같이 생겼습니다. + +```json +{ + "compilerOptions": { + "baseUrl": "../../", + "typeRoots": ["../../"], + "paths": { + "history": [ "history/v2" ] + }, + }, + "files": [ + "index.d.ts", + "history-tests.ts" + ] +} +``` + +수정 중인 패키지에 의존하는 DefinitelyTyped 의 다른 패키지들이 새 버전과 호환되지 않을 경우, 그 패키지들에도 옛날 버전으로의 경로 대응 규칙(Path mapping rule)을 추가해주어야 합니다. 수정 중인 패키지에 의존하는 패키지에 의존하는 패키지들에도 똑같은 작업을 해 주셔야 합니다. + +예를 들어, `react-router` 패키지는 `history@2` 패키지에 의존하고 있기 때문에, [react-router 패키지의 `tsconfig.json`](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/react-router/tsconfig.json) 파일이 `"history": [ "history/v2" ]` 와 같은 경로 대응 규칙(Path mapping rule)을 가지고 있는 걸 볼 수 있습니다. +이어서 (`react-router` 패키지에 의존하는 패키지인) `react-router-bootstrap` 또한 [tsconfig.json](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/react-router-bootstrap/tsconfig.json) 파일 안에 경로 대응 규칙(Path mapping rule)을 가지고 있는 것을 보실 수 있습니다. + +`/// ` 에서는 경로 대응 규칙(Path mapping rule)이 동작하지 않기 때문에, DefinitelyTyped 패키지로에 의존할 때에는 임포트(import) 를 사용해야 합니다. + +#### 전역적으로도 모듈로도 사용될 수 있는 패키지의 자료형 선언(Type declaration)은 어떻게 쓰나요? + +타입스크립트 안내서(TypeScript Handbook)은 [선언(Declaration)을 쓰는 방법에 대한 전반적인 정보](https://www.typescriptlang.org/docs/handbook/declaration-files/introduction.html)와 [예시들](https://www.typescriptlang.org/docs/handbook/declaration-files/templates/global-modifying-module-d-ts.html)을 포함하고 있습니다. 이 내용에는 ES6 식의 모듈 문법을 사용할 수 있는 자료형 선언(Type declaration)을 만드는 방법과 객체를 전역에서 사용할 수 있도록 하는 방법이 포함되어 있습니다. [big.js 패키지의 자료형 선언(Type declaration)](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/big.js/index.d.ts)이 실례입니다. 이 패키지는 웹 페이지의 스크립트 태그를 사용해 불러올 수 있으며, 또한 ES6 식의 임포트(Import) 구문을 사용해서 불러올 수도 있습니다. + +여러분의 패키지가 임포트(Import) 구문을 사용했을 때와 전역적으로 불렀을 때를 테스트 해보고 싶다면, `test` 디렉토리를 추가하고 `YourLibraryName-global.test.ts` 그리고 `YourLibraryName-module.test.ts` 라는 이름으로 테스트 파일 두 개를 추가해주세요. **전역(Global)** 테스트 파일은 웹 페이지에서 전역적으로 사용될 때를 테스트하는 파일입니다. 이 파일에서는 임포트(Import) 구문을 사용하지 않아야 합니다. **모듈(Module)** 테스트 파일은 임포트(Import) 구문을 사용할 때를 테스트 하는 파일입니다. 만약 여러분의 `tsconfig.json` 파일이 `files` 필드(Field)를 가지고 있다면, 이 필드(Field)는 반드시 두 테스트 파일을 모두 포함해야 합니다. [이 방식을 사용하는 실례](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/big.js/test) 또한 big.js 패키지의 자료형 선언(Type declaration)에서 확인해보실 수 있습니다. + +각각의 테스트 파일에 모든 상황을 테스트할 필요는 없다는 걸 잊지마세요. 전역 테스트 파일에서는 전역적으로 사용될 때만 테스트하고, 모듈 테스트 파일에서 나머지 상황들을 모두 테스트 할 수 있으며, 그 반대의 경우도 괜찮습니다. + +#### 지역 패키지(Scoped package)의 경우는 어떻게 하죠? + +`@foo/bar` 패키지와 같은 지역 패키지(Scoped package)를 위한 자료형 패키지(Type package)는 `types/foo__bar` 디렉토리에 추가하면 됩니다. 밑줄 문자가 두 번 있는 것에 주의하세요. + +지역 패키지(Scoped package)를 위한 자료형 패키지(Type package)를 생성하기 위해 `dts-gen` 를 사용한 경우에는, +다음과 같이 생성된 `tsconfig.json` 안에 지역 패키지(Scoped package)를 위한 적절한 경로 대응 규칙(Path mapping rule)을 추가해주어야 합니다. + +```json +{ + "paths":{ + "@foo/bar": ["foo__bar"] + } +} +``` + + +#### 깃헙(GitHub)이 보여주는 파일 히스토리(History)가 불완전해요. + +깃헙은 이름이 바뀐 파일의 히스토리(History)를 [지원하지 않습니다](http://stackoverflow.com/questions/5646174/how-to-make-github-follow-directory-history-after-renames). 대신 [`git log --follow`](https://www.git-scm.com/docs/git-log) 명령을 사용하세요. + +#### ES6 에서 사용하는 임포트(Import)를 사용하기 위해 모듈을 익스포트(Export)하지 않는 패키지들에 빈 이름공간을 추가해야 하나요? + +[chai-http](https://github.com/chaijs/chai-http) 패키지와 같은 몇몇 패키지들은 함수를 익스포트(Export)합니다. + +이런 패키지들을 `import * as foo from "foo";` 와 같이 임포트(Import)하면 다음과 같은 오류가 발생합니다. + +> error TS2497: Module 'foo' resolves to a non-module entity and cannot be imported using this construct + +이 오류는 함수의 이름과 똑같은 빈 이름공간(Namespace)을 정의해서 없앨 수 있으나, 좋은 방법은 아닙니다. +[스택오버플로(Stack Overflow)의 이 질문의 답변](https://stackoverflow.com/questions/39415661/what-does-resolves-to-a-non-module-entity-and-cannot-be-imported-using-this)이 이 문제와 관련되어 자주 언급됩니다. + +`import foo = require("foo");` 를 사용하여 모듈을 임포트(Import)하거나, 환경에서 ES6 모듈 변환(Module interop)을 지원한다면 `--allowSyntheticDefaultImports` 와 함께 `import foo from "foo";` 같은 디폴트 임포트(Default import)를 사용하는 것이 더 나은 방법입니다. + +## 라이센스 + +이 프로젝트는 MIT license 가 적용되어 있습니다. + +각 자료형 정의(Type definition) 파일들의 저작권은 각 기여자들에게 있으며, 기여자들은 해당 자료형 정의(Type definition) 파일들의 맨 위에 나열되어 있습니다. + +[![Analytics](https://ga-beacon.appspot.com/UA-47495295-4/borisyankov/DefinitelyTyped)](https://github.com/igrigorik/ga-beacon) diff --git a/README.md b/README.md index 8e582f05b4..9a31d73da1 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ Also see the [definitelytyped.org](http://definitelytyped.org) website, although information in this README is more up-to-date. -*[You can also read this README in Spanish!](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/README.es.md)* +*You can also read this README in [Spanish](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/README.es.md) and [Korean!](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/README.ko.md)* ## What are declaration files? @@ -54,7 +54,7 @@ Before you share your improvement with the world, use it yourself. #### Test editing an existing package -To add new features you can use [module augmentation](http://www.typescriptlang.org/docs/handbook/declaration-merging.html). +To add new features you can use [module augmentation](http://www.typescriptlang.org/docs/handbook/declaration-merging.html#module-augmentation). You can also directly edit the types in `node_modules/@types/foo/index.d.ts`, or copy them from there and follow the steps below. diff --git a/notNeededPackages.json b/notNeededPackages.json index f3dc9ef37f..f3f09c0f7b 100644 --- a/notNeededPackages.json +++ b/notNeededPackages.json @@ -156,12 +156,6 @@ "sourceRepoURL": "https://github.com/brianloveswords/base64url", "asOfVersion": "2.0.0" }, - { - "libraryName": "better-scroll", - "typingsPackageName": "better-scroll", - "sourceRepoURL": "https://github.com/ustbhuangyi/better-scroll", - "asOfVersion": "1.5.0" - }, { "libraryName": "BigInteger.js", "typingsPackageName": "big-integer", @@ -396,6 +390,12 @@ "sourceRepoURL": "https://github.com/MikeMcl/decimal.js", "asOfVersion": "7.4.0" }, + { + "libraryName": "delay", + "typingsPackageName": "delay", + "sourceRepoURL": "https://github.com/sindresorhus/delay", + "asOfVersion": "3.1.0" + }, { "libraryName": "DevExtreme", "typingsPackageName": "devextreme", @@ -570,6 +570,12 @@ "sourceRepoURL": "https://github.com/acdlite/flux-standard-action", "asOfVersion": "1.1.0" }, + { + "libraryName": "fork-ts-checker-webpack-plugin", + "typingsPackageName": "fork-ts-checker-webpack-plugin", + "sourceRepoURL": "https://github.com/Realytics/fork-ts-checker-webpack-plugin", + "asOfVersion": "0.4.5" + }, { "libraryName": "Foundation Sites", "typingsPackageName": "foundation-sites", @@ -678,6 +684,12 @@ "sourceRepoURL": "https://github.com/facebook/immutable-js", "asOfVersion": "3.8.7" }, + { + "libraryName": "interactjs", + "typingsPackageName": "interact.js", + "sourceRepoURL": "https://github.com/taye/interact.js", + "asOfVersion": "1.3.0" + }, { "libraryName": "inversify", "typingsPackageName": "inversify", @@ -1140,6 +1152,24 @@ "sourceRepoURL": "https://github.com/gpbl/react-day-picker", "asOfVersion": "5.3.0" }, + { + "libraryName": "react-dnd", + "typingsPackageName": "react-dnd", + "sourceRepoURL": "https://github.com/react-dnd/react-dnd", + "asOfVersion": "3.0.2" + }, + { + "libraryName": "react-dnd-html5-backend", + "typingsPackageName": "react-dnd-html5-backend", + "sourceRepoURL": "https://github.com/react-dnd/react-dnd", + "asOfVersion": "3.0.2" + }, + { + "libraryName": "react-dnd-test-backend", + "typingsPackageName": "react-dnd-test-backend", + "sourceRepoURL": "https://github.com/react-dnd/react-dnd", + "asOfVersion": "3.0.2" + }, { "libraryName": "react-flip-move", "typingsPackageName": "react-flip-move", @@ -1194,12 +1224,24 @@ "sourceRepoURL": "https://github.com/react-native-community/react-native-modal", "asOfVersion": "4.1.1" }, + { + "libraryName": "react-native-navigation", + "typingsPackageName": "react-native-navigation", + "sourceRepoURL": "https://github.com/wix/react-native-navigation", + "asOfVersion": "2.0.0" + }, { "libraryName": "react-split-pane", "typingsPackageName": "react-split-pane", "sourceRepoURL": "https://github.com/tomkp/react-split-pane", "asOfVersion": "0.1.67" }, + { + "libraryName": "react-svg", + "typingsPackageName": "react-svg", + "sourceRepoURL": "https://github.com/tanem/react-svg", + "asOfVersion": "5.0.0" + }, { "libraryName": "realm", "typingsPackageName": "realm", @@ -1219,7 +1261,7 @@ "asOfVersion": "0.1.5" }, { - "libraryName": "react-bootstrap", + "libraryName": "redux-bootstrap", "typingsPackageName": "redux-bootstrap", "sourceRepoURL": "https://github.com/remojansen/redux-bootstrap", "asOfVersion": "1.1.0" @@ -1494,6 +1536,12 @@ "sourceRepoURL": "https://github.com/samchon/tstl", "asOfVersion": "1.5.7" }, + { + "libraryName": "typed.js", + "typingsPackageName": "typed.js", + "sourceRepoURL": "https://github.com/mattboldt/typed.js", + "asOfVersion": "2.0.9" + }, { "libraryName": "TypeScript", "typingsPackageName": "typescript", @@ -1584,6 +1632,12 @@ "sourceRepoURL": "http://webix.com", "asOfVersion": "5.1.1" }, + { + "libraryName": "winston", + "typingsPackageName": "winston", + "sourceRepoURL": "https://github.com/winstonjs/winston.git", + "asOfVersion": "2.4.4" + }, { "libraryName": "wolfy87-eventemitter", "typingsPackageName": "wolfy87-eventemitter", diff --git a/package.json b/package.json index c5b1b03057..09fe064d48 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "private": true, "name": "definitely-typed", - "version": "0.0.2", + "version": "0.0.3", "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped", "repository": { "type": "git", diff --git a/types/abstract-leveldown/abstract-leveldown-tests.ts b/types/abstract-leveldown/abstract-leveldown-tests.ts new file mode 100644 index 0000000000..c5edadf069 --- /dev/null +++ b/types/abstract-leveldown/abstract-leveldown-tests.ts @@ -0,0 +1,13 @@ +import { AbstractLevelDOWN } from 'abstract-leveldown'; + +const test = (levelDown: AbstractLevelDOWN) => { + levelDown.put("key", "value", (err?) => { }); + levelDown.put(1, "value", { something: true }, (err?) => { }); + + levelDown.get("key", (err?) => { }); + levelDown.get(1, { something: true }, (err?) => { }); +}; +// $ExpectType void +test(new AbstractLevelDOWN('here')); +// $ExpectType void +test(AbstractLevelDOWN('there')); diff --git a/types/abstract-leveldown/index.d.ts b/types/abstract-leveldown/index.d.ts new file mode 100644 index 0000000000..2caf073432 --- /dev/null +++ b/types/abstract-leveldown/index.d.ts @@ -0,0 +1,103 @@ +// Type definitions for abstract-leveldown 5.0 +// Project: https://github.com/Level/abstract-leveldown +// Definitions by: Meirion Hughes +// Daniel Byrne +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export interface AbstractOptions { + readonly [k: string]: any; +} + +export type ErrorCallback = (err: Error | undefined) => void; +export type ErrorValueCallback = (err: Error | undefined, value: V) => void; +export type ErrorKeyValueCallback = (err: Error | undefined, key: K, value: V) => void; + +export interface AbstractOpenOptions extends AbstractOptions { + createIfMissing?: boolean; + errorIfExists?: boolean; +} + +export interface AbstractGetOptions extends AbstractOptions { + asBuffer?: boolean; +} + +export interface AbstractLevelDOWN extends AbstractOptions { + open(cb: ErrorCallback): void; + open(options: AbstractOpenOptions, cb: ErrorCallback): void; + + close(cb: ErrorCallback): void; + + get(key: K, cb: ErrorValueCallback): void; + get(key: K, options: AbstractGetOptions, cb: ErrorValueCallback): void; + + put(key: K, value: V, cb: ErrorCallback): void; + put(key: K, value: V, options: AbstractOptions, cb: ErrorCallback): void; + + del(key: K, cb: ErrorCallback): void; + del(key: K, options: AbstractOptions, cb: ErrorCallback): void; + + batch(): AbstractChainedBatch; + batch(array: ReadonlyArray>, cb: ErrorCallback): AbstractChainedBatch; + batch(array: ReadonlyArray>, options: AbstractOptions, cb: ErrorCallback): AbstractChainedBatch; + + iterator(options?: AbstractIteratorOptions): AbstractIterator; +} + +export interface AbstractLevelDOWNConstructor { + new (location: string): AbstractLevelDOWN; + (location: string): AbstractLevelDOWN; +} + +export interface AbstractIteratorOptions extends AbstractOptions { + gt?: K; + gte?: K; + lt?: K; + lte?: K; + reverse?: boolean; + limit?: number; + keys?: boolean; + values?: boolean; + keyAsBuffer?: boolean; + valueAsBuffer?: boolean; +} + +export type AbstractBatch = PutBatch | DelBatch; + +export interface PutBatch { + readonly type: 'put'; + readonly key: K; + readonly value: V; +} + +export interface DelBatch { + readonly type: 'del'; + readonly key: K; +} + +export interface AbstractChainedBatch extends AbstractChainedBatchConstructor, AbstractOptions { + put: (key: K, value: V) => this; + del: (key: K) => this; + clear: () => this; + write(cb: ErrorCallback): any; + write(options: any, cb: ErrorCallback): any; +} + +export interface AbstractChainedBatchConstructor { + new(db: any): AbstractChainedBatch; + (db: any): AbstractChainedBatch; +} + +export interface AbstractIterator extends AbstractChainedBatchConstructor { + db: AbstractLevelDOWN; + next(cb: ErrorKeyValueCallback): this; + end(cb: ErrorCallback): void; +} + +export interface AbstractIteratorConstructor { + new(db: any): AbstractIterator; + (db: any): AbstractIterator; +} + +export const AbstractLevelDOWN: AbstractLevelDOWNConstructor; +export const AbstractIterator: AbstractIteratorConstructor; +export const AbstractChainedBatch: AbstractChainedBatchConstructor; diff --git a/types/meteor-univserse-i18n/tsconfig.json b/types/abstract-leveldown/tsconfig.json similarity index 91% rename from types/meteor-univserse-i18n/tsconfig.json rename to types/abstract-leveldown/tsconfig.json index 7beab3bd30..286b867f00 100644 --- a/types/meteor-univserse-i18n/tsconfig.json +++ b/types/abstract-leveldown/tsconfig.json @@ -18,6 +18,6 @@ }, "files": [ "index.d.ts", - "meteor-univserse-i18n-tests.ts" + "abstract-leveldown-tests.ts" ] } diff --git a/types/abstract-leveldown/tslint.json b/types/abstract-leveldown/tslint.json new file mode 100644 index 0000000000..256ee54775 --- /dev/null +++ b/types/abstract-leveldown/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": "dtslint/dt.json" +} diff --git a/types/ace/index.d.ts b/types/ace/index.d.ts index 828aab87c2..7faa5da4f8 100644 --- a/types/ace/index.d.ts +++ b/types/ace/index.d.ts @@ -832,8 +832,9 @@ declare namespace AceAjax { /** * [Sets the value of the distance between the left of the editor and the leftmost part of the visible content.]{: #EditSession.setScrollLeft} + * @param scrollLeft The new scroll left value **/ - setScrollLeft(): void; + setScrollLeft(scrollLeft: number): void; /** * [Returns the value of the distance between the left of the editor and the leftmost part of the visible content.]{: #EditSession.getScrollLeft} diff --git a/types/ace/test/edit_session.ts b/types/ace/test/edit_session.ts index 4713495f7a..29b3bb6bd8 100644 --- a/types/ace/test/edit_session.ts +++ b/types/ace/test/edit_session.ts @@ -18,6 +18,23 @@ function createFoldTestSession() { return session; } +function createScrollTestRenderer(): AceAjax.VirtualRenderer | null { + var el = document.createElement("div"); + + if (!el.getBoundingClientRect) { + console.log("Skipping test: This test only runs in the browser"); + return null; + } + + el.style.left = "20px"; + el.style.top = "30px"; + el.style.width = "300px"; + el.style.height = "100px"; + document.body.appendChild(el); + + return new AceAjax.VirtualRenderer(el); +} + function assertArray(a, b) { assert.equal(a + "", b + ""); assert.ok(a.length == b.length); @@ -915,5 +932,25 @@ const aceEditSessionTests = { session = new AceAjax.EditSession(new Array(30).join("\n")); session.documentToScreenPosition(2, 0); session.documentToScreenPosition(2, 0); + }, + + "test setScrollTop()": function() { + var renderer = createScrollTestRenderer(); + var session = new AceAjax.EditSession(["1", "2", "3", "2", "3", "4"]); + renderer.setSession(session); + assert.equal(renderer.getScrollTop(), 0); + session.setScrollTop(40); + assert.equal(renderer.getScrollTop(), 40); + renderer.getScrollTop() + }, + + "test setScrollLeft()": function() { + var renderer = createScrollTestRenderer(); + var session = new AceAjax.EditSession(["1", "2", "3", "2", "3", "4"]); + renderer.setSession(session); + assert.equal(renderer.getScrollLeft(), 0); + session.setScrollLeft(40); + assert.equal(renderer.getScrollLeft(), 40); + renderer.getScrollLeft() } -}; \ No newline at end of file +}; diff --git a/types/acl/index.d.ts b/types/acl/index.d.ts index 43de3f5369..3f4df31aa2 100644 --- a/types/acl/index.d.ts +++ b/types/acl/index.d.ts @@ -2,9 +2,8 @@ // Project: https://github.com/optimalbits/node_acl // Definitions by: Qubo // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.3 +// TypeScript Version: 2.8 -/// /// /// diff --git a/types/activedirectory2/activedirectory2-tests.ts b/types/activedirectory2/activedirectory2-tests.ts new file mode 100644 index 0000000000..662109e746 --- /dev/null +++ b/types/activedirectory2/activedirectory2-tests.ts @@ -0,0 +1,14 @@ +import ActiveDirectory = require("activedirectory2"); + +const ad = new ActiveDirectory({ + url: 'ldap://192.168.199.10', + baseDN: 'OU=MyUsers,DC=mydomain,DC=com', + username: 'service-user@mydomain.com', + password: 'xxxxx000pw' +}); + +ad.authenticate("test@mydomain.com", "yyyy111pw", (err, authed) => { + console.log("hello"); + console.log(err); + console.log(authed); +}); diff --git a/types/activedirectory2/index.d.ts b/types/activedirectory2/index.d.ts new file mode 100644 index 0000000000..f963ae32ba --- /dev/null +++ b/types/activedirectory2/index.d.ts @@ -0,0 +1,151 @@ +// Type definitions for activedirectory2 1.2 +// Project: https://github.com/jsumners/node-activedirectory#readme +// Definitions by: pas +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.5 + +import { Filter } from "ldapjs"; + +interface ADProperties { + url: string; + baseDN: string; + username: string; + password: string; + pageSize?: 1000; + entryParser?: (entry: object, raw: string, cb: (entry: object) => void) => void; + referrals?: { + enabled: false, + exclude: [ + 'ldaps?://ForestDnsZones\\..*/.*', + 'ldaps?://DomainDnsZones\\..*/.*', + 'ldaps?://.*/CN=Configuration,.*' + ] + }; + attributes?: { + user: [ + 'dn', 'distinguishedName', + 'userPrincipalName', 'sAMAccountName', 'mail', + 'lockoutTime', 'whenCreated', 'pwdLastSet', 'userAccountControl', + 'employeeID', 'sn', 'givenName', 'initials', 'cn', 'displayName', + 'comment', 'description' + ], + group: [ + 'dn', 'cn', 'description', 'distinguishedName', 'objectCategory' + ] + }; +} + +interface LDAPjsReqProps { + url: string; + tlsOptions: { + host?: string; + key?: string; + cert?: string; + ca?: string; + rejectUnauthorized: boolean; + }; + socketPath?: string; + log?: any; + timeout?: number; + idleTimeout?: number; + connectionTimeout?: number; + strictDN?: boolean; +} + +type MembershipType = 'all'|'user'|'group'; + +interface ReqProps extends LDAPjsReqProps { + baseDN?: string; + bindDN?: string; + bindCredentials?: string; + scope?: 'base' | 'one' | 'sub'; + filter: string | Filter; + attributes: AttributeSpec; + sizeLimit: 0; + timeLimit: 10; + includeMembership: MembershipType[]; +} + +interface AttributeSpec { + user: UserAttributes[]; + group: GroupAttributes[]; +} + +type GroupAttributes = + | 'distinguishedName' + | 'objectCategory' + | 'cn' + | 'description'; + +type UserAttributes = + | 'distinguishedName' + | 'userPrincipalName' + | 'sAMAccountName' + | 'mail' + | 'lockoutTime' + | 'whenCreated' + | 'pwdLastSet' + | 'userAccountControl' + | 'employeeID' + | 'sn' + | 'givenName' + | 'initials' + | 'cn' + | 'displayName' + | 'comment' + | 'description'; + +interface FindResult { + groups: object[]; + users: object[]; + other: object[]; +} + +declare class ActiveDirectory { + constructor(props: ADProperties); + authenticate( + username: string, + password: string, + callback: (err: string, authenticated: boolean) => void + ): void; + isUserMemberOf( + opts: ReqProps, + username: string, + groupName: string, + callback: (err: object, res: boolean) => void + ): void; + find( + opts: string | ReqProps, + callback: (err: object, results: FindResult) => void + ): void; + findDeletedObjects( + opts: string | ReqProps, + callback: (err: object, results: object[]) => void + ): void; + findUser( + opts: string | ReqProps, + username: string, + callback: (err: object, user: object) => void + ): void; + findUsers( + opts: string | ReqProps, + callback: (err: object, users: object[]) => void + ): void; + findGroup( + opts: string | ReqProps, + groupName: string, + callback: (err: object, group: object) => void + ): void; + findGroups( + opts: string | ReqProps, + groupName: string, + callback: (err: object, groups: object[]) => void + ): void; + getRootDSE( + url: string, + attributes: string[], + callback: (err: object, result: object) => void + ): void; +} + +export = ActiveDirectory; diff --git a/types/activedirectory2/tsconfig.json b/types/activedirectory2/tsconfig.json new file mode 100644 index 0000000000..57a68150ac --- /dev/null +++ b/types/activedirectory2/tsconfig.json @@ -0,0 +1,24 @@ +{ + "files": [ + "index.d.ts", + "activedirectory2-tests.ts" + ], + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "es2015.iterable" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + } +} diff --git a/types/fork-ts-checker-webpack-plugin/tslint.json b/types/activedirectory2/tslint.json similarity index 100% rename from types/fork-ts-checker-webpack-plugin/tslint.json rename to types/activedirectory2/tslint.json diff --git a/types/activex-excel/activex-excel-tests.ts b/types/activex-excel/activex-excel-tests.ts index 4f6fab3aa1..505fcacfef 100644 --- a/types/activex-excel/activex-excel-tests.ts +++ b/types/activex-excel/activex-excel-tests.ts @@ -16,6 +16,17 @@ const inCollection = (collection: { Item(index: any): T }, index: strin return item; }; +{ + let app1: Excel.Application | null = new ActiveXObject('Excel.Application'); + app1.Visible = true; + const book1 = app1.Workbooks.Add(); + + app1.Quit(); + app1 = null; + + WScript.Quit(); +} + const app = new ActiveXObject('Excel.Application'); // create a workbook -- https://msdn.microsoft.com/en-us/vba/excel-vba/articles/create-a-workbook @@ -27,7 +38,7 @@ newBook.SaveAs('allsales.xls'); // create or replace a worksheet -- https://msdn.microsoft.com/en-us/vba/excel-vba/articles/create-or-replace-a-worksheet const newOrExistingWorksheet = () => { const mySheetName = 'Sheet4'; - let mySheet = inCollection(newBook.Worksheets, mySheetName) as Excel.Worksheet | undefined; + let mySheet = inCollection(newBook.Worksheets, mySheetName); if (!mySheet) { WScript.Echo(`The sheet named "${mySheetName} doesn't exist, but will be created.`); mySheet = app.Worksheets.Add() as Excel.Worksheet; @@ -37,7 +48,7 @@ const newOrExistingWorksheet = () => { const replaceWorksheet = () => { const mySheetName = 'Sheet4'; app.DisplayAlerts = false; - let mySheet = inCollection(app.Worksheets, mySheetName); + let mySheet = inCollection(app.Worksheets, mySheetName); if (mySheet) { mySheet.Delete(); } app.DisplayAlerts = true; mySheet = app.Worksheets.Add() as Excel.Worksheet; @@ -46,9 +57,7 @@ const replaceWorksheet = () => { }; // referencing multiple sheets -- https://msdn.microsoft.com/VBA/Excel-VBA/articles/sheets-object-excel -const moveMultipleSheets = () => { - app.Worksheets.Item(toSafeArray(1, 'Sheet2')).Move(4); -}; +const moveMultipleSheets = () => app.Worksheets(toSafeArray(1, 'Sheet2')).Move(4); // sort worksheets alphanumerically by name -- https://msdn.microsoft.com/en-us/vba/excel-vba/articles/sort-worksheets-alphanumerically-by-name const sortSheetsTabName = () => { @@ -56,9 +65,9 @@ const sortSheetsTabName = () => { const sheets = app.ActiveWorkbook.Sheets; const sheetCount = sheets.Count; for (let i = 0; i < sheetCount; i += 1) { - const sheetI = sheets.Item(i); + const sheetI = sheets(i); for (let j = i; j < sheetCount; j += 1) { - const sheetJ = sheets.Item(j); + const sheetJ = sheets(j); if (sheetJ.Name < sheetI.Name) { sheetJ.Move(sheetI); } } } @@ -68,7 +77,7 @@ const sortSheetsTabName = () => { // fill a value down into blank cells in a column -- https://msdn.microsoft.com/en-us/vba/excel-vba/articles/fill-a-value-down-into-blank-cells-in-a-column const fillCellsFromAbove = () => { app.ScreenUpdating = false; - const columnA = app.Columns.Item(1); + const columnA = app.Columns(1); try { columnA.SpecialCells(Excel.XlCellType.xlCellTypeBlanks).Formula = '=R[-1]C'; columnA.Value = columnA.Value; @@ -78,7 +87,7 @@ const fillCellsFromAbove = () => { // hide and unhide columns -- https://msdn.microsoft.com/en-us/vba/excel-vba/articles/hide-and-unhide-columns const setColumnVisibility = (visible: boolean) => { - const book = app.Workbooks.Item(1); + const book = app.Workbooks(1); const sheet = inCollection(book.Worksheets, 'Sheet1'); if (!sheet) { return; } @@ -97,7 +106,7 @@ const setColumnVisibility = (visible: boolean) => { }; // highlighting the active cell, row, or column -- https://msdn.microsoft.com/en-us/vba/excel-vba/articles/highlight-the-active-cell-row-or-column -(() => { +{ const wks = app.ActiveSheet as Excel.Worksheet; // highlight active cell @@ -120,10 +129,10 @@ const setColumnVisibility = (visible: boolean) => { prm.Target.EntireColumn.Interior.ColorIndex = 8; app.ScreenUpdating = true; }); -})(); +} // referencing cells -- https://msdn.microsoft.com/en-us/vba/excel-vba/articles/reference-cells-and-ranges -(() => { +{ const wks = app.ActiveSheet as Excel.Worksheet; // all the cells on a worksheet @@ -141,20 +150,19 @@ const setColumnVisibility = (visible: boolean) => { wks.Range('A:A,C:C,F:F').Font.Bold = true; // using index numbers - wks.Cells.Item(6, 1).Value2 = 10; - // Value is also a property with parameters - ActiveXObject.set(wks.Cells.Item(6, 1), 'Value', 10); + wks.Cells(6, 1).Value2 = 10; + wks.Cells(6, 1).Value = 10; // iterating through cells using index numbers for (let counter = 1; counter < 20; counter += 1) { - ActiveXObject.set(wks.Cells.Item(counter, 1), 'Value', 10); + wks.Cells(counter, 1).Value = 10; } // relative to other cells - wks.Cells.Item(1, 1).Font.Underline = Excel.XlUnderlineStyle.xlUnderlineStyleDouble; + wks.Cells(1, 1).Font.Underline = Excel.XlUnderlineStyle.xlUnderlineStyleDouble; // using a Range object - const rng = wks.Cells.Item('A1:D5'); + const rng = wks.Cells('A1:D5'); rng.Formula = '=RAND()'; rng.Font.Bold = true; @@ -166,23 +174,22 @@ const setColumnVisibility = (visible: boolean) => { // refer to multiple ranges using Areas WScript.Echo(union.Areas.Count); -})(); +} // looping through a range of cells -- https://msdn.microsoft.com/en-us/vba/excel-vba/articles/looping-through-a-range-of-cells -(() => { +{ const wks = app.ActiveSheet as Excel.Worksheet; // using for for (let x = 1; x < 20; x++) { - const currentCell = wks.Cells.Item(x, 1); - if (Math.abs(currentCell.Value()) < 0.01) { - // because Value is typed as a method on the Excel.Range class, we have to treat it as a setter with parameters - ActiveXObject.set(currentCell, 'Value', 0); + const currentCell = wks.Cells(x, 1); + if (Math.abs(currentCell.Value) < 0.01) { + currentCell.Value = 0; } } // using Enumerator - let enumerator = new Enumerator(wks.Cells.Item('A1:D10')); + let enumerator = new Enumerator(wks.Cells('A1:D10')); enumerator.moveFirst(); while (!enumerator.atEnd()) { const currentCell = enumerator.item(); @@ -202,11 +209,11 @@ const setColumnVisibility = (visible: boolean) => { } enumerator.moveNext(); } -})(); +} // using selection -- https://msdn.microsoft.com/en-us/vba/excel-vba/articles/selecting-and-activating-cells -(() => { - const wks = app.ActiveWorkbook.Worksheets.Item(1) as Excel.Worksheet; +{ + const wks = app.ActiveWorkbook.Worksheets(1); // make a worksheet the active worksheet; otherwise code which uses the selection will fail wks.Select(); @@ -219,24 +226,24 @@ const setColumnVisibility = (visible: boolean) => { wks.Range("B1").Activate(); // working with 3-D ranges -- https://msdn.microsoft.com/en-us/vba/excel-vba/articles/working-with-3-d-ranges - app.Sheets.Item(toSafeArray("Sheet2", "Sheet3", "Sheet4")).Select(); + app.Sheets(toSafeArray("Sheet2", "Sheet3", "Sheet4")).Select(); app.Range("A1:H1").Select(); - (app.Selection as Excel.Range).Borders.Item(Excel.XlBordersIndex.xlEdgeBottom).LineStyle = Excel.XlLineStyle.xlDouble; + (app.Selection as Excel.Range).Borders(Excel.XlBordersIndex.xlEdgeBottom).LineStyle = Excel.XlLineStyle.xlDouble; // alternatively, use FillAcrossSheets to fill formatting and data across sheets const book = app.ActiveWorkbook; - const wks2 = book.Sheets.Item("Sheet2") as Excel.Worksheet; + const wks2 = book.Worksheets("Sheet2"); const rng = wks2.Range("A1:H1"); - rng.Borders.Item(Excel.XlBordersIndex.xlEdgeBottom).LineStyle = Excel.XlLineStyle.xlDouble; + rng.Borders(Excel.XlBordersIndex.xlEdgeBottom).LineStyle = Excel.XlLineStyle.xlDouble; book.Sheets.FillAcrossSheets(rng); -})(); +} // prevent duplicate entry -- https://msdn.microsoft.com/en-us/vba/excel-vba/articles/prevent-duplicate-entries-in-a-range -(() => { - const book = app.Workbooks.Item(1); +{ + const book = app.Workbooks(1); ActiveXObject.on(book, 'SheetChange', ['Sh', 'Target'], function(this, prm) { - const EvalRange = this.ActiveSheet.Range("A1:B20"); + const EvalRange = (this.ActiveSheet as Excel.Worksheet).Range("A1:B20"); // If the cell where the value was entered is not in the defined range, if the value pasted is larger than a single cell, or if no value was entered in the cell, then exit the macro if ( @@ -253,10 +260,11 @@ const setColumnVisibility = (visible: boolean) => { return; } + // const enumerator = new Enumerator(book.Worksheets); const enumerator = new Enumerator(book.Worksheets); enumerator.moveFirst(); while (!enumerator.atEnd()) { - const wks = enumerator.item() as Excel.Worksheet; + const wks = enumerator.item(); if (wks.Name === prm.Target.Name) { continue; } // If the value entered already exists in the defined range on the current worksheet, undo the entry. @@ -267,14 +275,14 @@ const setColumnVisibility = (visible: boolean) => { app.EnableEvents = true; } }); -})(); +} // add a unique list of values to a combobox -- https://msdn.microsoft.com/en-us/vba/excel-vba/articles/add-a-unique-list-of-values-to-a-combo-box -(() => { - (() => { +{ + { // using the AdvancedFilter property const book = app.ThisWorkbook; - const sheet = book.Worksheets.Item("Sheet1") as Excel.Worksheet; + const sheet = book.Worksheets("Sheet1"); const dataRange = sheet.Range('A1', sheet.Range("A100").End(Excel.XlDirection.xlUp)); dataRange.AdvancedFilter(Excel.XlFilterAction.xlFilterCopy, undefined, sheet.Range('L1'), true); const data = sheet.Range("L2", sheet.Range('L100').End(Excel.XlDirection.xlUp)).Value() as SafeArray; @@ -284,15 +292,17 @@ const setColumnVisibility = (visible: boolean) => { combobox.Clear(); ActiveXObject.set(combobox, 'List', [], data); combobox.ListIndex = -1; - })(); + } - (() => { + { // using a Dictionary - const sheet = app.ThisWorkbook.Sheets.Item('Sheet2') as Excel.Worksheet; + const sheet = app.ThisWorkbook.Sheets('Sheet2') as Excel.Worksheet; const data = sheet.Range('A2', sheet.Range('A100').End(Excel.XlDirection.xlUp)).Value2 as SafeArray; const arr = new VBArray(data).toArray(); const dict = new ActiveXObject('Scripting.Dictionary'); - arr.forEach(x => ActiveXObject.set(dict, 'Item', [x], true)); + for (const x of arr) { + ActiveXObject.set(dict, 'Item', [x], true); + } const combobox = sheet.OLEObjects('ComboBox1').Object as MSForms.ComboBox; combobox.Clear(); @@ -307,21 +317,28 @@ const setColumnVisibility = (visible: boolean) => { // alternatively, make a JS array out of the keys, and iterate using forEach // new VBArray(dict.Keys()).toArray().forEach(x => combobox.AddItem(x)); - })(); -})(); - -// animating a sparkline -- https://msdn.microsoft.com/en-us/vba/excel-vba/articles/animate-a-sparkline -(() => { - const wks = app.ActiveSheet as Excel.Worksheet; - const oSparkGroup = wks.Cells.SparklineGroups.Item(1); - - // Set the data source to the first year of data - oSparkGroup.ModifySourceData('B2:M4'); - - // Loop through the data points for the subsequent two years - for (let i = 1; i <= 24; i++) { - // Move the reference for the sparkline group over one cell - oSparkGroup.ModifySourceData(wks.Range(oSparkGroup.SourceData).Offset(0, 1).Address()); - WScript.Sleep(1000); } -})(); + + // animating a sparkline -- https://msdn.microsoft.com/en-us/vba/excel-vba/articles/animate-a-sparkline + { + const wks = app.ActiveSheet as Excel.Worksheet; + const oSparkGroup = wks.Cells.SparklineGroups(1); + + // Set the data source to the first year of data + oSparkGroup.ModifySourceData('B2:M4'); + + // Loop through the data points for the subsequent two years + for (let i = 1; i <= 24; i++) { + // Move the reference for the sparkline group over one cell + oSparkGroup.ModifySourceData(wks.Range(oSparkGroup.SourceData).Offset(0, 1).Address()); + WScript.Sleep(1000); + } + } + + { + const formats = new VBArray(app.ClipboardFormats).toArray(); + for (const format of formats) { + WScript.Echo(format); + } + } +} diff --git a/types/activex-excel/index.d.ts b/types/activex-excel/index.d.ts index c55bfe1c42..6243d25e05 100644 --- a/types/activex-excel/index.d.ts +++ b/types/activex-excel/index.d.ts @@ -2,14 +2,52 @@ // Project: https://msdn.microsoft.com/en-us/library/fp179694.aspx // Definitions by: Zev Spitz // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 /// /// /// +/// +/// declare namespace Excel { - // tslint:disable-next-line:no-const-enum + type AddSheetResult = + T extends XlSheetType.xlDialogSheet ? DialogSheet : + T extends XlSheetType.xlChart ? Chart : + T extends XlSheetType ? Worksheet : + T extends undefined ? Sheet : + never; + + type InternationalResult = + T extends XlApplicationInternationalStrings ? string : + T extends XlApplicationInternationalNumbers ? number : + T extends XlApplicationInternationalBooleans ? boolean : + any; + + type LineStyle = XlLineStyle | Constants.xlGray25 | Constants.xlGray50 | Constants.xlGray75 | Constants.xlAutomatic; + + type HorizontalAlignments = Constants.xlCenter | Constants.xlDistributed | Constants.xlJustify | Constants.xlLeft | Constants.xlRight; + + type VerticalAlignments = Constants.xlBottom | Constants.xlCenter | Constants.xlDistributed | Constants.xlJustify | Constants.xlTop; + + type PivotTableWizardSourceData = + TSourceType extends XlPivotTableSourceType.xlExternal ? SafeArray : + TSourceType extends XlPivotTableSourceType ? Range | SafeArray | string : + TSourceType extends undefined ? undefined : + never; + + type PivotTableWizardAutoPage = + TSourceType extends XlPivotTableSourceType.xlConsolidation ? boolean : + undefined; + + type PrintToFileName = + T extends true ? string : + undefined; + + type Sheet = Worksheet | Chart | DialogSheet; + + type SheetView = WorksheetView | DialogSheetView; + const enum Constants { xl3DBar = -4099, xl3DEffects1 = 13, @@ -180,7 +218,48 @@ declare namespace Excel { xlWorksheetShort = 5, } - // tslint:disable-next-line:no-const-enum + const enum FunctionCategory { + Commands = 10, + Customizing = 11, + Database = 6, + DateAndTime = 2, + DDEAndExternal = 13, + Financial = 1, + Information = 9, + Logical = 8, + LookupAndReference = 5, + MacroControl = 12, + MathAndTrig = 3, + Statistical = 4, + Text = 7, + UserDefined = 14, + } + + const enum InputBoxReturnType { + Formula = 0, + Number = 1, + String = 2, + Boolean = 4, + Range = 8, + ErrorValue = 16, + SafeArray = 64, + } + + const enum PivotFieldSubtotal { + Automatic = 1, + Average = 4, + Count = 3, + CountNums = 8, + Max = 5, + Min = 6, + Product = 7, + StdDev = 9, + StdDevp = 10, + Sum = 2, + Var = 11, + Varp = 12 + } + const enum XlAboveBelow { xlAboveAverage = 0, xlAboveStdDev = 4, @@ -190,7 +269,6 @@ declare namespace Excel { xlEqualBelowAverage = 3, } - // tslint:disable-next-line:no-const-enum const enum XlActionType { xlActionTypeDrillthrough = 256, xlActionTypeReport = 128, @@ -198,80 +276,82 @@ declare namespace Excel { xlActionTypeUrl = 1, } - // tslint:disable-next-line:no-const-enum const enum XlAllocation { xlAutomaticAllocation = 2, xlManualAllocation = 1, } - // tslint:disable-next-line:no-const-enum const enum XlAllocationMethod { xlEqualAllocation = 1, xlWeightedAllocation = 2, } - // tslint:disable-next-line:no-const-enum const enum XlAllocationValue { xlAllocateIncrement = 2, xlAllocateValue = 1, } - // tslint:disable-next-line:no-const-enum - const enum XlApplicationInternational { - xl24HourClock = 33, - xl4DigitYears = 43, + const enum XlApplicationInternationalStrings { xlAlternateArraySeparator = 16, xlColumnSeparator = 14, - xlCountryCode = 1, - xlCountrySetting = 2, - xlCurrencyBefore = 37, xlCurrencyCode = 25, - xlCurrencyDigits = 27, - xlCurrencyLeadingZeros = 40, - xlCurrencyMinusSign = 38, - xlCurrencyNegative = 28, - xlCurrencySpaceBefore = 36, - xlCurrencyTrailingZeros = 39, - xlDateOrder = 32, - xlDateSeparator = 17, - xlDayCode = 21, - xlDayLeadingZero = 42, xlDecimalSeparator = 3, xlGeneralFormatName = 26, - xlHourCode = 22, xlLeftBrace = 12, xlLeftBracket = 10, xlListSeparator = 5, xlLowerCaseColumnLetter = 9, xlLowerCaseRowLetter = 8, - xlMDY = 44, - xlMetric = 35, - xlMinuteCode = 23, - xlMonthCode = 20, - xlMonthLeadingZero = 41, - xlMonthNameChars = 30, - xlNoncurrencyDigits = 29, - xlNonEnglishFunctions = 34, xlRightBrace = 13, xlRightBracket = 11, + xlUpperCaseColumnLetter = 7, + xlUpperCaseRowLetter = 6, + xlDateSeparator = 17, + xlDayCode = 21, + xlHourCode = 22, + xlMinuteCode = 23, + xlMonthCode = 20, xlRowSeparator = 15, xlSecondCode = 24, xlThousandsSeparator = 4, - xlTimeLeadingZero = 45, xlTimeSeparator = 18, - xlUpperCaseColumnLetter = 7, - xlUpperCaseRowLetter = 6, - xlWeekdayNameChars = 31, xlYearCode = 19, } - // tslint:disable-next-line:no-const-enum + const enum XlApplicationInternationalNumbers { + xlCountryCode = 1, + xlCountrySetting = 2, + xlCurrencyDigits = 27, + xlCurrencyNegative = 28, + xlNoncurrencyDigits = 29, + xlDateOrder = 32, + xlMonthNameChars = 30, + xlWeekdayNameChars = 31, + } + + const enum XlApplicationInternationalBooleans { + xl24HourClock = 33, + xl4DigitYears = 43, + xlCurrencyBefore = 37, + xlCurrencyLeadingZeros = 40, + xlCurrencyMinusSign = 38, + xlCurrencySpaceBefore = 36, + xlCurrencyTrailingZeros = 39, + xlDayLeadingZero = 42, + xlMDY = 44, + xlMetric = 35, + xlMonthLeadingZero = 41, + xlNonEnglishFunctions = 34, + xlTimeLeadingZero = 45, + } + + type XlApplicationInternational = XlApplicationInternationalStrings | XlApplicationInternationalNumbers | XlApplicationInternationalBooleans; + const enum XlApplyNamesOrder { xlColumnThenRow = 2, xlRowThenColumn = 1, } - // tslint:disable-next-line:no-const-enum const enum XlArabicModes { xlArabicBothStrict = 3, xlArabicNone = 0, @@ -279,7 +359,6 @@ declare namespace Excel { xlArabicStrictFinalYaa = 2, } - // tslint:disable-next-line:no-const-enum const enum XlArrangeStyle { xlArrangeStyleCascade = 7, xlArrangeStyleHorizontal = -4128, @@ -287,14 +366,12 @@ declare namespace Excel { xlArrangeStyleVertical = -4166, } - // tslint:disable-next-line:no-const-enum const enum XlArrowHeadLength { xlArrowHeadLengthLong = 3, xlArrowHeadLengthMedium = -4138, xlArrowHeadLengthShort = 1, } - // tslint:disable-next-line:no-const-enum const enum XlArrowHeadStyle { xlArrowHeadStyleClosed = 3, xlArrowHeadStyleDoubleClosed = 5, @@ -303,14 +380,12 @@ declare namespace Excel { xlArrowHeadStyleOpen = 2, } - // tslint:disable-next-line:no-const-enum const enum XlArrowHeadWidth { xlArrowHeadWidthMedium = -4138, xlArrowHeadWidthNarrow = 1, xlArrowHeadWidthWide = 3, } - // tslint:disable-next-line:no-const-enum const enum XlAutoFillType { xlFillCopy = 1, xlFillDays = 5, @@ -325,7 +400,6 @@ declare namespace Excel { xlLinearTrend = 9, } - // tslint:disable-next-line:no-const-enum const enum XlAutoFilterOperator { xlAnd = 1, xlBottom10Items = 4, @@ -343,7 +417,6 @@ declare namespace Excel { xlTop10Percent = 5, } - // tslint:disable-next-line:no-const-enum const enum XlAxisCrosses { xlAxisCrossesAutomatic = -4105, xlAxisCrossesCustom = -4114, @@ -351,27 +424,23 @@ declare namespace Excel { xlAxisCrossesMinimum = 4, } - // tslint:disable-next-line:no-const-enum const enum XlAxisGroup { xlPrimary = 1, xlSecondary = 2, } - // tslint:disable-next-line:no-const-enum const enum XlAxisType { xlCategory = 1, xlSeriesAxis = 3, xlValue = 2, } - // tslint:disable-next-line:no-const-enum const enum XlBackground { xlBackgroundAutomatic = -4105, xlBackgroundOpaque = 3, xlBackgroundTransparent = 2, } - // tslint:disable-next-line:no-const-enum const enum XlBarShape { xlBox = 0, xlConeToMax = 5, @@ -381,7 +450,6 @@ declare namespace Excel { xlPyramidToPoint = 1, } - // tslint:disable-next-line:no-const-enum const enum XlBordersIndex { xlDiagonalDown = 5, xlDiagonalUp = 6, @@ -393,7 +461,6 @@ declare namespace Excel { xlInsideVertical = 11, } - // tslint:disable-next-line:no-const-enum const enum XlBorderWeight { xlHairline = 1, xlMedium = -4138, @@ -401,7 +468,6 @@ declare namespace Excel { xlThin = 2, } - // tslint:disable-next-line:no-const-enum const enum XlBuiltInDialog { _xlDialogChartSourceData = 541, _xlDialogPhonetic = 538, @@ -664,62 +730,53 @@ declare namespace Excel { xlDialogZoom = 256, } - // tslint:disable-next-line:no-const-enum const enum XlCalcFor { xlAllValues = 0, xlColGroups = 2, xlRowGroups = 1, } - // tslint:disable-next-line:no-const-enum const enum XlCalculatedMemberType { xlCalculatedMember = 0, xlCalculatedSet = 1, } - // tslint:disable-next-line:no-const-enum const enum XlCalculation { xlCalculationAutomatic = -4105, xlCalculationManual = -4135, xlCalculationSemiautomatic = 2, } - // tslint:disable-next-line:no-const-enum const enum XlCalculationInterruptKey { xlAnyKey = 2, xlEscKey = 1, xlNoKey = 0, } - // tslint:disable-next-line:no-const-enum const enum XlCalculationState { xlCalculating = 1, xlDone = 0, xlPending = 2, } - // tslint:disable-next-line:no-const-enum const enum XlCategoryType { xlAutomaticScale = -4105, xlCategoryScale = 2, xlTimeScale = 3, } - // tslint:disable-next-line:no-const-enum const enum XlCellChangedState { xlCellChangeApplied = 3, xlCellChanged = 2, xlCellNotChanged = 1, } - // tslint:disable-next-line:no-const-enum const enum XlCellInsertionMode { xlInsertDeleteCells = 1, xlInsertEntireRows = 2, xlOverwriteCells = 0, } - // tslint:disable-next-line:no-const-enum const enum XlCellType { xlCellTypeAllFormatConditions = -4172, xlCellTypeAllValidation = -4174, @@ -733,20 +790,17 @@ declare namespace Excel { xlCellTypeVisible = 12, } - // tslint:disable-next-line:no-const-enum const enum XlChartElementPosition { xlChartElementPositionAutomatic = -4105, xlChartElementPositionCustom = -4114, } - // tslint:disable-next-line:no-const-enum const enum XlChartGallery { xlAnyGallery = 23, xlBuiltIn = 21, xlUserDefined = 22, } - // tslint:disable-next-line:no-const-enum const enum XlChartItem { xlAxis = 21, xlAxisTitle = 17, @@ -782,14 +836,12 @@ declare namespace Excel { xlYErrorBars = 11, } - // tslint:disable-next-line:no-const-enum const enum XlChartLocation { xlLocationAsNewSheet = 1, xlLocationAsObject = 2, xlLocationAutomatic = 3, } - // tslint:disable-next-line:no-const-enum const enum XlChartPicturePlacement { xlAllFaces = 7, xlEnd = 2, @@ -800,14 +852,12 @@ declare namespace Excel { xlSides = 1, } - // tslint:disable-next-line:no-const-enum const enum XlChartPictureType { xlStack = 2, xlStackScale = 3, xlStretch = 1, } - // tslint:disable-next-line:no-const-enum const enum XlChartSplitType { xlSplitByCustomSplit = 4, xlSplitByPercentValue = 3, @@ -815,7 +865,6 @@ declare namespace Excel { xlSplitByValue = 2, } - // tslint:disable-next-line:no-const-enum const enum XlChartType { xl3DArea = -4098, xl3DAreaStacked = 78, @@ -892,14 +941,12 @@ declare namespace Excel { xlXYScatterSmoothNoMarkers = 73, } - // tslint:disable-next-line:no-const-enum const enum XlCheckInVersionType { xlCheckInMajorVersion = 1, xlCheckInMinorVersion = 0, xlCheckInOverwriteVersion = 2, } - // tslint:disable-next-line:no-const-enum const enum XlClipboardFormat { xlClipboardFormatBIFF = 8, xlClipboardFormatBIFF12 = 63, @@ -937,7 +984,6 @@ declare namespace Excel { xlClipboardFormatWK1 = 10, } - // tslint:disable-next-line:no-const-enum const enum XlCmdType { xlCmdCube = 1, xlCmdDefault = 4, @@ -946,13 +992,11 @@ declare namespace Excel { xlCmdTable = 3, } - // tslint:disable-next-line:no-const-enum const enum XlColorIndex { xlColorIndexAutomatic = -4105, xlColorIndexNone = -4142, } - // tslint:disable-next-line:no-const-enum const enum XlColumnDataType { xlDMYFormat = 4, xlDYMFormat = 7, @@ -966,21 +1010,18 @@ declare namespace Excel { xlYMDFormat = 5, } - // tslint:disable-next-line:no-const-enum const enum XlCommandUnderlines { xlCommandUnderlinesAutomatic = -4105, xlCommandUnderlinesOff = -4146, xlCommandUnderlinesOn = 1, } - // tslint:disable-next-line:no-const-enum const enum XlCommentDisplayMode { xlCommentAndIndicator = 1, xlCommentIndicatorOnly = -1, xlNoIndicator = 0, } - // tslint:disable-next-line:no-const-enum const enum XlConditionValueTypes { xlConditionValueAutomaticMax = 7, xlConditionValueAutomaticMin = 6, @@ -993,7 +1034,6 @@ declare namespace Excel { xlConditionValuePercentile = 5, } - // tslint:disable-next-line:no-const-enum const enum XlConnectionType { xlConnectionTypeODBC = 2, xlConnectionTypeOLEDB = 1, @@ -1002,7 +1042,6 @@ declare namespace Excel { xlConnectionTypeXMLMAP = 3, } - // tslint:disable-next-line:no-const-enum const enum XlConsolidationFunction { xlAverage = -4106, xlCount = -4112, @@ -1018,7 +1057,6 @@ declare namespace Excel { xlVarP = -4165, } - // tslint:disable-next-line:no-const-enum const enum XlContainsOperator { xlBeginsWith = 2, xlContains = 0, @@ -1026,32 +1064,27 @@ declare namespace Excel { xlEndsWith = 3, } - // tslint:disable-next-line:no-const-enum const enum XlCopyPictureFormat { xlBitmap = 2, xlPicture = -4147, } - // tslint:disable-next-line:no-const-enum const enum XlCorruptLoad { xlExtractData = 2, xlNormalLoad = 0, xlRepairFile = 1, } - // tslint:disable-next-line:no-const-enum const enum XlCreator { xlCreatorCode = 1480803660, } - // tslint:disable-next-line:no-const-enum const enum XlCredentialsMethod { xlCredentialsMethodIntegrated = 0, xlCredentialsMethodNone = 1, xlCredentialsMethodStored = 2, } - // tslint:disable-next-line:no-const-enum const enum XlCubeFieldSubType { xlCubeAttribute = 4, xlCubeCalculatedMeasure = 5, @@ -1065,20 +1098,17 @@ declare namespace Excel { xlCubeSet = 3, } - // tslint:disable-next-line:no-const-enum const enum XlCubeFieldType { xlHierarchy = 1, xlMeasure = 2, xlSet = 3, } - // tslint:disable-next-line:no-const-enum const enum XlCutCopyMode { xlCopy = 1, xlCut = 2, } - // tslint:disable-next-line:no-const-enum const enum XlCVError { xlErrDiv0 = 2007, xlErrNA = 2042, @@ -1089,32 +1119,27 @@ declare namespace Excel { xlErrValue = 2015, } - // tslint:disable-next-line:no-const-enum const enum XlDataBarAxisPosition { xlDataBarAxisAutomatic = 0, xlDataBarAxisMidpoint = 1, xlDataBarAxisNone = 2, } - // tslint:disable-next-line:no-const-enum const enum XlDataBarBorderType { xlDataBarBorderNone = 0, xlDataBarBorderSolid = 1, } - // tslint:disable-next-line:no-const-enum const enum XlDataBarFillType { xlDataBarFillGradient = 1, xlDataBarFillSolid = 0, } - // tslint:disable-next-line:no-const-enum const enum XlDataBarNegativeColorType { xlDataBarColor = 0, xlDataBarSameAsPositive = 1, } - // tslint:disable-next-line:no-const-enum const enum XlDataLabelPosition { xlLabelPositionAbove = 0, xlLabelPositionBelow = 1, @@ -1129,12 +1154,10 @@ declare namespace Excel { xlLabelPositionRight = -4152, } - // tslint:disable-next-line:no-const-enum const enum XlDataLabelSeparator { xlDataLabelSeparatorDefault = 1, } - // tslint:disable-next-line:no-const-enum const enum XlDataLabelsType { xlDataLabelsShowBubbleSizes = 6, xlDataLabelsShowLabel = 4, @@ -1144,7 +1167,6 @@ declare namespace Excel { xlDataLabelsShowValue = 2, } - // tslint:disable-next-line:no-const-enum const enum XlDataSeriesDate { xlDay = 1, xlMonth = 3, @@ -1152,7 +1174,6 @@ declare namespace Excel { xlYear = 4, } - // tslint:disable-next-line:no-const-enum const enum XlDataSeriesType { xlAutoFill = 4, xlChronological = 3, @@ -1160,13 +1181,11 @@ declare namespace Excel { xlGrowth = 2, } - // tslint:disable-next-line:no-const-enum const enum XlDeleteShiftDirection { xlShiftToLeft = -4159, xlShiftUp = -4162, } - // tslint:disable-next-line:no-const-enum const enum XlDirection { xlDown = -4121, xlToLeft = -4159, @@ -1174,21 +1193,18 @@ declare namespace Excel { xlUp = -4162, } - // tslint:disable-next-line:no-const-enum const enum XlDisplayBlanksAs { xlInterpolated = 3, xlNotPlotted = 1, xlZero = 2, } - // tslint:disable-next-line:no-const-enum const enum XlDisplayDrawingObjects { xlDisplayShapes = -4104, xlHide = 3, xlPlaceholders = 2, } - // tslint:disable-next-line:no-const-enum const enum XlDisplayUnit { xlHundredMillions = -8, xlHundreds = -2, @@ -1201,20 +1217,17 @@ declare namespace Excel { xlThousands = -3, } - // tslint:disable-next-line:no-const-enum const enum XlDupeUnique { xlDuplicate = 1, xlUnique = 0, } - // tslint:disable-next-line:no-const-enum const enum XlDVAlertStyle { xlValidAlertInformation = 3, xlValidAlertStop = 1, xlValidAlertWarning = 2, } - // tslint:disable-next-line:no-const-enum const enum XlDVType { xlValidateCustom = 7, xlValidateDate = 4, @@ -1226,7 +1239,6 @@ declare namespace Excel { xlValidateWholeNumber = 1, } - // tslint:disable-next-line:no-const-enum const enum XlDynamicFilterCriteria { xlFilterAboveAverage = 33, xlFilterAllDatesInPeriodApril = 24, @@ -1264,7 +1276,6 @@ declare namespace Excel { xlFilterYesterday = 2, } - // tslint:disable-next-line:no-const-enum const enum XlEditionFormat { xlBIFF = 2, xlPICT = 1, @@ -1272,7 +1283,6 @@ declare namespace Excel { xlVALU = 8, } - // tslint:disable-next-line:no-const-enum const enum XlEditionOptionsOption { xlAutomaticUpdate = 4, xlCancel = 1, @@ -1284,39 +1294,33 @@ declare namespace Excel { xlUpdateSubscriber = 2, } - // tslint:disable-next-line:no-const-enum const enum XlEditionType { xlPublisher = 1, xlSubscriber = 2, } - // tslint:disable-next-line:no-const-enum const enum XlEnableCancelKey { xlDisabled = 0, xlErrorHandler = 2, xlInterrupt = 1, } - // tslint:disable-next-line:no-const-enum const enum XlEnableSelection { xlNoRestrictions = 0, xlNoSelection = -4142, xlUnlockedCells = 1, } - // tslint:disable-next-line:no-const-enum const enum XlEndStyleCap { xlCap = 1, xlNoCap = 2, } - // tslint:disable-next-line:no-const-enum const enum XlErrorBarDirection { xlX = -4168, xlY = 1, } - // tslint:disable-next-line:no-const-enum const enum XlErrorBarInclude { xlErrorBarIncludeBoth = 1, xlErrorBarIncludeMinusValues = 3, @@ -1324,7 +1328,6 @@ declare namespace Excel { xlErrorBarIncludePlusValues = 2, } - // tslint:disable-next-line:no-const-enum const enum XlErrorBarType { xlErrorBarTypeCustom = -4114, xlErrorBarTypeFixedValue = 1, @@ -1333,7 +1336,6 @@ declare namespace Excel { xlErrorBarTypeStError = 4, } - // tslint:disable-next-line:no-const-enum const enum XlErrorChecks { xlEmptyCellReferences = 7, xlEvaluateToError = 1, @@ -1346,13 +1348,11 @@ declare namespace Excel { xlUnlockedFormulaCells = 6, } - // tslint:disable-next-line:no-const-enum const enum XlFileAccess { xlReadOnly = 3, xlReadWrite = 2, } - // tslint:disable-next-line:no-const-enum const enum XlFileFormat { xlAddIn = 18, xlAddIn8 = 18, @@ -1410,27 +1410,23 @@ declare namespace Excel { xlXMLSpreadsheet = 46, } - // tslint:disable-next-line:no-const-enum const enum XlFileValidationPivotMode { xlFileValidationPivotDefault = 0, xlFileValidationPivotRun = 1, xlFileValidationPivotSkip = 2, } - // tslint:disable-next-line:no-const-enum const enum XlFillWith { xlFillWithAll = -4104, xlFillWithContents = 2, xlFillWithFormats = -4122, } - // tslint:disable-next-line:no-const-enum const enum XlFilterAction { xlFilterCopy = 2, xlFilterInPlace = 1, } - // tslint:disable-next-line:no-const-enum const enum XlFilterAllDatesInPeriod { xlFilterAllDatesInPeriodDay = 2, xlFilterAllDatesInPeriodHour = 3, @@ -1440,26 +1436,22 @@ declare namespace Excel { xlFilterAllDatesInPeriodYear = 0, } - // tslint:disable-next-line:no-const-enum const enum XlFindLookIn { xlComments = -4144, xlFormulas = -4123, xlValues = -4163, } - // tslint:disable-next-line:no-const-enum const enum XlFixedFormatQuality { xlQualityMinimum = 1, xlQualityStandard = 0, } - // tslint:disable-next-line:no-const-enum const enum XlFixedFormatType { xlTypePDF = 0, xlTypeXPS = 1, } - // tslint:disable-next-line:no-const-enum const enum XlFormatConditionOperator { xlBetween = 1, xlEqual = 3, @@ -1471,7 +1463,6 @@ declare namespace Excel { xlNotEqual = 4, } - // tslint:disable-next-line:no-const-enum const enum XlFormatConditionType { xlAboveAverageCondition = 12, xlBlanksCondition = 10, @@ -1489,7 +1480,6 @@ declare namespace Excel { xlUniqueValues = 8, } - // tslint:disable-next-line:no-const-enum const enum XlFormatFilterTypes { xlFilterBottom = 0, xlFilterBottomPercent = 2, @@ -1497,7 +1487,6 @@ declare namespace Excel { xlFilterTopPercent = 3, } - // tslint:disable-next-line:no-const-enum const enum XlFormControl { xlButtonControl = 0, xlCheckBox = 1, @@ -1511,7 +1500,6 @@ declare namespace Excel { xlSpinner = 9, } - // tslint:disable-next-line:no-const-enum const enum XlFormulaLabel { xlColumnLabels = 2, xlMixedLabels = 3, @@ -1519,19 +1507,16 @@ declare namespace Excel { xlRowLabels = 1, } - // tslint:disable-next-line:no-const-enum const enum XlGenerateTableRefs { xlGenerateTableRefA1 = 0, xlGenerateTableRefStruct = 1, } - // tslint:disable-next-line:no-const-enum const enum XlGradientFillType { xlGradientFillLinear = 0, xlGradientFillPath = 1, } - // tslint:disable-next-line:no-const-enum const enum XlHAlign { xlHAlignCenter = -4108, xlHAlignCenterAcrossSelection = 7, @@ -1543,7 +1528,6 @@ declare namespace Excel { xlHAlignRight = -4152, } - // tslint:disable-next-line:no-const-enum const enum XlHebrewModes { xlHebrewFullScript = 0, xlHebrewMixedAuthorizedScript = 3, @@ -1551,14 +1535,12 @@ declare namespace Excel { xlHebrewPartialScript = 1, } - // tslint:disable-next-line:no-const-enum const enum XlHighlightChangesTime { xlAllChanges = 2, xlNotYetReviewed = 3, xlSinceMyLastSave = 1, } - // tslint:disable-next-line:no-const-enum const enum XlHtmlType { xlHtmlCalc = 1, xlHtmlChart = 3, @@ -1566,7 +1548,6 @@ declare namespace Excel { xlHtmlStatic = 0, } - // tslint:disable-next-line:no-const-enum const enum XlIcon { xlIcon0Bars = 37, xlIcon0FilledBoxes = 52, @@ -1623,7 +1604,6 @@ declare namespace Excel { xlIconYellowUpInclineArrow = 25, } - // tslint:disable-next-line:no-const-enum const enum XlIconSet { xl3Arrows = 1, xl3ArrowsGray = 2, @@ -1648,7 +1628,6 @@ declare namespace Excel { xlCustomSet = -1, } - // tslint:disable-next-line:no-const-enum const enum XlIMEMode { xlIMEModeAlpha = 8, xlIMEModeAlphaFull = 7, @@ -1663,39 +1642,33 @@ declare namespace Excel { xlIMEModeOn = 1, } - // tslint:disable-next-line:no-const-enum const enum XlImportDataAs { xlPivotTableReport = 1, xlQueryTable = 0, xlTable = 2, } - // tslint:disable-next-line:no-const-enum const enum XlInsertFormatOrigin { xlFormatFromLeftOrAbove = 0, xlFormatFromRightOrBelow = 1, } - // tslint:disable-next-line:no-const-enum const enum XlInsertShiftDirection { xlShiftDown = -4121, xlShiftToRight = -4161, } - // tslint:disable-next-line:no-const-enum const enum XlLayoutFormType { xlOutline = 1, xlTabular = 0, } - // tslint:disable-next-line:no-const-enum const enum XlLayoutRowType { xlCompactRow = 0, xlOutlineRow = 2, xlTabularRow = 1, } - // tslint:disable-next-line:no-const-enum const enum XlLegendPosition { xlLegendPositionBottom = -4107, xlLegendPositionCorner = 2, @@ -1705,7 +1678,6 @@ declare namespace Excel { xlLegendPositionTop = -4160, } - // tslint:disable-next-line:no-const-enum const enum XlLineStyle { xlContinuous = 1, xlDash = -4115, @@ -1717,7 +1689,6 @@ declare namespace Excel { xlSlantDashDot = 13, } - // tslint:disable-next-line:no-const-enum const enum XlLink { xlExcelLinks = 1, xlOLELinks = 2, @@ -1725,21 +1696,18 @@ declare namespace Excel { xlSubscribers = 6, } - // tslint:disable-next-line:no-const-enum const enum XlLinkInfo { xlEditionDate = 2, xlLinkInfoStatus = 3, xlUpdateState = 1, } - // tslint:disable-next-line:no-const-enum const enum XlLinkInfoType { xlLinkInfoOLELinks = 2, xlLinkInfoPublishers = 5, xlLinkInfoSubscribers = 6, } - // tslint:disable-next-line:no-const-enum const enum XlLinkStatus { xlLinkStatusCopiedValues = 10, xlLinkStatusIndeterminate = 5, @@ -1754,13 +1722,11 @@ declare namespace Excel { xlLinkStatusSourceOpen = 9, } - // tslint:disable-next-line:no-const-enum const enum XlLinkType { xlLinkTypeExcelLinks = 1, xlLinkTypeOLELinks = 2, } - // tslint:disable-next-line:no-const-enum const enum XlListConflict { xlListConflictDialog = 0, xlListConflictDiscardAllConflicts = 2, @@ -1768,7 +1734,6 @@ declare namespace Excel { xlListConflictRetryAllConflicts = 1, } - // tslint:disable-next-line:no-const-enum const enum XlListDataType { xlListDataTypeCheckbox = 9, xlListDataTypeChoice = 6, @@ -1785,7 +1750,6 @@ declare namespace Excel { xlListDataTypeText = 1, } - // tslint:disable-next-line:no-const-enum const enum XlListObjectSourceType { xlSrcExternal = 0, xlSrcQuery = 3, @@ -1793,7 +1757,6 @@ declare namespace Excel { xlSrcXml = 2, } - // tslint:disable-next-line:no-const-enum const enum XlLocationInTable { xlColumnHeader = -4110, xlColumnItem = 5, @@ -1806,27 +1769,23 @@ declare namespace Excel { xlTableBody = 8, } - // tslint:disable-next-line:no-const-enum const enum XlLookAt { xlPart = 2, xlWhole = 1, } - // tslint:disable-next-line:no-const-enum const enum XlLookFor { xlLookForBlanks = 0, xlLookForErrors = 1, xlLookForFormulas = 2, } - // tslint:disable-next-line:no-const-enum const enum XlMailSystem { xlMAPI = 1, xlNoMailSystem = 0, xlPowerTalk = 2, } - // tslint:disable-next-line:no-const-enum const enum XlMarkerStyle { xlMarkerStyleAutomatic = -4105, xlMarkerStyleCircle = 8, @@ -1842,21 +1801,18 @@ declare namespace Excel { xlMarkerStyleX = -4168, } - // tslint:disable-next-line:no-const-enum const enum XlMeasurementUnits { xlCentimeters = 1, xlInches = 0, xlMillimeters = 2, } - // tslint:disable-next-line:no-const-enum const enum XlMouseButton { xlNoButton = 0, xlPrimaryButton = 1, xlSecondaryButton = 2, } - // tslint:disable-next-line:no-const-enum const enum XlMousePointer { xlDefault = -4143, xlIBeam = 3, @@ -1864,7 +1820,6 @@ declare namespace Excel { xlWait = 2, } - // tslint:disable-next-line:no-const-enum const enum XlMSApplication { xlMicrosoftAccess = 4, xlMicrosoftFoxPro = 5, @@ -1875,46 +1830,39 @@ declare namespace Excel { xlMicrosoftWord = 1, } - // tslint:disable-next-line:no-const-enum const enum XlOartHorizontalOverflow { xlOartHorizontalOverflowClip = 1, xlOartHorizontalOverflowOverflow = 0, } - // tslint:disable-next-line:no-const-enum const enum XlOartVerticalOverflow { xlOartVerticalOverflowClip = 1, xlOartVerticalOverflowEllipsis = 2, xlOartVerticalOverflowOverflow = 0, } - // tslint:disable-next-line:no-const-enum const enum XlObjectSize { xlFitToPage = 2, xlFullPage = 3, xlScreenSize = 1, } - // tslint:disable-next-line:no-const-enum const enum XlOLEType { xlOLEControl = 2, xlOLEEmbed = 1, xlOLELink = 0, } - // tslint:disable-next-line:no-const-enum const enum XlOLEVerb { xlVerbOpen = 2, xlVerbPrimary = 1, } - // tslint:disable-next-line:no-const-enum const enum XlOrder { xlDownThenOver = 1, xlOverThenDown = 2, } - // tslint:disable-next-line:no-const-enum const enum XlOrientation { xlDownward = -4170, xlHorizontal = -4128, @@ -1922,26 +1870,22 @@ declare namespace Excel { xlVertical = -4166, } - // tslint:disable-next-line:no-const-enum const enum XlPageBreak { xlPageBreakAutomatic = -4105, xlPageBreakManual = -4135, xlPageBreakNone = -4142, } - // tslint:disable-next-line:no-const-enum const enum XlPageBreakExtent { xlPageBreakFull = 1, xlPageBreakPartial = 2, } - // tslint:disable-next-line:no-const-enum const enum XlPageOrientation { xlLandscape = 2, xlPortrait = 1, } - // tslint:disable-next-line:no-const-enum const enum XlPaperSize { xlPaper10x14 = 16, xlPaper11x17 = 17, @@ -1987,7 +1931,6 @@ declare namespace Excel { xlPaperUser = 256, } - // tslint:disable-next-line:no-const-enum const enum XlParameterDataType { xlParamTypeBigInt = -5, xlParamTypeBinary = -2, @@ -2012,14 +1955,12 @@ declare namespace Excel { xlParamTypeWChar = -8, } - // tslint:disable-next-line:no-const-enum const enum XlParameterType { xlConstant = 1, xlPrompt = 0, xlRange = 2, } - // tslint:disable-next-line:no-const-enum const enum XlPasteSpecialOperation { xlPasteSpecialOperationAdd = 2, xlPasteSpecialOperationDivide = 5, @@ -2028,7 +1969,6 @@ declare namespace Excel { xlPasteSpecialOperationSubtract = 3, } - // tslint:disable-next-line:no-const-enum const enum XlPasteType { xlPasteAll = -4104, xlPasteAllExceptBorders = 7, @@ -2044,7 +1984,6 @@ declare namespace Excel { xlPasteValuesAndNumberFormats = 12, } - // tslint:disable-next-line:no-const-enum const enum XlPattern { xlPatternAutomatic = -4105, xlPatternChecker = 9, @@ -2070,7 +2009,6 @@ declare namespace Excel { xlPatternVertical = -4166, } - // tslint:disable-next-line:no-const-enum const enum XlPhoneticAlignment { xlPhoneticAlignCenter = 2, xlPhoneticAlignDistributed = 3, @@ -2078,7 +2016,6 @@ declare namespace Excel { xlPhoneticAlignNoControl = 0, } - // tslint:disable-next-line:no-const-enum const enum XlPhoneticCharacterType { xlHiragana = 2, xlKatakana = 1, @@ -2086,13 +2023,11 @@ declare namespace Excel { xlNoConversion = 3, } - // tslint:disable-next-line:no-const-enum const enum XlPictureAppearance { xlPrinter = 2, xlScreen = 1, } - // tslint:disable-next-line:no-const-enum const enum XlPictureConvertorType { xlBMP = 1, xlCGM = 7, @@ -2109,7 +2044,6 @@ declare namespace Excel { xlWPG = 3, } - // tslint:disable-next-line:no-const-enum const enum XlPieSliceIndex { xlCenterPoint = 5, xlInnerCenterPoint = 8, @@ -2122,13 +2056,11 @@ declare namespace Excel { xlOuterCounterClockwisePoint = 1, } - // tslint:disable-next-line:no-const-enum const enum XlPieSliceLocation { xlHorizontalCoordinate = 1, xlVerticalCoordinate = 2, } - // tslint:disable-next-line:no-const-enum const enum XlPivotCellType { xlPivotCellBlankCell = 9, xlPivotCellCustomSubtotal = 7, @@ -2142,14 +2074,12 @@ declare namespace Excel { xlPivotCellValue = 0, } - // tslint:disable-next-line:no-const-enum const enum XlPivotConditionScope { xlDataFieldScope = 2, xlFieldsScope = 1, xlSelectionScope = 0, } - // tslint:disable-next-line:no-const-enum const enum XlPivotFieldCalculation { xlDifferenceFrom = 2, xlIndex = 9, @@ -2168,14 +2098,12 @@ declare namespace Excel { xlRunningTotal = 5, } - // tslint:disable-next-line:no-const-enum const enum XlPivotFieldDataType { xlDate = 2, xlNumber = -4145, xlText = -4158, } - // tslint:disable-next-line:no-const-enum const enum XlPivotFieldOrientation { xlColumnField = 2, xlDataField = 4, @@ -2184,13 +2112,11 @@ declare namespace Excel { xlRowField = 1, } - // tslint:disable-next-line:no-const-enum const enum XlPivotFieldRepeatLabels { xlDoNotRepeatLabels = 1, xlRepeatLabels = 2, } - // tslint:disable-next-line:no-const-enum const enum XlPivotFilterType { xlAfter = 33, xlAfterOrEqualTo = 34, @@ -2262,7 +2188,6 @@ declare namespace Excel { xlYearToDate = 52, } - // tslint:disable-next-line:no-const-enum const enum XlPivotFormatType { xlPTClassic = 20, xlPTNone = 21, @@ -2288,7 +2213,6 @@ declare namespace Excel { xlTable9 = 18, } - // tslint:disable-next-line:no-const-enum const enum XlPivotLineType { xlPivotLineBlank = 3, xlPivotLineGrandTotal = 2, @@ -2296,7 +2220,6 @@ declare namespace Excel { xlPivotLineSubtotal = 1, } - // tslint:disable-next-line:no-const-enum const enum XlPivotTableMissingItems { xlMissingItemsDefault = -1, xlMissingItemsMax = 32500, @@ -2304,7 +2227,6 @@ declare namespace Excel { xlMissingItemsNone = 0, } - // tslint:disable-next-line:no-const-enum const enum XlPivotTableSourceType { xlConsolidation = 3, xlDatabase = 1, @@ -2313,7 +2235,6 @@ declare namespace Excel { xlScenario = 4, } - // tslint:disable-next-line:no-const-enum const enum XlPivotTableVersionList { xlPivotTableVersion10 = 1, xlPivotTableVersion11 = 2, @@ -2323,28 +2244,24 @@ declare namespace Excel { xlPivotTableVersionCurrent = -1, } - // tslint:disable-next-line:no-const-enum const enum XlPlacement { xlFreeFloating = 3, xlMove = 2, xlMoveAndSize = 1, } - // tslint:disable-next-line:no-const-enum const enum XlPlatform { xlMacintosh = 1, xlMSDOS = 3, xlWindows = 2, } - // tslint:disable-next-line:no-const-enum const enum XlPortugueseReform { xlPortugueseBoth = 3, xlPortuguesePostReform = 2, xlPortuguesePreReform = 1, } - // tslint:disable-next-line:no-const-enum const enum XlPrintErrors { xlPrintErrorsBlank = 1, xlPrintErrorsDash = 2, @@ -2352,42 +2269,36 @@ declare namespace Excel { xlPrintErrorsNA = 3, } - // tslint:disable-next-line:no-const-enum const enum XlPrintLocation { xlPrintInPlace = 16, xlPrintNoComments = -4142, xlPrintSheetEnd = 1, } - // tslint:disable-next-line:no-const-enum const enum XlPriority { xlPriorityHigh = -4127, xlPriorityLow = -4134, xlPriorityNormal = -4143, } - // tslint:disable-next-line:no-const-enum const enum XlPropertyDisplayedIn { xlDisplayPropertyInPivotTable = 1, xlDisplayPropertyInPivotTableAndTooltip = 3, xlDisplayPropertyInTooltip = 2, } - // tslint:disable-next-line:no-const-enum const enum XlProtectedViewCloseReason { xlProtectedViewCloseEdit = 1, xlProtectedViewCloseForced = 2, xlProtectedViewCloseNormal = 0, } - // tslint:disable-next-line:no-const-enum const enum XlProtectedViewWindowState { xlProtectedViewWindowMaximized = 2, xlProtectedViewWindowMinimized = 1, xlProtectedViewWindowNormal = 0, } - // tslint:disable-next-line:no-const-enum const enum XlPTSelectionMode { xlBlanks = 4, xlButton = 15, @@ -2398,7 +2309,6 @@ declare namespace Excel { xlOrigin = 3, } - // tslint:disable-next-line:no-const-enum const enum XlQueryType { xlADORecordset = 7, xlDAORecordset = 2, @@ -2408,7 +2318,6 @@ declare namespace Excel { xlWebQuery = 4, } - // tslint:disable-next-line:no-const-enum const enum XlRangeAutoFormat { xlRangeAutoFormat3DEffects1 = 13, xlRangeAutoFormat3DEffects2 = 14, @@ -2455,20 +2364,17 @@ declare namespace Excel { xlRangeAutoFormatTable9 = 40, } - // tslint:disable-next-line:no-const-enum const enum XlRangeValueDataType { xlRangeValueDefault = 10, xlRangeValueMSPersistXML = 12, xlRangeValueXMLSpreadsheet = 11, } - // tslint:disable-next-line:no-const-enum const enum XlReferenceStyle { xlA1 = 1, xlR1C1 = -4150, } - // tslint:disable-next-line:no-const-enum const enum XlReferenceType { xlAbsolute = 1, xlAbsRowRelColumn = 2, @@ -2476,7 +2382,6 @@ declare namespace Excel { xlRelRowAbsColumn = 3, } - // tslint:disable-next-line:no-const-enum const enum XlRemoveDocInfoType { xlRDIAll = 99, xlRDIComments = 1, @@ -2497,7 +2402,6 @@ declare namespace Excel { xlRDISendForReview = 7, } - // tslint:disable-next-line:no-const-enum const enum XlRgbColor { rgbAliceBlue = 16775408, rgbAntiqueWhite = 14150650, @@ -2645,33 +2549,28 @@ declare namespace Excel { rgbYellowGreen = 3329434, } - // tslint:disable-next-line:no-const-enum const enum XlRobustConnect { xlAlways = 1, xlAsRequired = 0, xlNever = 2, } - // tslint:disable-next-line:no-const-enum const enum XlRoutingSlipDelivery { xlAllAtOnce = 2, xlOneAfterAnother = 1, } - // tslint:disable-next-line:no-const-enum const enum XlRoutingSlipStatus { xlNotYetRouted = 0, xlRoutingComplete = 2, xlRoutingInProgress = 1, } - // tslint:disable-next-line:no-const-enum const enum XlRowCol { xlColumns = 2, xlRows = 1, } - // tslint:disable-next-line:no-const-enum const enum XlRunAutoMacro { xlAutoActivate = 3, xlAutoClose = 2, @@ -2679,51 +2578,43 @@ declare namespace Excel { xlAutoOpen = 1, } - // tslint:disable-next-line:no-const-enum const enum XlSaveAction { xlDoNotSaveChanges = 2, xlSaveChanges = 1, } - // tslint:disable-next-line:no-const-enum const enum XlSaveAsAccessMode { xlExclusive = 3, xlNoChange = 1, xlShared = 2, } - // tslint:disable-next-line:no-const-enum const enum XlSaveConflictResolution { xlLocalSessionChanges = 2, xlOtherSessionChanges = 3, xlUserResolution = 1, } - // tslint:disable-next-line:no-const-enum const enum XlScaleType { xlScaleLinear = -4132, xlScaleLogarithmic = -4133, } - // tslint:disable-next-line:no-const-enum const enum XlSearchDirection { xlNext = 1, xlPrevious = 2, } - // tslint:disable-next-line:no-const-enum const enum XlSearchOrder { xlByColumns = 2, xlByRows = 1, } - // tslint:disable-next-line:no-const-enum const enum XlSearchWithin { xlWithinSheet = 1, xlWithinWorkbook = 2, } - // tslint:disable-next-line:no-const-enum const enum XlSheetType { xlChart = -4109, xlDialogSheet = -4116, @@ -2732,34 +2623,29 @@ declare namespace Excel { xlWorksheet = -4167, } - // tslint:disable-next-line:no-const-enum const enum XlSheetVisibility { xlSheetHidden = 0, xlSheetVeryHidden = 2, xlSheetVisible = -1, } - // tslint:disable-next-line:no-const-enum const enum XlSizeRepresents { xlSizeIsArea = 1, xlSizeIsWidth = 2, } - // tslint:disable-next-line:no-const-enum const enum XlSlicerCrossFilterType { xlSlicerCrossFilterShowItemsWithDataAtTop = 2, xlSlicerCrossFilterShowItemsWithNoData = 3, xlSlicerNoCrossFilter = 1, } - // tslint:disable-next-line:no-const-enum const enum XlSlicerSort { xlSlicerSortAscending = 2, xlSlicerSortDataSourceOrder = 1, xlSlicerSortDescending = 3, } - // tslint:disable-next-line:no-const-enum const enum XlSmartTagControlType { xlSmartTagControlActiveX = 13, xlSmartTagControlButton = 6, @@ -2777,32 +2663,27 @@ declare namespace Excel { xlSmartTagControlTextbox = 10, } - // tslint:disable-next-line:no-const-enum const enum XlSmartTagDisplayMode { xlButtonOnly = 2, xlDisplayNone = 1, xlIndicatorAndButton = 0, } - // tslint:disable-next-line:no-const-enum const enum XlSortDataOption { xlSortNormal = 0, xlSortTextAsNumbers = 1, } - // tslint:disable-next-line:no-const-enum const enum XlSortMethod { xlPinYin = 1, xlStroke = 2, } - // tslint:disable-next-line:no-const-enum const enum XlSortMethodOld { xlCodePage = 2, xlSyllabary = 1, } - // tslint:disable-next-line:no-const-enum const enum XlSortOn { xlSortOnCellColor = 1, xlSortOnFontColor = 2, @@ -2810,25 +2691,21 @@ declare namespace Excel { xlSortOnValues = 0, } - // tslint:disable-next-line:no-const-enum const enum XlSortOrder { xlAscending = 1, xlDescending = 2, } - // tslint:disable-next-line:no-const-enum const enum XlSortOrientation { xlSortColumns = 1, xlSortRows = 2, } - // tslint:disable-next-line:no-const-enum const enum XlSortType { xlSortLabels = 2, xlSortValues = 1, } - // tslint:disable-next-line:no-const-enum const enum XlSourceType { xlSourceAutoFilter = 3, xlSourceChart = 5, @@ -2840,41 +2717,35 @@ declare namespace Excel { xlSourceWorkbook = 0, } - // tslint:disable-next-line:no-const-enum const enum XlSpanishModes { xlSpanishTuteoAndVoseo = 1, xlSpanishTuteoOnly = 0, xlSpanishVoseoOnly = 2, } - // tslint:disable-next-line:no-const-enum const enum XlSparklineRowCol { xlSparklineColumnsSquare = 2, xlSparklineNonSquare = 0, xlSparklineRowsSquare = 1, } - // tslint:disable-next-line:no-const-enum const enum XlSparkScale { xlSparkScaleCustom = 3, xlSparkScaleGroup = 1, xlSparkScaleSingle = 2, } - // tslint:disable-next-line:no-const-enum const enum XlSparkType { xlSparkColumn = 2, xlSparkColumnStacked100 = 3, xlSparkLine = 1, } - // tslint:disable-next-line:no-const-enum const enum XlSpeakDirection { xlSpeakByColumns = 1, xlSpeakByRows = 0, } - // tslint:disable-next-line:no-const-enum const enum XlSpecialCellsValue { xlErrors = 16, xlLogical = 4, @@ -2882,7 +2753,6 @@ declare namespace Excel { xlTextValues = 2, } - // tslint:disable-next-line:no-const-enum const enum XlStdColorScale { xlColorScaleBlackWhite = 3, xlColorScaleGYR = 2, @@ -2890,37 +2760,31 @@ declare namespace Excel { xlColorScaleWhiteBlack = 4, } - // tslint:disable-next-line:no-const-enum const enum XlSubscribeToFormat { xlSubscribeToPicture = -4147, xlSubscribeToText = -4158, } - // tslint:disable-next-line:no-const-enum const enum XlSubtototalLocationType { xlAtBottom = 2, xlAtTop = 1, } - // tslint:disable-next-line:no-const-enum const enum XlSummaryColumn { xlSummaryOnLeft = -4131, xlSummaryOnRight = -4152, } - // tslint:disable-next-line:no-const-enum const enum XlSummaryReportType { xlStandardSummary = 1, xlSummaryPivotTable = -4148, } - // tslint:disable-next-line:no-const-enum const enum XlSummaryRow { xlSummaryAbove = 0, xlSummaryBelow = 1, } - // tslint:disable-next-line:no-const-enum const enum XlTableStyleElementType { xlBlankRow = 19, xlColumnStripe1 = 7, @@ -2962,32 +2826,27 @@ declare namespace Excel { xlWholeTable = 0, } - // tslint:disable-next-line:no-const-enum const enum XlTabPosition { xlTabPositionFirst = 0, xlTabPositionLast = 1, } - // tslint:disable-next-line:no-const-enum const enum XlTextParsingType { xlDelimited = 1, xlFixedWidth = 2, } - // tslint:disable-next-line:no-const-enum const enum XlTextQualifier { xlTextQualifierDoubleQuote = 1, xlTextQualifierNone = -4142, xlTextQualifierSingleQuote = 2, } - // tslint:disable-next-line:no-const-enum const enum XlTextVisualLayoutType { xlTextVisualLTR = 1, xlTextVisualRTL = 2, } - // tslint:disable-next-line:no-const-enum const enum XlThemeColor { xlThemeColorAccent1 = 5, xlThemeColorAccent2 = 6, @@ -3003,20 +2862,17 @@ declare namespace Excel { xlThemeColorLight2 = 4, } - // tslint:disable-next-line:no-const-enum const enum XlThemeFont { xlThemeFontMajor = 1, xlThemeFontMinor = 2, xlThemeFontNone = 0, } - // tslint:disable-next-line:no-const-enum const enum XlThreadMode { xlThreadModeAutomatic = 0, xlThreadModeManual = 1, } - // tslint:disable-next-line:no-const-enum const enum XlTickLabelOrientation { xlTickLabelOrientationAutomatic = -4105, xlTickLabelOrientationDownward = -4170, @@ -3025,7 +2881,6 @@ declare namespace Excel { xlTickLabelOrientationVertical = -4166, } - // tslint:disable-next-line:no-const-enum const enum XlTickLabelPosition { xlTickLabelPositionHigh = -4127, xlTickLabelPositionLow = -4134, @@ -3033,7 +2888,6 @@ declare namespace Excel { xlTickLabelPositionNone = -4142, } - // tslint:disable-next-line:no-const-enum const enum XlTickMark { xlTickMarkCross = 4, xlTickMarkInside = 2, @@ -3041,7 +2895,6 @@ declare namespace Excel { xlTickMarkOutside = 3, } - // tslint:disable-next-line:no-const-enum const enum XlTimePeriods { xlLast7Days = 2, xlLastMonth = 5, @@ -3055,14 +2908,12 @@ declare namespace Excel { xlYesterday = 1, } - // tslint:disable-next-line:no-const-enum const enum XlTimeUnit { xlDays = 0, xlMonths = 1, xlYears = 2, } - // tslint:disable-next-line:no-const-enum const enum XlToolbarProtection { xlNoButtonChanges = 1, xlNoChanges = 4, @@ -3071,13 +2922,11 @@ declare namespace Excel { xlToolbarProtectionNone = -4143, } - // tslint:disable-next-line:no-const-enum const enum XlTopBottom { xlTop10Bottom = 0, xlTop10Top = 1, } - // tslint:disable-next-line:no-const-enum const enum XlTotalsCalculation { xlTotalsCalculationAverage = 2, xlTotalsCalculationCount = 3, @@ -3091,7 +2940,6 @@ declare namespace Excel { xlTotalsCalculationVar = 8, } - // tslint:disable-next-line:no-const-enum const enum XlTrendlineType { xlExponential = 5, xlLinear = -4132, @@ -3101,7 +2949,6 @@ declare namespace Excel { xlPower = 4, } - // tslint:disable-next-line:no-const-enum const enum XlUnderlineStyle { xlUnderlineStyleDouble = -4119, xlUnderlineStyleDoubleAccounting = 5, @@ -3110,14 +2957,12 @@ declare namespace Excel { xlUnderlineStyleSingleAccounting = 4, } - // tslint:disable-next-line:no-const-enum const enum XlUpdateLinks { xlUpdateLinksAlways = 3, xlUpdateLinksNever = 2, xlUpdateLinksUserSetting = 1, } - // tslint:disable-next-line:no-const-enum const enum XlVAlign { xlVAlignBottom = -4107, xlVAlignCenter = -4108, @@ -3126,7 +2971,6 @@ declare namespace Excel { xlVAlignTop = -4160, } - // tslint:disable-next-line:no-const-enum const enum XlWBATemplate { xlWBATChart = -4109, xlWBATExcel4IntlMacroSheet = 4, @@ -3134,28 +2978,24 @@ declare namespace Excel { xlWBATWorksheet = -4167, } - // tslint:disable-next-line:no-const-enum const enum XlWebFormatting { xlWebFormattingAll = 1, xlWebFormattingNone = 3, xlWebFormattingRTF = 2, } - // tslint:disable-next-line:no-const-enum const enum XlWebSelectionType { xlAllTables = 2, xlEntirePage = 1, xlSpecifiedTables = 3, } - // tslint:disable-next-line:no-const-enum const enum XlWindowState { xlMaximized = -4137, xlMinimized = -4140, xlNormal = -4143, } - // tslint:disable-next-line:no-const-enum const enum XlWindowType { xlChartAsWindow = 5, xlChartInPlace = 4, @@ -3164,34 +3004,29 @@ declare namespace Excel { xlWorkbook = 1, } - // tslint:disable-next-line:no-const-enum const enum XlWindowView { xlNormalView = 1, xlPageBreakPreview = 2, xlPageLayoutView = 3, } - // tslint:disable-next-line:no-const-enum const enum XlXLMMacroType { xlCommand = 2, xlFunction = 1, xlNotXLM = 3, } - // tslint:disable-next-line:no-const-enum const enum XlXmlExportResult { xlXmlExportSuccess = 0, xlXmlExportValidationFailed = 1, } - // tslint:disable-next-line:no-const-enum const enum XlXmlImportResult { xlXmlImportElementsTruncated = 1, xlXmlImportSuccess = 0, xlXmlImportValidationFailed = 2, } - // tslint:disable-next-line:no-const-enum const enum XlXmlLoadOption { xlXmlLoadImportToList = 2, xlXmlLoadMapXml = 3, @@ -3199,13 +3034,37 @@ declare namespace Excel { xlXmlLoadPromptUser = 0, } - // tslint:disable-next-line:no-const-enum const enum XlYesNoGuess { xlGuess = 0, xlNo = 2, xlYes = 1, } + class AboveAverage { + private 'Excel.AboveAverage_typekey': AboveAverage; + private constructor(); + AboveBelow: XlAboveBelow; + readonly Application: Application; + readonly AppliesTo: Range; + readonly Borders: Borders; + CalcFor: XlCalcFor; + readonly Creator: XlCreator; + Delete(): void; + readonly Font: Font; + readonly Interior: Interior; + ModifyAppliesToRange(Range: Range): void; + NumberFormat: string; + NumStdDev: number; + readonly Parent: any; + Priority: number; + readonly PTCondition: boolean; + ScopeType: XlPivotConditionScope; + SetFirstPriority(): void; + SetLastPriority(): void; + StopIfTrue: boolean; + readonly Type: number; + } + class Action { private 'Excel.Action_typekey': Action; private constructor(); @@ -3220,15 +3079,14 @@ declare namespace Excel { readonly Type: XlActionType; } - class Actions { - private 'Excel.Actions_typekey': Actions; - private constructor(); - _Default(Index: any): Action; + interface Actions { + _Default(Index: number | string): Action; readonly Application: Application; readonly Count: number; readonly Creator: XlCreator; - Item(Index: any): Action; + Item(Index: number | string): Action; readonly Parent: any; + (Index: number | string): Action; } class AddIn { @@ -3251,38 +3109,26 @@ declare namespace Excel { readonly Title: string; } - class AddIns { - private 'Excel.AddIns_typekey': AddIns; - private constructor(); - _Default(Index: any): AddIn; - Add(Filename: string, CopyFile?: any): AddIn; + interface AddIns { + _Default(Index: number | string): AddIn; + Add(Filename: string, CopyFile?: boolean): AddIn; readonly Application: Application; readonly Count: number; readonly Creator: XlCreator; - Item(Index: any): AddIn; + Item(Index: number | string): AddIn; readonly Parent: any; + (Index: number | string): AddIn; } - class AddIns2 { - private 'Excel.AddIns2_typekey': AddIns2; - private constructor(); - _Default(Index: any): AddIn; - Add(Filename: string, CopyFile?: any): AddIn; - readonly Application: Application; - readonly Count: number; - readonly Creator: XlCreator; - Item(Index: any): AddIn; - readonly Parent: any; - } + type AddIns2 = AddIns; - class Adjustments { - private 'Excel.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 AllowEditRange { @@ -3292,17 +3138,16 @@ declare namespace Excel { Delete(): void; Range: Range; Title: string; - Unprotect(Password?: any): void; + Unprotect(Password?: string): void; readonly Users: UserAccessList; } - class AllowEditRanges { - private 'Excel.AllowEditRanges_typekey': AllowEditRanges; - private constructor(); - _Default(Index: any): AllowEditRange; - Add(Title: string, Range: Range, Password?: any): AllowEditRange; + interface AllowEditRanges { + _Default(Index: number | string): AllowEditRange; + Add(Title: string, Range: Range, Password?: string): AllowEditRange; readonly Count: number; - Item(Index: any): AllowEditRange; + Item(Index: number | string): AllowEditRange; + (Index: number | string): AllowEditRange; } class Application { @@ -3311,17 +3156,10 @@ declare namespace Excel { readonly _Default: string; _Evaluate(Name: any): any; _FindFile(): void; - _MacroOptions( - Macro?: any, Description?: any, HasMenu?: any, MenuText?: any, HasShortcutKey?: any, ShortcutKey?: any, Category?: any, StatusBar?: any, HelpContextID?: any, HelpFile?: any): void; - _Run2( - Macro?: any, 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; + _MacroOptions(Macro?: any, Description?: any, HasMenu?: any, MenuText?: any, HasShortcutKey?: any, ShortcutKey?: any, Category?: any, StatusBar?: any, HelpContextID?: any, HelpFile?: any): void; + _Run2(Macro?: any, 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; _Wait(Time: any): void; - _WSFunction( - 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; + _WSFunction(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; ActivateMicrosoftApp(Index: XlMSApplication): void; readonly ActiveCell: Range; readonly ActiveChart: Chart; @@ -3330,11 +3168,11 @@ declare namespace Excel { readonly ActiveMenuBar: MenuBar; ActivePrinter: string; readonly ActiveProtectedViewWindow: ProtectedViewWindow; - readonly ActiveSheet: Worksheet | Chart | DialogSheet; + readonly ActiveSheet: Sheet; readonly ActiveWindow: Window; readonly ActiveWorkbook: Workbook; AddChartAutoFormat(Chart: any, Name: string, Description?: any): void; - AddCustomList(ListArray: any, ByRow?: any): void; + AddCustomList(ListArray: SafeArray | Range, ByRow?: boolean): void; readonly AddIns: AddIns; readonly AddIns2: AddIns2; AlertBeforeOverwriting: boolean; @@ -3361,17 +3199,17 @@ declare namespace Excel { CalculationInterruptKey: XlCalculationInterruptKey; readonly CalculationState: XlCalculationState; readonly CalculationVersion: number; - Caller(Index?: any): any; + Caller(Index?: number): Range | string | Error; readonly CanPlaySounds: boolean; readonly CanRecordSounds: boolean; Caption: string; CellDragAndDrop: boolean; readonly Cells: Range; CentimetersToPoints(Centimeters: number): number; - readonly Charts: Sheets; - CheckAbort(KeepAbort?: any): void; - CheckSpelling(Word: string, CustomDictionary?: any, IgnoreUppercase?: any): boolean; - ClipboardFormats(Index?: any): any; + readonly Charts: Sheets; + CheckAbort(KeepAbort?: boolean): void; + CheckSpelling(Word: string, CustomDictionary?: string, IgnoreUppercase?: boolean): boolean; + ClipboardFormats: SafeArray & ((Index: number) => XlClipboardFormat); ClusterConnector: string; ColorButtons: boolean; readonly Columns: Range; @@ -3380,7 +3218,7 @@ declare namespace Excel { CommandUnderlines: XlCommandUnderlines; ConstrainNumeric: boolean; ControlCharacters: boolean; - ConvertFormula(Formula: any, FromReferenceStyle: XlReferenceStyle, ToReferenceStyle?: any, ToAbsolute?: any, RelativeTo?: any): any; + ConvertFormula(Formula: string, FromReferenceStyle: XlReferenceStyle, ToReferenceStyle?: XlReferenceStyle, ToAbsolute?: XlReferenceType, RelativeTo?: Range): string; CopyObjectsWithCells: boolean; readonly Creator: XlCreator; Cursor: XlMousePointer; @@ -3403,7 +3241,7 @@ declare namespace Excel { DeleteChartAutoFormat(Name: string): void; DeleteCustomList(ListNum: number): void; readonly Dialogs: Dialogs; - readonly DialogSheets: Sheets; + readonly DialogSheets: Sheets; DisplayAlerts: boolean; DisplayClipboardWindow: boolean; DisplayCommentIndicator: XlCommentDisplayMode; @@ -3421,26 +3259,21 @@ declare namespace Excel { DisplayRecentFiles: boolean; DisplayScrollBars: boolean; DisplayStatusBar: boolean; - DisplayXMLSourcePane(XmlMap?: any): void; + DisplayXMLSourcePane(XmlMap?: XmlMap): void; DoubleClick(): void; Dummy1(Arg1?: any, Arg2?: any, Arg3?: any, Arg4?: any): any; Dummy10(arg?: any): boolean; readonly Dummy101: any; Dummy11(): void; Dummy12(p1: PivotTable, p2: PivotTable): void; - Dummy13( - 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; + Dummy13(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; Dummy14(): void; Dummy2(Arg1?: any, Arg2?: any, Arg3?: any, Arg4?: any, Arg5?: any, Arg6?: any, Arg7?: any, Arg8?: any): any; Dummy20(grfCompareFunctions: number): any; Dummy22: boolean; Dummy23: boolean; Dummy3(): any; - Dummy4( - 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): any; + Dummy4(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): any; Dummy5(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): any; Dummy6(): any; Dummy7(): any; @@ -3456,13 +3289,13 @@ declare namespace Excel { EnableSound: boolean; EnableTipWizard: boolean; readonly ErrorCheckingOptions: ErrorCheckingOptions; - Evaluate(Name: any): any; + Evaluate(Name: string): any; readonly Excel4IntlMacroSheets: Sheets; readonly Excel4MacroSheets: Sheets; ExecuteExcel4Macro(String: string): any; ExtendList: boolean; FeatureInstall: Office.MsoFeatureInstall; - FileConverters(Index1?: any, Index2?: any): any; + FileConverters(Index1?: string, Index2?: string): SafeArray; FileDialog(fileDialogType: Office.MsoFileDialogType): Office.FileDialog; readonly FileExportConverters: FileExportConverters; readonly FileFind: Office.IFind; @@ -3476,27 +3309,31 @@ declare namespace Excel { FormulaBarHeight: number; GenerateGetPivotData: boolean; GenerateTableRefs: XlGenerateTableRefs; - GetCustomListContents(ListNum: number): any; - GetCustomListNum(ListArray: any): number; - GetOpenFilename(FileFilter?: any, FilterIndex?: any, Title?: any, ButtonText?: any, MultiSelect?: any): any; - GetPhonetic(Text?: any): string; - GetSaveAsFilename(InitialFilename?: any, FileFilter?: any, FilterIndex?: any, Title?: any, ButtonText?: any): any; - Goto(Reference?: any, Scroll?: any): void; + GetCustomListContents(ListNum: number): SafeArray; + GetCustomListNum(ListArray: SafeArray): number; + + /** @param ButtonText Macintosh only */ + GetOpenFilename(FileFilter?: string, FilterIndex?: number, Title?: string, ButtonText?: null, MultiSelect?: false): string; + + /** @param ButtonText Macintosh only */ + GetOpenFilename(FileFilter: string | null, FilterIndex: number | null, Title: string | null, ButtonText: null, MultiSelect: true): SafeArray; + GetPhonetic(Text?: string): string; + + /** @param ButtonText Macintosh only */ + GetSaveAsFilename(InitialFilename?: string, FileFilter?: string, FilterIndex?: number, Title?: string, ButtonText?: undefined): string; + Goto(Reference?: Range | string, Scroll?: boolean): void; Height: number; - Help(HelpFile?: any, HelpContextID?: any): void; + Help(HelpFile?: string, HelpContextID?: number): void; HighQualityModeForGraphics: boolean; readonly Hinstance: number; - readonly HinstancePtr: any; + readonly HinstancePtr: number; readonly Hwnd: number; IgnoreRemoteRequests: boolean; InchesToPoints(Inches: number): number; - InputBox(Prompt: string, Title?: any, Default?: any, Left?: any, Top?: any, HelpFile?: any, HelpContextID?: any, Type?: any): any; + InputBox(Prompt: string, Title?: string, Default?: string, Left?: number, Top?: number, HelpFile?: string, HelpContextID?: number, Type?: InputBoxReturnType): string | number | boolean | Range | Error | SafeArray | SafeArray | SafeArray; Interactive: boolean; - International(Index?: any): any; - Intersect( - Arg1: Range, Arg2: Range, Arg3?: Range, Arg4?: Range, Arg5?: Range, Arg6?: Range, Arg7?: Range, Arg8?: Range, Arg9?: Range, Arg10?: Range, Arg11?: Range, Arg12?: Range, - Arg13?: Range, Arg14?: Range, Arg15?: Range, Arg16?: Range, Arg17?: Range, Arg18?: Range, Arg19?: Range, Arg20?: Range, Arg21?: Range, Arg22?: Range, Arg23?: Range, Arg24?: Range, - Arg25?: Range, Arg26?: Range, Arg27?: Range, Arg28?: Range, Arg29?: Range, Arg30?: Range): Range; + International: SafeArray & ((Index: T) => InternationalResult); + Intersect(Arg1: Range, Arg2: Range, Arg3?: Range, Arg4?: Range, Arg5?: Range, Arg6?: Range, Arg7?: Range, Arg8?: Range, Arg9?: Range, Arg10?: Range, Arg11?: Range, Arg12?: Range, Arg13?: Range, Arg14?: Range, Arg15?: Range, Arg16?: Range, Arg17?: Range, Arg18?: Range, Arg19?: Range, Arg20?: Range, Arg21?: Range, Arg22?: Range, Arg23?: Range, Arg24?: Range, Arg25?: Range, Arg26?: Range, Arg27?: Range, Arg28?: Range, Arg29?: Range, Arg30?: Range): Range; readonly IsSandboxed: boolean; Iteration: boolean; readonly LanguageSettings: Office.LanguageSettings; @@ -3504,12 +3341,10 @@ declare namespace Excel { LargeOperationCellThousandCount: number; Left: number; readonly LibraryPath: string; - MacroOptions( - Macro?: any, Description?: any, HasMenu?: any, MenuText?: any, HasShortcutKey?: any, ShortcutKey?: any, Category?: any, StatusBar?: any, HelpContextID?: any, - HelpFile?: any, ArgumentDescriptions?: any): void; + MacroOptions(Macro?: string, Description?: string, HasMenu?: undefined, MenuText?: undefined, HasShortcutKey?: boolean, ShortcutKey?: string, Category?: FunctionCategory | string, StatusBar?: string, HelpContextID?: number, HelpFile?: string, ArgumentDescriptions?: SafeArray): void; MailLogoff(): void; - MailLogon(Name?: any, Password?: any, DownloadNewMail?: any): void; - readonly MailSession: any; + MailLogon(Name?: string, Password?: string, DownloadNewMail?: boolean): void; + readonly MailSession: string | null; readonly MailSystem: XlMailSystem; MapPaperSize: boolean; readonly MathCoprocessorAvailable: boolean; @@ -3537,11 +3372,11 @@ declare namespace Excel { OnData: string; OnDoubleClick: string; OnEntry: string; - OnKey(Key: string, Procedure?: any): void; + OnKey(Key: string, Procedure?: string): void; OnRepeat(Text: string, Procedure: string): void; OnSheetActivate: string; OnSheetDeactivate: string; - OnTime(EarliestTime: any, Procedure: string, LatestTime?: any, Schedule?: any): void; + OnTime(EarliestTime: any, Procedure: string, LatestTime?: any, Schedule?: boolean): void; OnUndo(Text: string, Procedure: string): void; OnWindow: string; readonly OperatingSystem: string; @@ -3550,7 +3385,7 @@ declare namespace Excel { readonly Path: string; readonly PathSeparator: string; PivotTableSelection: boolean; - PreviousSelections(Index?: any): any; + PreviousSelections(Index: 1 | 2 | 3 | 4): Range | null; PrintCommunication: boolean; readonly ProductCode: string; PromptForSummaryInfo: boolean; @@ -3560,10 +3395,13 @@ declare namespace Excel { Range(Cell1: string | Range, Cell2?: string | Range): Range; readonly Ready: boolean; readonly RecentFiles: RecentFiles; - RecordMacro(BasicCode?: any, XlmCode?: any): void; + RecordMacro(BasicCode: string): void; + + /** This overload prevents recording */ + RecordMacro(BasicCode: '', XlmCode: ''): void; readonly RecordRelative: boolean; ReferenceStyle: XlReferenceStyle; - RegisteredFunctions(Index1?: any, Index2?: any): any; + RegisteredFunctions(Index1: string | undefined, Index2?: string): SafeArray | null; RegisterXLL(Filename: string): boolean; Repeat(): void; ReplaceFormat: CellFormat; @@ -3571,16 +3409,15 @@ declare namespace Excel { RollZoom: boolean; readonly Rows: Range; readonly RTD: RTD; - Run( - Macro?: any, 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(Macro?: string | Range | number, 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; Save(Filename?: any): void; SaveISO8601Dates: boolean; + + /** @deprecated */ SaveWorkspace(Filename?: any): void; ScreenUpdating: boolean; readonly Selection: any; - SendKeys(Keys: any, Wait?: any): void; + SendKeys(Keys: string, Wait?: boolean): void; SetDefaultChart(FormatName?: any, Gallery?: any): void; SharePointVersion(bstrUrl: string): number; readonly Sheets: Sheets; @@ -3603,7 +3440,15 @@ declare namespace Excel { StandardFont: string; StandardFontSize: number; readonly StartupPath: string; - StatusBar: any; + + /** + * Get or set the text of the status bar + * + * Returns `false` if Microsoft Excel has control of the status bar. + * + * To restore the default status bar text, set the property to False ; this works even if the status bar is hidden. + */ + StatusBar: string | false; Support(Object: any, ID: number, arg?: any): any; readonly TemplatesPath: string; readonly ThisCell: Range; @@ -3616,10 +3461,7 @@ declare namespace Excel { TransitionNavigKeys: boolean; UILanguage: number; Undo(): void; - Union( - Arg1: Range, Arg2: Range, 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): Range; + Union(Arg1: Range, Arg2: Range, Arg3?: Range, Arg4?: Range, Arg5?: Range, Arg6?: Range, Arg7?: Range, Arg8?: Range, Arg9?: Range, Arg10?: Range, Arg11?: Range, Arg12?: Range, Arg13?: Range, Arg14?: Range, Arg15?: Range, Arg16?: Range, Arg17?: Range, Arg18?: Range, Arg19?: Range, Arg20?: Range, Arg21?: Range, Arg22?: Range, Arg23?: Range, Arg24?: Range, Arg25?: Range, Arg26?: Range, Arg27?: Range, Arg28?: Range, Arg29?: Range, Arg30?: Range): Range; readonly UsableHeight: number; readonly UsableWidth: number; UseClusterConnector: boolean; @@ -3632,7 +3474,11 @@ declare namespace Excel { readonly VBE: VBIDE.VBE; readonly Version: string; Visible: boolean; - Volatile(Volatile?: any): void; + + /** + * @param Volatile [Volatile=true] + */ + Volatile(Volatile?: boolean): void; Wait(Time: any): boolean; WarnOnFunctionNameConflict: boolean; readonly Watches: Watches; @@ -3642,24 +3488,25 @@ declare namespace Excel { WindowState: XlWindowState; readonly Workbooks: Workbooks; readonly WorksheetFunction: WorksheetFunction; - readonly Worksheets: Sheets; + readonly Worksheets: Sheets; } - class Areas { - private 'Excel.Areas_typekey': Areas; - private constructor(); + interface Areas { _Default(Index: number): Range; readonly Application: Application; readonly Count: number; readonly Creator: XlCreator; Item(Index: number): Range; readonly Parent: any; + (Index: number): Range; } class AutoCorrect { private 'Excel.AutoCorrect_typekey': AutoCorrect; private constructor(); - AddReplacement(What: string, Replacement: string): any; + + /** @returns The string to be replaced */ + AddReplacement(What: string, Replacement: string): string; readonly Application: Application; AutoExpandListRange: boolean; AutoFillFormulasInLists: boolean; @@ -3667,10 +3514,12 @@ declare namespace Excel { CorrectCapsLock: boolean; CorrectSentenceCap: boolean; readonly Creator: XlCreator; - DeleteReplacement(What: string): any; + + /** @returns The string to be replaced */ + DeleteReplacement(What: string): string; DisplayAutoCorrectOptions: boolean; readonly Parent: any; - ReplacementList(Index?: any): any; + ReplacementList(Index: number): SafeArray; ReplaceText: boolean; TwoInitialCapitals: boolean; } @@ -3700,62 +3549,172 @@ declare namespace Excel { Time: number; } + interface Axes { + /** @param AxisGroup [AxisGroup=1] */ + _Default(Type: XlAxisType, AxisGroup?: XlAxisGroup): Axis; + readonly Application: Application; + readonly Count: number; + readonly Creator: XlCreator; + + /** @param AxisGroup [AxisGroup=1] */ + Item(Type: XlAxisType, AxisGroup?: XlAxisGroup): Axis; + readonly Parent: any; + + /** @param AxisGroup [AxisGroup=1] */ + (Type: XlAxisType, AxisGroup?: XlAxisGroup): Axis; + } + + class Axis { + private 'Excel.Axis_typekey': Axis; + private constructor(); + readonly Application: Application; + AxisBetweenCategories: boolean; + readonly AxisGroup: XlAxisGroup; + readonly AxisTitle: AxisTitle; + BaseUnit: XlTimeUnit; + BaseUnitIsAuto: boolean; + readonly Border: Border; + CategoryNames: SafeArray | Range; + CategoryType: XlCategoryType; + readonly Creator: XlCreator; + Crosses: XlAxisCrosses; + CrossesAt: number; + Delete(): any; + DisplayUnit: XlDisplayUnit; + DisplayUnitCustom: number; + readonly DisplayUnitLabel: DisplayUnitLabel; + readonly Format: ChartFormat; + HasDisplayUnitLabel: boolean; + HasMajorGridlines: boolean; + HasMinorGridlines: boolean; + HasTitle: boolean; + readonly Height: number; + readonly Left: number; + LogBase: number; + readonly MajorGridlines: Gridlines; + MajorTickMark: XlTickMark; + MajorUnit: number; + MajorUnitIsAuto: boolean; + MajorUnitScale: XlTimeUnit; + MaximumScale: number; + MaximumScaleIsAuto: boolean; + MinimumScale: number; + MinimumScaleIsAuto: boolean; + readonly MinorGridlines: Gridlines; + MinorTickMark: XlTickMark; + MinorUnit: number; + MinorUnitIsAuto: boolean; + MinorUnitScale: XlTimeUnit; + readonly Parent: any; + ReversePlotOrder: boolean; + ScaleType: XlScaleType; + Select(): any; + TickLabelPosition: XlTickLabelPosition; + readonly TickLabels: TickLabels; + TickLabelSpacing: number; + TickLabelSpacingIsAuto: boolean; + TickMarkSpacing: number; + readonly Top: number; + Type: XlAxisType; + readonly Width: number; + } + + class AxisTitle { + private 'Excel.AxisTitle_typekey': AxisTitle; + private constructor(); + readonly Application: Application; + AutoScaleFont: any; + readonly Border: Border; + Caption: string; + Characters(Start?: number, Length?: number): Characters; + readonly Creator: XlCreator; + Delete(): any; + readonly Fill: ChartFillFormat; + readonly Font: Font; + readonly Format: ChartFormat; + Formula: string; + FormulaLocal: string; + FormulaR1C1: string; + FormulaR1C1Local: string; + readonly Height: number; + HorizontalAlignment: HorizontalAlignments; + IncludeInLayout: boolean; + readonly Interior: Interior; + Left: number; + readonly Name: string; + Orientation: number | XlOrientation; + readonly Parent: any; + Position: XlChartElementPosition; + ReadingOrder: number; + Select(): any; + Shadow: boolean; + Text: string; + Top: number; + VerticalAlignment: VerticalAlignments; + readonly Width: number; + } + class Border { private 'Excel.Border_typekey': Border; private constructor(); readonly Application: Application; - Color: any; - ColorIndex: any; + Color: XlRgbColor | number; + ColorIndex: number | XlColorIndex; readonly Creator: XlCreator; - LineStyle: XlLineStyle | Constants.xlGray25 | Constants.xlGray50 | Constants.xlGray75 | Constants.xlAutomatic; + LineStyle: LineStyle; readonly Parent: any; - ThemeColor: any; - TintAndShade: any; - Weight: any; + ThemeColor: XlThemeColor; + TintAndShade: number; + Weight: XlBorderWeight; } - class Borders { - private 'Excel.Borders_typekey': Borders; - private constructor(); + interface Borders { _Default(Index: XlBordersIndex): Border; readonly Application: Application; - Color: any; - ColorIndex: any; + Color: XlRgbColor | number; + ColorIndex: number | XlColorIndex | null; readonly Count: number; readonly Creator: XlCreator; Item(Index: XlBordersIndex): Border; - LineStyle: any; + LineStyle: LineStyle; readonly Parent: any; - ThemeColor: any; - TintAndShade: any; - Value: any; - Weight: any; + ThemeColor: XlThemeColor; + TintAndShade: number; + Value: LineStyle; + Weight: XlBorderWeight; + (Index: XlBordersIndex): Border; } - class CalculatedFields { - private 'Excel.CalculatedFields_typekey': CalculatedFields; - private constructor(); + interface CalculatedFields { _Add(Name: string, Formula: string): PivotField; _Default(Field: any): PivotField; - Add(Name: string, Formula: string, UseStandardFormula?: any): PivotField; + + /** + * @param UseStandardFormula [UseStandardFormula=false] + */ + Add(Name: string, Formula: string, UseStandardFormula?: boolean): PivotField; readonly Application: Application; readonly Count: number; readonly Creator: XlCreator; - Item(Index: any): PivotField; + Item(Index: number | string): PivotField; readonly Parent: any; + (Field: number | string): PivotField; } - class CalculatedItems { - private 'Excel.CalculatedItems_typekey': CalculatedItems; - private constructor(); + interface CalculatedItems { _Add(Name: string, Formula: string): PivotItem; - _Default(Field: any): PivotItem; - Add(Name: string, Formula: string, UseStandardFormula?: any): PivotItem; + _Default(Field: number | string): PivotItem; + + /** + * @param UseStandardFormula [UseStandardFormula=false] + */ + Add(Name: string, Formula: string, UseStandardFormula?: boolean): PivotItem; readonly Application: Application; readonly Count: number; readonly Creator: XlCreator; - Item(Index: any): PivotItem; + Item(Index: number | string): PivotItem; readonly Parent: any; + (Field: number | string): PivotItem; } class CalculatedMember { @@ -3778,17 +3737,19 @@ declare namespace Excel { readonly Type: XlCalculatedMemberType; } - class CalculatedMembers { - private 'Excel.CalculatedMembers_typekey': CalculatedMembers; - private constructor(); + interface CalculatedMembers { _Add(Name: string, Formula: string, SolveOrder?: any, Type?: any): CalculatedMember; _Default(Index: any): CalculatedMember; - Add(Name: string, Formula: any, SolveOrder?: any, Type?: any, Dynamic?: any, DisplayFolder?: any, HierarchizeDistinct?: any): CalculatedMember; + Add(Name: string, Formula: string, SolveOrder?: number, Type?: XlCalculatedMemberType, Dynamic?: boolean, DisplayFolder?: string, HierarchizeDistinct?: boolean): CalculatedMember; + + /** @version 2013 */ + AddCalculatedMember(Name: string, Formula: string, SolveOrder?: number, Type?: XlCalculatedMemberType, DisplayFolder?: string, MeasureGroup?: any, ParentMember?: any, NumberFormat?: any): CalculatedMember; readonly Application: Application; readonly Count: number; readonly Creator: XlCreator; - Item(Index: any): CalculatedMember; + Item(Index: number | string): CalculatedMember; readonly Parent: any; + (Index: number | string): CalculatedMember; } class CalloutFormat { @@ -3816,25 +3777,25 @@ declare namespace Excel { class CellFormat { private 'Excel.CellFormat_typekey': CellFormat; private constructor(); - AddIndent: any; + AddIndent: boolean; readonly Application: Application; Borders: Borders; Clear(): void; readonly Creator: XlCreator; Font: Font; - FormulaHidden: any; - HorizontalAlignment: any; - IndentLevel: any; + FormulaHidden: boolean | null; + HorizontalAlignment: HorizontalAlignments; + IndentLevel: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15; Interior: Interior; - Locked: any; - MergeCells: any; - NumberFormat: any; - NumberFormatLocal: any; - Orientation: any; + Locked: boolean | null; + MergeCells: boolean; + NumberFormat: string | null; + NumberFormatLocal: string | null; + Orientation: number | XlOrientation; readonly Parent: any; - ShrinkToFit: any; - VerticalAlignment: any; - WrapText: any; + ShrinkToFit: boolean | null; + VerticalAlignment: VerticalAlignments; + WrapText: boolean | null; } class Characters { @@ -3844,9 +3805,9 @@ declare namespace Excel { Caption: string; readonly Count: number; readonly Creator: XlCreator; - Delete(): any; + Delete(): null; readonly Font: Font; - Insert(String: string): any; + Insert(String: string | null): string; readonly Parent: any; PhoneticCharacters: string; Text: string; @@ -3857,67 +3818,62 @@ declare namespace Excel { private constructor(); __PrintOut(From?: any, To?: any, Copies?: any, Preview?: any, ActivePrinter?: any, PrintToFile?: any, Collate?: any): void; - /** @param Excel.XlDataLabelsType [Type=2] */ + /** @param Type [Type=2] */ _ApplyDataLabels(Type?: XlDataLabelsType, LegendKey?: any, AutoText?: any, HasLeaderLines?: any): void; _CodeName: string; _Evaluate(Name: any): any; _PrintOut(From?: any, To?: any, Copies?: any, Preview?: any, ActivePrinter?: any, PrintToFile?: any, Collate?: any, PrToFileName?: any): void; _Protect(Password?: any, DrawingObjects?: any, Contents?: any, Scenarios?: any, UserInterfaceOnly?: any): void; - _SaveAs( - Filename: string, FileFormat?: any, Password?: any, WriteResPassword?: any, ReadOnlyRecommended?: any, CreateBackup?: any, AddToMru?: any, TextCodepage?: any, - TextVisualLayout?: any): void; + _SaveAs(Filename: string, FileFormat?: any, Password?: any, WriteResPassword?: any, ReadOnlyRecommended?: any, CreateBackup?: any, AddToMru?: any, TextCodepage?: any, TextVisualLayout?: any): void; Activate(): void; readonly Application: Application; ApplyChartTemplate(Filename: string): void; ApplyCustomType(ChartType: XlChartType, TypeName?: any): void; - /** @param Excel.XlDataLabelsType [Type=2] */ - ApplyDataLabels( - Type?: XlDataLabelsType, LegendKey?: any, AutoText?: any, HasLeaderLines?: any, ShowSeriesName?: any, ShowCategoryName?: any, ShowValue?: any, - ShowPercentage?: any, ShowBubbleSize?: any, Separator?: any): void; - ApplyLayout(Layout: number, ChartType?: any): void; + /** @param Type [Type=2] */ + ApplyDataLabels(Type?: XlDataLabelsType, LegendKey?: boolean, AutoText?: boolean, HasLeaderLines?: boolean, ShowSeriesName?: boolean, ShowCategoryName?: boolean, ShowValue?: boolean, ShowPercentage?: boolean, ShowBubbleSize?: boolean, Separator?: string): void; + ApplyLayout(Layout: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10, ChartType?: XlChartType): void; Arcs(Index?: any): any; readonly Area3DGroup: ChartGroup; AreaGroups(Index?: any): any; AutoFormat(Gallery: number, Format?: any): void; AutoScaling: boolean; - /** @param Excel.XlAxisGroup [AxisGroup=1] */ - Axes(Type: any, AxisGroup?: XlAxisGroup): any; + /** @param AxisGroup [AxisGroup=1] */ + Axes(Type?: XlAxisType, AxisGroup?: XlAxisGroup): Axes | Axis; readonly BackWall: Walls; readonly Bar3DGroup: ChartGroup; BarGroups(Index?: any): any; BarShape: XlBarShape; Buttons(Index?: any): any; readonly ChartArea: ChartArea; - ChartGroups(Index?: any): any; - ChartObjects(Index?: any): any; - ChartStyle: any; + ChartObjects(Index?: SafeArray): ChartObjects; + ChartObjects(Index: string | number): ChartObject; + ChartStyle: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48; readonly ChartTitle: ChartTitle; ChartType: XlChartType; - ChartWizard( - Source?: any, Gallery?: any, Format?: any, PlotBy?: any, CategoryLabels?: any, SeriesLabels?: any, HasLegend?: any, Title?: any, CategoryTitle?: any, - ValueTitle?: any, ExtraTitle?: any): void; + ChartWizard(Source?: Range, Gallery?: XlChartType, Format?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10, PlotBy?: XlRowCol, CategoryLabels?: number, SeriesLabels?: number, HasLegend?: boolean, Title?: string, CategoryTitle?: string, ValueTitle?: string, ExtraTitle?: string): void; CheckBoxes(Index?: any): any; - CheckSpelling(CustomDictionary?: any, IgnoreUppercase?: any, AlwaysSuggest?: any, SpellLang?: any): void; + CheckSpelling(CustomDictionary?: string, IgnoreUppercase?: boolean, AlwaysSuggest?: boolean, SpellLang?: Office.MsoLanguageID): void; ClearToMatchStyle(): void; readonly CodeName: string; readonly Column3DGroup: ChartGroup; ColumnGroups(Index?: any): any; - Copy(Before?: any, After?: any): void; + Copy(Before?: Sheet): void; + Copy(Before: undefined, After: Sheet): void; CopyChartBuild(): void; /** - * @param Excel.XlPictureAppearance [Appearance=1] - * @param Excel.XlCopyPictureFormat [Format=-4147] - * @param Excel.XlPictureAppearance [Size=2] + * @param Appearance [Appearance=1] + * @param Format [Format=-4147] + * @param Size [Size=2] */ CopyPicture(Appearance?: XlPictureAppearance, Format?: XlCopyPictureFormat, Size?: XlPictureAppearance): void; readonly Corners: Corners; /** - * @param Excel.XlPictureAppearance [Appearance=1] - * @param Excel.XlPictureAppearance [Size=1] + * @param Appearance [Appearance=1] + * @param Size [Size=1] */ CreatePublisher(Edition: any, Appearance?: XlPictureAppearance, Size?: XlPictureAppearance, ContainsPICT?: any, ContainsBIFF?: any, ContainsRTF?: any, ContainsVALU?: any): void; readonly Creator: XlCreator; @@ -3933,17 +3889,15 @@ declare namespace Excel { Dummy24: boolean; Dummy25: boolean; Elevation: number; - Evaluate(Name: any): any; - Export(Filename: string, FilterName?: any, Interactive?: any): boolean; - ExportAsFixedFormat( - Type: XlFixedFormatType, Filename?: any, Quality?: any, IncludeDocProperties?: any, IgnorePrintAreas?: any, From?: any, To?: any, OpenAfterPublish?: any, - FixedFormatExtClassPtr?: any): void; + Evaluate(Name: string): any; + Export(Filename: string, FilterName?: string, Interactive?: boolean): boolean; + ExportAsFixedFormat(Type: XlFixedFormatType, Filename?: string, Quality?: XlFixedFormatQuality, IncludeDocProperties?: boolean, IgnorePrintAreas?: boolean, From?: number, To?: number, OpenAfterPublish?: boolean, FixedFormatExtClassPtr?: any): void; readonly Floor: Floor; GapDepth: number; GetChartElement(x: number, y: number, ElementID: number, Arg1: number, Arg2: number): void; GroupBoxes(Index?: any): any; GroupObjects(Index?: any): any; - HasAxis(Index1?: any, Index2?: any): any; + HasAxis(Index1?: XlAxisType, Index2?: XlAxisGroup): boolean; HasDataTable: boolean; HasLegend: boolean; HasPivotFields: boolean; @@ -3957,12 +3911,14 @@ declare namespace Excel { LineGroups(Index?: any): any; Lines(Index?: any): any; ListBoxes(Index?: any): any; - Location(Where: XlChartLocation, Name?: any): Chart; + Location(Where: XlChartLocation.xlLocationAsObject, Name: string): Chart; + Location(Where: XlChartLocation, Name?: string): Chart; readonly MailEnvelope: Office.MsoEnvelope; - Move(Before?: any, After?: any): void; + Move(Before?: Sheet, After?: Sheet): void; Name: string; - readonly Next: any; - OLEObjects(Index?: any): any; + readonly Next: Sheet; + OLEObjects(Index: number | string): OLEObject; + OLEObjects(): OLEObjects; OnDoubleClick: string; OnSheetActivate: string; OnSheetDeactivate: string; @@ -3970,7 +3926,7 @@ declare namespace Excel { Ovals(Index?: any): any; readonly PageSetup: PageSetup; readonly Parent: any; - Paste(Type?: any): void; + Paste(Type?: XlPasteType.xlPasteAll | XlPasteType.xlPasteFormats | XlPasteType.xlPasteFormulas): void; Perspective: number; Pictures(Index?: any): any; readonly Pie3DGroup: ChartGroup; @@ -3979,11 +3935,13 @@ declare namespace Excel { readonly PlotArea: PlotArea; PlotBy: XlRowCol; PlotVisibleOnly: boolean; - readonly Previous: any; + readonly Previous: Sheet; readonly PrintedCommentPages: number; - PrintOut(From?: any, To?: any, Copies?: any, Preview?: any, ActivePrinter?: any, PrintToFile?: any, Collate?: any, PrToFileName?: any): void; - PrintPreview(EnableChanges?: any): void; - Protect(Password?: any, DrawingObjects?: any, Contents?: any, Scenarios?: any, UserInterfaceOnly?: any): void; + PrintOut(From?: number, To?: number, Copies?: number, Preview?: boolean, ActivePrinter?: string, PrintToFile?: T, Collate?: boolean, PrToFileName?: PrintToFileName): any; + PrintPreview(EnableChanges?: boolean): void; + + /** @param Scenarios Passing `true` for this argument is only valid on worksheets */ + Protect(Password?: string, DrawingObjects?: boolean, Contents?: boolean, Scenarios?: false, UserInterfaceOnly?: boolean): void; readonly ProtectContents: boolean; ProtectData: boolean; readonly ProtectDrawingObjects: boolean; @@ -3994,20 +3952,20 @@ declare namespace Excel { RadarGroups(Index?: any): any; Rectangles(Index?: any): any; Refresh(): void; - RightAngleAxes: any; - Rotation: any; - SaveAs( - Filename: string, FileFormat?: any, Password?: any, WriteResPassword?: any, ReadOnlyRecommended?: any, CreateBackup?: any, AddToMru?: any, TextCodepage?: any, - TextVisualLayout?: any, Local?: any): void; + + /** `true` if the chart axes are at right angles, independent of chart rotation or elevation. Applies only to 3-D line, column, and bar charts. */ + RightAngleAxes: boolean; + Rotation: number; + SaveAs(Filename: string, FileFormat?: XlFileFormat, Password?: string, WriteResPassword?: string, ReadOnlyRecommended?: boolean, CreateBackup?: boolean, AddToMru?: boolean, TextCodepage?: any, TextVisualLayout?: any, Local?: any): void; SaveChartTemplate(Filename: string): void; readonly Scripts: Office.Scripts; ScrollBars(Index?: any): any; - Select(Replace?: any): void; - SeriesCollection(Index?: any): any; + Select(Replace?: boolean): void; + SeriesCollection(Index?: number | string): SeriesCollection | Series; SetBackgroundPicture(Filename: string): void; SetDefaultChart(Name: any): void; SetElement(Element: Office.MsoChartElementType): void; - SetSourceData(Source: Range, PlotBy?: any): void; + SetSourceData(Source: Range, PlotBy?: XlRowCol): void; readonly Shapes: Shapes; ShowAllFieldButtons: boolean; ShowAxisFieldButtons: boolean; @@ -4024,7 +3982,7 @@ declare namespace Excel { readonly Tab: Tab; TextBoxes(Index?: any): any; Type: number; - Unprotect(Password?: any): void; + Unprotect(Password?: string): void; Visible: XlSheetVisibility; readonly Walls: Walls; WallsAndGridlines2D: boolean; @@ -4138,18 +4096,114 @@ declare namespace Excel { readonly Parent: any; readonly RadarAxisLabels: TickLabels; SecondPlotSize: number; - SeriesCollection(Index?: any): any; + SeriesCollection(Index?: number | string): SeriesCollection | Series; readonly SeriesLines: SeriesLines; ShowNegativeBubbles: boolean; SizeRepresents: XlSizeRepresents; SplitType: XlChartSplitType; - SplitValue: any; + SplitValue: number; SubType: number; Type: number; readonly UpBars: UpBars; VaryByCategories: boolean; } + interface ChartGroups { + readonly Application: Application; + readonly Count: number; + readonly Creator: XlCreator; + Item(Index: number): ChartGroup; + readonly Parent: any; + (Index: number): ChartGroup; + } + + class ChartObject { + private 'Excel.ChartObject_typekey': ChartObject; + private constructor(); + _Copy(): any; + Activate(): any; + readonly Application: Application; + readonly Border: Border; + readonly BottomRightCell: Range; + BringToFront(): any; + readonly Chart: Chart; + Copy(): any; + + /** + * @param Appearance [Appearance=2] + * @param Format [Format=-4147] + */ + CopyPicture(Appearance?: XlPictureAppearance, Format?: XlCopyPictureFormat): any; + readonly Creator: XlCreator; + Cut(): any; + Delete(): any; + Duplicate(): any; + Enabled: boolean; + Height: number; + readonly Index: number; + readonly Interior: Interior; + Left: number; + Locked: boolean; + Name: string; + OnAction: string; + readonly Parent: any; + Placement: XlPlacement; + PrintObject: boolean; + ProtectChartObject: boolean; + RoundedCorners: boolean; + Select(Replace?: boolean): any; + SendToBack(): any; + Shadow: boolean; + readonly ShapeRange: ShapeRange; + Top: number; + readonly TopLeftCell: Range; + Visible: boolean; + Width: number; + readonly ZOrder: number; + } + + interface ChartObjects { + _Copy(): any; + _Default(Index: any): any; + Add(Left: number, Top: number, Width: number, Height: number): ChartObject; + readonly Application: Application; + readonly Border: Border; + BringToFront(): any; + Copy(): any; + + /** + * @param Appearance [Appearance=2] + * @param Format [Format=-4147] + */ + CopyPicture(Appearance?: XlPictureAppearance, Format?: XlCopyPictureFormat): any; + readonly Count: number; + readonly Creator: XlCreator; + Cut(): any; + Delete(): any; + Duplicate(): any; + Enabled: boolean; + Group(): GroupObject; + Height: number; + readonly Interior: Interior; + Item(Index: number | string): ChartObject; + Left: number; + Locked: boolean; + OnAction: string; + readonly Parent: any; + Placement: XlPlacement; + PrintObject: boolean; + ProtectChartObject: boolean; + RoundedCorners: boolean; + Select(Replace?: boolean): any; + SendToBack(): any; + Shadow: boolean; + readonly ShapeRange: ShapeRange; + Top: number; + Visible: boolean; + Width: number; + (Index: number | string): any; + } + class ChartTitle { private 'Excel.ChartTitle_typekey': ChartTitle; private constructor(); @@ -4157,7 +4211,7 @@ declare namespace Excel { AutoScaleFont: any; readonly Border: Border; Caption: string; - Characters(Start?: any, Length?: any): Characters; + Characters(Start?: number, Length?: number): Characters; readonly Creator: XlCreator; Delete(): any; readonly Fill: ChartFillFormat; @@ -4168,7 +4222,7 @@ declare namespace Excel { FormulaR1C1: string; FormulaR1C1Local: string; readonly Height: number; - HorizontalAlignment: any; + HorizontalAlignment: HorizontalAlignments; IncludeInLayout: boolean; readonly Interior: Interior; Left: number; @@ -4181,7 +4235,7 @@ declare namespace Excel { Shadow: boolean; Text: string; Top: number; - VerticalAlignment: any; + VerticalAlignment: VerticalAlignments; readonly Width: number; } @@ -4199,6 +4253,42 @@ declare namespace Excel { readonly Type: Office.MsoColorType; } + class ColorScale { + private 'Excel.ColorScale_typekey': ColorScale; + private constructor(); + readonly Application: Application; + readonly AppliesTo: Range; + readonly ColorScaleCriteria: ColorScaleCriteria; + readonly Creator: XlCreator; + Delete(): void; + Formula: string; + ModifyAppliesToRange(Range: Range): void; + readonly Parent: any; + Priority: number; + readonly PTCondition: boolean; + ScopeType: XlPivotConditionScope; + SetFirstPriority(): void; + SetLastPriority(): void; + readonly StopIfTrue: boolean; + readonly Type: number; + } + + interface ColorScaleCriteria { + _Default(Index: any): ColorScaleCriterion; + readonly Count: number; + Item(Index: number): ColorScaleCriterion; + (Index: number): ColorScaleCriterion; + } + + class ColorScaleCriterion { + private 'Excel.ColorScaleCriterion_typekey': ColorScaleCriterion; + private constructor(); + readonly FormatColor: FormatColor; + readonly Index: number; + Type: XlConditionValueTypes; + Value: any; + } + class Comment { private 'Excel.Comment_typekey': Comment; private constructor(); @@ -4210,32 +4300,44 @@ declare namespace Excel { readonly Parent: any; Previous(): Comment; readonly Shape: Shape; - Text(Text?: any, Start?: any, Overwrite?: any): string; + Text(Text?: string, Start?: number, Overwrite?: boolean): string; Visible: boolean; } - class Comments { - private 'Excel.Comments_typekey': Comments; - private constructor(); + interface Comments { _Default(Index: number): Comment; readonly Application: Application; readonly Count: number; readonly Creator: XlCreator; Item(Index: number): Comment; readonly Parent: any; + (Index: number): Comment; } - class Connections { - private 'Excel.Connections_typekey': Connections; + class ConditionValue { + private 'Excel.ConditionValue_typekey': ConditionValue; private constructor(); + readonly Application: Application; + readonly Creator: XlCreator; + Modify(newtype: XlConditionValueTypes.xlConditionValueLowestValue | XlConditionValueTypes.xlConditionValueHighestValue): void; + Modify(newtype: XlConditionValueTypes.xlConditionValueNumber | XlConditionValueTypes.xlConditionValuePercent | XlConditionValueTypes.xlConditionValuePercentile, newvalue: number): void; + Modify(newtype: XlConditionValueTypes.xlConditionValueFormula, newvalue: string): void; + Modify(newtype: XlConditionValueTypes, newvalue?: any): void; + readonly Parent: any; + readonly Type: XlConditionValueTypes; + Value: number | string; + } + + interface Connections { _Default(Index: any): WorkbookConnection; - Add(Name: string, Description: string, ConnectionString: any, CommandText: any, lCmdtype?: any): WorkbookConnection; + Add(Name: string, Description: string, ConnectionString: string, CommandText: string, lCmdtype?: any): WorkbookConnection; AddFromFile(Filename: string): WorkbookConnection; readonly Application: Application; readonly Count: number; readonly Creator: XlCreator; - Item(Index: any): WorkbookConnection; + Item(Index: number): WorkbookConnection; readonly Parent: any; + (Index: number): WorkbookConnection; } class ConnectorFormat { @@ -4261,14 +4363,15 @@ declare namespace Excel { private 'Excel.ControlFormat_typekey': ControlFormat; private constructor(); _Default: number; - AddItem(Text: string, Index?: any): void; + AddItem(Text: string, Index?: number): void; readonly Application: Application; readonly Creator: XlCreator; DropDownLines: number; Enabled: boolean; LargeChange: number; LinkedCell: string; - List(Index?: any): any; + List(Index: number): string; + List(): SafeArray; ListCount: number; ListFillRange: string; ListIndex: number; @@ -4279,7 +4382,7 @@ declare namespace Excel { readonly Parent: any; PrintObject: boolean; RemoveAllItems(): void; - RemoveItem(Index: number, Count?: any): void; + RemoveItem(Index: number, Count?: number): void; SmallChange: number; Value: number; } @@ -4299,7 +4402,7 @@ declare namespace Excel { private constructor(); _AddMemberPropertyField(Property: string, PropertyOrder?: any): void; readonly _Caption: string; - AddMemberPropertyField(Property: string, PropertyOrder?: any, PropertyDisplayedIn?: any): void; + AddMemberPropertyField(Property: string, PropertyOrder?: number, PropertyDisplayedIn?: XlPropertyDisplayedIn): void; readonly AllItemsVisible: boolean; readonly Application: Application; Caption: string; @@ -4334,28 +4437,26 @@ declare namespace Excel { readonly Value: string; } - class CubeFields { - private 'Excel.CubeFields_typekey': CubeFields; - private constructor(); + interface CubeFields { _Default(Index: any): CubeField; AddSet(Name: string, Caption: string): CubeField; readonly Application: Application; readonly Count: number; readonly Creator: XlCreator; - Item(Index: any): CubeField; + Item(Index: number | string): CubeField; readonly Parent: any; + (Index: number | string): CubeField; } - class CustomProperties { - private 'Excel.CustomProperties_typekey': CustomProperties; - private constructor(); + interface CustomProperties { _Default(Index: any): CustomProperty; Add(Name: string, Value: any): CustomProperty; readonly Application: Application; readonly Count: number; readonly Creator: XlCreator; - Item(Index: any): CustomProperty; + Item(Index: number | string): CustomProperty; readonly Parent: any; + (Index: number | string): CustomProperty; } class CustomProperty { @@ -4383,16 +4484,139 @@ declare namespace Excel { Show(): void; } - class CustomViews { - private 'Excel.CustomViews_typekey': CustomViews; - private constructor(); + interface CustomViews { _Default(ViewName: any): CustomView; - Add(ViewName: string, PrintSettings?: any, RowColSettings?: any): CustomView; + Add(ViewName: string, PrintSettings?: boolean, RowColSettings?: boolean): CustomView; readonly Application: Application; readonly Count: number; readonly Creator: XlCreator; - Item(ViewName: any): CustomView; + Item(ViewName: number | string): CustomView; readonly Parent: any; + (ViewName: number | string): CustomView; + } + + class Databar { + private 'Excel.Databar_typekey': Databar; + private constructor(); + readonly Application: Application; + readonly AppliesTo: Range; + readonly AxisColor: FormatColor; + AxisPosition: XlDataBarAxisPosition; + readonly BarBorder: DataBarBorder; + readonly BarColor: FormatColor; + BarFillType: XlDataBarFillType; + readonly Creator: XlCreator; + Delete(): void; + Direction: number; + Formula: string; + readonly MaxPoint: ConditionValue; + readonly MinPoint: ConditionValue; + ModifyAppliesToRange(Range: Range): void; + readonly NegativeBarFormat: NegativeBarFormat; + readonly Parent: any; + PercentMax: number; + PercentMin: number; + Priority: number; + readonly PTCondition: boolean; + ScopeType: XlPivotConditionScope; + SetFirstPriority(): void; + SetLastPriority(): void; + ShowValue: boolean; + readonly StopIfTrue: boolean; + readonly Type: number; + } + + class DataBarBorder { + private 'Excel.DataBarBorder_typekey': DataBarBorder; + private constructor(); + readonly Application: Application; + readonly Color: FormatColor; + readonly Creator: XlCreator; + readonly Parent: any; + Type: XlDataBarBorderType; + } + + class DataLabel { + private 'Excel.DataLabel_typekey': DataLabel; + private constructor(); + readonly Application: Application; + AutoScaleFont: any; + AutoText: boolean; + readonly Border: Border; + Caption: string; + Characters(Start?: number, Length?: number): Characters; + readonly Creator: XlCreator; + Delete(): any; + readonly Fill: ChartFillFormat; + readonly Font: Font; + readonly Format: ChartFormat; + Formula: string; + FormulaLocal: string; + FormulaR1C1: string; + FormulaR1C1Local: string; + readonly Height: number; + HorizontalAlignment: HorizontalAlignments; + readonly Interior: Interior; + Left: number; + readonly Name: string; + NumberFormat: string; + NumberFormatLinked: boolean; + NumberFormatLocal: string; + Orientation: XlOrientation; + readonly Parent: any; + Position: XlDataLabelPosition; + ReadingOrder: number; + Select(): any; + Separator: string | XlDataLabelSeparator; + Shadow: boolean; + ShowBubbleSize: boolean; + ShowCategoryName: boolean; + ShowLegendKey: boolean; + ShowPercentage: boolean; + ShowSeriesName: boolean; + ShowValue: boolean; + Text: string; + Top: number; + Type: any; + VerticalAlignment: VerticalAlignments; + readonly Width: number; + } + + interface DataLabels { + _Default(Index: any): DataLabel; + readonly Application: Application; + AutoScaleFont: any; + AutoText: boolean; + readonly Border: Border; + readonly Count: number; + readonly Creator: XlCreator; + Delete(): any; + readonly Fill: ChartFillFormat; + readonly Font: Font; + readonly Format: ChartFormat; + HorizontalAlignment: HorizontalAlignments; + readonly Interior: Interior; + Item(Index: number): DataLabel; + readonly Name: string; + NumberFormat: string; + NumberFormatLinked: boolean; + NumberFormatLocal: string; + Orientation: XlOrientation; + readonly Parent: any; + Position: XlDataLabelPosition; + ReadingOrder: number; + Select(): any; + Separator: string | XlDataLabelSeparator; + Shadow: boolean; + ShowBubbleSize: boolean; + ShowCategoryName: boolean; + ShowLegendKey: boolean; + ShowPercentage: boolean; + ShowSeriesName: boolean; + ShowValue: boolean; + Type: any; + VerticalAlignment: VerticalAlignments; + (Index: number): DataLabel; } class DataTable { @@ -4460,14 +4684,14 @@ declare namespace Excel { private constructor(); /** - * @param Office.MsoRelativeNodePosition [pos=2] - * @param Office.MsoDiagramNodeType [nodeType=1] + * @param pos [pos=2] + * @param nodeType [nodeType=1] */ AddNode(pos?: Office.MsoRelativeNodePosition, nodeType?: Office.MsoDiagramNodeType): DiagramNode; readonly Application: any; readonly Children: DiagramNodeChildren; - /** @param Office.MsoRelativeNodePosition [pos=2] */ + /** @param pos [pos=2] */ CloneNode(copyChildren: boolean, pTargetNode: DiagramNode, pos?: Office.MsoRelativeNodePosition): DiagramNode; readonly Creator: number; Delete(): void; @@ -4481,19 +4705,16 @@ declare namespace Excel { readonly Root: DiagramNode; readonly Shape: Shape; - /** @param boolean [swapChildren=true] */ + /** @param swapChildren [swapChildren=true] */ SwapNode(pTargetNode: DiagramNode, swapChildren?: boolean): void; readonly TextShape: Shape; TransferChildren(pReceivingNode: DiagramNode): void; } - class DiagramNodeChildren { - private 'Excel.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?: Office.MsoDiagramNodeType): DiagramNode; readonly Application: any; @@ -4504,17 +4725,17 @@ declare namespace Excel { readonly LastChild: DiagramNode; readonly Parent: any; SelectAll(): void; + (Index: any): DiagramNode; } - class DiagramNodes { - private 'Excel.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 Dialog { @@ -4523,10 +4744,7 @@ declare namespace Excel { readonly Application: Application; readonly Creator: XlCreator; readonly Parent: any; - Show( - 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): boolean; + Show(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): boolean; } class DialogFrame { @@ -4538,8 +4756,8 @@ declare namespace Excel { CheckSpelling(CustomDictionary?: any, IgnoreUppercase?: any, AlwaysSuggest?: any, SpellLang?: any): any; /** - * @param Excel.XlPictureAppearance [Appearance=2] - * @param Excel.XlCopyPictureFormat [Format=-4147] + * @param Appearance [Appearance=2] + * @param Format [Format=-4147] */ CopyPicture(Appearance?: XlPictureAppearance, Format?: XlCopyPictureFormat): any; readonly Creator: XlCreator; @@ -4557,15 +4775,14 @@ declare namespace Excel { Width: number; } - class Dialogs { - private 'Excel.Dialogs_typekey': Dialogs; - private constructor(); + interface Dialogs { _Default(Index: XlBuiltInDialog): Dialog; readonly Application: Application; readonly Count: number; readonly Creator: XlCreator; Item(Index: XlBuiltInDialog): Dialog; readonly Parent: any; + (Index: XlBuiltInDialog): Dialog; } class DialogSheet { @@ -4579,9 +4796,7 @@ declare namespace Excel { _PasteSpecial(Format?: any, Link?: any, DisplayAsIcon?: any, IconFileName?: any, IconIndex?: any, IconLabel?: any): void; _PrintOut(From?: any, To?: any, Copies?: any, Preview?: any, ActivePrinter?: any, PrintToFile?: any, Collate?: any, PrToFileName?: any): void; _Protect(Password?: any, DrawingObjects?: any, Contents?: any, Scenarios?: any, UserInterfaceOnly?: any): void; - _SaveAs( - Filename: string, FileFormat?: any, Password?: any, WriteResPassword?: any, ReadOnlyRecommended?: any, CreateBackup?: any, AddToMru?: any, TextCodepage?: any, - TextVisualLayout?: any): void; + _SaveAs(Filename: string, FileFormat?: any, Password?: any, WriteResPassword?: any, ReadOnlyRecommended?: any, CreateBackup?: any, AddToMru?: any, TextCodepage?: any, TextVisualLayout?: any): void; Activate(): void; readonly Application: Application; Arcs(Index?: any): any; @@ -4594,7 +4809,8 @@ declare namespace Excel { ClearCircles(): void; readonly CodeName: string; readonly Comments: Comments; - Copy(Before?: any, After?: any): void; + Copy(Before?: Sheet): void; + Copy(Before: undefined, After: Sheet): void; readonly Creator: XlCreator; readonly CustomProperties: CustomProperties; DefaultButton: any; @@ -4614,9 +4830,7 @@ declare namespace Excel { EnablePivotTable: boolean; EnableSelection: XlEnableSelection; Evaluate(Name: any): any; - ExportAsFixedFormat( - Type: XlFixedFormatType, Filename?: any, Quality?: any, IncludeDocProperties?: any, IgnorePrintAreas?: any, From?: any, To?: any, OpenAfterPublish?: any, - FixedFormatExtClassPtr?: any): void; + ExportAsFixedFormat(Type: XlFixedFormatType, Filename?: any, Quality?: any, IncludeDocProperties?: any, IgnorePrintAreas?: any, From?: any, To?: any, OpenAfterPublish?: any, FixedFormatExtClassPtr?: any): void; Focus: any; GroupBoxes(Index?: any): any; GroupObjects(Index?: any): any; @@ -4628,7 +4842,7 @@ declare namespace Excel { Lines(Index?: any): any; ListBoxes(Index?: any): any; readonly MailEnvelope: Office.MsoEnvelope; - Move(Before?: any, After?: any): void; + Move(Before?: Sheet, After?: Sheet): void; Name: string; readonly Names: Names; readonly Next: any; @@ -4645,12 +4859,9 @@ declare namespace Excel { Pictures(Index?: any): any; readonly Previous: any; readonly PrintedCommentPages: number; - PrintOut(From?: any, To?: any, Copies?: any, Preview?: any, ActivePrinter?: any, PrintToFile?: any, Collate?: any, PrToFileName?: any): void; + PrintOut(From?: number, To?: number, Copies?: number, Preview?: boolean, ActivePrinter?: string, PrintToFile?: T, Collate?: boolean, PrToFileName?: PrintToFileName): any; PrintPreview(EnableChanges?: any): void; - Protect( - Password?: any, DrawingObjects?: any, Contents?: any, Scenarios?: any, UserInterfaceOnly?: any, AllowFormattingCells?: any, AllowFormattingColumns?: any, - AllowFormattingRows?: any, AllowInsertingColumns?: any, AllowInsertingRows?: any, AllowInsertingHyperlinks?: any, AllowDeletingColumns?: any, - AllowDeletingRows?: any, AllowSorting?: any, AllowFiltering?: any, AllowUsingPivotTables?: any): void; + Protect(Password?: any, DrawingObjects?: any, Contents?: any, Scenarios?: any, UserInterfaceOnly?: any, AllowFormattingCells?: any, AllowFormattingColumns?: any, AllowFormattingRows?: any, AllowInsertingColumns?: any, AllowInsertingRows?: any, AllowInsertingHyperlinks?: any, AllowDeletingColumns?: any, AllowDeletingRows?: any, AllowSorting?: any, AllowFiltering?: any, AllowUsingPivotTables?: any): void; readonly ProtectContents: boolean; readonly ProtectDrawingObjects: boolean; readonly Protection: Protection; @@ -4659,9 +4870,7 @@ declare namespace Excel { readonly QueryTables: QueryTables; Rectangles(Index?: any): any; ResetAllPageBreaks(): void; - SaveAs( - Filename: string, FileFormat?: any, Password?: any, WriteResPassword?: any, ReadOnlyRecommended?: any, CreateBackup?: any, AddToMru?: any, TextCodepage?: any, - TextVisualLayout?: any, Local?: any): void; + SaveAs(Filename: string, FileFormat?: any, Password?: any, WriteResPassword?: any, ReadOnlyRecommended?: any, CreateBackup?: any, AddToMru?: any, TextCodepage?: any, TextVisualLayout?: any, Local?: any): void; readonly Scripts: Office.Scripts; ScrollArea: string; ScrollBars(Index?: any): any; @@ -4678,30 +4887,73 @@ declare namespace Excel { readonly VPageBreaks: VPageBreaks; } + class DialogSheetView { + private 'Excel.DialogSheetView_typekey': DialogSheetView; + private constructor(); + readonly Application: Application; + readonly Creator: XlCreator; + readonly Parent: any; + readonly Sheet: DialogSheet; + } + class DisplayFormat { private 'Excel.DisplayFormat_typekey': DisplayFormat; private constructor(); - readonly AddIndent: any; + readonly AddIndent: boolean | null; readonly Application: Application; readonly Borders: Borders; - Characters(Start?: any, Length?: any): Characters; + Characters(Start?: number, Length?: number): Characters; readonly Creator: XlCreator; readonly Font: Font; - readonly FormulaHidden: any; + readonly FormulaHidden: boolean | null; readonly HorizontalAlignment: any; readonly IndentLevel: any; readonly Interior: Interior; - readonly Locked: any; - readonly MergeCells: any; - readonly NumberFormat: any; - readonly NumberFormatLocal: any; + readonly Locked: boolean | null; + readonly MergeCells: boolean; + readonly NumberFormat: string | null; + readonly NumberFormatLocal: string | null; readonly Orientation: any; readonly Parent: any; readonly ReadingOrder: number; - readonly ShrinkToFit: any; - readonly Style: any; + readonly ShrinkToFit: boolean; + readonly Style: Style; readonly VerticalAlignment: any; - readonly WrapText: any; + readonly WrapText: boolean; + } + + class DisplayUnitLabel { + private 'Excel.DisplayUnitLabel_typekey': DisplayUnitLabel; + private constructor(); + readonly Application: Application; + AutoScaleFont: any; + readonly Border: Border; + Caption: string; + Characters(Start?: number, Length?: number): Characters; + readonly Creator: XlCreator; + Delete(): any; + readonly Fill: ChartFillFormat; + readonly Font: Font; + readonly Format: ChartFormat; + Formula: string; + FormulaLocal: string; + FormulaR1C1: string; + FormulaR1C1Local: string; + readonly Height: number; + HorizontalAlignment: HorizontalAlignments; + readonly Interior: Interior; + Left: number; + readonly Name: string; + Orientation: XlOrientation; + readonly Parent: any; + Position: XlChartElementPosition; + ReadingOrder: number; + Select(): any; + Shadow: boolean; + Text: string; + Top: number; + VerticalAlignment: VerticalAlignments; + readonly Width: number; } class DownBars { @@ -4742,6 +4994,21 @@ declare namespace Excel { readonly Value: boolean; } + class ErrorBars { + private 'Excel.ErrorBars_typekey': ErrorBars; + private constructor(); + readonly Application: Application; + readonly Border: Border; + ClearFormats(): any; + readonly Creator: XlCreator; + Delete(): any; + EndStyle: XlEndStyleCap; + readonly Format: ChartFormat; + readonly Name: string; + readonly Parent: any; + Select(): any; + } + class ErrorCheckingOptions { private 'Excel.ErrorCheckingOptions_typekey': ErrorCheckingOptions; private constructor(); @@ -4761,14 +5028,13 @@ declare namespace Excel { UnlockedFormulaCells: boolean; } - class Errors { - private 'Excel.Errors_typekey': Errors; - private constructor(); + interface Errors { _Default(Index: any): Error; readonly Application: Application; readonly Creator: XlCreator; - Item(Index: any): Error; + Item(Index: number | XlErrorChecks): Error; readonly Parent: any; + (Index: number | XlErrorChecks): Error; } class FileExportConverter { @@ -4782,15 +5048,14 @@ declare namespace Excel { readonly Parent: any; } - class FileExportConverters { - private 'Excel.FileExportConverters_typekey': FileExportConverters; - private constructor(); + interface FileExportConverters { _Default(Index: any): FileExportConverter; readonly Application: Application; readonly Count: number; readonly Creator: XlCreator; - Item(Index: any): FileExportConverter; + Item(Index: number): FileExportConverter; readonly Parent: any; + (Index: number): FileExportConverter; } class FillFormat { @@ -4848,15 +5113,14 @@ declare namespace Excel { readonly Parent: any; } - class Filters { - private 'Excel.Filters_typekey': Filters; - private constructor(); + interface Filters { _Default(Index: number): Filter; readonly Application: Application; readonly Count: number; readonly Creator: XlCreator; Item(Index: number): Filter; readonly Parent: any; + (Index: number): Filter; } class Floor { @@ -4872,7 +5136,7 @@ declare namespace Excel { readonly Name: string; readonly Parent: any; Paste(): void; - PictureType: any; + PictureType: XlChartPictureType; Select(): any; Thickness: number; } @@ -4881,133 +5145,103 @@ declare namespace Excel { private 'Excel.Font_typekey': Font; private constructor(); readonly Application: Application; - Background: any; - Bold: any; - Color: any; - ColorIndex: any; + Background: XlBackground; + Bold: boolean; + Color: XlRgbColor | number; + ColorIndex: number | XlColorIndex; readonly Creator: XlCreator; - FontStyle: any; - Italic: any; - Name: any; + FontStyle: 'Regular' | 'Italic' | 'Bold' | 'Bold Italic'; + Italic: boolean; + Name: string; OutlineFont: any; readonly Parent: any; Shadow: any; - Size: any; - Strikethrough: any; - Subscript: any; - Superscript: any; - ThemeColor: any; + Size: number; + Strikethrough: boolean; + Subscript: boolean; + Superscript: boolean; + ThemeColor: XlThemeColor; ThemeFont: XlThemeFont; - TintAndShade: any; - Underline: any; + TintAndShade: number; + Underline: XlUnderlineStyle; } class FormatColor { private 'Excel.FormatColor_typekey': FormatColor; private constructor(); readonly Application: Application; - Color: any; + Color: XlRgbColor | number; ColorIndex: XlColorIndex; readonly Creator: XlCreator; readonly Parent: any; - ThemeColor: any; - TintAndShade: any; + ThemeColor: XlThemeColor; + TintAndShade: number; } - class FormatConditions { - private 'Excel.FormatConditions_typekey': FormatConditions; + class FormatCondition { + private 'Excel.FormatCondition_typekey': FormatCondition; private constructor(); + _Modify(Type: XlFormatConditionType, Operator?: any, Formula1?: any, Formula2?: any): void; + readonly Application: Application; + readonly AppliesTo: Range; + readonly Borders: Borders; + readonly Creator: XlCreator; + DateOperator: XlTimePeriods; + Delete(): void; + readonly Font: Font; + readonly Formula1: string; + readonly Formula2: string; + readonly Interior: Interior; + Modify(Type: XlFormatConditionType.xlExpression, Operator: undefined, Formula1: string): void; + Modify(Type: XlFormatConditionType, Operator: XlFormatConditionOperator.xlBetween | XlFormatConditionOperator.xlNotBetween, Formula1: string, Formula2: string): void; + Modify(Type: XlFormatConditionType, Operator?: XlFormatConditionOperator, Formula1?: string, Formula2?: string, String?: any, Operator2?: any): void; + ModifyAppliesToRange(Range: Range): void; + NumberFormat: string; + readonly Operator: number; + readonly Parent: any; + Priority: number; + readonly PTCondition: boolean; + ScopeType: XlPivotConditionScope; + SetFirstPriority(): void; + SetLastPriority(): void; + StopIfTrue: boolean; + Text: string; + TextOperator: XlContainsOperator; + readonly Type: number; + } + + interface FormatConditions { _Default(Index: any): any; - Add(Type: XlFormatConditionType, Operator?: any, Formula1?: any, Formula2?: any, String?: any, TextOperator?: any, DateOperator?: any, ScopeType?: any): any; - AddAboveAverage(): any; - AddColorScale(ColorScaleType: number): any; - AddDatabar(): any; - AddIconSetCondition(): any; - AddTop10(): any; - AddUniqueValues(): any; + Add(Type: XlFormatConditionType.xlExpression, Operator: undefined, Formula1: string): FormatCondition; + Add(Type: XlFormatConditionType, Operator: XlFormatConditionOperator.xlBetween | XlFormatConditionOperator.xlNotBetween, Formula1: string, Formula2: string): FormatCondition; + Add(Type: XlFormatConditionType, Operator?: XlFormatConditionOperator, Formula1?: string, Formula2?: string, String?: any, TextOperator?: any, DateOperator?: any, ScopeType?: any): FormatCondition; + AddAboveAverage(): AboveAverage; + AddColorScale(ColorScaleType: number): ColorScale; + AddDatabar(): Databar; + AddIconSetCondition(): IconSetCondition; + AddTop10(): Top10; + AddUniqueValues(): UniqueValues; readonly Application: Application; readonly Count: number; readonly Creator: XlCreator; Delete(): void; - Item(Index: any): any; + Item(Index: number | string): FormatCondition; readonly Parent: any; + (Index: number | string): FormatCondition; } class FreeformBuilder { private 'Excel.FreeformBuilder_typekey': FreeformBuilder; private constructor(); - AddNodes(SegmentType: Office.MsoSegmentType, EditingType: Office.MsoEditingType, X1: number, Y1: number, X2?: any, Y2?: any, X3?: any, Y3?: any): void; + AddNodes(SegmentType: Office.MsoSegmentType.msoSegmentCurve, EditingType: Office.MsoEditingType.msoEditingCorner, X1: number, Y1: number, X2: number, Y2: number, X3: number, Y3: number): void; + AddNodes(SegmentType: Office.MsoSegmentType, EditingType: Office.MsoEditingType.msoEditingAuto, X1: number, Y1: number): void; readonly Application: Application; ConvertToShape(): Shape; readonly Creator: XlCreator; readonly Parent: any; } - class Global { - private 'Excel.Global_typekey': Global; - private constructor(); - _Evaluate(Name: any): any; - _Run2( - Macro?: any, 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; - readonly ActiveCell: Range; - readonly ActiveChart: Chart; - readonly ActiveDialog: DialogSheet; - readonly ActiveMenuBar: MenuBar; - ActivePrinter: string; - readonly ActiveSheet: any; - readonly ActiveWindow: Window; - readonly ActiveWorkbook: Workbook; - readonly AddIns: AddIns; - readonly Application: Application; - readonly Assistant: Office.Assistant; - Calculate(): void; - readonly Cells: Range; - readonly Charts: Sheets; - readonly Columns: Range; - readonly CommandBars: Office.CommandBars; - readonly Creator: XlCreator; - readonly DDEAppReturnCode: number; - DDEExecute(Channel: number, String: string): void; - DDEInitiate(App: string, Topic: string): number; - DDEPoke(Channel: number, Item: any, Data: any): void; - DDERequest(Channel: number, Item: string): any; - DDETerminate(Channel: number): void; - readonly DialogSheets: Sheets; - Evaluate(Name: any): any; - readonly Excel4IntlMacroSheets: Sheets; - readonly Excel4MacroSheets: Sheets; - ExecuteExcel4Macro(String: string): any; - Intersect( - Arg1: Range, Arg2: Range, 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): Range; - readonly MenuBars: MenuBars; - readonly Modules: Modules; - readonly Names: Names; - readonly Parent: Application; - Range(Cell1: any, Cell2?: any): Range; - readonly Rows: Range; - Run( - Macro?: any, 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; - readonly Selection: any; - SendKeys(Keys: any, Wait?: any): void; - readonly Sheets: Sheets; - ShortcutMenus(Index: number): Menu; - readonly ThisWorkbook: Workbook; - readonly Toolbars: Toolbars; - Union( - Arg1: Range, Arg2: Range, 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): Range; - readonly Windows: Windows; - readonly Workbooks: Workbooks; - readonly WorksheetFunction: WorksheetFunction; - readonly Worksheets: Sheets; - } + // there is no way to use the Globals class from within Javascript class Graphic { private 'Excel.Graphic_typekey': Graphic; @@ -5028,16 +5262,82 @@ declare namespace Excel { Width: number; } - class GroupShapes { - private 'Excel.GroupShapes_typekey': GroupShapes; + class Gridlines { + private 'Excel.Gridlines_typekey': Gridlines; private constructor(); + readonly Application: Application; + readonly Border: Border; + readonly Creator: XlCreator; + Delete(): any; + readonly Format: ChartFormat; + readonly Name: string; + readonly Parent: any; + Select(): any; + } + + class GroupObject { + private 'Excel.GroupObject_typekey': GroupObject; + private constructor(); + _Default: number; + AddIndent: boolean; + readonly Application: Application; + ArrowHeadLength: any; + ArrowHeadStyle: any; + ArrowHeadWidth: any; + AutoSize: boolean; + readonly Border: Border; + readonly BottomRightCell: Range; + BringToFront(): any; + CheckSpelling(CustomDictionary?: any, IgnoreUppercase?: any, AlwaysSuggest?: any, SpellLang?: any): any; + Copy(): any; + + /** + * @param Appearance [Appearance=2] + * @param Format [Format=-4147] + */ + CopyPicture(Appearance?: XlPictureAppearance, Format?: XlCopyPictureFormat): any; + readonly Creator: XlCreator; + Cut(): any; + Delete(): any; + Duplicate(): any; + Enabled: boolean; + readonly Font: Font; + Height: number; + HorizontalAlignment: any; + readonly Index: number; + readonly Interior: Interior; + Left: number; + Locked: boolean; + Name: string; + OnAction: string; + Orientation: any; + readonly Parent: any; + Placement: any; + PrintObject: boolean; + ReadingOrder: number; + RoundedCorners: boolean; + Select(Replace?: any): any; + SendToBack(): any; + Shadow: boolean; + readonly ShapeRange: ShapeRange; + Top: number; + readonly TopLeftCell: Range; + Ungroup(): any; + VerticalAlignment: any; + Visible: boolean; + Width: number; + readonly ZOrder: number; + } + + interface GroupShapes { _Default(Index: any): Shape; readonly Application: Application; readonly Count: number; readonly Creator: XlCreator; - Item(Index: any): Shape; + Item(Index: number | string): Shape; readonly Parent: any; - Range(Index: any): ShapeRange; + Range(Index: number | string | SafeArray): ShapeRange; + (Index: number | string): Shape; } class HeaderFooter { @@ -5073,16 +5373,15 @@ declare namespace Excel { Type: XlPageBreak; } - class HPageBreaks { - private 'Excel.HPageBreaks_typekey': HPageBreaks; - private constructor(); + interface HPageBreaks { _Default(Index: number): HPageBreak; - Add(Before: any): HPageBreak; + Add(Before: Range): HPageBreak; readonly Application: Application; readonly Count: number; readonly Creator: XlCreator; Item(Index: number): HPageBreak; readonly Parent: any; + (Index: number): HPageBreak; } class Hyperlink { @@ -5095,7 +5394,7 @@ declare namespace Excel { readonly Creator: XlCreator; Delete(): void; EmailSubject: string; - Follow(NewWindow?: any, AddHistory?: any, ExtraInfo?: any, Method?: any, HeaderInfo?: any): void; + Follow(NewWindow?: boolean, AddHistory?: undefined, ExtraInfo?: string | Office.ByteArray, Method?: Office.MsoExtraInfoMethod, HeaderInfo?: string): void; readonly Name: string; readonly Parent: any; readonly Range: Range; @@ -5106,17 +5405,16 @@ declare namespace Excel { readonly Type: number; } - class Hyperlinks { - private 'Excel.Hyperlinks_typekey': Hyperlinks; - private constructor(); + interface Hyperlinks { _Default(Index: any): Hyperlink; - Add(Anchor: any, Address: string, SubAddress?: any, ScreenTip?: any, TextToDisplay?: any): any; + Add(Anchor: Range | Shape, Address: string, SubAddress?: string, ScreenTip?: string, TextToDisplay?: string): Hyperlink; readonly Application: Application; readonly Count: number; readonly Creator: XlCreator; Delete(): void; - Item(Index: any): Hyperlink; + Item(Index: number | string): Hyperlink; readonly Parent: any; + (Index: number | string): Hyperlink; } class Icon { @@ -5128,46 +5426,100 @@ declare namespace Excel { readonly Parent: IconSet; } - class IconSet { - private 'Excel.IconSet_typekey': IconSet; - private constructor(); + // tslint:disable-next-line:interface-name + interface IconSet { _Default(Index: any): Icon; readonly Application: Application; readonly Count: number; readonly Creator: XlCreator; readonly ID: XlIconSet; - Item(Index: any): Icon; + Item(Index: number): Icon; readonly Parent: any; + (Index: number): Icon; } - class IconSets { - private 'Excel.IconSets_typekey': IconSets; + class IconSetCondition { + private 'Excel.IconSetCondition_typekey': IconSetCondition; private constructor(); + readonly Application: Application; + readonly AppliesTo: Range; + readonly Creator: XlCreator; + Delete(): void; + Formula: string; + readonly IconCriteria: IconCriteria; + IconSet: IconSets; + ModifyAppliesToRange(Range: Range): void; + readonly Parent: any; + PercentileValues: boolean; + Priority: number; + readonly PTCondition: boolean; + ReverseOrder: boolean; + ScopeType: XlPivotConditionScope; + SetFirstPriority(): void; + SetLastPriority(): void; + ShowIconOnly: boolean; + readonly StopIfTrue: boolean; + readonly Type: number; + } + + // tslint:disable-next-line:interface-name + interface IconCriteria { + _Default(Index: any): IconCriterion; + readonly Count: number; + Item(Index: number): IconCriterion; + (Index: number): IconCriterion; + } + + class IconCriterion { + private 'Excel.IconCriterion_typekey': IconCriterion; + private constructor(); + Icon: XlIcon; + readonly Index: number; + Operator: number; + Type: XlConditionValueTypes; + Value: number | string; + } + + // tslint:disable-next-line:interface-name + interface IconSets { _Default(Index: any): any; readonly Application: Application; readonly Count: number; readonly Creator: XlCreator; - Item(Index: any): any; + Item(Index: number): IconSet; readonly Parent: any; + (Index: number): IconSet; } class Interior { private 'Excel.Interior_typekey': Interior; private constructor(); readonly Application: Application; - Color: any; + Color: XlRgbColor | number; ColorIndex: number | XlColorIndex; readonly Creator: XlCreator; readonly Gradient: any; - InvertIfNegative: any; + InvertIfNegative: boolean; readonly Parent: any; - Pattern: any; - PatternColor: any; - PatternColorIndex: any; - PatternThemeColor: any; - PatternTintAndShade: any; - ThemeColor: any; - TintAndShade: any; + Pattern: XlPattern; + PatternColor: XlRgbColor | number; + PatternColorIndex: number | XlColorIndex; + PatternThemeColor: XlThemeColor; + PatternTintAndShade: number; + ThemeColor: XlThemeColor; + TintAndShade: number; + } + + class LeaderLines { + private 'Excel.LeaderLines_typekey': LeaderLines; + private constructor(); + readonly Application: Application; + readonly Border: Border; + readonly Creator: XlCreator; + Delete(): void; + readonly Format: ChartFormat; + readonly Parent: any; + Select(): void; } class Legend { @@ -5186,7 +5538,7 @@ declare namespace Excel { IncludeInLayout: boolean; readonly Interior: Interior; Left: number; - LegendEntries(Index?: any): any; + LegendEntries: LegendEntries & ((Index: number) => LegendEntry); readonly Name: string; readonly Parent: any; Position: XlLegendPosition; @@ -5196,6 +5548,66 @@ declare namespace Excel { Width: number; } + interface LegendEntries { + _Default(Index: any): LegendEntry; + readonly Application: Application; + readonly Count: number; + readonly Creator: XlCreator; + Item(Index: number): LegendEntry; + readonly Parent: any; + (Index: number): LegendEntry; + } + + class LegendEntry { + private 'Excel.LegendEntry_typekey': LegendEntry; + private constructor(); + readonly Application: Application; + AutoScaleFont: any; + readonly Creator: XlCreator; + Delete(): any; + readonly Font: Font; + readonly Format: ChartFormat; + readonly Height: number; + readonly Index: number; + readonly Left: number; + readonly LegendKey: LegendKey; + readonly Parent: any; + Select(): any; + readonly Top: number; + readonly Width: number; + } + + class LegendKey { + private 'Excel.LegendKey_typekey': LegendKey; + private constructor(); + readonly Application: Application; + readonly Border: Border; + ClearFormats(): any; + readonly Creator: XlCreator; + Delete(): any; + readonly Fill: ChartFillFormat; + readonly Format: ChartFormat; + readonly Height: number; + readonly Interior: Interior; + InvertIfNegative: boolean; + readonly Left: number; + MarkerBackgroundColor: number; + MarkerBackgroundColorIndex: XlColorIndex; + MarkerForegroundColor: number; + MarkerForegroundColorIndex: XlColorIndex; + MarkerSize: number; + MarkerStyle: XlMarkerStyle; + readonly Parent: any; + PictureType: number; + PictureUnit: number; + PictureUnit2: number; + Select(): any; + Shadow: boolean; + Smooth: boolean; + readonly Top: number; + readonly Width: number; + } + class LineFormat { private 'Excel.LineFormat_typekey': LineFormat; private constructor(); @@ -5249,16 +5661,15 @@ declare namespace Excel { readonly XPath: XPath; } - class ListColumns { - private 'Excel.ListColumns_typekey': ListColumns; - private constructor(); + interface ListColumns { _Default(Index: any): ListColumn; - Add(Position?: any): ListColumn; + Add(Position?: number): ListColumn; readonly Application: Application; readonly Count: number; readonly Creator: XlCreator; - Item(Index: any): ListColumn; + Item(Index: number | string): ListColumn; readonly Parent: any; + (Index: number | string): ListColumn; } class ListDataFormat { @@ -5267,15 +5678,15 @@ declare namespace Excel { readonly _Default: XlListDataType; readonly AllowFillIn: boolean; readonly Application: Application; - readonly Choices: any; + readonly Choices: SafeArray; readonly Creator: XlCreator; readonly DecimalPlaces: number; readonly DefaultValue: any; readonly IsPercent: boolean; readonly lcid: number; readonly MaxCharacters: number; - readonly MaxNumber: any; - readonly MinNumber: any; + readonly MaxNumber: number | null; + readonly MinNumber: number | null; readonly Parent: any; readonly ReadOnly: boolean; readonly Required: boolean; @@ -5303,7 +5714,7 @@ declare namespace Excel { readonly ListRows: ListRows; Name: string; readonly Parent: any; - Publish(Target: any, LinkSource: boolean): string; + Publish(Target: SafeArray, LinkSource: boolean): string; readonly QueryTable: QueryTable; readonly Range: Range; Refresh(): void; @@ -5324,32 +5735,33 @@ declare namespace Excel { Unlink(): void; Unlist(): void; - /** @param Excel.XlListConflict [iConflictType=0] */ + /** @param iConflictType [iConflictType=0] */ UpdateChanges(iConflictType?: XlListConflict): void; readonly XmlMap: XmlMap; } - class ListObjects { - private 'Excel.ListObjects_typekey': ListObjects; - private constructor(); - + interface ListObjects { /** - * @param Excel.XlListObjectSourceType [SourceType=1] - * @param Excel.XlYesNoGuess [XlListObjectHasHeaders=0] + * @param SourceType [SourceType=1] + * @param XlListObjectHasHeaders [XlListObjectHasHeaders=0] */ _Add(SourceType?: XlListObjectSourceType, Source?: any, LinkSource?: any, XlListObjectHasHeaders?: XlYesNoGuess, Destination?: any): ListObject; _Default(Index: any): ListObject; + Add(SourceType: XlListObjectSourceType.xlSrcRange, Source?: Range, LinkSource?: undefined, XlListObjectHasHeaders?: XlYesNoGuess, Destination?: undefined, TableStyleName?: string): ListObject; + Add(SourceType: XlListObjectSourceType.xlSrcExternal, Source: SafeArray, LinkSource: boolean, XlListObjectHasHeaders: XlYesNoGuess, Destination: Range, TableStyleName?: string): ListObject; + /** - * @param Excel.XlListObjectSourceType [SourceType=1] - * @param Excel.XlYesNoGuess [XlListObjectHasHeaders=0] + * @param SourceType [SourceType=1] + * @param XlListObjectHasHeaders [XlListObjectHasHeaders=0] */ - Add(SourceType?: XlListObjectSourceType, Source?: any, LinkSource?: any, XlListObjectHasHeaders?: XlYesNoGuess, Destination?: any, TableStyleName?: any): ListObject; + Add(SourceType?: XlListObjectSourceType, Source?: any, LinkSource?: boolean, XlListObjectHasHeaders?: XlYesNoGuess, Destination?: Range, TableStyleName?: string): ListObject; readonly Application: Application; readonly Count: number; readonly Creator: XlCreator; - Item(Index: any): ListObject; + Item(Index: number | string): ListObject; readonly Parent: any; + (Index: number | string): ListObject; } class ListRow { @@ -5364,19 +5776,19 @@ declare namespace Excel { readonly Range: Range; } - class ListRows { - private 'Excel.ListRows_typekey': ListRows; - private constructor(); + interface ListRows { _Add(Position?: any): ListRow; _Default(Index: any): ListRow; - Add(Position?: any, AlwaysInsert?: any): ListRow; + Add(Position?: number, AlwaysInsert?: boolean): ListRow; readonly Application: Application; readonly Count: number; readonly Creator: XlCreator; - Item(Index: any): ListRow; + Item(Index: number | string): ListRow; readonly Parent: any; + (Index: number | string): ListRow; } + /** Macintosh only */ class Mailer { private 'Excel.Mailer_typekey': Mailer; private constructor(); @@ -5422,9 +5834,7 @@ declare namespace Excel { Reset(): void; } - class MenuBars { - private 'Excel.MenuBars_typekey': MenuBars; - private constructor(); + interface MenuBars { _Default(Index: any): MenuBar; Add(Name?: any): MenuBar; readonly Application: Application; @@ -5432,6 +5842,7 @@ declare namespace Excel { readonly Creator: XlCreator; Item(Index: any): MenuBar; readonly Parent: any; + (Index: any): MenuBar; } class MenuItem { @@ -5451,9 +5862,7 @@ declare namespace Excel { StatusBar: string; } - class MenuItems { - private 'Excel.MenuItems_typekey': MenuItems; - private constructor(); + interface MenuItems { _Default(Index: any): any; Add(Caption: string, OnAction?: any, ShortcutKey?: any, Before?: any, Restore?: any, StatusBar?: any, HelpFile?: any, HelpContextID?: any): MenuItem; AddMenu(Caption: string, Before?: any, Restore?: any): Menu; @@ -5462,11 +5871,10 @@ declare namespace Excel { readonly Creator: XlCreator; Item(Index: any): any; readonly Parent: any; + (Index: any): any; } - class Menus { - private 'Excel.Menus_typekey': Menus; - private constructor(); + interface Menus { _Default(Index: any): Menu; Add(Caption: string, Before?: any, Restore?: any): Menu; readonly Application: Application; @@ -5474,6 +5882,7 @@ declare namespace Excel { readonly Creator: XlCreator; Item(Index: any): Menu; readonly Parent: any; + (Index: any): Menu; } class Module { @@ -5483,9 +5892,7 @@ declare namespace Excel { _CodeName: string; _PrintOut(From?: any, To?: any, Copies?: any, Preview?: any, ActivePrinter?: any, PrintToFile?: any, Collate?: any): void; _Protect(Password?: any, DrawingObjects?: any, Contents?: any, Scenarios?: any, UserInterfaceOnly?: any): void; - _SaveAs( - Filename: string, FileFormat?: any, Password?: any, WriteResPassword?: any, ReadOnlyRecommended?: any, CreateBackup?: any, AddToMru?: any, TextCodepage?: any, - TextVisualLayout?: any): void; + _SaveAs(Filename: string, FileFormat?: any, Password?: any, WriteResPassword?: any, ReadOnlyRecommended?: any, CreateBackup?: any, AddToMru?: any, TextCodepage?: any, TextVisualLayout?: any): void; Activate(): void; readonly Application: Application; readonly CodeName: string; @@ -5507,18 +5914,14 @@ declare namespace Excel { Protect(Password?: any, DrawingObjects?: any, Contents?: any, Scenarios?: any, UserInterfaceOnly?: any): void; readonly ProtectContents: boolean; readonly ProtectionMode: boolean; - SaveAs( - Filename: string, FileFormat?: any, Password?: any, WriteResPassword?: any, ReadOnlyRecommended?: any, CreateBackup?: any, AddToMru?: any, TextCodepage?: any, - TextVisualLayout?: any): void; + SaveAs(Filename: string, FileFormat?: any, Password?: any, WriteResPassword?: any, ReadOnlyRecommended?: any, CreateBackup?: any, AddToMru?: any, TextCodepage?: any, TextVisualLayout?: any): void; Select(Replace?: any): void; readonly Shapes: Shapes; Unprotect(Password?: any): void; Visible: XlSheetVisibility; } - class Modules { - private 'Excel.Modules_typekey': Modules; - private constructor(); + interface Modules { __PrintOut(From?: any, To?: any, Copies?: any, Preview?: any, ActivePrinter?: any, PrintToFile?: any, Collate?: any): void; _Default(Index: any): any; _PrintOut(From?: any, To?: any, Copies?: any, Preview?: any, ActivePrinter?: any, PrintToFile?: any, Collate?: any, PrToFileName?: any): void; @@ -5536,6 +5939,7 @@ declare namespace Excel { Select(Replace?: any): void; Visible: any; readonly VPageBreaks: VPageBreaks; + (Index: any): any; } class MultiThreadedCalculation { @@ -5564,10 +5968,10 @@ declare namespace Excel { Name: string; NameLocal: string; readonly Parent: any; - RefersTo: any; - RefersToLocal: any; - RefersToR1C1: any; - RefersToR1C1Local: any; + RefersTo: string; + RefersToLocal: string; + RefersToR1C1: string; + RefersToR1C1Local: string; readonly RefersToRange: Range; ShortcutKey: string; readonly ValidWorkbookParameter: boolean; @@ -5576,17 +5980,30 @@ declare namespace Excel { WorkbookParameter: boolean; } - class Names { - private 'Excel.Names_typekey': Names; - private constructor(); + interface Names { _Default(Index?: any, IndexLocal?: any, RefersTo?: any): Name; - Add( - Name?: any, RefersTo?: any, Visible?: any, MacroType?: any, ShortcutKey?: any, Category?: any, NameLocal?: any, RefersToLocal?: any, CategoryLocal?: any, - RefersToR1C1?: any, RefersToR1C1Local?: any): Name; + Add(Name?: string, RefersTo?: string, Visible?: boolean, MacroType?: 1 | 2 | 3, ShortcutKey?: string, Category?: FunctionCategory | string, NameLocal?: string, RefersToLocal?: string, CategoryLocal?: string, RefersToR1C1?: string, RefersToR1C1Local?: string): Name; readonly Application: Application; readonly Count: number; readonly Creator: XlCreator; - Item(Index?: any, IndexLocal?: any, RefersTo?: any): Name; + Item(Index: number | string): Name; + Item(Index: undefined, IndexLocal: string): Name; + Item(Index: undefined, IndexLocal: undefined, RefersTo: string): Name; + readonly Parent: any; + (Index: number | string): Name; + (Index: undefined, IndexLocal: string): Name; + (Index: undefined, IndexLocal: undefined, RefersTo: string): Name; + } + + class NegativeBarFormat { + private 'Excel.NegativeBarFormat_typekey': NegativeBarFormat; + private constructor(); + readonly Application: Application; + readonly BorderColor: FormatColor; + BorderColorType: XlDataBarNegativeColorType; + readonly Color: FormatColor; + ColorType: XlDataBarNegativeColorType; + readonly Creator: XlCreator; readonly Parent: any; } @@ -5597,9 +6014,9 @@ declare namespace Excel { readonly Application: Application; BackgroundQuery: boolean; CancelRefresh(): void; - CommandText: any; + CommandText: string; CommandType: XlCmdType; - Connection: any; + Connection: string; readonly Creator: XlCreator; EnableRefresh: boolean; readonly Parent: any; @@ -5609,12 +6026,12 @@ declare namespace Excel { RefreshOnFileOpen: boolean; RefreshPeriod: number; RobustConnect: XlRobustConnect; - SaveAsODC(ODCFileName: string, Description?: any, Keywords?: any): void; + SaveAsODC(ODCFileName: string, Description?: string, Keywords?: string): void; SavePassword: boolean; ServerCredentialsMethod: XlCredentialsMethod; ServerSSOApplicationID: string; SourceConnectionFile: string; - SourceData: any; + SourceData: string | SafeArray | PivotTable; SourceDataFile: string; } @@ -5628,33 +6045,32 @@ declare namespace Excel { readonly SqlState: string; } - class ODBCErrors { - private 'Excel.ODBCErrors_typekey': ODBCErrors; - private constructor(); + interface ODBCErrors { _Default(Index: number): ODBCError; readonly Application: Application; readonly Count: number; readonly Creator: XlCreator; Item(Index: number): ODBCError; readonly Parent: any; + (Index: number): ODBCError; } class OLEDBConnection { private 'Excel.OLEDBConnection_typekey': OLEDBConnection; private constructor(); - readonly ADOConnection: any; + readonly ADOConnection: ADODB.Connection; AlwaysUseConnectionFile: boolean; readonly Application: Application; BackgroundQuery: boolean; readonly CalculatedMembers: CalculatedMembers; CancelRefresh(): void; - CommandText: any; + CommandText: string; CommandType: XlCmdType; - Connection: any; + Connection: string; readonly Creator: XlCreator; EnableRefresh: boolean; readonly IsConnected: boolean; - LocalConnection: any; + LocalConnection: string; LocaleID: number; MaintainConnection: boolean; MakeConnection(): void; @@ -5669,7 +6085,7 @@ declare namespace Excel { RefreshPeriod: number; RetrieveInOfficeUILang: boolean; RobustConnect: XlRobustConnect; - SaveAsODC(ODCFileName: string, Description?: any, Keywords?: any): void; + SaveAsODC(ODCFileName: string, Description?: string, Keywords?: string): void; SavePassword: boolean; ServerCredentialsMethod: XlCredentialsMethod; ServerFillColor: boolean; @@ -5695,15 +6111,14 @@ declare namespace Excel { readonly Stage: number; } - class OLEDBErrors { - private 'Excel.OLEDBErrors_typekey': OLEDBErrors; - private constructor(); + interface OLEDBErrors { _Default(Index: number): OLEDBError; readonly Application: Application; readonly Count: number; readonly Creator: XlCreator; Item(Index: number): OLEDBError; readonly Parent: any; + (Index: number): OLEDBError; } class OLEFormat { @@ -5715,7 +6130,7 @@ declare namespace Excel { readonly Object: any; readonly Parent: any; readonly progID: string; - Verb(Verb?: any): void; + Verb(Verb?: XlOLEVerb): void; } class OLEObject { @@ -5732,8 +6147,8 @@ declare namespace Excel { Copy(): any; /** - * @param Excel.XlPictureAppearance [Appearance=2] - * @param Excel.XlCopyPictureFormat [Format=-4147] + * @param Appearance [Appearance=2] + * @param Format [Format=-4147] */ CopyPicture(Appearance?: XlPictureAppearance, Format?: XlCopyPictureFormat): any; readonly Creator: XlCreator; @@ -5750,13 +6165,13 @@ declare namespace Excel { Locked: boolean; Name: string; readonly Object: any; - readonly OLEType: any; + readonly OLEType: XlOLEType.xlOLELink | XlOLEType.xlOLEEmbed; OnAction: string; readonly Parent: any; - Placement: any; + Placement: XlPlacement; PrintObject: boolean; readonly progID: string; - Select(Replace?: any): any; + Select(Replace?: boolean): any; SendToBack(): any; Shadow: boolean; readonly ShapeRange: ShapeRange; @@ -5765,13 +6180,58 @@ declare namespace Excel { readonly TopLeftCell: Range; Update(): any; - /** @param Excel.XlOLEVerb [Verb=1] */ + /** @param Verb [Verb=1] */ Verb(Verb?: XlOLEVerb): any; Visible: boolean; Width: number; readonly ZOrder: number; } + class OLEObjects { + private 'Excel.OLEObjects_typekey': OLEObjects; + private constructor(); + Add(ClassType: string, Filename: undefined, Link: undefined, DisplayAsIcon: true, IconFileName?: string, IconIndex?: number, IconLabel?: string, Left?: number, Top?: number, Width?: number, Height?: number): OLEObject; + Add(ClassType: string, Filename?: undefined, Link?: undefined, DisplayAsIcon?: false, IconFileName?: undefined, IconIndex?: undefined, IconLabel?: undefined, Left?: number, Top?: number, Width?: number, Height?: number): OLEObject; + Add(ClassType: undefined, Filename: string, Link: boolean, DisplayAsIcon: true, IconFileName?: string, IconIndex?: number, IconLabel?: string, Left?: number, Top?: number, Width?: number, Height?: number): OLEObject; + Add(ClassType: undefined, Filename: string, Link?: boolean, DisplayAsIcon?: false, IconFileName?: undefined, IconIndex?: undefined, IconLabel?: undefined, Left?: number, Top?: number, Width?: number, Height?: number): OLEObject; + readonly Application: Application; + AutoLoad: boolean; + readonly Border: Border; + BringToFront(): any; + Copy(): any; + + /** + * @param Appearance [Appearance=2] + * @param Format [Format=-4147] + */ + CopyPicture(Appearance?: XlPictureAppearance, Format?: XlCopyPictureFormat): any; + readonly Count: number; + readonly Creator: XlCreator; + Cut(): any; + Delete(): any; + Duplicate(): any; + Enabled: boolean; + Group(): GroupObject; + Height: number; + readonly Interior: Interior; + Item(Index: number | string): any; + Left: number; + Locked: boolean; + OnAction: string; + readonly Parent: any; + Placement: any; + PrintObject: boolean; + Select(Replace?: boolean): any; + SendToBack(): any; + Shadow: boolean; + readonly ShapeRange: ShapeRange; + SourceName: string; + Top: number; + Visible: boolean; + Width: number; + readonly ZOrder: number; + } + class Outline { private 'Excel.Outline_typekey': Outline; private constructor(); @@ -5779,7 +6239,7 @@ declare namespace Excel { AutomaticStyles: boolean; readonly Creator: XlCreator; readonly Parent: any; - ShowLevels(RowLevels?: any, ColumnLevels?: any): any; + ShowLevels(RowLevels?: number, ColumnLevels?: number): any; SummaryColumn: XlSummaryColumn; SummaryRow: XlSummaryRow; } @@ -5795,12 +6255,11 @@ declare namespace Excel { readonly RightHeader: HeaderFooter; } - class Pages { - private 'Excel.Pages_typekey': Pages; - private constructor(); + interface Pages { _Default(Index: any): Page; readonly Count: number; - Item(Index: any): Page; + Item(Index: number): Page; + (Index: number): Page; } class PageSetup { @@ -5823,8 +6282,8 @@ declare namespace Excel { readonly EvenPage: Page; readonly FirstPage: Page; FirstPageNumber: number; - FitToPagesTall: any; - FitToPagesWide: any; + FitToPagesTall: number | false; + FitToPagesWide: number | false; FooterMargin: number; HeaderMargin: number; LeftFooter: string; @@ -5844,7 +6303,7 @@ declare namespace Excel { PrintGridlines: boolean; PrintHeadings: boolean; PrintNotes: boolean; - PrintQuality(Index?: any): any; + PrintQuality: SafeArray & ((Index: 1 | 2) => number); PrintTitleColumns: string; PrintTitleRows: string; RightFooter: string; @@ -5854,7 +6313,9 @@ declare namespace Excel { RightMargin: number; ScaleWithDocHeaderFooter: boolean; TopMargin: number; - Zoom: any; + + /** Represents a percentage between 10 and 400 */ + Zoom: number; } class Pane { @@ -5864,26 +6325,25 @@ declare namespace Excel { readonly Application: Application; readonly Creator: XlCreator; readonly Index: number; - LargeScroll(Down?: any, Up?: any, ToRight?: any, ToLeft?: any): any; + LargeScroll(Down?: number, Up?: number, ToRight?: number, ToLeft?: number): any; readonly Parent: any; PointsToScreenPixelsX(Points: number): number; PointsToScreenPixelsY(Points: number): number; ScrollColumn: number; - ScrollIntoView(Left: number, Top: number, Width: number, Height: number, Start?: any): void; + ScrollIntoView(Left: number, Top: number, Width: number, Height: number, Start?: boolean): void; ScrollRow: number; - SmallScroll(Down?: any, Up?: any, ToRight?: any, ToLeft?: any): any; + SmallScroll(Down?: number, Up?: number, ToRight?: number, ToLeft?: number): any; readonly VisibleRange: Range; } - class Panes { - private 'Excel.Panes_typekey': Panes; - private constructor(); + interface Panes { _Default(Index: number): Pane; readonly Application: Application; readonly Count: number; readonly Creator: XlCreator; Item(Index: number): Pane; readonly Parent: any; + (Index: number): Pane; } class Parameter { @@ -5902,17 +6362,16 @@ declare namespace Excel { readonly Value: any; } - class Parameters { - private 'Excel.Parameters_typekey': Parameters; - private constructor(); + interface Parameters { _Default(Index: any): Parameter; - Add(Name: string, iDataType?: any): Parameter; + Add(Name: string, iDataType?: XlParameterDataType): Parameter; readonly Application: Application; readonly Count: number; readonly Creator: XlCreator; Delete(): void; - Item(Index: any): Parameter; + Item(Index: number | string): Parameter; readonly Parent: any; + (Index: number | string): Parameter; } class Phonetic { @@ -5928,9 +6387,7 @@ declare namespace Excel { Visible: boolean; } - class Phonetics { - private 'Excel.Phonetics_typekey': Phonetics; - private constructor(); + interface Phonetics { _Default(Index: number): any; Add(Start: number, Length: number, Text: string): void; Alignment: number; @@ -5940,12 +6397,13 @@ declare namespace Excel { readonly Creator: XlCreator; Delete(): void; readonly Font: Font; - Item(Index: number): any; + Item(Index: number): Phonetic; readonly Length: number; readonly Parent: any; readonly Start: number; Text: string; Visible: boolean; + (Index: number): Phonetic; } class PictureFormat { @@ -5980,18 +6438,18 @@ declare namespace Excel { class PivotCache { private 'Excel.PivotCache_typekey': PivotCache; private constructor(); - readonly ADOConnection: any; + readonly ADOConnection: ADODB.Connection; readonly Application: Application; BackgroundQuery: boolean; - CommandText: any; + CommandText: string; CommandType: XlCmdType; - Connection: any; - CreatePivotTable(TableDestination: any, TableName?: any, ReadData?: any, DefaultVersion?: any): PivotTable; + Connection: string; + CreatePivotTable(TableDestination: Range, TableName?: string, ReadData?: boolean, DefaultVersion?: any): PivotTable; readonly Creator: XlCreator; EnableRefresh: boolean; readonly Index: number; readonly IsConnected: boolean; - LocalConnection: any; + LocalConnection: string; MaintainConnection: boolean; MakeConnection(): void; readonly MemoryUsed: number; @@ -6001,7 +6459,7 @@ declare namespace Excel { readonly Parent: any; readonly QueryType: XlQueryType; readonly RecordCount: number; - Recordset: any; + Recordset: ADODB.Recordset; Refresh(): void; readonly RefreshDate: VarDate; readonly RefreshName: string; @@ -6009,10 +6467,10 @@ declare namespace Excel { RefreshPeriod: number; ResetTimer(): void; RobustConnect: XlRobustConnect; - SaveAsODC(ODCFileName: string, Description?: any, Keywords?: any): void; + SaveAsODC(ODCFileName: string, Description?: string, Keywords?: string): void; SavePassword: boolean; SourceConnectionFile: string; - SourceData: any; + SourceData: string | SafeArray | PivotTable; readonly SourceDataFile: string; readonly SourceType: XlPivotTableSourceType; Sql: any; @@ -6022,17 +6480,17 @@ declare namespace Excel { readonly WorkbookConnection: WorkbookConnection; } - class PivotCaches { - private 'Excel.PivotCaches_typekey': PivotCaches; - private constructor(); + interface PivotCaches { _Default(Index: any): PivotCache; Add(SourceType: XlPivotTableSourceType, SourceData?: any): PivotCache; readonly Application: Application; readonly Count: number; - Create(SourceType: XlPivotTableSourceType, SourceData?: any, Version?: any): PivotCache; + Create(SourceType: XlPivotTableSourceType.xlDatabase | XlPivotTableSourceType.xlConsolidation, SourceData: string, Version?: XlPivotTableVersionList): PivotCache; + Create(SourceType: XlPivotTableSourceType.xlExternal, SourceData: WorkbookConnection, Version?: XlPivotTableVersionList): PivotCache; readonly Creator: XlCreator; - Item(Index: any): PivotCache; + Item(Index: number): PivotCache; readonly Parent: any; + (Index: number): PivotCache; } class PivotCell { @@ -6065,7 +6523,7 @@ declare namespace Excel { private constructor(); _AutoSort(Order: number, Field: string): void; _Default: string; - AddPageItem(Item: string, ClearList?: any): void; + AddPageItem(Item: string, ClearList?: boolean): void; readonly AllItemsVisible: boolean; readonly Application: Application; AutoShow(Type: number, Range: number, Count: number, Field: string): void; @@ -6084,15 +6542,15 @@ declare namespace Excel { Calculation: XlPivotFieldCalculation; Caption: string; readonly ChildField: PivotField; - ChildItems(Index?: any): any; + readonly ChildItems: PivotItemsResult; ClearAllFilters(): void; ClearLabelFilters(): void; ClearManualFilter(): void; ClearValueFilters(): void; readonly Creator: XlCreator; readonly CubeField: CubeField; - CurrentPage: any; - CurrentPageList: any; + CurrentPage: PivotItem; + CurrentPageList: SafeArray; CurrentPageName: string; DatabaseSort: boolean; readonly DataRange: Range; @@ -6112,10 +6570,10 @@ declare namespace Excel { EnableMultiplePageItems: boolean; Formula: string; Function: XlConsolidationFunction; - readonly GroupLevel: any; + readonly GroupLevel: number; Hidden: boolean; - HiddenItems(Index?: any): any; - HiddenItemsList: any; + readonly HiddenItems: PivotItemsResult; + HiddenItemsList: SafeArray; IncludeNewItemsInFilter: boolean; readonly IsCalculated: boolean; readonly IsMemberProperty: boolean; @@ -6132,9 +6590,9 @@ declare namespace Excel { Orientation: XlPivotFieldOrientation; readonly Parent: any; readonly ParentField: PivotField; - ParentItems(Index?: any): any; + readonly ParentItems: PivotItemsResult; readonly PivotFilters: PivotFilters; - PivotItems(Index?: any): any; + readonly PivotItems: PivotItemsResult; Position: any; PropertyOrder: number; readonly PropertyParentField: PivotField; @@ -6147,12 +6605,12 @@ declare namespace Excel { readonly SourceName: string; StandardFormula: string; SubtotalName: string; - Subtotals(Index?: any): any; - readonly TotalLevels: any; + readonly Subtotals: SafeArray & ((Index: PivotFieldSubtotal) => boolean); + readonly TotalLevels: number; UseMemberPropertyAsCaption: boolean; Value: string; - VisibleItems(Index?: any): any; - VisibleItemsList: any; + readonly VisibleItems: PivotItemsResult; + VisibleItemsList: SafeArray; } class PivotFields { @@ -6161,10 +6619,12 @@ declare namespace Excel { readonly Application: Application; readonly Count: number; readonly Creator: XlCreator; - Item(Index: any): any; + Item(Index: number | string): PivotField; readonly Parent: PivotTable; } + type PivotFieldsResult = PivotFields & ((Index: number | string) => PivotField) & ((Indexes: SafeArray) => PivotFields); + class PivotFilter { private 'Excel.PivotFilter_typekey': PivotFilter; private constructor(); @@ -6186,16 +6646,15 @@ declare namespace Excel { readonly Value2: any; } - class PivotFilters { - private 'Excel.PivotFilters_typekey': PivotFilters; - private constructor(); + interface PivotFilters { _Default(Index: any): PivotFilter; Add(Type: XlPivotFilterType, DataField?: any, Value1?: any, Value2?: any, Order?: any, Name?: any, Description?: any, MemberPropertyField?: any): PivotFilter; readonly Application: Application; readonly Count: number; readonly Creator: XlCreator; - Item(Index: any): PivotFilter; + Item(Index: number): PivotFilter; readonly Parent: any; + (Index: number): PivotFilter; } class PivotFormula { @@ -6212,17 +6671,16 @@ declare namespace Excel { Value: string; } - class PivotFormulas { - private 'Excel.PivotFormulas_typekey': PivotFormulas; - private constructor(); + interface PivotFormulas { _Add(Formula: string): PivotFormula; _Default(Index: any): PivotFormula; Add(Formula: string, UseStandardFormula?: any): PivotFormula; readonly Application: Application; readonly Count: number; readonly Creator: XlCreator; - Item(Index: any): PivotFormula; + Item(Index: number | string): PivotFormula; readonly Parent: any; + (Index: number | string): PivotFormula; } class PivotItem { @@ -6231,7 +6689,7 @@ declare namespace Excel { _Default: string; readonly Application: Application; Caption: string; - ChildItems(Index?: any): any; + ChildItems: PivotItemsResult; readonly Creator: XlCreator; readonly DataRange: Range; Delete(): void; @@ -6254,17 +6712,29 @@ declare namespace Excel { Visible: boolean; } - class PivotItemList { - private 'Excel.PivotItemList_typekey': PivotItemList; - private constructor(); + interface PivotItemList { _Default(Field: any): PivotItem; readonly Application: Application; readonly Count: number; readonly Creator: XlCreator; - Item(Index: any): PivotItem; + Item(Index: number | string): PivotItem; readonly Parent: any; + (Field: number | string): PivotItem; } + class PivotItems { + private 'Excel.PivotItems_typekey': PivotItems; + private constructor(); + Add(Name: string): void; + readonly Application: Application; + readonly Count: number; + readonly Creator: XlCreator; + Item(Index: number | string): any; + readonly Parent: PivotField; + } + + type PivotItemsResult = PivotItems & ((Index: number | string) => PivotItem) & ((Indexes: SafeArray) => PivotItems); + class PivotLayout { private 'Excel.PivotLayout_typekey': PivotLayout; private constructor(); @@ -6296,26 +6766,24 @@ declare namespace Excel { readonly Position: number; } - class PivotLineCells { - private 'Excel.PivotLineCells_typekey': PivotLineCells; - private constructor(); + interface PivotLineCells { _Default(Index: any): PivotCell; readonly Application: Application; readonly Count: number; readonly Creator: XlCreator; - Item(Index: any): PivotCell; + Item(Index: number): PivotCell; readonly Parent: any; + (Index: number): PivotCell; } - class PivotLines { - private 'Excel.PivotLines_typekey': PivotLines; - private constructor(); + interface PivotLines { _Default(Index: any): PivotLine; readonly Application: Application; readonly Count: number; readonly Creator: XlCreator; - Item(Index: any): PivotLine; + Item(Index: number): PivotLine; readonly Parent: any; + (Index: number): PivotLine; } class PivotTable { @@ -6323,11 +6791,11 @@ declare namespace Excel { private constructor(); _Default: string; - /** @param Excel.XlPTSelectionMode [Mode=0] */ + /** @param Mode [Mode=0] */ _PivotSelect(Name: string, Mode?: XlPTSelectionMode): void; readonly ActiveFilters: PivotFilters; AddDataField(Field: any, Caption?: any, Function?: any): PivotField; - AddFields(RowFields?: any, ColumnFields?: any, PageFields?: any, AddToTable?: any): any; + AddFields(RowFields?: string | SafeArray, ColumnFields?: string | SafeArray, PageFields?: string | SafeArray, AddToTable?: boolean): any; AllocateChanges(): void; Allocation: XlAllocation; AllocationMethod: XlAllocationMethod; @@ -6342,10 +6810,10 @@ declare namespace Excel { CalculatedMembersInFilters: boolean; ChangeConnection(conn: WorkbookConnection): void; readonly ChangeList: PivotTableChangeList; - ChangePivotCache(PivotCache: any): void; + ChangePivotCache(PivotCache: string): void; ClearAllFilters(): void; ClearTable(): void; - ColumnFields(Index?: any): any; + ColumnFields: PivotFieldsResult; ColumnGrand: boolean; readonly ColumnRange: Range; CommitChanges(): void; @@ -6353,11 +6821,11 @@ declare namespace Excel { CompactLayoutRowHeader: string; CompactRowIndent: number; ConvertToFormulas(ConvertFilters: boolean): void; - CreateCubeFile(File: string, Measures?: any, Levels?: any, Members?: any, Properties?: any): string; + CreateCubeFile(File: string, Measures?: SafeArray, Levels?: SafeArray, Members?: SafeArray>, Properties?: boolean): string; readonly Creator: XlCreator; readonly CubeFields: CubeFields; readonly DataBodyRange: Range; - DataFields(Index?: any): any; + DataFields: PivotFieldsResult; readonly DataLabelRange: Range; readonly DataPivotField: PivotField; DiscardChanges(): void; @@ -6369,10 +6837,7 @@ declare namespace Excel { DisplayImmediateItems: boolean; DisplayMemberPropertyTooltips: boolean; DisplayNullString: boolean; - Dummy15( - 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; + Dummy15(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; EnableDataValueEditing: boolean; EnableDrilldown: boolean; EnableFieldDialog: boolean; @@ -6383,13 +6848,10 @@ declare namespace Excel { FieldListSortAscending: boolean; Format(Format: XlPivotFormatType): void; GetData(Name: string): number; - GetPivotData( - DataField?: any, Field1?: any, Item1?: any, Field2?: any, Item2?: any, Field3?: any, Item3?: any, Field4?: any, Item4?: any, Field5?: any, Item5?: any, - Field6?: any, Item6?: any, Field7?: any, Item7?: any, Field8?: any, Item8?: any, Field9?: any, Item9?: any, Field10?: any, Item10?: any, Field11?: any, - Item11?: any, Field12?: any, Item12?: any, Field13?: any, Item13?: any, Field14?: any, Item14?: any): Range; + GetPivotData(DataField?: string, Field1?: string, Item1?: string, Field2?: string, Item2?: string, Field3?: string, Item3?: string, Field4?: string, Item4?: string, Field5?: string, Item5?: string, Field6?: string, Item6?: string, Field7?: string, Item7?: string, Field8?: string, Item8?: string, Field9?: string, Item9?: string, Field10?: string, Item10?: string, Field11?: string, Item11?: string, Field12?: string, Item12?: string, Field13?: string, Item13?: string, Field14?: string, Item14?: string): Range; GrandTotalName: string; HasAutoFormat: boolean; - HiddenFields(Index?: any): any; + HiddenFields: PivotFieldsResult; InGridDropZones: boolean; InnerDetail: string; LayoutRowDefault: XlLayoutRowType; @@ -6401,7 +6863,7 @@ declare namespace Excel { Name: string; NullString: string; PageFieldOrder: number; - PageFields(Index?: any): any; + PageFields: PivotFieldsResult; PageFieldStyle: string; PageFieldWrapCount: number; readonly PageRange: Range; @@ -6409,17 +6871,16 @@ declare namespace Excel { readonly Parent: any; PivotCache(): PivotCache; readonly PivotColumnAxis: PivotAxis; - PivotFields(Index?: any): any; + PivotFields: PivotFieldsResult; readonly PivotFormulas: PivotFormulas; readonly PivotRowAxis: PivotAxis; - /** @param Excel.XlPTSelectionMode [Mode=0] */ - PivotSelect(Name: string, Mode?: XlPTSelectionMode, UseStandardName?: any): void; + /** @param Mode [Mode=0] */ + PivotSelect(Name: string, Mode?: XlPTSelectionMode, UseStandardName?: boolean): void; PivotSelection: string; PivotSelectionStandard: string; - PivotTableWizard( - SourceType?: any, SourceData?: any, TableDestination?: any, TableName?: any, RowGrand?: any, ColumnGrand?: any, SaveData?: any, HasAutoFormat?: any, - AutoPage?: any, Reserved?: any, BackgroundQuery?: any, OptimizeCache?: any, PageFieldOrder?: any, PageFieldWrapCount?: any, ReadData?: any, Connection?: any): void; + PivotTableWizard(): void; + PivotTableWizard(SourceType: TSourceType, SourceData: PivotTableWizardSourceData, TableDestination?: Range, TableName?: string, RowGrand?: boolean, ColumnGrand?: boolean, SaveData?: boolean, HasAutoFormat?: boolean, AutoPage?: PivotTableWizardAutoPage, Reserved?: undefined, BackgroundQuery?: boolean, OptimizeCache?: boolean, PageFieldOrder?: XlOrder, PageFieldWrapCount?: number, ReadData?: boolean, Connection?: string): void; PreserveFormatting: boolean; PrintDrillIndicators: boolean; PrintTitles: boolean; @@ -6430,7 +6891,7 @@ declare namespace Excel { RepeatAllLabels(Repeat: XlPivotFieldRepeatLabels): void; RepeatItemsOnEachPrintedPage: boolean; RowAxisLayout(RowLayout: XlLayoutRowType): void; - RowFields(Index?: any): any; + RowFields: PivotFieldsResult; RowGrand: boolean; readonly RowRange: Range; SaveData: boolean; @@ -6438,7 +6899,7 @@ declare namespace Excel { ShowCellBackgroundFromOLAP: boolean; ShowDrillIndicators: boolean; ShowPageMultipleItemLabel: boolean; - ShowPages(PageField?: any): any; + ShowPages(PageField?: string): any; ShowTableStyleColumnHeaders: boolean; ShowTableStyleColumnStripes: boolean; ShowTableStyleLastColumn: boolean; @@ -6463,21 +6924,20 @@ declare namespace Excel { Value: string; readonly Version: XlPivotTableVersionList; ViewCalculatedMembers: boolean; - VisibleFields(Index?: any): any; + VisibleFields: PivotFieldsResult; VisualTotals: boolean; VisualTotalsForSets: boolean; } - class PivotTableChangeList { - private 'Excel.PivotTableChangeList_typekey': PivotTableChangeList; - private constructor(); + interface PivotTableChangeList { _Default(Index: any): ValueChange; Add(Tuple: string, Value: number, AllocationValue?: any, AllocationMethod?: any, AllocationWeightExpression?: any): ValueChange; readonly Application: Application; readonly Count: number; readonly Creator: XlCreator; - Item(Index: any): ValueChange; + Item(Index: number | string): ValueChange; readonly Parent: any; + (Index: number | string): ValueChange; } class PlotArea { @@ -6508,6 +6968,66 @@ declare namespace Excel { Width: number; } + class Point { + private 'Excel.Point_typekey': Point; + private constructor(); + + /** @param Type [Type=2] */ + _ApplyDataLabels(Type?: XlDataLabelsType, LegendKey?: any, AutoText?: any, HasLeaderLines?: any): any; + readonly Application: Application; + + /** @param Type [Type=2] */ + ApplyDataLabels(Type?: XlDataLabelsType, LegendKey?: boolean, AutoText?: boolean, HasLeaderLines?: boolean, ShowSeriesName?: boolean, ShowCategoryName?: boolean, ShowValue?: boolean, ShowPercentage?: boolean, ShowBubbleSize?: boolean, Separator?: string): any; + ApplyPictToEnd: boolean; + ApplyPictToFront: boolean; + ApplyPictToSides: boolean; + readonly Border: Border; + ClearFormats(): any; + Copy(): any; + readonly Creator: XlCreator; + readonly DataLabel: DataLabel; + Delete(): any; + Explosion: number; + readonly Fill: ChartFillFormat; + readonly Format: ChartFormat; + Has3DEffect: boolean; + HasDataLabel: boolean; + readonly Height: number; + readonly Interior: Interior; + InvertIfNegative: boolean; + readonly Left: number; + MarkerBackgroundColor: number; + MarkerBackgroundColorIndex: XlColorIndex; + MarkerForegroundColor: number; + MarkerForegroundColorIndex: XlColorIndex; + MarkerSize: number; + MarkerStyle: XlMarkerStyle; + readonly Name: string; + readonly Parent: any; + Paste(): any; + PictureType: XlChartPictureType; + PictureUnit: number; + PictureUnit2: number; + + /** @param Index [Index=2] */ + PieSliceLocation(loc: XlPieSliceLocation, Index?: XlPieSliceIndex): number; + SecondaryPlot: boolean; + Select(): any; + Shadow: boolean; + readonly Top: number; + readonly Width: number; + } + + interface Points { + _Default(Index: number): Point; + readonly Application: Application; + readonly Count: number; + readonly Creator: XlCreator; + Item(Index: number): Point; + readonly Parent: any; + (Index: number): Point; + } + class ProtectedViewWindow { private 'Excel.ProtectedViewWindow_typekey': ProtectedViewWindow; private constructor(); @@ -6515,7 +7035,7 @@ declare namespace Excel { Activate(): void; Caption: string; Close(): boolean; - Edit(WriteResPassword?: any, UpdateLinks?: any): Workbook; + Edit(WriteResPassword?: string, UpdateLinks?: 0 | 1): Workbook; EnableResize: boolean; Height: number; Left: number; @@ -6528,16 +7048,15 @@ declare namespace Excel { readonly Workbook: Workbook; } - class ProtectedViewWindows { - private 'Excel.ProtectedViewWindows_typekey': ProtectedViewWindows; - private constructor(); + interface ProtectedViewWindows { _Default(Index: any): ProtectedViewWindow; readonly Application: Application; readonly Count: number; readonly Creator: XlCreator; - Item(Index: any): ProtectedViewWindow; - Open(Filename: string, Password?: any, AddToMru?: any, RepairMode?: any): ProtectedViewWindow; + Item(Index: number | string): ProtectedViewWindow; + Open(Filename: string, Password?: string, AddToMru?: boolean, RepairMode?: boolean): ProtectedViewWindow; readonly Parent: any; + (Index: number | string): ProtectedViewWindow; } class Protection { @@ -6568,25 +7087,24 @@ declare namespace Excel { Filename: string; HtmlType: XlHtmlType; readonly Parent: any; - Publish(Create?: any): void; + Publish(Create?: boolean): void; readonly Sheet: string; readonly Source: string; readonly SourceType: XlSourceType; Title: string; } - class PublishObjects { - private 'Excel.PublishObjects_typekey': PublishObjects; - private constructor(); + interface PublishObjects { _Default(Index: any): PublishObject; - Add(SourceType: XlSourceType, Filename: string, Sheet?: any, Source?: any, HtmlType?: any, DivID?: any, Title?: any): PublishObject; + Add(SourceType: XlSourceType, Filename: string, Sheet?: string, Source?: XlSourceType.xlSourceAutoFilter | XlSourceType.xlSourceChart | XlSourceType.xlSourcePivotTable | XlSourceType.xlSourcePrintArea | XlSourceType.xlSourceQuery | XlSourceType.xlSourceRange, HtmlType?: XlHtmlType, DivID?: string, Title?: string): PublishObject; readonly Application: Application; readonly Count: number; readonly Creator: XlCreator; Delete(): void; - Item(Index: any): PublishObject; + Item(Index: number | string): PublishObject; readonly Parent: any; Publish(): void; + (Index: number | string): PublishObject; } class QueryTable { @@ -6596,13 +7114,13 @@ declare namespace Excel { readonly Application: Application; BackgroundQuery: boolean; CancelRefresh(): void; - CommandText: any; + CommandText: string; CommandType: XlCmdType; - Connection: any; + Connection: string; readonly Creator: XlCreator; Delete(): void; readonly Destination: Range; - EditWebPage: any; + EditWebPage: string; EnableEditing: boolean; EnableRefresh: boolean; readonly FetchedRowOverflow: boolean; @@ -6618,8 +7136,8 @@ declare namespace Excel { PreserveColumnInfo: boolean; PreserveFormatting: boolean; readonly QueryType: XlQueryType; - Recordset: any; - Refresh(BackgroundQuery?: any): boolean; + Recordset: DAO.Recordset | ADODB.Recordset; + Refresh(BackgroundQuery?: boolean): boolean; readonly Refreshing: boolean; RefreshOnFileOpen: boolean; RefreshPeriod: number; @@ -6628,7 +7146,7 @@ declare namespace Excel { readonly ResultRange: Range; RobustConnect: XlRobustConnect; RowNumbers: boolean; - SaveAsODC(ODCFileName: string, Description?: any, Keywords?: any): void; + SaveAsODC(ODCFileName: string, Description?: string, Keywords?: string): void; SaveData: boolean; SavePassword: boolean; readonly Sort: Sort; @@ -6636,11 +7154,11 @@ declare namespace Excel { SourceDataFile: string; Sql: any; TablesOnlyFromHTML: boolean; - TextFileColumnDataTypes: any; + TextFileColumnDataTypes: SafeArray; TextFileCommaDelimiter: boolean; TextFileConsecutiveDelimiter: boolean; TextFileDecimalSeparator: string; - TextFileFixedColumnWidths: any; + TextFileFixedColumnWidths: SafeArray; TextFileOtherDelimiter: string; TextFileParseType: XlTextParsingType; TextFilePlatform: number; @@ -6664,79 +7182,77 @@ declare namespace Excel { readonly WorkbookConnection: WorkbookConnection; } - class QueryTables { - private 'Excel.QueryTables_typekey': QueryTables; - private constructor(); + interface QueryTables { _Default(Index: any): QueryTable; - Add(Connection: any, Destination: Range, Sql?: any): QueryTable; + Add(Connection: QueryTable | DAO.Recordset | ADODB.Recordset, Destination: Range): QueryTable; + Add(Connection: string, Destination: Range, Sql?: string): QueryTable; readonly Application: Application; readonly Count: number; readonly Creator: XlCreator; - Item(Index: any): QueryTable; + Item(Index: number | string): QueryTable; readonly Parent: any; + (Index: number | string): QueryTable; } - class Range { - private 'Excel.Range_typekey': Range; - private constructor(); + interface Range { __PrintOut(From?: any, To?: any, Copies?: any, Preview?: any, ActivePrinter?: any, PrintToFile?: any, Collate?: any): any; /** - * @param Excel.XlBorderWeight [Weight=2] - * @param Excel.XlColorIndex [ColorIndex=-4105] + * @param Weight [Weight=2] + * @param ColorIndex [ColorIndex=-4105] */ _BorderAround(LineStyle: any, Weight?: XlBorderWeight, ColorIndex?: XlColorIndex, Color?: any): any; _Default(RowIndex?: any, ColumnIndex?: any): any; /** - * @param Excel.XlPasteType [Paste=-4104] - * @param Excel.XlPasteSpecialOperation [Operation=-4142] + * @param Paste [Paste=-4104] + * @param Operation [Operation=-4142] */ _PasteSpecial(Paste?: XlPasteType, Operation?: XlPasteSpecialOperation, SkipBlanks?: any, Transpose?: any): any; _PrintOut(From?: any, To?: any, Copies?: any, Preview?: any, ActivePrinter?: any, PrintToFile?: any, Collate?: any, PrToFileName?: any): any; Activate(): any; - AddComment(Text?: any): Comment; - AddIndent: any; + AddComment(Text?: string): Comment; + AddIndent: boolean; - /** @param Excel.XlReferenceStyle [ReferenceStyle=1] */ + /** @param ReferenceStyle [ReferenceStyle=1] */ Address(RowAbsolute?: boolean, ColumnAbsolute?: boolean, ReferenceStyle?: XlReferenceStyle, External?: boolean, RelativeTo?: Range): string; - /** @param Excel.XlReferenceStyle [ReferenceStyle=1] */ - AddressLocal(RowAbsolute: any, ColumnAbsolute: any, ReferenceStyle?: XlReferenceStyle, External?: any, RelativeTo?: any): string; + /** @param ReferenceStyle [ReferenceStyle=1] */ + AddressLocal(RowAbsolute?: boolean, ColumnAbsolute?: boolean, ReferenceStyle?: XlReferenceStyle, External?: boolean, RelativeTo?: Range): string; AdvancedFilter(Action: XlFilterAction.xlFilterCopy, CriteriaRange?: Range, CopyToRange?: Range, Unique?: boolean): any; AdvancedFilter(Action: XlFilterAction, CriteriaRange?: Range, CopyToRange?: undefined, Unique?: boolean): any; AllocateChanges(): void; readonly AllowEdit: boolean; readonly Application: Application; - /** @param Excel.XlApplyNamesOrder [Order=1] */ - ApplyNames(Names: any, IgnoreRelativeAbsolute: any, UseRowColumnNames: any, OmitColumn: any, OmitRow: any, Order?: XlApplyNamesOrder, AppendLast?: any): any; + /** @param Order [Order=1] */ + ApplyNames(Names?: SafeArray, IgnoreRelativeAbsolute?: boolean, UseRowColumnNames?: boolean, OmitColumn?: boolean, OmitRow?: boolean, Order?: XlApplyNamesOrder, AppendLast?: boolean): any; ApplyOutlineStyles(): any; readonly Areas: Areas; AutoComplete(String: string): string; - /** @param Excel.XlAutoFillType [Type=0] */ + /** @param Type [Type=0] */ AutoFill(Destination: Range, Type?: XlAutoFillType): any; - /** @param Excel.XlAutoFilterOperator [Operator=1] */ - AutoFilter(Field: any, Criteria1: any, Operator?: XlAutoFilterOperator, Criteria2?: any, VisibleDropDown?: any): any; + /** @param Operator [Operator=1] */ + AutoFilter(Field: number, Criteria1: string, Operator?: XlAutoFilterOperator, Criteria2?: string, VisibleDropDown?: boolean): any; AutoFit(): any; - /** @param Excel.XlRangeAutoFormat [Format=1] */ + /** @param Format [Format=1] */ AutoFormat(Format?: XlRangeAutoFormat, Number?: any, Font?: any, Alignment?: any, Border?: any, Pattern?: any, Width?: any): any; AutoOutline(): any; /** - * @param Excel.XlBorderWeight [Weight=2] - * @param Excel.XlColorIndex [ColorIndex=-4105] + * @param Weight [Weight=2] + * @param ColorIndex [ColorIndex=-4105] */ - BorderAround(LineStyle: any, Weight?: XlBorderWeight, ColorIndex?: XlColorIndex, Color?: any, ThemeColor?: any): any; + BorderAround(LineStyle?: XlLineStyle, Weight?: XlBorderWeight, ColorIndex?: XlColorIndex, Color?: number, ThemeColor?: number | XlThemeColor): any; readonly Borders: Borders; Calculate(): any; CalculateRowMajorOrder(): any; readonly Cells: Range; - Characters(Start?: any, Length?: any): Characters; - CheckSpelling(CustomDictionary?: any, IgnoreUppercase?: any, AlwaysSuggest?: any, SpellLang?: any): any; + Characters(Start?: number, Length?: number): Characters; + CheckSpelling(CustomDictionary?: string, IgnoreUppercase?: boolean, AlwaysSuggest?: boolean, SpellLang?: Office.MsoLanguageID): any; Clear(): any; ClearComments(): void; ClearContents(): any; @@ -6745,38 +7261,39 @@ declare namespace Excel { ClearNotes(): any; ClearOutline(): any; readonly Column: number; - ColumnDifferences(Comparison: any): Range; + ColumnDifferences(Comparison: Range): Range; readonly Columns: Range; - ColumnWidth: any; + ColumnWidth: number | null; readonly Comment: Comment; - Consolidate(Sources?: any, Function?: any, TopRow?: any, LeftColumn?: any, CreateLinks?: any): any; - Copy(Destination?: any): any; - CopyFromRecordset(Data: any, MaxRows?: any, MaxColumns?: any): number; + Consolidate(Sources?: SafeArray, Function?: XlConsolidationFunction, TopRow?: boolean, LeftColumn?: boolean, CreateLinks?: boolean): any; + Copy(Destination?: Range): any; + CopyFromRecordset(Data: DAO.Recordset | ADODB.Recordset, MaxRows?: number, MaxColumns?: number): number; /** - * @param Excel.XlPictureAppearance [Appearance=1] - * @param Excel.XlCopyPictureFormat [Format=-4147] + * @param Appearance [Appearance=1] + * @param Format [Format=-4147] */ CopyPicture(Appearance?: XlPictureAppearance, Format?: XlCopyPictureFormat): any; readonly Count: number; - readonly CountLarge: any; - CreateNames(Top?: any, Left?: any, Bottom?: any, Right?: any): any; + readonly CountLarge: number; + CreateNames(Top?: boolean, Left?: boolean, Bottom?: boolean, Right?: boolean): any; - /** @param Excel.XlPictureAppearance [Appearance=1] */ + /** @param Appearance [Appearance=1] */ CreatePublisher(Edition: any, Appearance?: XlPictureAppearance, ContainsPICT?: any, ContainsBIFF?: any, ContainsRTF?: any, ContainsVALU?: any): any; readonly Creator: XlCreator; readonly CurrentArray: Range; readonly CurrentRegion: Range; - Cut(Destination?: any): any; + Cut(Destination?: Range): any; /** - * @param Excel.XlDataSeriesType [Type=-4132] - * @param Excel.XlDataSeriesDate [Date=1] + * @param Type [Type=-4132] + * @param Date [Date=1] + * @param Step [Step=1] */ - DataSeries(Rowcol: any, Type?: XlDataSeriesType, Date?: XlDataSeriesDate, Step?: any, Stop?: any, Trend?: any): any; - Delete(Shift?: any): any; + DataSeries(Rowcol: XlRowCol, Type?: XlDataSeriesType, Date?: XlDataSeriesDate, Step?: number, Stop?: number, Trend?: boolean): any; + Delete(Shift?: XlDeleteShiftDirection): any; readonly Dependents: Range; - DialogBox(): any; + DialogBox(): number | false; readonly DirectDependents: Range; readonly DirectPrecedents: Range; Dirty(): void; @@ -6784,81 +7301,78 @@ declare namespace Excel { readonly DisplayFormat: DisplayFormat; /** - * @param Excel.XlPictureAppearance [Appearance=1] - * @param Excel.XlPictureAppearance [ChartSize=1] + * @param Appearance [Appearance=1] + * @param ChartSize [ChartSize=1] */ EditionOptions(Type: XlEditionType, Option: XlEditionOptionsOption, Name: any, Reference: any, Appearance?: XlPictureAppearance, ChartSize?: XlPictureAppearance, Format?: any): any; End(Direction: XlDirection): Range; readonly EntireColumn: Range; readonly EntireRow: Range; readonly Errors: Errors; - ExportAsFixedFormat( - Type: XlFixedFormatType, Filename?: any, Quality?: any, IncludeDocProperties?: any, IgnorePrintAreas?: any, From?: any, To?: any, OpenAfterPublish?: any, - FixedFormatExtClassPtr?: any): void; + ExportAsFixedFormat(Type: XlFixedFormatType, Filename?: string, Quality?: XlFixedFormatQuality, IncludeDocProperties?: boolean, IgnorePrintAreas?: boolean, From?: number, To?: number, OpenAfterPublish?: boolean, FixedFormatExtClassPtr?: any): void; FillDown(): any; FillLeft(): any; FillRight(): any; FillUp(): any; - /** @param Excel.XlSearchDirection [SearchDirection=1] */ - Find(What: any, After?: any, LookIn?: XlFindLookIn, LookAt?: XlLookAt, SearchOrder?: XlSearchOrder, SearchDirection?: XlSearchDirection, MatchCase?: boolean, - MatchByte?: boolean, SearchFormat?: any): Range; + /** @param SearchDirection [SearchDirection=1] */ + Find(What: any, After?: any, LookIn?: XlFindLookIn, LookAt?: XlLookAt, SearchOrder?: XlSearchOrder, SearchDirection?: XlSearchDirection, MatchCase?: boolean, MatchByte?: boolean, SearchFormat?: any): Range; FindNext(After?: any): Range; FindPrevious(After?: any): Range; readonly Font: Font; readonly FormatConditions: FormatConditions; - Formula: any; - FormulaArray: any; - FormulaHidden: any; + Formula: string | SafeArray; + FormulaArray: string | SafeArray | null; + FormulaHidden: boolean | null; FormulaLabel: XlFormulaLabel; - FormulaLocal: any; - FormulaR1C1: any; - FormulaR1C1Local: any; + FormulaLocal: string | SafeArray; + FormulaR1C1: string | SafeArray; + FormulaR1C1Local: string | SafeArray; FunctionWizard(): any; GoalSeek(Goal: any, ChangingCell: Range): boolean; - Group(Start?: any, End?: any, By?: any, Periods?: any): any; - readonly HasArray: any; - readonly HasFormula: any; - readonly Height: any; - Hidden: any; - HorizontalAlignment: any; + Group(Start?: any, End?: any, By?: number, Periods?: SafeArray): any; + readonly HasArray: boolean; + readonly HasFormula: boolean | null; + Height: number; + Hidden: boolean; + HorizontalAlignment: HorizontalAlignments; readonly Hyperlinks: Hyperlinks; ID: string; - IndentLevel: any; - Insert(Shift?: any, CopyOrigin?: any): any; + IndentLevel: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15; + Insert(Shift?: XlInsertShiftDirection, CopyOrigin?: any): any; InsertIndent(InsertAmount: number): void; readonly Interior: Interior; Item(RowIndex: number, ColumnIndex?: number): Range; Item(Address: string): Range; Justify(): any; - readonly Left: any; + readonly Left: number; readonly ListHeaderRows: number; ListNames(): any; readonly ListObject: ListObject; readonly LocationInTable: XlLocationInTable; - Locked: any; + Locked: boolean | null; readonly MDX: string; - Merge(Across?: any): void; + Merge(Across?: boolean): void; readonly MergeArea: Range; - MergeCells: any; - Name: any; - NavigateArrow(TowardPrecedent?: any, ArrowNumber?: any, LinkNumber?: any): any; + MergeCells: boolean; + Name: string | Name; + NavigateArrow(TowardPrecedent?: boolean, ArrowNumber?: number, LinkNumber?: number): any; readonly Next: Range; - NoteText(Text?: any, Start?: any, Length?: any): string; - NumberFormat: any; - NumberFormatLocal: any; + NoteText(Text?: string, Start?: number, Length?: number): string; + NumberFormat: string | null; + NumberFormatLocal: string | null; Offset(RowOffset?: number, ColumnOffset?: number): Range; - Orientation: any; - OutlineLevel: any; + Orientation: number | XlOrientation; + OutlineLevel: number; PageBreak: number; readonly Parent: any; - Parse(ParseLine?: any, Destination?: any): any; + Parse(ParseLine?: string, Destination?: Range): any; /** - * @param Excel.XlPasteType [Paste=-4104] - * @param Excel.XlPasteSpecialOperation [Operation=-4142] + * @param Paste [Paste=-4104] + * @param Operation [Operation=-4142] */ - PasteSpecial(Paste?: XlPasteType, Operation?: XlPasteSpecialOperation, SkipBlanks?: any, Transpose?: any): any; + PasteSpecial(Paste?: XlPasteType, Operation?: XlPasteSpecialOperation, SkipBlanks?: boolean, Transpose?: boolean): any; readonly Phonetic: Phonetic; readonly Phonetics: Phonetics; readonly PivotCell: PivotCell; @@ -6866,114 +7380,108 @@ declare namespace Excel { readonly PivotItem: PivotItem; readonly PivotTable: PivotTable; readonly Precedents: Range; - readonly PrefixCharacter: any; + readonly PrefixCharacter: "'" | '"' | '^' | '\\' | ''; readonly Previous: Range; - PrintOut(From?: any, To?: any, Copies?: any, Preview?: any, ActivePrinter?: any, PrintToFile?: any, Collate?: any, PrToFileName?: any): any; - PrintPreview(EnableChanges?: any): any; + PrintOut(From?: number, To?: number, Copies?: number, Preview?: boolean, ActivePrinter?: string, PrintToFile?: T, Collate?: boolean, PrToFileName?: PrintToFileName): any; + PrintPreview(EnableChanges?: boolean): any; readonly QueryTable: QueryTable; - Range(Cell1: any, Cell2?: any): Range; + Range(Cell1: string | Range, Cell2?: string | Range): Range; ReadingOrder: number; - /** @param Excel.XlYesNoGuess [Header=2] */ - RemoveDuplicates(Columns: any, Header?: XlYesNoGuess): void; + /** @param Header [Header=2] */ + RemoveDuplicates(Columns: SafeArray, Header?: XlYesNoGuess): void; RemoveSubtotal(): any; - Replace(What: any, Replacement: any, LookAt?: any, SearchOrder?: any, MatchCase?: any, MatchByte?: any, SearchFormat?: any, ReplaceFormat?: any): boolean; - Resize(RowSize?: any, ColumnSize?: any): Range; + Replace(What: string, Replacement: string, LookAt?: XlLookAt, SearchOrder?: XlSearchOrder, MatchCase?: boolean, MatchByte?: boolean, SearchFormat?: boolean, ReplaceFormat?: boolean): boolean; + Resize(RowSize?: number, ColumnSize?: number): Range; readonly Row: number; - RowDifferences(Comparison: any): Range; - RowHeight: any; + RowDifferences(Comparison: Range): Range; + RowHeight: number | null; readonly Rows: Range; - Run( - 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(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; Select(): any; readonly ServerActions: Actions; SetPhonetic(): void; Show(): any; - ShowDependents(Remove?: any): any; + ShowDependents(Remove?: boolean): any; ShowDetail: any; ShowErrors(): any; - ShowPrecedents(Remove?: any): any; - ShrinkToFit: any; + ShowPrecedents(Remove?: boolean): any; + ShrinkToFit: boolean | null; readonly SmartTags: SmartTags; /** - * @param Excel.XlSortOrder [Order1=1] - * @param Excel.XlSortOrder [Order2=1] - * @param Excel.XlSortOrder [Order3=1] - * @param Excel.XlYesNoGuess [Header=2] - * @param Excel.XlSortOrientation [Orientation=2] - * @param Excel.XlSortMethod [SortMethod=1] - * @param Excel.XlSortDataOption [DataOption1=0] - * @param Excel.XlSortDataOption [DataOption2=0] - * @param Excel.XlSortDataOption [DataOption3=0] + * @param Order1 [Order1=1] + * @param Order2 [Order2=1] + * @param Order3 [Order3=1] + * @param Header [Header=2] + * @param Orientation [Orientation=2] + * @param SortMethod [SortMethod=1] + * @param DataOption1 [DataOption1=0] + * @param DataOption2 [DataOption2=0] + * @param DataOption3 [DataOption3=0] */ - Sort( - Key1: any, Order1?: XlSortOrder, Key2?: any, Type?: any, Order2?: XlSortOrder, Key3?: any, Order3?: XlSortOrder, Header?: XlYesNoGuess, OrderCustom?: any, - MatchCase?: any, Orientation?: XlSortOrientation, SortMethod?: XlSortMethod, DataOption1?: XlSortDataOption, DataOption2?: XlSortDataOption, DataOption3?: XlSortDataOption): any; + Sort(Key1: string | Range, Order1?: XlSortOrder, Key2?: any, Type?: any, Order2?: XlSortOrder, Key3?: any, Order3?: XlSortOrder, Header?: XlYesNoGuess, OrderCustom?: number, MatchCase?: boolean, Orientation?: XlSortOrientation, SortMethod?: XlSortMethod, DataOption1?: XlSortDataOption, DataOption2?: XlSortDataOption, DataOption3?: XlSortDataOption): any; /** - * @param Excel.XlSortMethod [SortMethod=1] - * @param Excel.XlSortOrder [Order1=1] - * @param Excel.XlSortOrder [Order2=1] - * @param Excel.XlSortOrder [Order3=1] - * @param Excel.XlYesNoGuess [Header=2] - * @param Excel.XlSortOrientation [Orientation=2] - * @param Excel.XlSortDataOption [DataOption1=0] - * @param Excel.XlSortDataOption [DataOption2=0] - * @param Excel.XlSortDataOption [DataOption3=0] + * @param SortMethod [SortMethod=1] + * @param Order1 [Order1=1] + * @param Order2 [Order2=1] + * @param Order3 [Order3=1] + * @param Header [Header=2] + * @param Orientation [Orientation=2] + * @param DataOption1 [DataOption1=0] + * @param DataOption2 [DataOption2=0] + * @param DataOption3 [DataOption3=0] */ - SortSpecial( - SortMethod?: XlSortMethod, Key1?: any, Order1?: XlSortOrder, Type?: any, Key2?: any, Order2?: XlSortOrder, Key3?: any, Order3?: XlSortOrder, - Header?: XlYesNoGuess, OrderCustom?: any, MatchCase?: any, Orientation?: XlSortOrientation, DataOption1?: XlSortDataOption, DataOption2?: XlSortDataOption, - DataOption3?: XlSortDataOption): any; + SortSpecial(SortMethod?: XlSortMethod, Key1?: string | Range, Order1?: XlSortOrder, Type?: any, Key2?: string | Range, Order2?: XlSortOrder, Key3?: string | Range, Order3?: XlSortOrder, Header?: XlYesNoGuess, OrderCustom?: number, MatchCase?: boolean, Orientation?: XlSortOrientation, DataOption1?: XlSortDataOption, DataOption2?: XlSortDataOption, DataOption3?: XlSortDataOption): any; readonly SoundNote: SoundNote; readonly SparklineGroups: SparklineGroups; - Speak(SpeakDirection?: any, SpeakFormulas?: any): void; - SpecialCells(Type: XlCellType, Value?: any): Range; - Style: any; + Speak(SpeakDirection?: XlSpeakDirection, SpeakFormulas?: boolean): void; + SpecialCells(Type: XlCellType.xlCellTypeConstants | XlCellType.xlCellTypeFormulas, Value?: XlSpecialCellsValue): Range; + SpecialCells(Type: XlCellType): Range; + Style: Style; - /** @param Excel.XlSubscribeToFormat [Format=-4158] */ + /** @param Format [Format=-4158] */ SubscribeTo(Edition: string, Format?: XlSubscribeToFormat): any; - /** @param Excel.XlSummaryRow [SummaryBelowData=1] */ - Subtotal(GroupBy: number, Function: XlConsolidationFunction, TotalList: any, Replace: any, PageBreaks: any, SummaryBelowData?: XlSummaryRow): any; - readonly Summary: any; - Table(RowInput?: any, ColumnInput?: any): any; - readonly Text: any; + /** @param SummaryBelowData [SummaryBelowData=1] */ + Subtotal(GroupBy: number, Function: XlConsolidationFunction, TotalList: SafeArray, Replace: boolean, PageBreaks: boolean, SummaryBelowData?: XlSummaryRow): any; + readonly Summary: boolean; + Table(RowInput?: Range, ColumnInput?: Range): any; + readonly Text: string; /** - * @param Excel.XlTextParsingType [DataType=1] - * @param Excel.XlTextQualifier [TextQualifier=1] + * @param DataType [DataType=1] + * @param TextQualifier [TextQualifier=1] */ - TextToColumns( - Destination: any, DataType?: XlTextParsingType, TextQualifier?: XlTextQualifier, ConsecutiveDelimiter?: any, Tab?: any, Semicolon?: any, Comma?: any, - Space?: any, Other?: any, OtherChar?: any, FieldInfo?: any, DecimalSeparator?: any, ThousandsSeparator?: any, TrailingMinusNumbers?: any): any; - readonly Top: any; + TextToColumns(Destination: Range, DataType?: XlTextParsingType, TextQualifier?: XlTextQualifier, ConsecutiveDelimiter?: boolean, Tab?: boolean, Semicolon?: boolean, Comma?: boolean, Space?: boolean, Other?: boolean, OtherChar?: string, FieldInfo?: SafeArray, DecimalSeparator?: string, ThousandsSeparator?: string, TrailingMinusNumbers?: any): any; + readonly Top: number; Ungroup(): any; UnMerge(): void; - UseStandardHeight: any; - UseStandardWidth: any; + UseStandardHeight: boolean | null; + UseStandardWidth: boolean | null; readonly Validation: Validation; - Value(RangeValueDataType?: XlRangeValueDataType): any; + + // tslint:disable-next-line: ban-types + Value: Exclude & ((RangeValueDataType?: XlRangeValueDataType) => any); Value2: any; - VerticalAlignment: any; - readonly Width: any; + VerticalAlignment: VerticalAlignments; + readonly Width: number; readonly Worksheet: Worksheet; - WrapText: any; + WrapText: boolean | null; readonly XPath: XPath; + (RowIndex: number, ColumnIndex?: number): Range; + (Address: string): Range; } - class Ranges { - private 'Excel.Ranges_typekey': Ranges; - private constructor(); + interface Ranges { _Default(Index: any): Range; readonly Application: Application; readonly Count: number; readonly Creator: XlCreator; Item(Index: any): Range; readonly Parent: any; + (Index: any): Range; } class RecentFile { @@ -6989,9 +7497,7 @@ declare namespace Excel { readonly Path: string; } - class RecentFiles { - private 'Excel.RecentFiles_typekey': RecentFiles; - private constructor(); + interface RecentFiles { _Default(Index: number): RecentFile; Add(Name: string): RecentFile; readonly Application: Application; @@ -7000,6 +7506,7 @@ declare namespace Excel { Item(Index: number): RecentFile; Maximum: number; readonly Parent: any; + (Index: number): RecentFile; } class Research { @@ -7009,7 +7516,7 @@ declare namespace Excel { readonly Creator: XlCreator; IsResearchService(ServiceID: string): boolean; readonly Parent: any; - Query(ServiceID: string, QueryString?: any, QueryLanguage?: any, UseSelection?: any, LaunchQuery?: any): any; + Query(ServiceID: string, QueryString?: string, QueryLanguage?: any, UseSelection?: boolean, LaunchQuery?: boolean): any; SetLanguagePair(LanguageFrom: number, LanguageTo: number): any; } @@ -7037,6 +7544,123 @@ declare namespace Excel { ThrottleInterval: number; } + class Scenario { + private 'Excel.Scenario_typekey': Scenario; + private constructor(); + readonly Application: Application; + ChangeScenario(ChangingCells: Range, Values?: SafeArray): any; + readonly ChangingCells: Range; + Comment: string; + readonly Creator: XlCreator; + Delete(): any; + Hidden: boolean; + readonly Index: number; + Locked: boolean; + Name: string; + readonly Parent: any; + Show(): any; + Values(): SafeArray; + Values(Index: number): any; + } + + interface Scenarios { + Add(Name: string, ChangingCells: Range, Values?: SafeArray, Comment?: string, Locked?: boolean, Hidden?: boolean): Scenario; + readonly Application: Application; + readonly Count: number; + + /** @param ReportType [ReportType=1] */ + CreateSummary(ReportType?: XlSummaryReportType, ResultCells?: Range): any; + readonly Creator: XlCreator; + Item(Index: number | string): Scenario; + Merge(Source: string | Worksheet): any; + readonly Parent: any; + (Index: number | string): Scenario; + } + + class Series { + private 'Excel.Series_typekey': Series; + private constructor(); + + /** @param Type [Type=2] */ + _ApplyDataLabels(Type?: XlDataLabelsType, LegendKey?: any, AutoText?: any, HasLeaderLines?: any): any; + readonly Application: Application; + ApplyCustomType(ChartType: XlChartType): void; + + /** @param Type [Type=2] */ + ApplyDataLabels(Type?: XlDataLabelsType, LegendKey?: boolean, AutoText?: boolean, HasLeaderLines?: boolean, ShowSeriesName?: boolean, ShowCategoryName?: boolean, ShowValue?: boolean, ShowPercentage?: boolean, ShowBubbleSize?: boolean, Separator?: string): any; + ApplyPictToEnd: boolean; + ApplyPictToFront: boolean; + ApplyPictToSides: boolean; + AxisGroup: XlAxisGroup; + BarShape: XlBarShape; + readonly Border: Border; + BubbleSizes: string; + ChartType: XlChartType; + ClearFormats(): any; + Copy(): any; + readonly Creator: XlCreator; + DataLabels: DataLabels & ((Index: number) => DataLabel); + Delete(): any; + ErrorBar(Direction: XlErrorBarDirection, Include: XlErrorBarInclude, Type: XlErrorBarType, Amount?: any, MinusValues?: any): any; + readonly ErrorBars: ErrorBars; + Explosion: number; + readonly Fill: ChartFillFormat; + readonly Format: ChartFormat; + Formula: string; + FormulaLocal: string; + FormulaR1C1: string; + FormulaR1C1Local: string; + Has3DEffect: boolean; + HasDataLabels: boolean; + HasErrorBars: boolean; + HasLeaderLines: boolean; + readonly Interior: Interior; + InvertColor: number; + InvertColorIndex: number; + InvertIfNegative: boolean; + readonly LeaderLines: LeaderLines; + MarkerBackgroundColor: number; + MarkerBackgroundColorIndex: XlColorIndex; + MarkerForegroundColor: number; + MarkerForegroundColorIndex: XlColorIndex; + MarkerSize: number; + MarkerStyle: XlMarkerStyle; + Name: string; + readonly Parent: any; + Paste(): any; + PictureType: XlChartPictureType; + PictureUnit: number; + PictureUnit2: number; + readonly PlotColorIndex: number; + PlotOrder: number; + Points: Points & ((Index: number) => Point); + Select(): any; + Shadow: boolean; + Smooth: boolean; + Trendlines: Trendlines & ((Index: number | string) => Trendline); + Type: number; + Values: Range | SafeArray; + XValues: Range | SafeArray; + } + + interface SeriesCollection { + _Default(Index: any): Series; + + /** @param Rowcol [Rowcol=-4105] */ + Add(Source: Range, Rowcol?: XlRowCol, SeriesLabels?: boolean, CategoryLabels?: boolean, Replace?: boolean): Series; + readonly Application: Application; + readonly Count: number; + readonly Creator: XlCreator; + Extend(Source: Range, Rowcol?: XlRowCol, CategoryLabels?: boolean): any; + Item(Index: number | string): Series; + NewSeries(): Series; + readonly Parent: any; + + /** @param Rowcol [Rowcol=-4105] */ + Paste(Rowcol?: XlRowCol, SeriesLabels?: boolean, CategoryLabels?: boolean, Replace?: boolean, NewSeries?: boolean): any; + (Index: number | string): Series; + } + class SeriesLines { private 'Excel.SeriesLines_typekey': SeriesLines; private constructor(); @@ -7050,18 +7674,17 @@ declare namespace Excel { Select(): any; } - class ServerViewableItems { - private 'Excel.ServerViewableItems_typekey': ServerViewableItems; - private constructor(); + interface ServerViewableItems { _Default(Index: any): any; Add(Obj: any): any; readonly Application: Application; readonly Count: number; readonly Creator: XlCreator; - Delete(Index: any): void; + Delete(Index: number): void; DeleteAll(): void; - Item(Index: any): any; + Item(Index: number): any; readonly Parent: any; + (Index: number): any; } class ShadowFormat { @@ -7109,7 +7732,7 @@ declare namespace Excel { readonly ConnectorFormat: ConnectorFormat; readonly ControlFormat: ControlFormat; Copy(): void; - CopyPicture(Appearance?: any, Format?: any): void; + CopyPicture(Appearance?: XlPictureAppearance, Format?: XlCopyPictureFormat): void; readonly Creator: XlCreator; Cut(): void; Delete(): void; @@ -7150,10 +7773,10 @@ declare namespace Excel { readonly Reflection: Office.ReflectionFormat; RerouteConnections(): void; Rotation: number; - ScaleHeight(Factor: number, RelativeToOriginalSize: Office.MsoTriState, Scale?: any): void; - ScaleWidth(Factor: number, RelativeToOriginalSize: Office.MsoTriState, Scale?: any): void; + ScaleHeight(Factor: number, RelativeToOriginalSize: Office.MsoTriState, Scale?: Office.MsoScaleFrom): void; + ScaleWidth(Factor: number, RelativeToOriginalSize: Office.MsoTriState, Scale?: Office.MsoScaleFrom): void; readonly Script: Office.Script; - Select(Replace?: any): void; + Select(Replace?: boolean): void; SetShapesDefaultProperties(): void; readonly Shadow: ShadowFormat; ShapeStyle: Office.MsoShapeStyleIndex; @@ -7169,7 +7792,7 @@ declare namespace Excel { readonly Type: Office.MsoShapeType; Ungroup(): ShapeRange; readonly VerticalFlip: Office.MsoTriState; - readonly Vertices: any; + readonly Vertices: SafeArray; Visible: Office.MsoTriState; Width: number; ZOrder(ZOrderCmd: Office.MsoZOrderCmd): void; @@ -7183,35 +7806,32 @@ declare namespace Excel { readonly Creator: number; readonly EditingType: Office.MsoEditingType; readonly Parent: any; - readonly Points: any; + readonly Points: SafeArray; readonly SegmentType: Office.MsoSegmentType; } - class ShapeNodes { - private 'Excel.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: Office.MsoSegmentType, EditingType: Office.MsoEditingType, X1: number, Y1: number, X2?: number, Y2?: number, X3?: number, Y3?: number): void; - Item(Index: any): ShapeNode; + Item(Index: number | string): ShapeNode; readonly Parent: any; SetEditingType(Index: number, EditingType: Office.MsoEditingType): void; SetPosition(Index: number, X1: number, Y1: number): void; SetSegmentType(Index: number, SegmentType: Office.MsoSegmentType): void; + (Index: number | string): ShapeNode; } - class ShapeRange { - private 'Excel.ShapeRange_typekey': ShapeRange; - private constructor(); + interface ShapeRange { _Default(Index: any): Shape; readonly Adjustments: Adjustments; Align(AlignCmd: Office.MsoAlignCmd, RelativeTo: Office.MsoTriState): void; @@ -7253,7 +7873,7 @@ declare namespace Excel { IncrementLeft(Increment: number): void; IncrementRotation(Increment: number): void; IncrementTop(Increment: number): void; - Item(Index: any): Shape; + Item(Index: number | string): Shape; Left: number; readonly Line: LineFormat; LockAspectRatio: Office.MsoTriState; @@ -7267,9 +7887,9 @@ declare namespace Excel { Regroup(): Shape; RerouteConnections(): void; Rotation: number; - ScaleHeight(Factor: number, RelativeToOriginalSize: Office.MsoTriState, Scale?: any): void; - ScaleWidth(Factor: number, RelativeToOriginalSize: Office.MsoTriState, Scale?: any): void; - Select(Replace?: any): void; + ScaleHeight(Factor: number, RelativeToOriginalSize: Office.MsoTriState, Scale?: Office.MsoScaleFrom): void; + ScaleWidth(Factor: number, RelativeToOriginalSize: Office.MsoTriState, Scale?: Office.MsoScaleFrom): void; + Select(Replace?: boolean): void; SetShapesDefaultProperties(): void; readonly Shadow: ShadowFormat; ShapeStyle: Office.MsoShapeStyleIndex; @@ -7283,82 +7903,81 @@ declare namespace Excel { readonly Type: Office.MsoShapeType; Ungroup(): ShapeRange; readonly VerticalFlip: Office.MsoTriState; - readonly Vertices: any; + readonly Vertices: SafeArray; Visible: Office.MsoTriState; Width: number; ZOrder(ZOrderCmd: Office.MsoZOrderCmd): void; readonly ZOrderPosition: number; + (Index: number | string): Shape; } - class Shapes { - private 'Excel.Shapes_typekey': Shapes; - private constructor(); + interface Shapes { _Default(Index: any): Shape; AddCallout(Type: Office.MsoCalloutType, Left: number, Top: number, Width: number, Height: number): Shape; AddCanvas(Left: number, Top: number, Width: number, Height: number): Shape; - AddChart(XlChartType?: any, Left?: any, Top?: any, Width?: any, Height?: any): Shape; + AddChart(XlChartType?: XlChartType, Left?: number, Top?: number, Width?: number, Height?: number, NewLayout?: boolean): Shape; AddConnector(Type: Office.MsoConnectorType, BeginX: number, BeginY: number, EndX: number, EndY: number): Shape; - AddCurve(SafeArrayOfPoints: any): Shape; + AddCurve(SafeArrayOfPoints: SafeArray): Shape; AddDiagram(Type: Office.MsoDiagramType, Left: number, Top: number, Width: number, Height: number): Shape; AddFormControl(Type: XlFormControl, Left: number, Top: number, Width: number, Height: number): Shape; AddLabel(Orientation: Office.MsoTextOrientation, Left: number, Top: number, Width: number, Height: number): Shape; AddLine(BeginX: number, BeginY: number, EndX: number, EndY: number): Shape; - AddOLEObject(ClassType?: any, Filename?: any, Link?: any, DisplayAsIcon?: any, IconFileName?: any, IconIndex?: any, IconLabel?: any, Left?: any, Top?: any, Width?: any, - Height?: any): Shape; + AddOLEObject(ClassType: string, Filename?: undefined, Link?: false, DisplayAsIcon?: boolean, IconFileName?: string, IconIndex?: number, IconLabel?: string, Left?: number, Top?: number, Width?: number, Height?: number): Shape; + AddOLEObject(ClassType: undefined, Filename: string, Link?: boolean, DisplayAsIcon?: boolean, IconFileName?: string, IconIndex?: number, IconLabel?: string, Left?: number, Top?: number, Width?: number, Height?: number): Shape; AddPicture(Filename: string, LinkToFile: Office.MsoTriState, SaveWithDocument: Office.MsoTriState, Left: number, Top: number, Width: number, Height: number): Shape; - AddPolyline(SafeArrayOfPoints: any): Shape; + AddPolyline(SafeArrayOfPoints: SafeArray): Shape; AddShape(Type: Office.MsoAutoShapeType, Left: number, Top: number, Width: number, Height: number): Shape; - AddSmartArt(Layout: Office.SmartArtLayout, Left?: any, Top?: any, Width?: any, Height?: any): Shape; + AddSmartArt(Layout: Office.SmartArtLayout, Left?: number, Top?: number, Width?: number, Height?: number): Shape; AddTextbox(Orientation: Office.MsoTextOrientation, Left: number, Top: number, Width: number, Height: number): Shape; - AddTextEffect( - PresetTextEffect: Office.MsoPresetTextEffect, Text: string, FontName: string, FontSize: number, FontBold: Office.MsoTriState, FontItalic: Office.MsoTriState, - Left: number, Top: number): Shape; + AddTextEffect(PresetTextEffect: Office.MsoPresetTextEffect, Text: string, FontName: string, FontSize: number, FontBold: Office.MsoTriState, FontItalic: Office.MsoTriState, Left: number, Top: number): Shape; readonly Application: Application; BuildFreeform(EditingType: Office.MsoEditingType, X1: number, Y1: number): FreeformBuilder; readonly Count: number; readonly Creator: XlCreator; - Item(Index: any): Shape; + Item(Index: number | string): Shape; readonly Parent: any; - Range(Index: any): ShapeRange; + Range(Index: number | string | SafeArray): ShapeRange; SelectAll(): void; + (Index: number | string): Shape; } - class Sheets { - private 'Excel.Sheets_typekey': Sheets; - private constructor(); + interface Sheets { __PrintOut(From?: any, To?: any, Copies?: any, Preview?: any, ActivePrinter?: any, PrintToFile?: any, Collate?: any): void; _Default(Index: any): any; _PrintOut(From?: any, To?: any, Copies?: any, Preview?: any, ActivePrinter?: any, PrintToFile?: any, Collate?: any, PrToFileName?: any): void; - Add(Before?: any, After?: any, Count?: any, Type?: any): any; + Add(Before?: Sheet, After?: Sheet, Count?: number, Type?: T): AddSheetResult; readonly Application: Application; - Copy(Before?: any, After?: any): void; + Copy(Before?: Sheet): void; + Copy(Before: undefined, After: Sheet): void; readonly Count: number; readonly Creator: XlCreator; Delete(): void; - /** @param Excel.XlFillWith [Type=-4104] */ + /** @param Type [Type=-4104] */ FillAcrossSheets(Range: Range, Type?: XlFillWith): void; readonly HPageBreaks: HPageBreaks; - Item(Index: string | number): Worksheet | Chart | DialogSheet; - Item(Indexes: SafeArray): Sheets; - Move(Before?: any, After?: any): void; + Item(Index: string | number): TSheet; + Item(Indexes: SafeArray): Sheets; + Move(Before?: Sheet | number): void; + Move(Before: undefined, After: Sheet | number): void; readonly Parent: any; - PrintOut(From?: any, To?: any, Copies?: any, Preview?: any, ActivePrinter?: any, PrintToFile?: any, Collate?: any, PrToFileName?: any, IgnorePrintAreas?: any): void; - PrintPreview(EnableChanges?: any): void; + PrintOut(From?: number, To?: number, Copies?: number, Preview?: boolean, ActivePrinter?: string, PrintToFile?: T, Collate?: boolean, PrToFileName?: PrintToFileName, IgnorePrintAreas?: boolean): void; + PrintPreview(EnableChanges?: boolean): void; Select(Replace?: boolean): void; Visible: any; readonly VPageBreaks: VPageBreaks; + (Index: string | number): TSheet; + (Indexes: SafeArray): Sheets; } - class SheetViews { - private 'Excel.SheetViews_typekey': SheetViews; - private constructor(); + interface SheetViews { _Default(Index: any): any; readonly Application: Application; readonly Count: number; readonly Creator: XlCreator; - Item(Index: any): any; + Item(Index: any): SheetView; readonly Parent: any; + (Index: any): SheetView; } class Slicer { @@ -7430,27 +8049,25 @@ declare namespace Excel { readonly VisibleSlicerItemsList: any; } - class SlicerCacheLevels { - private 'Excel.SlicerCacheLevels_typekey': SlicerCacheLevels; - private constructor(); + interface SlicerCacheLevels { _Default(Level?: any): SlicerCacheLevel; readonly Application: Application; readonly Count: number; readonly Creator: XlCreator; - Item(Level?: any): SlicerCacheLevel; + Item(Level?: number | string): SlicerCacheLevel; readonly Parent: any; + (Level?: number | string): SlicerCacheLevel; } - class SlicerCaches { - private 'Excel.SlicerCaches_typekey': SlicerCaches; - private constructor(); + interface SlicerCaches { _Default(Index: any): SlicerCache; - Add(Source: any, SourceField: any, Name?: any): SlicerCache; + Add(Source: WorkbookConnection | PivotTable | string, SourceField: any, Name?: any): SlicerCache; readonly Application: Application; readonly Count: number; readonly Creator: XlCreator; - Item(Index: any): SlicerCache; + Item(Index: number | string): SlicerCache; readonly Parent: any; + (Index: number | string): SlicerCache; } class SlicerItem { @@ -7468,40 +8085,37 @@ declare namespace Excel { readonly Value: string; } - class SlicerItems { - private 'Excel.SlicerItems_typekey': SlicerItems; - private constructor(); + interface SlicerItems { _Default(Index: any): SlicerItem; readonly Application: Application; readonly Count: number; readonly Creator: XlCreator; - Item(Index: any): SlicerItem; + Item(Index: number | string): SlicerItem; readonly Parent: any; + (Index: number | string): SlicerItem; } - class SlicerPivotTables { - private 'Excel.SlicerPivotTables_typekey': SlicerPivotTables; - private constructor(); + interface SlicerPivotTables { _Default(Index: any): PivotTable; AddPivotTable(PivotTable: PivotTable): void; readonly Application: Application; readonly Count: number; readonly Creator: XlCreator; - Item(Index: any): PivotTable; + Item(Index: number | string): PivotTable; readonly Parent: any; - RemovePivotTable(PivotTable: any): void; + RemovePivotTable(PivotTable: PivotTable | number | string): void; + (Index: number | string): PivotTable; } - class Slicers { - private 'Excel.Slicers_typekey': Slicers; - private constructor(); + interface Slicers { _Default(Index: any): Slicer; - Add(SlicerDestination: any, Level?: any, Name?: any, Caption?: any, Top?: any, Left?: any, Width?: any, Height?: any): Slicer; + Add(SlicerDestination: string | Worksheet, Level?: any, Name?: string, Caption?: string, Top?: number, Left?: number, Width?: number, Height?: number): Slicer; readonly Application: Application; readonly Count: number; readonly Creator: XlCreator; - Item(Index: any): Slicer; + Item(Index: number | string): Slicer; readonly Parent: any; + (Index: number | string): Slicer; } class SmartTag { @@ -7539,15 +8153,14 @@ declare namespace Excel { readonly Type: XlSmartTagControlType; } - class SmartTagActions { - private 'Excel.SmartTagActions_typekey': SmartTagActions; - private constructor(); + interface SmartTagActions { _Default(Index: any): SmartTagAction; readonly Application: Application; readonly Count: number; readonly Creator: XlCreator; Item(Index: any): SmartTagAction; readonly Parent: any; + (Index: any): SmartTagAction; } class SmartTagOptions { @@ -7572,9 +8185,7 @@ declare namespace Excel { readonly progID: string; } - class SmartTagRecognizers { - private 'Excel.SmartTagRecognizers_typekey': SmartTagRecognizers; - private constructor(); + interface SmartTagRecognizers { _Default(Index: any): SmartTagRecognizer; readonly Application: Application; readonly Count: number; @@ -7582,17 +8193,17 @@ declare namespace Excel { Item(Index: any): SmartTagRecognizer; readonly Parent: any; Recognize: boolean; + (Index: any): SmartTagRecognizer; } - class SmartTags { - private 'Excel.SmartTags_typekey': SmartTags; - private constructor(); + interface SmartTags { _Default(Index: any): SmartTag; Add(SmartTagType: string): SmartTag; readonly Application: Application; readonly Count: number; readonly Creator: XlCreator; readonly Parent: any; + (Index: any): SmartTag; } class Sort { @@ -7629,9 +8240,7 @@ declare namespace Excel { readonly SortOnValue: any; } - class SortFields { - private 'Excel.SortFields_typekey': SortFields; - private constructor(); + interface SortFields { _Default(Index: any): SortField; Add(Key: Range, SortOn?: any, Order?: any, CustomOrder?: any, DataOption?: any): SortField; readonly Application: Application; @@ -7640,6 +8249,7 @@ declare namespace Excel { readonly Creator: XlCreator; Item(Index: any): SortField; readonly Parent: any; + (Index: any): SortField; } class SoundNote { @@ -7723,9 +8333,7 @@ declare namespace Excel { Type: XlSparkType; } - class SparklineGroups { - private 'Excel.SparklineGroups_typekey': SparklineGroups; - private constructor(); + interface SparklineGroups { _Default(Index: any): SparklineGroup; Add(Type: XlSparkType, SourceData: string): SparklineGroup; readonly Application: Application; @@ -7734,9 +8342,10 @@ declare namespace Excel { readonly Count: number; readonly Creator: XlCreator; Group(Location: Range): void; - Item(Index: any): SparklineGroup; + Item(Index: number): SparklineGroup; readonly Parent: any; Ungroup(): void; + (Index: number): SparklineGroup; } class SparkPoints { @@ -7769,7 +8378,7 @@ declare namespace Excel { private 'Excel.Speech_typekey': Speech; private constructor(); Direction: XlSpeakDirection; - Speak(Text: string, SpeakAsync?: any, SpeakXML?: any, Purge?: any): void; + Speak(Text: string, SpeakAsync?: boolean, SpeakXML?: boolean, Purge?: boolean): void; SpeakCellOnEnter: boolean; } @@ -7819,7 +8428,7 @@ declare namespace Excel { IndentLevel: number; readonly Interior: Interior; Locked: boolean; - MergeCells: any; + MergeCells: boolean; readonly Name: string; readonly NameLocal: string; NumberFormat: string; @@ -7833,29 +8442,28 @@ declare namespace Excel { WrapText: boolean; } - class Styles { - private 'Excel.Styles_typekey': Styles; - private constructor(); + interface Styles { _Default(Index: any): Style; Add(Name: string, BasedOn?: any): Style; readonly Application: Application; readonly Count: number; readonly Creator: XlCreator; - Item(Index: any): Style; - Merge(Workbook: any): any; + Item(Index: number | string): Style; + Merge(Workbook: Workbook): any; readonly Parent: any; + (Index: any): Style; } class Tab { private 'Excel.Tab_typekey': Tab; private constructor(); readonly Application: Application; - Color: any; + Color: XlRgbColor | number; ColorIndex: XlColorIndex; readonly Creator: XlCreator; readonly Parent: any; ThemeColor: XlThemeColor; - TintAndShade: any; + TintAndShade: number; } class TableStyle { @@ -7866,7 +8474,7 @@ declare namespace Excel { readonly BuiltIn: boolean; readonly Creator: XlCreator; Delete(): void; - Duplicate(NewTableStyleName?: any): TableStyle; + Duplicate(NewTableStyleName?: string): TableStyle; readonly Name: string; readonly NameLocal: string; readonly Parent: any; @@ -7890,27 +8498,25 @@ declare namespace Excel { StripeSize: number; } - class TableStyleElements { - private 'Excel.TableStyleElements_typekey': TableStyleElements; - private constructor(); + interface TableStyleElements { _Default(Index: XlTableStyleElementType): TableStyleElement; readonly Application: Application; readonly Count: number; readonly Creator: XlCreator; Item(Index: XlTableStyleElementType): TableStyleElement; readonly Parent: any; + (Index: XlTableStyleElementType): TableStyleElement; } - class TableStyles { - private 'Excel.TableStyles_typekey': TableStyles; - private constructor(); + interface TableStyles { _Default(Index: any): TableStyle; Add(TableStyleName: string): TableStyle; readonly Application: Application; readonly Count: number; readonly Creator: XlCreator; - Item(Index: any): TableStyle; + Item(Index: number | string): TableStyle; readonly Parent: any; + (Index: number | string): TableStyle; } class TextEffectFormat { @@ -7940,7 +8546,7 @@ declare namespace Excel { readonly Application: Application; AutoMargins: boolean; AutoSize: boolean; - Characters(Start?: any, Length?: any): Characters; + Characters(Start?: number, Length?: number): Characters; readonly Creator: XlCreator; HorizontalAlignment: XlHAlign; HorizontalOverflow: XlOartHorizontalOverflow; @@ -8041,7 +8647,7 @@ declare namespace Excel { readonly Name: string; NumberFormat: string; NumberFormatLinked: boolean; - NumberFormatLocal: any; + NumberFormatLocal: string; Offset: number; Orientation: XlTickLabelOrientation; readonly Parent: any; @@ -8096,9 +8702,7 @@ declare namespace Excel { Width: number; } - class ToolbarButtons { - private 'Excel.ToolbarButtons_typekey': ToolbarButtons; - private constructor(); + interface ToolbarButtons { _Default(Index: number): ToolbarButton; Add(Button?: any, Before?: any, OnAction?: any, Pushed?: any, Enabled?: any, StatusBar?: any, HelpFile?: any, HelpContextID?: any): ToolbarButton; readonly Application: Application; @@ -8106,11 +8710,10 @@ declare namespace Excel { readonly Creator: XlCreator; Item(Index: number): ToolbarButton; readonly Parent: any; + (Index: number): ToolbarButton; } - class Toolbars { - private 'Excel.Toolbars_typekey': Toolbars; - private constructor(); + interface Toolbars { _Default(Index: any): Toolbar; Add(Name?: any): Toolbar; readonly Application: Application; @@ -8118,6 +8721,33 @@ declare namespace Excel { readonly Creator: XlCreator; Item(Index: any): Toolbar; readonly Parent: any; + (Index: any): Toolbar; + } + + class Top10 { + private 'Excel.Top10_typekey': Top10; + private constructor(); + readonly Application: Application; + readonly AppliesTo: Range; + readonly Borders: Borders; + CalcFor: XlCalcFor; + readonly Creator: XlCreator; + Delete(): void; + readonly Font: Font; + readonly Interior: Interior; + ModifyAppliesToRange(Range: Range): void; + NumberFormat: string; + readonly Parent: any; + Percent: boolean; + Priority: number; + readonly PTCondition: boolean; + Rank: number; + ScopeType: XlPivotConditionScope; + SetFirstPriority(): void; + SetLastPriority(): void; + StopIfTrue: boolean; + TopBottom: XlTopBottom; + readonly Type: number; } class TreeviewControl { @@ -8126,10 +8756,74 @@ declare namespace Excel { readonly Application: Application; readonly Creator: XlCreator; Drilled: any; - Hidden: any; + Hidden: SafeArray>; readonly Parent: any; } + class Trendline { + private 'Excel.Trendline_typekey': Trendline; + private constructor(); + readonly Application: Application; + Backward: number; + Backward2: number; + readonly Border: Border; + ClearFormats(): any; + readonly Creator: XlCreator; + readonly DataLabel: DataLabel; + Delete(): any; + DisplayEquation: boolean; + DisplayRSquared: boolean; + readonly Format: ChartFormat; + Forward: number; + Forward2: number; + readonly Index: number; + Intercept: number; + InterceptIsAuto: boolean; + Name: string; + NameIsAuto: boolean; + Order: number; + readonly Parent: any; + Period: number; + Select(): any; + Type: XlTrendlineType; + } + + interface Trendlines { + _Default(Index?: any): Trendline; + + /** @param Type [Type=-4132] */ + Add(Type?: XlTrendlineType, Order?: number, Period?: number, Forward?: number, Backward?: number, Intercept?: any, DisplayEquation?: boolean, DisplayRSquared?: boolean, Name?: string): Trendline; + readonly Application: Application; + readonly Count: number; + readonly Creator: XlCreator; + Item(Index: number): Trendline; + readonly Parent: any; + (Index: number): Trendline; + } + + class UniqueValues { + private 'Excel.UniqueValues_typekey': UniqueValues; + private constructor(); + readonly Application: Application; + readonly AppliesTo: Range; + readonly Borders: Borders; + readonly Creator: XlCreator; + Delete(): void; + DupeUnique: XlDupeUnique; + readonly Font: Font; + readonly Interior: Interior; + ModifyAppliesToRange(Range: Range): void; + NumberFormat: string; + readonly Parent: any; + Priority: number; + readonly PTCondition: boolean; + ScopeType: XlPivotConditionScope; + SetFirstPriority(): void; + SetLastPriority(): void; + StopIfTrue: boolean; + readonly Type: XlFormatConditionType.xlUniqueValues; + } + class UpBars { private 'Excel.UpBars_typekey': UpBars; private constructor(); @@ -8145,15 +8839,14 @@ declare namespace Excel { Select(): any; } - class UsedObjects { - private 'Excel.UsedObjects_typekey': UsedObjects; - private constructor(); + interface UsedObjects { _Default(Index: any): any; readonly Application: Application; readonly Count: number; readonly Creator: XlCreator; - Item(Index: any): any; + Item(Index: number | string): any; readonly Parent: any; + (Index: number | string): any; } class UserAccess { @@ -8164,20 +8857,21 @@ declare namespace Excel { readonly Name: string; } - class UserAccessList { - private 'Excel.UserAccessList_typekey': UserAccessList; - private constructor(); + interface UserAccessList { _Default(Index: any): UserAccess; Add(Name: string, AllowEdit: boolean): UserAccess; readonly Count: number; DeleteAll(): void; - Item(Index: any): UserAccess; + Item(Index: number | string): UserAccess; + (Index: number | string): UserAccess; } class Validation { private 'Excel.Validation_typekey': Validation; private constructor(); - Add(Type: XlDVType, AlertStyle?: any, Operator?: any, Formula1?: any, Formula2?: any): void; + Add(Type: XlDVType.xlValidateInputOnly): void; + Add(Type: XlDVType.xlValidateWholeNumber | XlDVType.xlValidateDate | XlDVType.xlValidateDecimal | XlDVType.xlValidateTextLength | XlDVType.xlValidateTime, AlertStyle?: XlDVAlertStyle, Operator?: XlFormatConditionOperator.xlBetween | XlFormatConditionOperator.xlNotBetween, Formula1?: string, Formula2?: string): void; + Add(Type?: XlDVType, AlertStyle?: XlDVAlertStyle, Operator?: XlFormatConditionOperator, Formula1?: string): void; readonly AlertStyle: number; readonly Application: Application; readonly Creator: XlCreator; @@ -8191,7 +8885,9 @@ declare namespace Excel { InCellDropdown: boolean; InputMessage: string; InputTitle: string; - Modify(Type?: any, AlertStyle?: any, Operator?: any, Formula1?: any, Formula2?: any): void; + Modify(Type: XlDVType.xlValidateInputOnly): void; + Modify(Type: XlDVType.xlValidateWholeNumber | XlDVType.xlValidateDate | XlDVType.xlValidateDecimal | XlDVType.xlValidateTextLength | XlDVType.xlValidateTime, AlertStyle?: XlDVAlertStyle, Operator?: XlFormatConditionOperator.xlBetween | XlFormatConditionOperator.xlNotBetween, Formula1?: string, Formula2?: string): void; + Modify(Type?: XlDVType, AlertStyle?: XlDVAlertStyle, Operator?: XlFormatConditionOperator, Formula1?: string): void; readonly Operator: number; readonly Parent: any; ShowError: boolean; @@ -8230,16 +8926,15 @@ declare namespace Excel { Type: XlPageBreak; } - class VPageBreaks { - private 'Excel.VPageBreaks_typekey': VPageBreaks; - private constructor(); + interface VPageBreaks { _Default(Index: number): VPageBreak; - Add(Before: any): VPageBreak; + Add(Before: Range): VPageBreak; readonly Application: Application; readonly Count: number; readonly Creator: XlCreator; Item(Index: number): VPageBreak; readonly Parent: any; + (Index: number): VPageBreak; } class Walls { @@ -8255,8 +8950,8 @@ declare namespace Excel { readonly Name: string; readonly Parent: any; Paste(): void; - PictureType: any; - PictureUnit: any; + PictureType: XlChartPictureType; + PictureUnit: number; Select(): any; Thickness: number; } @@ -8271,17 +8966,16 @@ declare namespace Excel { readonly Source: any; } - class Watches { - private 'Excel.Watches_typekey': Watches; - private constructor(); + interface Watches { _Default(Index: any): Watch; Add(Source: any): Watch; readonly Application: Application; readonly Count: number; readonly Creator: XlCreator; Delete(): void; - Item(Index: any): Watch; + Item(Index: number | string): Watch; readonly Parent: any; + (Index: number | string): Watch; } class WebOptions { @@ -8316,12 +9010,12 @@ declare namespace Excel { readonly ActiveCell: Range; readonly ActiveChart: Chart; readonly ActivePane: Pane; - readonly ActiveSheet: any; - readonly ActiveSheetView: any; + readonly ActiveSheet: Sheet | null; + readonly ActiveSheetView: SheetView | null; readonly Application: Application; AutoFilterDateGrouping: boolean; - Caption: any; - Close(SaveChanges?: any, Filename?: any, RouteWorkbook?: any): boolean; + Caption: string; + Close(SaveChanges?: boolean, Filename?: string, RouteWorkbook?: boolean): boolean; readonly Creator: XlCreator; DisplayFormulas: boolean; DisplayGridlines: boolean; @@ -8340,7 +9034,7 @@ declare namespace Excel { GridlineColorIndex: XlColorIndex; Height: number; readonly Index: number; - LargeScroll(Down?: any, Up?: any, ToRight?: any, ToLeft?: any): any; + LargeScroll(Down?: number, Up?: number, ToRight?: number, ToLeft?: number): any; Left: number; NewWindow(): Window; OnWindow: string; @@ -8348,18 +9042,19 @@ declare namespace Excel { readonly Parent: any; PointsToScreenPixelsX(Points: number): number; PointsToScreenPixelsY(Points: number): number; - PrintOut(From?: any, To?: any, Copies?: any, Preview?: any, ActivePrinter?: any, PrintToFile?: any, Collate?: any, PrToFileName?: any): any; - PrintPreview(EnableChanges?: any): any; - RangeFromPoint(x: number, y: number): any; + PrintOut(From?: number, To?: number, Copies?: number, Preview?: boolean, ActivePrinter?: string, PrintToFile?: T, Collate?: boolean, PrToFileName?: PrintToFileName): any; + PrintPreview(EnableChanges?: boolean): any; + RangeFromPoint(x: number, y: number): Shape | Range | null; readonly RangeSelection: Range; ScrollColumn: number; - ScrollIntoView(Left: number, Top: number, Width: number, Height: number, Start?: any): void; + ScrollIntoView(Left: number, Top: number, Width: number, Height: number, Start?: boolean): void; ScrollRow: number; - ScrollWorkbookTabs(Sheets?: any, Position?: any): any; + ScrollWorkbookTabs(Sheets: 0, Position: Constants.xlFirst | Constants.xlLast): any; + ScrollWorkbookTabs(Sheets: number): any; readonly SelectedSheets: Sheets; readonly Selection: any; readonly SheetViews: SheetViews; - SmallScroll(Down?: any, Up?: any, ToRight?: any, ToLeft?: any): any; + SmallScroll(Down?: number, Up?: number, ToRight?: number, ToLeft?: number): any; Split: boolean; SplitColumn: number; SplitHorizontal: number; @@ -8376,25 +9071,25 @@ declare namespace Excel { Width: number; readonly WindowNumber: number; WindowState: XlWindowState; - Zoom: any; + Zoom: number | true; } - class Windows { - private 'Excel.Windows_typekey': Windows; - private constructor(); + interface Windows { _Default(Index: any): Window; readonly Application: Application; + Arrange(ArrangeStyle: XlArrangeStyle, ActiveWorkbook: true, SyncHorizontal?: boolean, SyncVertical?: boolean): any; - /** @param Excel.XlArrangeStyle [ArrangeStyle=1] */ - Arrange(ArrangeStyle?: XlArrangeStyle, ActiveWorkbook?: any, SyncHorizontal?: any, SyncVertical?: any): any; + /** @param ArrangeStyle [ArrangeStyle=1] */ + Arrange(ArrangeStyle?: XlArrangeStyle, ActiveWorkbook?: boolean, SyncHorizontal?: boolean, SyncVertical?: boolean): any; BreakSideBySide(): boolean; - CompareSideBySideWith(WindowName: any): boolean; + CompareSideBySideWith(WindowName: string): boolean; readonly Count: number; readonly Creator: XlCreator; - Item(Index: any): Window; + Item(Index: number | string): Window; readonly Parent: any; ResetPositionsSideBySide(): void; SyncScrollingSideBySide: boolean; + (Index: number | string): Window; } class Workbook { @@ -8407,16 +9102,14 @@ declare namespace Excel { _ProtectSharing(Filename?: any, Password?: any, WriteResPassword?: any, ReadOnlyRecommended?: any, CreateBackup?: any, SharingPassword?: any): void; readonly _ReadOnlyRecommended: boolean; - /** @param Excel.XlSaveAsAccessMode [AccessMode=1] */ - _SaveAs( - Filename: string, FileFormat?: XlFileFormat, Password?: string, WriteResPassword?: string, ReadOnlyRecommended?: boolean, CreateBackup?: boolean, AccessMode?: XlSaveAsAccessMode, - ConflictResolution?: XlSaveConflictResolution, AddToMru?: boolean, TextCodepage?: any, TextVisualLayout?: any): void; + /** @param AccessMode [AccessMode=1] */ + _SaveAs(Filename: string, FileFormat?: XlFileFormat, Password?: string, WriteResPassword?: string, ReadOnlyRecommended?: boolean, CreateBackup?: boolean, AccessMode?: XlSaveAsAccessMode, ConflictResolution?: XlSaveConflictResolution, AddToMru?: boolean, TextCodepage?: any, TextVisualLayout?: any): void; AcceptAllChanges(When?: any, Who?: any, Where?: any): void; AcceptLabelsInFormulas: boolean; AccuracyVersion: number; Activate(): void; readonly ActiveChart: Chart; - readonly ActiveSheet: any; + readonly ActiveSheet: Sheet; readonly ActiveSlicer: Slicer; AddToFavorites(): void; readonly Application: Application; @@ -8428,18 +9121,21 @@ declare namespace Excel { readonly BuiltinDocumentProperties: Office.DocumentProperties; readonly CalculationVersion: number; CanCheckIn(): boolean; - ChangeFileAccess(Mode: XlFileAccess, WritePassword?: any, Notify?: any): void; + ChangeFileAccess(Mode: XlFileAccess.xlReadWrite, WritePassword?: string, Notify?: boolean): void; + ChangeFileAccess(Mode: XlFileAccess): void; ChangeHistoryDuration: number; - /** @param Excel.XlLinkType [Type=1] */ + /** @param Type [Type=1] */ ChangeLink(Name: string, NewName: string, Type?: XlLinkType): void; - readonly Charts: Sheets; + readonly Charts: Sheets; CheckCompatibility: boolean; - CheckIn(SaveChanges?: any, Comments?: any, MakePublic?: any): void; - CheckInWithVersion(SaveChanges?: any, Comments?: any, MakePublic?: any, VersionType?: any): void; - Close(SaveChanges?: any, Filename?: any, RouteWorkbook?: any): void; + CheckIn(SaveChanges: true, Comments?: string, MakePublic?: boolean): void; + CheckIn(SaveChanges?: any): void; + CheckInWithVersion(SaveChanges?: boolean, Comments?: any, MakePublic?: any, VersionType?: any): void; + Close(SaveChanges: true, Filename?: string, RouteWorkbook?: boolean): void; + Close(SaveChanges?: boolean, Filename?: undefined, RouteWorkbook?: boolean): void; readonly CodeName: string; - Colors(Index?: any): any; + Colors: SafeArray & ((Index: number) => number); readonly CommandBars: Office.CommandBars; Comments: string; ConflictResolution: XlSaveConflictResolution; @@ -8457,7 +9153,7 @@ declare namespace Excel { DefaultSlicerStyle: any; DefaultTableStyle: any; DeleteNumberFormat(NumberFormat: string): void; - readonly DialogSheets: Sheets; + readonly DialogSheets: Sheets; DisplayDrawingObjects: XlDisplayDrawingObjects; DisplayInkComments: boolean; readonly DocumentInspectors: Office.DocumentInspectors; @@ -8476,12 +9172,10 @@ declare namespace Excel { readonly Excel4MacroSheets: Sheets; readonly Excel8CompatibilityMode: boolean; ExclusiveAccess(): boolean; - ExportAsFixedFormat( - Type: XlFixedFormatType, Filename?: any, Quality?: any, IncludeDocProperties?: any, IgnorePrintAreas?: any, From?: any, To?: any, OpenAfterPublish?: any, - FixedFormatExtClassPtr?: any): void; + ExportAsFixedFormat(Type: XlFixedFormatType, Filename?: string, Quality?: XlFixedFormatQuality, IncludeDocProperties?: boolean, IgnorePrintAreas?: boolean, From?: number, To?: number, OpenAfterPublish?: boolean, FixedFormatExtClassPtr?: any): void; readonly FileFormat: XlFileFormat; Final: boolean; - FollowHyperlink(Address: string, SubAddress?: any, NewWindow?: any, AddHistory?: any, ExtraInfo?: any, Method?: any, HeaderInfo?: any): void; + FollowHyperlink(Address: string, SubAddress?: string, NewWindow?: boolean, AddHistory?: undefined, ExtraInfo?: string | Office.ByteArray, Method?: Office.MsoExtraInfoMethod, HeaderInfo?: string): void; ForceFullCalculation: boolean; ForwardMailer(): void; readonly FullName: string; @@ -8493,7 +9187,7 @@ declare namespace Excel { HasRoutingSlip: boolean; readonly HasVBProject: boolean; HighlightChangesOnScreen: boolean; - HighlightChangesOptions(When?: any, Who?: any, Where?: any): void; + HighlightChangesOptions(When?: XlHighlightChangesTime, Who?: 'Everyone' | 'Everyone but me' | string, Where?: string): void; readonly HTMLProject: Office.HTMLProject; readonly IconSets: IconSets; InactiveListBorderVisible: boolean; @@ -8501,12 +9195,12 @@ declare namespace Excel { readonly IsInplace: boolean; KeepChangeHistory: boolean; Keywords: string; - LinkInfo(Name: string, LinkInfo: XlLinkInfo, Type?: any, EditionRef?: any): any; - LinkSources(Type?: any): any; + LinkInfo(Name: string, LinkInfo: XlLinkInfo, Type?: XlLinkInfoType, EditionRef?: string): any; + LinkSources(Type?: XlLink): SafeArray; ListChangesOnNewSheet: boolean; LockServerFile(): void; readonly Mailer: Mailer; - MergeWorkbook(Filename: any): void; + MergeWorkbook(Filename: string): void; readonly Modules: Sheets; readonly MultiUserEditing: boolean; readonly Name: string; @@ -8515,7 +9209,7 @@ declare namespace Excel { OnSave: string; OnSheetActivate: string; OnSheetDeactivate: string; - OpenLinks(Name: string, ReadOnly?: any, Type?: any): void; + OpenLinks(Name: string, ReadOnly?: boolean, Type?: XlLink): void; readonly Parent: any; Password: string; readonly PasswordEncryptionAlgorithm: string; @@ -8527,19 +9221,18 @@ declare namespace Excel { PersonalViewListSettings: boolean; PersonalViewPrintSettings: boolean; PivotCaches(): PivotCaches; - PivotTableWizard( - SourceType?: any, SourceData?: any, TableDestination?: any, TableName?: any, RowGrand?: any, ColumnGrand?: any, SaveData?: any, HasAutoFormat?: any, - AutoPage?: any, Reserved?: any, BackgroundQuery?: any, OptimizeCache?: any, PageFieldOrder?: any, PageFieldWrapCount?: any, ReadData?: any, Connection?: any): void; - Post(DestName?: any): void; + PivotTableWizard(): void; + PivotTableWizard(SourceType: TSourceType, SourceData: PivotTableWizardSourceData, TableDestination?: Range, TableName?: string, RowGrand?: boolean, ColumnGrand?: boolean, SaveData?: boolean, HasAutoFormat?: boolean, AutoPage?: PivotTableWizardAutoPage, Reserved?: undefined, BackgroundQuery?: boolean, OptimizeCache?: boolean, PageFieldOrder?: XlOrder, PageFieldWrapCount?: number, ReadData?: boolean, Connection?: string): void; + Post(): void; PrecisionAsDisplayed: boolean; - PrintOut(From?: any, To?: any, Copies?: any, Preview?: any, ActivePrinter?: any, PrintToFile?: any, Collate?: any, PrToFileName?: any, IgnorePrintAreas?: any): void; - PrintPreview(EnableChanges?: any): void; - Protect(Password?: any, Structure?: any, Windows?: any): void; - ProtectSharing(Filename?: any, Password?: any, WriteResPassword?: any, ReadOnlyRecommended?: any, CreateBackup?: any, SharingPassword?: any, FileFormat?: any): void; + PrintOut(From?: number, To?: number, Copies?: number, Preview?: boolean, ActivePrinter?: string, PrintToFile?: T, Collate?: boolean, PrToFileName?: PrintToFileName, IgnorePrintAreas?: boolean): void; + PrintPreview(EnableChanges?: boolean): void; + Protect(Password?: string, Structure?: boolean, Windows?: boolean): void; + ProtectSharing(Filename?: string, Password?: string, WriteResPassword?: string, ReadOnlyRecommended?: boolean, CreateBackup?: boolean, SharingPassword?: string, FileFormat?: any): void; readonly ProtectStructure: boolean; readonly ProtectWindows: boolean; readonly PublishObjects: PublishObjects; - PurgeChangeHistoryNow(Days: number, SharingPassword?: any): void; + PurgeChangeHistoryNow(Days: number, SharingPassword?: string): void; readonly ReadOnly: boolean; ReadOnlyRecommended: boolean; RecheckSmartTags(): void; @@ -8551,7 +9244,7 @@ declare namespace Excel { RemoveUser(Index: number): void; Reply(): void; ReplyAll(): void; - ReplyWithChanges(ShowMessage?: any): void; + ReplyWithChanges(ShowMessage?: boolean): void; readonly Research: Research; ResetColors(): void; readonly RevisionNumber: number; @@ -8561,25 +9254,27 @@ declare namespace Excel { RunAutoMacros(Which: XlRunAutoMacro): void; Save(): void; - /** @param Excel.XlSaveAsAccessMode [AccessMode=1] */ - SaveAs( - Filename: string, FileFormat?: XlFileFormat, Password?: string, WriteResPassword?: string, ReadOnlyRecommended?: boolean, CreateBackup?: boolean, AccessMode?: XlSaveAsAccessMode, - ConflictResolution?: XlSaveConflictResolution, AddToMru?: boolean, TextCodepage?: any, TextVisualLayout?: any): void; + /** @param AccessMode [AccessMode=1] */ + SaveAs(Filename: string, FileFormat?: XlFileFormat, Password?: string, WriteResPassword?: string, ReadOnlyRecommended?: boolean, CreateBackup?: boolean, AccessMode?: XlSaveAsAccessMode, ConflictResolution?: XlSaveConflictResolution, AddToMru?: boolean, TextCodepage?: any, TextVisualLayout?: any): void; SaveAsXMLData(Filename: string, Map: XmlMap): void; - SaveCopyAs(Filename?: any): void; + SaveCopyAs(Filename: string): void; Saved: boolean; SaveLinkValues: boolean; sblt(s: string): void; - SendFaxOverInternet(Recipients?: any, Subject?: any, ShowMessage?: any): void; - SendForReview(Recipients?: any, Subject?: any, ShowMessage?: any, IncludeAttachment?: any): void; - SendMail(Recipients: any, Subject?: any, ReturnReceipt?: any): void; + SendFaxOverInternet(Recipients?: string, Subject?: string, ShowMessage?: boolean): void; + SendForReview(Recipients?: string, Subject?: string, ShowMessage?: boolean, IncludeAttachment?: boolean): void; + SendMail(Recipients: string | SafeArray, Subject?: string, ReturnReceipt?: boolean): void; - /** @param Excel.XlPriority [Priority=-4143] */ + /** + * Macintosh only + * + * @param Priority [Priority=-4143] + */ SendMailer(FileFormat: any, Priority?: XlPriority): void; readonly ServerPolicy: Office.ServerPolicy; readonly ServerViewableItems: ServerViewableItems; - SetLinkOnData(Name: string, Procedure?: any): void; - SetPasswordEncryptionOptions(PasswordEncryptionProvider?: any, PasswordEncryptionAlgorithm?: any, PasswordEncryptionKeyLength?: any, PasswordEncryptionFileProperties?: any): void; + SetLinkOnData(Name: string, Procedure?: string): void; + SetPasswordEncryptionOptions(PasswordEncryptionProvider?: string, PasswordEncryptionAlgorithm?: string, PasswordEncryptionKeyLength?: number, PasswordEncryptionFileProperties?: boolean): void; readonly SharedWorkspace: Office.SharedWorkspace; readonly Sheets: Sheets; ShowConflictHistory: boolean; @@ -8597,25 +9292,25 @@ declare namespace Excel { readonly Theme: Office.OfficeTheme; Title: string; ToggleFormsDesign(): void; - Unprotect(Password?: any): void; - UnprotectSharing(SharingPassword?: any): void; + Unprotect(Password?: string): void; + UnprotectSharing(SharingPassword?: string): void; UpdateFromFile(): void; - UpdateLink(Name?: any, Type?: any): void; + UpdateLink(Name?: string, Type?: XlLinkType): void; UpdateLinks: XlUpdateLinks; UpdateRemoteReferences: boolean; UserControl: boolean; - readonly UserStatus: any; + readonly UserStatus: SafeArray; readonly VBASigned: boolean; readonly VBProject: VBIDE.VBProject; readonly WebOptions: WebOptions; WebPagePreview(): void; readonly Windows: Windows; - readonly Worksheets: Sheets; + readonly Worksheets: Sheets; WritePassword: string; readonly WriteReserved: boolean; readonly WriteReservedBy: string; - XmlImport(Url: string, ImportMap: XmlMap, Overwrite?: any, Destination?: any): XlXmlImportResult; - XmlImportXml(Data: string, ImportMap: XmlMap, Overwrite?: any, Destination?: any): XlXmlImportResult; + XmlImport(Url: string, ImportMap: XmlMap, Overwrite?: boolean, Destination?: any): XlXmlImportResult; + XmlImportXml(Data: string, ImportMap: XmlMap, Overwrite?: boolean, Destination?: any): XlXmlImportResult; readonly XmlMaps: XmlMaps; readonly XmlNamespaces: XmlNamespaces; } @@ -8637,25 +9332,16 @@ declare namespace Excel { readonly Type: XlConnectionType; } - class Workbooks { - private 'Excel.Workbooks_typekey': Workbooks; - private constructor(); - - /** @param Excel.XlTextQualifier [TextQualifier=1] */ - __OpenText( - Filename: string, Origin: any, StartRow: any, DataType: any, TextQualifier?: XlTextQualifier, ConsecutiveDelimiter?: any, Tab?: any, Semicolon?: any, - Comma?: any, Space?: any, Other?: any, OtherChar?: any, FieldInfo?: any, TextVisualLayout?: any): void; + interface Workbooks { + /** @param TextQualifier [TextQualifier=1] */ + __OpenText(Filename: string, Origin: any, StartRow: any, DataType: any, TextQualifier?: XlTextQualifier, ConsecutiveDelimiter?: any, Tab?: any, Semicolon?: any, Comma?: any, Space?: any, Other?: any, OtherChar?: any, FieldInfo?: any, TextVisualLayout?: any): void; _Default(Index: any): Workbook; - _Open( - Filename: string, UpdateLinks?: any, ReadOnly?: any, Format?: any, Password?: any, WriteResPassword?: any, IgnoreReadOnlyRecommended?: any, Origin?: any, - Delimiter?: any, Editable?: any, Notify?: any, Converter?: any, AddToMru?: any): Workbook; + _Open(Filename: string, UpdateLinks?: any, ReadOnly?: any, Format?: any, Password?: any, WriteResPassword?: any, IgnoreReadOnlyRecommended?: any, Origin?: any, Delimiter?: any, Editable?: any, Notify?: any, Converter?: any, AddToMru?: any): Workbook; - /** @param Excel.XlTextQualifier [TextQualifier=1] */ - _OpenText( - Filename: string, Origin: any, StartRow: any, DataType: any, TextQualifier?: XlTextQualifier, ConsecutiveDelimiter?: any, Tab?: any, Semicolon?: any, - Comma?: any, Space?: any, Other?: any, OtherChar?: any, FieldInfo?: any, TextVisualLayout?: any, DecimalSeparator?: any, ThousandsSeparator?: any): void; + /** @param TextQualifier [TextQualifier=1] */ + _OpenText(Filename: string, Origin: any, StartRow: any, DataType: any, TextQualifier?: XlTextQualifier, ConsecutiveDelimiter?: any, Tab?: any, Semicolon?: any, Comma?: any, Space?: any, Other?: any, OtherChar?: any, FieldInfo?: any, TextVisualLayout?: any, DecimalSeparator?: any, ThousandsSeparator?: any): void; _OpenXML(Filename: string, Stylesheets?: any): Workbook; - Add(Template?: any): Workbook; + Add(Template?: string | XlWBATemplate): Workbook; readonly Application: Application; CanCheckOut(Filename: string): boolean; CheckOut(Filename: string): void; @@ -8663,18 +9349,21 @@ declare namespace Excel { readonly Count: number; readonly Creator: XlCreator; Item(Index: number | string): Workbook; - Open( - Filename: string, UpdateLinks?: any, ReadOnly?: any, Format?: any, Password?: any, WriteResPassword?: any, IgnoreReadOnlyRecommended?: any, Origin?: any, - Delimiter?: any, Editable?: any, Notify?: any, Converter?: any, AddToMru?: any, Local?: any, CorruptLoad?: any): Workbook; - OpenDatabase(Filename: string, CommandText?: any, CommandType?: any, BackgroundQuery?: any, ImportDataAs?: any): Workbook; + Open(Filename: string, UpdateLinks?: 0 | 3, ReadOnly?: boolean, Format?: 1 | 2 | 3 | 4 | 5, Password?: string, WriteResPassword?: string, IgnoreReadOnlyRecommended?: boolean, Origin?: XlPlatform, Delimiter?: undefined, Editable?: boolean, Notify?: boolean, Converter?: number, AddToMru?: boolean, Local?: boolean, CorruptLoad?: XlCorruptLoad): Workbook; + Open(Filename: string, UpdateLinks?: 0 | 3, ReadOnly?: boolean, Format?: 6, Password?: string, WriteResPassword?: string, IgnoreReadOnlyRecommended?: boolean, Origin?: XlPlatform, Delimiter?: string, Editable?: boolean, Notify?: boolean, Converter?: number, AddToMru?: boolean, Local?: boolean, CorruptLoad?: XlCorruptLoad): Workbook; + OpenDatabase(Filename: string, CommandText?: string, CommandType?: XlCmdType, BackgroundQuery?: boolean, ImportDataAs?: XlImportDataAs): Workbook; - /** @param Excel.XlTextQualifier [TextQualifier=1] */ - OpenText( - Filename: string, Origin: any, StartRow: any, DataType: any, TextQualifier?: XlTextQualifier, ConsecutiveDelimiter?: any, Tab?: any, Semicolon?: any, - Comma?: any, Space?: any, Other?: any, OtherChar?: any, FieldInfo?: any, TextVisualLayout?: any, DecimalSeparator?: any, ThousandsSeparator?: any, - TrailingMinusNumbers?: any, Local?: any): void; - OpenXML(Filename: string, Stylesheets?: any, LoadOption?: any): Workbook; + /** @param TextQualifier [TextQualifier=1] */ + OpenText(Filename: string, Origin: XlPlatform, StartRow: number, DataType: XlTextParsingType.xlDelimited, TextQualifier?: XlTextQualifier, ConsecutiveDelimiter?: boolean, Tab?: boolean, Semicolon?: boolean, Comma?: boolean, Space?: boolean, Other?: true, OtherChar?: string, FieldInfo?: SafeArray, TextVisualLayout?: any, DecimalSeparator?: string, ThousandsSeparator?: string, TrailingMinusNumbers?: boolean, Local?: boolean): void; + + /** @param TextQualifier [TextQualifier=1] */ + OpenText(Filename: string, Origin: XlPlatform, StartRow: number, DataType: XlTextParsingType.xlDelimited, TextQualifier?: XlTextQualifier, ConsecutiveDelimiter?: boolean, Tab?: boolean, Semicolon?: boolean, Comma?: boolean, Space?: boolean, Other?: boolean, OtherChar?: undefined, FieldInfo?: SafeArray, TextVisualLayout?: any, DecimalSeparator?: string, ThousandsSeparator?: string, TrailingMinusNumbers?: boolean, Local?: boolean): void; + + /** @param TextQualifier [TextQualifier=1] */ + OpenText(Filename: string, Origin: XlPlatform, StartRow: number, DataType: XlTextParsingType, TextQualifier?: XlTextQualifier, ConsecutiveDelimiter?: undefined, Tab?: undefined, Semicolon?: undefined, Comma?: undefined, Space?: undefined, Other?: undefined, OtherChar?: undefined, FieldInfo?: SafeArray, TextVisualLayout?: any, DecimalSeparator?: string, ThousandsSeparator?: string, TrailingMinusNumbers?: boolean, Local?: boolean): void; + OpenXML(Filename: string, Stylesheets?: string | SafeArray, LoadOption?: XlXmlLoadOption): Workbook; readonly Parent: any; + (Index: number | string): Workbook; } class Worksheet { @@ -8688,9 +9377,7 @@ declare namespace Excel { _PasteSpecial(Format?: any, Link?: any, DisplayAsIcon?: any, IconFileName?: any, IconIndex?: any, IconLabel?: any): void; _PrintOut(From?: any, To?: any, Copies?: any, Preview?: any, ActivePrinter?: any, PrintToFile?: any, Collate?: any, PrToFileName?: any): void; _Protect(Password?: any, DrawingObjects?: any, Contents?: any, Scenarios?: any, UserInterfaceOnly?: any): void; - _SaveAs( - Filename: string, FileFormat?: any, Password?: any, WriteResPassword?: any, ReadOnlyRecommended?: any, CreateBackup?: any, AddToMru?: any, TextCodepage?: any, - TextVisualLayout?: any): void; + _SaveAs(Filename: string, FileFormat?: any, Password?: any, WriteResPassword?: any, ReadOnlyRecommended?: any, CreateBackup?: any, AddToMru?: any, TextCodepage?: any, TextVisualLayout?: any): void; Activate(): void; readonly Application: Application; Arcs(Index?: any): any; @@ -8699,9 +9386,10 @@ declare namespace Excel { Buttons(Index?: any): any; Calculate(): void; readonly Cells: Range; - ChartObjects(Index?: any): any; + ChartObjects(Index?: SafeArray): ChartObjects; + ChartObjects(Index: string | number): ChartObject; CheckBoxes(Index?: any): any; - CheckSpelling(CustomDictionary?: any, IgnoreUppercase?: any, AlwaysSuggest?: any, SpellLang?: any): void; + CheckSpelling(CustomDictionary?: string, IgnoreUppercase?: boolean, AlwaysSuggest?: boolean, SpellLang?: Office.MsoLanguageID): void; CircleInvalid(): void; readonly CircularReference: Range; ClearArrows(): void; @@ -8710,9 +9398,10 @@ declare namespace Excel { readonly Columns: Range; readonly Comments: Comments; readonly ConsolidationFunction: XlConsolidationFunction; - readonly ConsolidationOptions: any; - readonly ConsolidationSources: any; - Copy(Before?: any, After?: any): void; + readonly ConsolidationOptions: SafeArray; + readonly ConsolidationSources: SafeArray | undefined; + Copy(Before?: Sheet): void; + Copy(Before: undefined, After: Sheet): void; readonly Creator: XlCreator; readonly CustomProperties: CustomProperties; Delete(): void; @@ -8728,10 +9417,8 @@ declare namespace Excel { EnableOutlining: boolean; EnablePivotTable: boolean; EnableSelection: XlEnableSelection; - Evaluate(Name: any): any; - ExportAsFixedFormat( - Type: XlFixedFormatType, Filename?: any, Quality?: any, IncludeDocProperties?: any, IgnorePrintAreas?: any, From?: any, To?: any, OpenAfterPublish?: any, - FixedFormatExtClassPtr?: any): void; + Evaluate(Name: string): any; + ExportAsFixedFormat(Type: XlFixedFormatType, Filename?: string, Quality?: XlFixedFormatQuality, IncludeDocProperties?: boolean, IgnorePrintAreas?: boolean, From?: number, To?: number, OpenAfterPublish?: boolean, FixedFormatExtClassPtr?: any): void; readonly FilterMode: boolean; GroupBoxes(Index?: any): any; GroupObjects(Index?: any): any; @@ -8743,11 +9430,12 @@ declare namespace Excel { ListBoxes(Index?: any): any; readonly ListObjects: ListObjects; readonly MailEnvelope: Office.MsoEnvelope; - Move(Before?: any, After?: any): void; + Move(Before?: Sheet, After?: Sheet): void; Name: string; readonly Names: Names; - readonly Next: any; - OLEObjects(Index?: any): any; + readonly Next: Worksheet; + OLEObjects(Index: number | string): OLEObject; + OLEObjects(): OLEObjects; OnCalculate: string; OnData: string; OnDoubleClick: string; @@ -8759,21 +9447,18 @@ declare namespace Excel { Ovals(Index?: any): any; readonly PageSetup: PageSetup; readonly Parent: any; - Paste(Destination?: any, Link?: any): void; - PasteSpecial(Format?: any, Link?: any, DisplayAsIcon?: any, IconFileName?: any, IconIndex?: any, IconLabel?: any, NoHTMLFormatting?: any): void; + Paste(Destination?: Range, Link?: boolean): void; + PasteSpecial(Format: string | undefined, Link: boolean | undefined, DisplayAsIcon: true, IconFileName?: string, IconIndex?: number, IconLabel?: string, NoHTMLFormatting?: boolean): void; + PasteSpecial(Format?: string, Link?: boolean, DisplayAsIcon?: boolean, IconFileName?: undefined, IconIndex?: undefined, IconLabel?: undefined, NoHTMLFormatting?: boolean): void; Pictures(Index?: any): any; PivotTables(Index?: any): any; - PivotTableWizard( - SourceType?: any, SourceData?: any, TableDestination?: any, TableName?: any, RowGrand?: any, ColumnGrand?: any, SaveData?: any, HasAutoFormat?: any, - AutoPage?: any, Reserved?: any, BackgroundQuery?: any, OptimizeCache?: any, PageFieldOrder?: any, PageFieldWrapCount?: any, ReadData?: any, Connection?: any): PivotTable; - readonly Previous: any; + PivotTableWizard(): void; + PivotTableWizard(SourceType: TSourceType, SourceData: PivotTableWizardSourceData, TableDestination?: Range, TableName?: string, RowGrand?: boolean, ColumnGrand?: boolean, SaveData?: boolean, HasAutoFormat?: boolean, AutoPage?: PivotTableWizardAutoPage, Reserved?: undefined, BackgroundQuery?: boolean, OptimizeCache?: boolean, PageFieldOrder?: XlOrder, PageFieldWrapCount?: number, ReadData?: boolean, Connection?: string): void; + readonly Previous: Worksheet; readonly PrintedCommentPages: number; - PrintOut(From?: any, To?: any, Copies?: any, Preview?: any, ActivePrinter?: any, PrintToFile?: any, Collate?: any, PrToFileName?: any, IgnorePrintAreas?: any): void; - PrintPreview(EnableChanges?: any): void; - Protect( - Password?: any, DrawingObjects?: any, Contents?: any, Scenarios?: any, UserInterfaceOnly?: any, AllowFormattingCells?: any, AllowFormattingColumns?: any, - AllowFormattingRows?: any, AllowInsertingColumns?: any, AllowInsertingRows?: any, AllowInsertingHyperlinks?: any, AllowDeletingColumns?: any, - AllowDeletingRows?: any, AllowSorting?: any, AllowFiltering?: any, AllowUsingPivotTables?: any): void; + PrintOut(From?: number, To?: number, Copies?: number, Preview?: boolean, ActivePrinter?: string, PrintToFile?: T, Collate?: boolean, PrToFileName?: PrintToFileName, IgnorePrintAreas?: boolean): void; + PrintPreview(EnableChanges?: boolean): void; + Protect(Password?: string, DrawingObjects?: boolean, Contents?: boolean, Scenarios?: boolean, UserInterfaceOnly?: boolean, AllowFormattingCells?: boolean, AllowFormattingColumns?: boolean, AllowFormattingRows?: boolean, AllowInsertingColumns?: boolean, AllowInsertingRows?: boolean, AllowInsertingHyperlinks?: boolean, AllowDeletingColumns?: boolean, AllowDeletingRows?: boolean, AllowSorting?: boolean, AllowFiltering?: boolean, AllowUsingPivotTables?: boolean): void; readonly ProtectContents: boolean; readonly ProtectDrawingObjects: boolean; readonly Protection: Protection; @@ -8784,14 +9469,13 @@ declare namespace Excel { Rectangles(Index?: any): any; ResetAllPageBreaks(): void; readonly Rows: Range; - SaveAs( - Filename: string, FileFormat?: any, Password?: any, WriteResPassword?: any, ReadOnlyRecommended?: any, CreateBackup?: any, AddToMru?: any, TextCodepage?: any, - TextVisualLayout?: any, Local?: any): void; - Scenarios(Index?: any): any; + SaveAs(Filename: string, FileFormat?: XlFileFormat, Password?: string, WriteResPassword?: string, ReadOnlyRecommended?: boolean, CreateBackup?: boolean, AddToMru?: boolean, TextCodepage?: any, TextVisualLayout?: any, Local?: boolean): void; + Scenarios(Index: number | string): Scenario; + Scenarios(Index?: SafeArray): Scenarios; readonly Scripts: Office.Scripts; ScrollArea: string; ScrollBars(Index?: any): any; - Select(Replace?: any): void; + Select(Replace?: boolean): void; SetBackgroundPicture(Filename: string): void; readonly Shapes: Shapes; ShowAllData(): void; @@ -8806,54 +9490,36 @@ declare namespace Excel { TransitionExpEval: boolean; TransitionFormEntry: boolean; readonly Type: XlSheetType; - Unprotect(Password?: any): void; + Unprotect(Password?: string): void; readonly UsedRange: Range; Visible: XlSheetVisibility; readonly VPageBreaks: VPageBreaks; - XmlDataQuery(XPath: string, SelectionNamespaces?: any, Map?: any): Range; - XmlMapQuery(XPath: string, SelectionNamespaces?: any, Map?: any): Range; + XmlDataQuery(XPath: string, SelectionNamespaces?: string, Map?: XmlMap): Range | null; + XmlMapQuery(XPath: string, SelectionNamespaces?: string, Map?: XmlMap): Range; } class WorksheetFunction { private 'Excel.WorksheetFunction_typekey': WorksheetFunction; private constructor(); - _WSFunction( - 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; + _WSFunction(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; AccrInt(Arg1: any, Arg2: any, Arg3: any, Arg4: any, Arg5: any, Arg6: any, Arg7?: any): number; AccrIntM(Arg1: any, Arg2: any, Arg3: any, Arg4: any, Arg5?: any): number; Acos(Arg1: number): number; Acosh(Arg1: number): number; - Aggregate( - Arg1: number, Arg2: number, Arg3: Range, 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): number; + Aggregate(Arg1: number, Arg2: number, Arg3: Range, 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): number; AmorDegrc(Arg1: any, Arg2: any, Arg3: any, Arg4: any, Arg5: any, Arg6: any, Arg7?: any): number; AmorLinc(Arg1: any, Arg2: any, Arg3: any, Arg4: any, Arg5: any, Arg6: any, Arg7?: any): number; - And( - 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): boolean; + And(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): boolean; readonly Application: Application; Asc(Arg1: string): string; Asin(Arg1: number): number; Asinh(Arg1: number): number; Atan2(Arg1: number, Arg2: number): number; Atanh(Arg1: number): number; - AveDev( - 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): number; - Average( - 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): number; + AveDev(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): number; + Average(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): number; AverageIf(Arg1: Range, Arg2: any, Arg3?: any): number; - AverageIfs( - Arg1: Range, Arg2: Range, 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): number; + AverageIfs(Arg1: Range, Arg2: Range, 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): number; BahtText(Arg1: number): string; BesselI(Arg1: any, Arg2: any): number; BesselJ(Arg1: any, Arg2: any): number; @@ -8879,10 +9545,7 @@ declare namespace Excel { ChiSq_Inv_RT(Arg1: number, Arg2: number): number; ChiSq_Test(Arg1: any, Arg2: any): number; ChiTest(Arg1: any, Arg2: any): number; - Choose( - 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; + Choose(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; Clean(Arg1: string): string; Combin(Arg1: number, Arg2: number): number; Complex(Arg1: any, Arg2: any, Arg3?: any): string; @@ -8892,20 +9555,11 @@ declare namespace Excel { Convert(Arg1: any, Arg2: any, Arg3: any): number; Correl(Arg1: any, Arg2: any): number; Cosh(Arg1: number): number; - Count( - 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): number; - CountA( - 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): number; + Count(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): number; + CountA(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): number; CountBlank(Arg1: Range): number; CountIf(Arg1: Range, Arg2: string | number): number; - CountIfs( - Arg1: Range, 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): number; + CountIfs(Arg1: Range, 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): number; CoupDayBs(Arg1: any, Arg2: any, Arg3: any, Arg4?: any): number; CoupDays(Arg1: any, Arg2: any, Arg3: any, Arg4?: any): number; CoupDaysNc(Arg1: any, Arg2: any, Arg3: any, Arg4?: any): number; @@ -8931,10 +9585,7 @@ declare namespace Excel { Dec2Oct(Arg1: any, Arg2?: any): string; Degrees(Arg1: number): number; Delta(Arg1: any, Arg2?: any): number; - DevSq( - 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): number; + DevSq(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): number; DGet(Arg1: Range, Arg2: any, Arg3: any): any; Disc(Arg1: any, Arg2: any, Arg3: any, Arg4: any, Arg5?: any): number; DMax(Arg1: Range, Arg2: any, Arg3: any): number; @@ -8946,10 +9597,7 @@ declare namespace Excel { DStDev(Arg1: Range, Arg2: any, Arg3: any): number; DStDevP(Arg1: Range, Arg2: any, Arg3: any): number; DSum(Arg1: Range, Arg2: any, Arg3: any): number; - Dummy19( - 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; + Dummy19(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; Dummy21(Arg1: number, Arg2: number): number; Duration(Arg1: any, Arg2: any, Arg3: any, Arg4: any, Arg5: any, Arg6?: any): number; DVar(Arg1: Range, Arg2: any, Arg3: any): number; @@ -8991,20 +9639,11 @@ declare namespace Excel { GammaInv(Arg1: number, Arg2: number, Arg3: number): number; GammaLn(Arg1: number): number; GammaLn_Precise(Arg1: number): number; - Gcd( - 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): number; - GeoMean( - 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): number; + Gcd(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): number; + GeoMean(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): number; GeStep(Arg1: any, Arg2?: any): number; Growth(Arg1: any, Arg2?: any, Arg3?: any, Arg4?: any): any; - HarMean( - 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): number; + HarMean(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): number; Hex2Bin(Arg1: any, Arg2?: any): string; Hex2Dec(Arg1: any): string; Hex2Oct(Arg1: any, Arg2?: any): string; @@ -9023,18 +9662,12 @@ declare namespace Excel { ImLog10(Arg1: any): string; ImLog2(Arg1: any): string; ImPower(Arg1: any, Arg2: any): string; - ImProduct( - 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): string; + ImProduct(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): string; ImReal(Arg1: any): number; ImSin(Arg1: any): string; ImSqrt(Arg1: any): string; ImSub(Arg1: any, Arg2: any): string; - ImSum( - 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): string; + ImSum(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): string; Index(Arg1: any, Arg2: number, Arg3?: any, Arg4?: any): any; Intercept(Arg1: any, Arg2: any): number; IntRate(Arg1: any, Arg2: any, Arg3: any, Arg4: any, Arg5?: any): number; @@ -9052,15 +9685,9 @@ declare namespace Excel { Ispmt(Arg1: number, Arg2: number, Arg3: number, Arg4: number): number; IsText(Arg1: any): boolean; IsThaiDigit(Arg1: string): boolean; - Kurt( - 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): number; + Kurt(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): number; Large(Arg1: any, Arg2: number): number; - Lcm( - 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): number; + Lcm(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): number; LinEst(Arg1: any, Arg2?: any, Arg3?: any, Arg4?: any): any; Ln(Arg1: number): number; Log(Arg1: number, Arg2?: any): number; @@ -9072,40 +9699,19 @@ declare namespace Excel { LogNormDist(Arg1: number, Arg2: number, Arg3: number): number; Lookup(Arg1: any, Arg2: any, Arg3?: any): any; Match(Arg1: any, Arg2: any, Arg3?: any): number; - Max( - 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): number; + Max(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): number; MDeterm(Arg1: any): number; MDuration(Arg1: any, Arg2: any, Arg3: any, Arg4: any, Arg5: any, Arg6?: any): number; - Median( - 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): number; - Min( - 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): number; + Median(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): number; + Min(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): number; MInverse(Arg1: any): any; MIrr(Arg1: any, Arg2: number, Arg3: number): number; MMult(Arg1: any, Arg2: any): any; - Mode( - 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): number; - Mode_Mult( - 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; - Mode_Sngl( - 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): number; + Mode(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): number; + Mode_Mult(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; + Mode_Sngl(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): number; MRound(Arg1: any, Arg2: any): number; - MultiNomial( - 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): number; + MultiNomial(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): number; NegBinom_Dist(Arg1: number, Arg2: number, Arg3: number, Arg4: boolean): number; NegBinomDist(Arg1: number, Arg2: number, Arg3: number): number; NetworkDays(Arg1: any, Arg2: any, Arg3?: any): number; @@ -9120,10 +9726,7 @@ declare namespace Excel { NormSDist(Arg1: number): number; NormSInv(Arg1: number): number; NPer(Arg1: number, Arg2: number, Arg3: number, Arg4?: any, Arg5?: any): number; - Npv( - Arg1: number, 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): number; + Npv(Arg1: number, 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): number; Oct2Bin(Arg1: any, Arg2?: any): string; Oct2Dec(Arg1: any): string; Oct2Hex(Arg1: any, Arg2?: any): string; @@ -9132,10 +9735,7 @@ declare namespace Excel { OddFYield(Arg1: any, Arg2: any, Arg3: any, Arg4: any, Arg5: any, Arg6: any, Arg7: any, Arg8: any, Arg9?: any): number; OddLPrice(Arg1: any, Arg2: any, Arg3: any, Arg4: any, Arg5: any, Arg6: any, Arg7: any, Arg8?: any): number; OddLYield(Arg1: any, Arg2: any, Arg3: any, Arg4: any, Arg5: any, Arg6: any, Arg7: any, Arg8?: any): number; - Or( - 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): boolean; + Or(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): boolean; readonly Parent: any; Pearson(Arg1: any, Arg2: any): number; Percentile(Arg1: any, Arg2: number): number; @@ -9156,10 +9756,7 @@ declare namespace Excel { PriceDisc(Arg1: any, Arg2: any, Arg3: any, Arg4: any, Arg5?: any): number; PriceMat(Arg1: any, Arg2: any, Arg3: any, Arg4: any, Arg5: any, Arg6?: any): number; Prob(Arg1: any, Arg2: any, Arg3: number, Arg4?: any): number; - Product( - 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): number; + Product(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): number; Proper(Arg1: string): string; Pv(Arg1: number, Arg2: number, Arg3: number, Arg4?: any, Arg5?: any): number; Quartile(Arg1: any, Arg2: number): number; @@ -9183,62 +9780,29 @@ declare namespace Excel { RoundDown(Arg1: number, Arg2: number): number; RoundUp(Arg1: number, Arg2: number): number; RSq(Arg1: any, Arg2: any): number; - RTD( - progID: any, server: any, topic1: any, topic2?: any, topic3?: any, topic4?: any, topic5?: any, topic6?: any, topic7?: any, topic8?: any, topic9?: any, - topic10?: any, topic11?: any, topic12?: any, topic13?: any, topic14?: any, topic15?: any, topic16?: any, topic17?: any, topic18?: any, topic19?: any, - topic20?: any, topic21?: any, topic22?: any, topic23?: any, topic24?: any, topic25?: any, topic26?: any, topic27?: any, topic28?: any): any; + RTD(progID: any, server: any, topic1: any, topic2?: any, topic3?: any, topic4?: any, topic5?: any, topic6?: any, topic7?: any, topic8?: any, topic9?: any, topic10?: any, topic11?: any, topic12?: any, topic13?: any, topic14?: any, topic15?: any, topic16?: any, topic17?: any, topic18?: any, topic19?: any, topic20?: any, topic21?: any, topic22?: any, topic23?: any, topic24?: any, topic25?: any, topic26?: any, topic27?: any, topic28?: any): any; Search(Arg1: string, Arg2: string, Arg3?: any): number; SearchB(Arg1: string, Arg2: string, Arg3?: any): number; SeriesSum(Arg1: any, Arg2: any, Arg3: any, Arg4: any): number; Sinh(Arg1: number): number; - Skew( - 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): number; + Skew(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): number; Sln(Arg1: number, Arg2: number, Arg3: number): number; Slope(Arg1: any, Arg2: any): number; Small(Arg1: any, Arg2: number): number; SqrtPi(Arg1: any): number; Standardize(Arg1: number, Arg2: number, Arg3: number): number; - StDev( - 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): number; - StDev_P( - 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): number; - StDev_S( - 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): number; - StDevP( - 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): number; + StDev(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): number; + StDev_P(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): number; + StDev_S(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): number; + StDevP(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): number; StEyx(Arg1: any, Arg2: any): number; Substitute(Arg1: string, Arg2: string, Arg3: string, Arg4?: any): string; - Subtotal( - Arg1: number, Arg2: Range, 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): number; - Sum( - 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): number; + Subtotal(Arg1: number, Arg2: Range, 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): number; + Sum(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): number; SumIf(Arg1: Range, Arg2: any, Arg3?: any): number; - SumIfs( - Arg1: Range, Arg2: Range, 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): number; - SumProduct( - 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): number; - SumSq( - 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): number; + SumIfs(Arg1: Range, Arg2: Range, 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): number; + SumProduct(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): number; + SumSq(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): number; SumX2MY2(Arg1: any, Arg2: any): number; SumX2PY2(Arg1: any, Arg2: any): number; SumXMY2(Arg1: any, Arg2: any): number; @@ -9269,22 +9833,10 @@ declare namespace Excel { TrimMean(Arg1: any, Arg2: number): number; TTest(Arg1: any, Arg2: any, Arg3: number, Arg4: number): number; USDollar(Arg1: number, Arg2: number): string; - Var( - 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): number; - Var_P( - 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): number; - Var_S( - 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): number; - VarP( - 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): number; + Var(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): number; + Var_P(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): number; + Var_S(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): number; + VarP(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): number; Vdb(Arg1: number, Arg2: number, Arg3: number, Arg4: number, Arg5: number, Arg6?: any, Arg7?: any): number; VLookup(Arg1: any, Arg2: any, Arg3: any, Arg4?: any): any; Weekday(Arg1: any, Arg2?: any): number; @@ -9302,6 +9854,20 @@ declare namespace Excel { ZTest(Arg1: any, Arg2: number, Arg3?: any): number; } + class WorksheetView { + private 'Excel.WorksheetView_typekey': WorksheetView; + private constructor(); + readonly Application: Application; + readonly Creator: XlCreator; + DisplayFormulas: boolean; + DisplayGridlines: boolean; + DisplayHeadings: boolean; + DisplayOutline: boolean; + DisplayZeros: boolean; + readonly Parent: any; + readonly Sheet: Worksheet; + } + class XmlDataBinding { private 'Excel.XmlDataBinding_typekey': XmlDataBinding; private constructor(); @@ -9325,10 +9891,10 @@ declare namespace Excel { readonly Creator: XlCreator; readonly DataBinding: XmlDataBinding; Delete(): void; - Export(Url: string, Overwrite?: any): XlXmlExportResult; + Export(Url: string, Overwrite?: boolean): XlXmlExportResult; ExportXml(Data: string): XlXmlExportResult; - Import(Url: string, Overwrite?: any): XlXmlImportResult; - ImportXml(XmlData: string, Overwrite?: any): XlXmlImportResult; + Import(Url: string, Overwrite?: boolean): XlXmlImportResult; + ImportXml(XmlData: string, Overwrite?: boolean): XlXmlImportResult; readonly IsExportable: boolean; Name: string; readonly Parent: any; @@ -9342,16 +9908,15 @@ declare namespace Excel { readonly WorkbookConnection: WorkbookConnection; } - class XmlMaps { - private 'Excel.XmlMaps_typekey': XmlMaps; - private constructor(); + interface XmlMaps { _Default(Index: any): XmlMap; - Add(Schema: string, RootElementName?: any): XmlMap; + Add(Schema: string, RootElementName?: string): XmlMap; readonly Application: Application; readonly Count: number; readonly Creator: XlCreator; - Item(Index: any): XmlMap; + Item(Index: number | string): XmlMap; readonly Parent: any; + (Index: number | string): XmlMap; } class XmlNamespace { @@ -9365,17 +9930,16 @@ declare namespace Excel { readonly Uri: string; } - class XmlNamespaces { - private 'Excel.XmlNamespaces_typekey': XmlNamespaces; - private constructor(); + interface XmlNamespaces { _Default(Index: any): XmlNamespace; readonly Application: Application; readonly Count: number; readonly Creator: XlCreator; - InstallManifest(Path: string, InstallForAllUsers?: any): void; - Item(Index: any): XmlNamespace; + InstallManifest(Path: string, InstallForAllUsers?: boolean): void; + Item(Index: number | string): XmlNamespace; readonly Parent: any; readonly Value: string; + (Index: number | string): XmlNamespace; } class XmlSchema { @@ -9389,15 +9953,14 @@ declare namespace Excel { readonly XML: string; } - class XmlSchemas { - private 'Excel.XmlSchemas_typekey': XmlSchemas; - private constructor(); + interface XmlSchemas { _Default(Index: any): XmlSchema; readonly Application: Application; readonly Count: number; readonly Creator: XlCreator; - Item(Index: any): XmlSchema; + Item(Index: number | string): XmlSchema; readonly Parent: any; + (Index: number | string): XmlSchema; } class XPath { @@ -9410,7 +9973,7 @@ declare namespace Excel { readonly Map: XmlMap; readonly Parent: any; readonly Repeating: boolean; - SetValue(Map: XmlMap, XPath: string, SelectionNamespace?: any, Repeating?: any): void; + SetValue(Map: XmlMap, XPath: string, SelectionNamespace?: any, Repeating?: boolean): void; readonly Value: string; } @@ -9495,223 +10058,100 @@ declare namespace Excel { } } +interface EnumeratorConstructor { + // we need this because there are two overloads for Item on the Sheets object + new (sheets: Excel.Sheets): Enumerator; +} + interface ActiveXObject { - on( - obj: Excel.Application, event: 'GetIDsOfNames', argNames: ['riid', 'rgszNames', 'cNames', 'lcid', 'rgdispid'], handler: ( - this: Excel.Application, parameter: { readonly riid: stdole.GUID, readonly rgszNames: number, readonly cNames: number, readonly lcid: number, rgdispid: number }) => void): void; - on( - obj: Excel.Application, event: 'GetTypeInfo', argNames: ['itinfo', 'lcid', 'pptinfo'], handler: ( - this: Excel.Application, parameter: { readonly itinfo: number, readonly lcid: number, pptinfo: undefined }) => void): void; + on(obj: Excel.Application, event: 'GetIDsOfNames', argNames: ['riid', 'rgszNames', 'cNames', 'lcid', 'rgdispid'], handler: (this: Excel.Application, parameter: { readonly riid: stdole.GUID, readonly rgszNames: number, readonly cNames: number, readonly lcid: number, rgdispid: number }) => void): void; + on(obj: Excel.Application, event: 'GetTypeInfo', argNames: ['itinfo', 'lcid', 'pptinfo'], handler: (this: Excel.Application, parameter: { readonly itinfo: number, readonly lcid: number, pptinfo: undefined }) => void): void; on(obj: Excel.Application, event: 'GetTypeInfoCount', argNames: ['pctinfo'], handler: (this: Excel.Application, parameter: { pctinfo: number }) => void): void; - on( - obj: Excel.Application, event: 'Invoke', argNames: Excel.EventHelperTypes.Application_Invoke_ArgNames, handler: ( - this: Excel.Application, parameter: Excel.EventHelperTypes.Application_Invoke_Parameter) => void): void; - on( - obj: Excel.Application, event: 'NewWorkbook' | 'WorkbookActivate' | 'WorkbookAddinInstall' | 'WorkbookAddinUninstall' | 'WorkbookDeactivate' | 'WorkbookOpen', - argNames: ['Wb'], handler: (this: Excel.Application, parameter: { readonly Wb: Excel.Workbook }) => void): void; - on( - obj: Excel.Application, event: 'ProtectedViewWindowActivate' | 'ProtectedViewWindowDeactivate' | 'ProtectedViewWindowOpen' | 'ProtectedViewWindowResize', - argNames: ['Pvw'], handler: (this: Excel.Application, parameter: { readonly Pvw: Excel.ProtectedViewWindow }) => void): void; - on( - obj: Excel.Application, event: 'ProtectedViewWindowBeforeClose', argNames: ['Pvw', 'Reason', 'Cancel'], handler: ( - this: Excel.Application, parameter: { readonly Pvw: Excel.ProtectedViewWindow, readonly Reason: Excel.XlProtectedViewCloseReason, Cancel: boolean }) => void): void; - on( - obj: Excel.Application, event: 'ProtectedViewWindowBeforeEdit', argNames: ['Pvw', 'Cancel'], handler: ( - this: Excel.Application, parameter: { readonly Pvw: Excel.ProtectedViewWindow, Cancel: boolean }) => void): void; + on(obj: Excel.Application, event: 'Invoke', argNames: Excel.EventHelperTypes.Application_Invoke_ArgNames, handler: (this: Excel.Application, parameter: Excel.EventHelperTypes.Application_Invoke_Parameter) => void): void; + on(obj: Excel.Application, event: 'NewWorkbook' | 'WorkbookActivate' | 'WorkbookAddinInstall' | 'WorkbookAddinUninstall' | 'WorkbookDeactivate' | 'WorkbookOpen', argNames: ['Wb'], handler: (this: Excel.Application, parameter: { readonly Wb: Excel.Workbook }) => void): void; + on(obj: Excel.Application, event: 'ProtectedViewWindowActivate' | 'ProtectedViewWindowDeactivate' | 'ProtectedViewWindowOpen' | 'ProtectedViewWindowResize', argNames: ['Pvw'], handler: (this: Excel.Application, parameter: { readonly Pvw: Excel.ProtectedViewWindow }) => void): void; + on(obj: Excel.Application, event: 'ProtectedViewWindowBeforeClose', argNames: ['Pvw', 'Reason', 'Cancel'], handler: (this: Excel.Application, parameter: { readonly Pvw: Excel.ProtectedViewWindow, readonly Reason: Excel.XlProtectedViewCloseReason, Cancel: boolean }) => void): void; + on(obj: Excel.Application, event: 'ProtectedViewWindowBeforeEdit', argNames: ['Pvw', 'Cancel'], handler: (this: Excel.Application, parameter: { readonly Pvw: Excel.ProtectedViewWindow, Cancel: boolean }) => void): void; on(obj: Excel.Application, event: 'QueryInterface', argNames: ['riid', 'ppvObj'], handler: (this: Excel.Application, parameter: { readonly riid: stdole.GUID, ppvObj: undefined }) => void): void; - on(obj: Excel.Application, event: 'SheetActivate' | 'SheetCalculate' | 'SheetDeactivate', argNames: ['Sh'], handler: (this: Excel.Application, parameter: { readonly Sh: any }) => void): void; - on( - obj: Excel.Application, event: 'SheetBeforeDoubleClick' | 'SheetBeforeRightClick', argNames: ['Sh', 'Target', 'Cancel'], handler: ( - this: Excel.Application, parameter: { readonly Sh: any, readonly Target: Excel.Range, Cancel: boolean }) => void): void; - on( - obj: Excel.Application, event: 'SheetChange' | 'SheetSelectionChange', argNames: ['Sh', 'Target'], handler: ( - this: Excel.Application, parameter: { readonly Sh: any, readonly Target: Excel.Range }) => void): void; - on( - obj: Excel.Application, event: 'SheetFollowHyperlink', argNames: ['Sh', 'Target'], handler: ( - this: Excel.Application, parameter: { readonly Sh: any, readonly Target: Excel.Hyperlink }) => void): void; - on( - obj: Excel.Application, event: 'SheetPivotTableAfterValueChange', argNames: ['Sh', 'TargetPivotTable', 'TargetRange'], handler: ( - this: Excel.Application, parameter: { readonly Sh: any, readonly TargetPivotTable: Excel.PivotTable, readonly TargetRange: Excel.Range }) => void): void; - on( - obj: Excel.Application, event: 'SheetPivotTableBeforeAllocateChanges' | 'SheetPivotTableBeforeCommitChanges', - argNames: ['Sh', 'TargetPivotTable', 'ValueChangeStart', 'ValueChangeEnd', 'Cancel'], handler: ( - this: Excel.Application, - parameter: { readonly Sh: any, readonly TargetPivotTable: Excel.PivotTable, readonly ValueChangeStart: number, readonly ValueChangeEnd: number, Cancel: boolean }) => void): void; - on( - obj: Excel.Application, event: 'SheetPivotTableBeforeDiscardChanges', argNames: ['Sh', 'TargetPivotTable', 'ValueChangeStart', 'ValueChangeEnd'], - handler: ( - this: Excel.Application, parameter: { readonly Sh: any, readonly TargetPivotTable: Excel.PivotTable, readonly ValueChangeStart: number, readonly ValueChangeEnd: number }) => void): void; - on( - obj: Excel.Application, event: 'SheetPivotTableUpdate', argNames: ['Sh', 'Target'], handler: ( - this: Excel.Application, parameter: { readonly Sh: any, readonly Target: Excel.PivotTable }) => void): void; - on( - obj: Excel.Application, event: 'WindowActivate' | 'WindowDeactivate' | 'WindowResize', argNames: ['Wb', 'Wn'], handler: ( - this: Excel.Application, parameter: { readonly Wb: Excel.Workbook, readonly Wn: Excel.Window }) => void): void; - on( - obj: Excel.Application, event: 'WorkbookAfterSave', argNames: ['Wb', 'Success'], handler: ( - this: Excel.Application, parameter: { readonly Wb: Excel.Workbook, readonly Success: boolean }) => void): void; - on( - obj: Excel.Application, event: 'WorkbookAfterXmlExport', argNames: ['Wb', 'Map', 'Url', 'Result'], handler: ( - this: Excel.Application, parameter: { readonly Wb: Excel.Workbook, readonly Map: Excel.XmlMap, readonly Url: string, readonly Result: Excel.XlXmlExportResult }) => void): void; - on( - obj: Excel.Application, event: 'WorkbookAfterXmlImport', argNames: ['Wb', 'Map', 'IsRefresh', 'Result'], handler: ( - this: Excel.Application, parameter: { readonly Wb: Excel.Workbook, readonly Map: Excel.XmlMap, readonly IsRefresh: boolean, readonly Result: Excel.XlXmlImportResult }) => void): void; - on( - obj: Excel.Application, event: 'WorkbookBeforeClose' | 'WorkbookBeforePrint', argNames: ['Wb', 'Cancel'], handler: ( - this: Excel.Application, parameter: { readonly Wb: Excel.Workbook, Cancel: boolean }) => void): void; - on( - obj: Excel.Application, event: 'WorkbookBeforeSave', argNames: ['Wb', 'SaveAsUI', 'Cancel'], handler: ( - this: Excel.Application, parameter: { readonly Wb: Excel.Workbook, readonly SaveAsUI: boolean, Cancel: boolean }) => void): void; - on( - obj: Excel.Application, event: 'WorkbookBeforeXmlExport', argNames: ['Wb', 'Map', 'Url', 'Cancel'], handler: ( - this: Excel.Application, parameter: { readonly Wb: Excel.Workbook, readonly Map: Excel.XmlMap, readonly Url: string, Cancel: boolean }) => void): void; - on( - obj: Excel.Application, event: 'WorkbookBeforeXmlImport', argNames: ['Wb', 'Map', 'Url', 'IsRefresh', 'Cancel'], handler: ( - this: Excel.Application, parameter: { readonly Wb: Excel.Workbook, readonly Map: Excel.XmlMap, readonly Url: string, readonly IsRefresh: boolean, Cancel: boolean }) => void): void; - on(obj: Excel.Application, event: 'WorkbookNewChart', argNames: ['Wb', 'Ch'], handler: ( - this: Excel.Application, parameter: { readonly Wb: Excel.Workbook, readonly Ch: Excel.Chart }) => void): void; - on(obj: Excel.Application, event: 'WorkbookNewSheet', argNames: ['Wb', 'Sh'], handler: (this: Excel.Application, parameter: { readonly Wb: Excel.Workbook, readonly Sh: any }) => void): void; - on( - obj: Excel.Application, event: 'WorkbookPivotTableCloseConnection' | 'WorkbookPivotTableOpenConnection', argNames: ['Wb', 'Target'], - handler: (this: Excel.Application, parameter: { readonly Wb: Excel.Workbook, readonly Target: Excel.PivotTable }) => void): void; - on( - obj: Excel.Application, event: 'WorkbookRowsetComplete', argNames: ['Wb', 'Description', 'Sheet', 'Success'], handler: ( - this: Excel.Application, parameter: { readonly Wb: Excel.Workbook, readonly Description: string, readonly Sheet: string, readonly Success: boolean }) => void): void; - on( - obj: Excel.Application, event: 'WorkbookSync', argNames: ['Wb', 'SyncEventType'], handler: ( - this: Excel.Application, parameter: { readonly Wb: Excel.Workbook, readonly SyncEventType: Office.MsoSyncEventType }) => void): void; - on( - obj: Excel.Chart, event: 'BeforeDoubleClick', argNames: ['ElementID', 'Arg1', 'Arg2', 'Cancel'], handler: ( - this: Excel.Chart, parameter: { readonly ElementID: number, readonly Arg1: number, readonly Arg2: number, Cancel: boolean }) => void): void; + on(obj: Excel.Application, event: 'SheetActivate' | 'SheetCalculate' | 'SheetDeactivate', argNames: ['Sh'], handler: (this: Excel.Application, parameter: { readonly Sh: Excel.Chart | Excel.Worksheet }) => void): void; + on(obj: Excel.Application, event: 'SheetBeforeDoubleClick' | 'SheetBeforeRightClick', argNames: ['Sh', 'Target', 'Cancel'], handler: (this: Excel.Application, parameter: { readonly Sh: Excel.Worksheet, readonly Target: Excel.Range, Cancel: boolean }) => void): void; + on(obj: Excel.Application, event: 'SheetChange' | 'SheetSelectionChange', argNames: ['Sh', 'Target'], handler: (this: Excel.Application, parameter: { readonly Sh: Excel.Worksheet, readonly Target: Excel.Range }) => void): void; + on(obj: Excel.Application, event: 'SheetFollowHyperlink', argNames: ['Sh', 'Target'], handler: (this: Excel.Application, parameter: { readonly Sh: Excel.Worksheet, readonly Target: Excel.Hyperlink }) => void): void; + on(obj: Excel.Application, event: 'SheetPivotTableAfterValueChange', argNames: ['Sh', 'TargetPivotTable', 'TargetRange'], handler: (this: Excel.Application, parameter: { readonly Sh: Excel.Worksheet, readonly TargetPivotTable: Excel.PivotTable, readonly TargetRange: Excel.Range }) => void): void; + on(obj: Excel.Application, event: 'SheetPivotTableBeforeAllocateChanges' | 'SheetPivotTableBeforeCommitChanges', argNames: ['Sh', 'TargetPivotTable', 'ValueChangeStart', 'ValueChangeEnd', 'Cancel'], handler: (this: Excel.Application, parameter: { readonly Sh: Excel.Worksheet, readonly TargetPivotTable: Excel.PivotTable, readonly ValueChangeStart: number, readonly ValueChangeEnd: number, Cancel: boolean }) => void): void; + on(obj: Excel.Application, event: 'SheetPivotTableBeforeDiscardChanges', argNames: ['Sh', 'TargetPivotTable', 'ValueChangeStart', 'ValueChangeEnd'], handler: (this: Excel.Application, parameter: { readonly Sh: any, readonly TargetPivotTable: Excel.PivotTable, readonly ValueChangeStart: number, readonly ValueChangeEnd: number }) => void): void; + on(obj: Excel.Application, event: 'SheetPivotTableUpdate', argNames: ['Sh', 'Target'], handler: (this: Excel.Application, parameter: { readonly Sh: Excel.Worksheet, readonly Target: Excel.PivotTable }) => void): void; + on(obj: Excel.Application, event: 'WindowActivate' | 'WindowDeactivate' | 'WindowResize', argNames: ['Wb', 'Wn'], handler: (this: Excel.Application, parameter: { readonly Wb: Excel.Workbook, readonly Wn: Excel.Window }) => void): void; + on(obj: Excel.Application, event: 'WorkbookAfterSave', argNames: ['Wb', 'Success'], handler: (this: Excel.Application, parameter: { readonly Wb: Excel.Workbook, readonly Success: boolean }) => void): void; + on(obj: Excel.Application, event: 'WorkbookAfterXmlExport', argNames: ['Wb', 'Map', 'Url', 'Result'], handler: (this: Excel.Application, parameter: { readonly Wb: Excel.Workbook, readonly Map: Excel.XmlMap, readonly Url: string, readonly Result: Excel.XlXmlExportResult }) => void): void; + on(obj: Excel.Application, event: 'WorkbookAfterXmlImport', argNames: ['Wb', 'Map', 'IsRefresh', 'Result'], handler: (this: Excel.Application, parameter: { readonly Wb: Excel.Workbook, readonly Map: Excel.XmlMap, readonly IsRefresh: boolean, readonly Result: Excel.XlXmlImportResult }) => void): void; + on(obj: Excel.Application, event: 'WorkbookBeforeClose' | 'WorkbookBeforePrint', argNames: ['Wb', 'Cancel'], handler: (this: Excel.Application, parameter: { readonly Wb: Excel.Workbook, Cancel: boolean }) => void): void; + on(obj: Excel.Application, event: 'WorkbookBeforeSave', argNames: ['Wb', 'SaveAsUI', 'Cancel'], handler: (this: Excel.Application, parameter: { readonly Wb: Excel.Workbook, readonly SaveAsUI: boolean, Cancel: boolean }) => void): void; + on(obj: Excel.Application, event: 'WorkbookBeforeXmlExport', argNames: ['Wb', 'Map', 'Url', 'Cancel'], handler: (this: Excel.Application, parameter: { readonly Wb: Excel.Workbook, readonly Map: Excel.XmlMap, readonly Url: string, Cancel: boolean }) => void): void; + on(obj: Excel.Application, event: 'WorkbookBeforeXmlImport', argNames: ['Wb', 'Map', 'Url', 'IsRefresh', 'Cancel'], handler: (this: Excel.Application, parameter: { readonly Wb: Excel.Workbook, readonly Map: Excel.XmlMap, readonly Url: string, readonly IsRefresh: boolean, Cancel: boolean }) => void): void; + on(obj: Excel.Application, event: 'WorkbookNewChart', argNames: ['Wb', 'Ch'], handler: (this: Excel.Application, parameter: { readonly Wb: Excel.Workbook, readonly Ch: Excel.Chart }) => void): void; + on(obj: Excel.Application, event: 'WorkbookNewSheet', argNames: ['Wb', 'Sh'], handler: (this: Excel.Application, parameter: { readonly Wb: Excel.Workbook, readonly Sh: Excel.Worksheet }) => void): void; + on(obj: Excel.Application, event: 'WorkbookPivotTableCloseConnection' | 'WorkbookPivotTableOpenConnection', argNames: ['Wb', 'Target'], handler: (this: Excel.Application, parameter: { readonly Wb: Excel.Workbook, readonly Target: Excel.PivotTable }) => void): void; + on(obj: Excel.Application, event: 'WorkbookRowsetComplete', argNames: ['Wb', 'Description', 'Sheet', 'Success'], handler: (this: Excel.Application, parameter: { readonly Wb: Excel.Workbook, readonly Description: string, readonly Sheet: string, readonly Success: boolean }) => void): void; + on(obj: Excel.Application, event: 'WorkbookSync', argNames: ['Wb', 'SyncEventType'], handler: (this: Excel.Application, parameter: { readonly Wb: Excel.Workbook, readonly SyncEventType: Office.MsoSyncEventType }) => void): void; + on(obj: Excel.Chart, event: 'BeforeDoubleClick', argNames: ['ElementID', 'Arg1', 'Arg2', 'Cancel'], handler: (this: Excel.Chart, parameter: { readonly ElementID: number, readonly Arg1: number, readonly Arg2: number, Cancel: boolean }) => void): void; on(obj: Excel.Chart, event: 'BeforeRightClick', argNames: ['Cancel'], handler: (this: Excel.Chart, parameter: { Cancel: boolean }) => void): void; - on( - obj: Excel.Chart, event: 'GetIDsOfNames', argNames: ['riid', 'rgszNames', 'cNames', 'lcid', 'rgdispid'], handler: ( - this: Excel.Chart, parameter: { readonly riid: stdole.GUID, readonly rgszNames: number, readonly cNames: number, readonly lcid: number, rgdispid: number }) => void): void; - on( - obj: Excel.Chart, event: 'GetTypeInfo', argNames: ['itinfo', 'lcid', 'pptinfo'], handler: ( - this: Excel.Chart, parameter: { readonly itinfo: number, readonly lcid: number, pptinfo: undefined }) => void): void; + on(obj: Excel.Chart, event: 'GetIDsOfNames', argNames: ['riid', 'rgszNames', 'cNames', 'lcid', 'rgdispid'], handler: (this: Excel.Chart, parameter: { readonly riid: stdole.GUID, readonly rgszNames: number, readonly cNames: number, readonly lcid: number, rgdispid: number }) => void): void; + on(obj: Excel.Chart, event: 'GetTypeInfo', argNames: ['itinfo', 'lcid', 'pptinfo'], handler: (this: Excel.Chart, parameter: { readonly itinfo: number, readonly lcid: number, pptinfo: undefined }) => void): void; on(obj: Excel.Chart, event: 'GetTypeInfoCount', argNames: ['pctinfo'], handler: (this: Excel.Chart, parameter: { pctinfo: number }) => void): void; on(obj: Excel.Chart, event: 'Invoke', argNames: Excel.EventHelperTypes.Chart_Invoke_ArgNames, handler: (this: Excel.Chart, parameter: Excel.EventHelperTypes.Chart_Invoke_Parameter) => void): void; - on( - obj: Excel.Chart, event: 'MouseDown' | 'MouseMove' | 'MouseUp', argNames: ['Button', 'Shift', 'x', 'y'], handler: ( - this: Excel.Chart, parameter: { readonly Button: number, readonly Shift: number, readonly x: number, readonly y: number }) => void): void; + on(obj: Excel.Chart, event: 'MouseDown' | 'MouseMove' | 'MouseUp', argNames: ['Button', 'Shift', 'x', 'y'], handler: (this: Excel.Chart, parameter: { readonly Button: number, readonly Shift: number, readonly x: number, readonly y: number }) => void): void; on(obj: Excel.Chart, event: 'QueryInterface', argNames: ['riid', 'ppvObj'], handler: (this: Excel.Chart, parameter: { readonly riid: stdole.GUID, ppvObj: undefined }) => void): void; - on( - obj: Excel.Chart, event: 'Select', argNames: ['ElementID', 'Arg1', 'Arg2'], handler: ( - this: Excel.Chart, parameter: { readonly ElementID: number, readonly Arg1: number, readonly Arg2: number }) => void): void; - on( - obj: Excel.Chart, event: 'SeriesChange', argNames: ['SeriesIndex', 'PointIndex'], handler: ( - this: Excel.Chart, parameter: { readonly SeriesIndex: number, readonly PointIndex: number }) => void): void; - on( - obj: Excel.OLEObject, event: 'GetIDsOfNames', argNames: ['riid', 'rgszNames', 'cNames', 'lcid', 'rgdispid'], handler: ( - this: Excel.OLEObject, parameter: { readonly riid: stdole.GUID, readonly rgszNames: number, readonly cNames: number, readonly lcid: number, rgdispid: number }) => void): void; - on( - obj: Excel.OLEObject, event: 'GetTypeInfo', argNames: ['itinfo', 'lcid', 'pptinfo'], handler: ( - this: Excel.OLEObject, parameter: { readonly itinfo: number, readonly lcid: number, pptinfo: undefined }) => void): void; + on(obj: Excel.Chart, event: 'Select', argNames: ['ElementID', 'Arg1', 'Arg2'], handler: (this: Excel.Chart, parameter: { readonly ElementID: number, readonly Arg1: number, readonly Arg2: number }) => void): void; + on(obj: Excel.Chart, event: 'SeriesChange', argNames: ['SeriesIndex', 'PointIndex'], handler: (this: Excel.Chart, parameter: { readonly SeriesIndex: number, readonly PointIndex: number }) => void): void; + on(obj: Excel.OLEObject, event: 'GetIDsOfNames', argNames: ['riid', 'rgszNames', 'cNames', 'lcid', 'rgdispid'], handler: (this: Excel.OLEObject, parameter: { readonly riid: stdole.GUID, readonly rgszNames: number, readonly cNames: number, readonly lcid: number, rgdispid: number }) => void): void; + on(obj: Excel.OLEObject, event: 'GetTypeInfo', argNames: ['itinfo', 'lcid', 'pptinfo'], handler: (this: Excel.OLEObject, parameter: { readonly itinfo: number, readonly lcid: number, pptinfo: undefined }) => void): void; on(obj: Excel.OLEObject, event: 'GetTypeInfoCount', argNames: ['pctinfo'], handler: (this: Excel.OLEObject, parameter: { pctinfo: number }) => void): void; - on( - obj: Excel.OLEObject, event: 'Invoke', argNames: Excel.EventHelperTypes.OLEObject_Invoke_ArgNames, handler: ( - this: Excel.OLEObject, parameter: Excel.EventHelperTypes.OLEObject_Invoke_Parameter) => void): void; + on(obj: Excel.OLEObject, event: 'Invoke', argNames: Excel.EventHelperTypes.OLEObject_Invoke_ArgNames, handler: (this: Excel.OLEObject, parameter: Excel.EventHelperTypes.OLEObject_Invoke_Parameter) => void): void; on(obj: Excel.OLEObject, event: 'QueryInterface', argNames: ['riid', 'ppvObj'], handler: (this: Excel.OLEObject, parameter: { readonly riid: stdole.GUID, ppvObj: undefined }) => void): void; on(obj: Excel.QueryTable, event: 'AfterRefresh', argNames: ['Success'], handler: (this: Excel.QueryTable, parameter: { readonly Success: boolean }) => void): void; on(obj: Excel.QueryTable, event: 'BeforeRefresh', argNames: ['Cancel'], handler: (this: Excel.QueryTable, parameter: { Cancel: boolean }) => void): void; - on( - obj: Excel.QueryTable, event: 'GetIDsOfNames', argNames: ['riid', 'rgszNames', 'cNames', 'lcid', 'rgdispid'], handler: ( - this: Excel.QueryTable, parameter: { readonly riid: stdole.GUID, readonly rgszNames: number, readonly cNames: number, readonly lcid: number, rgdispid: number }) => void): void; - on( - obj: Excel.QueryTable, event: 'GetTypeInfo', argNames: ['itinfo', 'lcid', 'pptinfo'], handler: ( - this: Excel.QueryTable, parameter: { readonly itinfo: number, readonly lcid: number, pptinfo: undefined }) => void): void; + on(obj: Excel.QueryTable, event: 'GetIDsOfNames', argNames: ['riid', 'rgszNames', 'cNames', 'lcid', 'rgdispid'], handler: (this: Excel.QueryTable, parameter: { readonly riid: stdole.GUID, readonly rgszNames: number, readonly cNames: number, readonly lcid: number, rgdispid: number }) => void): void; + on(obj: Excel.QueryTable, event: 'GetTypeInfo', argNames: ['itinfo', 'lcid', 'pptinfo'], handler: (this: Excel.QueryTable, parameter: { readonly itinfo: number, readonly lcid: number, pptinfo: undefined }) => void): void; on(obj: Excel.QueryTable, event: 'GetTypeInfoCount', argNames: ['pctinfo'], handler: (this: Excel.QueryTable, parameter: { pctinfo: number }) => void): void; - on( - obj: Excel.QueryTable, event: 'Invoke', argNames: Excel.EventHelperTypes.QueryTable_Invoke_ArgNames, handler: ( - this: Excel.QueryTable, parameter: Excel.EventHelperTypes.QueryTable_Invoke_Parameter) => void): void; + on(obj: Excel.QueryTable, event: 'Invoke', argNames: Excel.EventHelperTypes.QueryTable_Invoke_ArgNames, handler: (this: Excel.QueryTable, parameter: Excel.EventHelperTypes.QueryTable_Invoke_Parameter) => void): void; on(obj: Excel.QueryTable, event: 'QueryInterface', argNames: ['riid', 'ppvObj'], handler: (this: Excel.QueryTable, parameter: { readonly riid: stdole.GUID, ppvObj: undefined }) => void): void; on(obj: Excel.Workbook, event: 'AfterSave', argNames: ['Success'], handler: (this: Excel.Workbook, parameter: { readonly Success: boolean }) => void): void; - on( - obj: Excel.Workbook, event: 'AfterXmlExport', argNames: ['Map', 'Url', 'Result'], handler: ( - this: Excel.Workbook, parameter: { readonly Map: Excel.XmlMap, readonly Url: string, readonly Result: Excel.XlXmlExportResult }) => void): void; - on( - obj: Excel.Workbook, event: 'AfterXmlImport', argNames: ['Map', 'IsRefresh', 'Result'], handler: ( - this: Excel.Workbook, parameter: { readonly Map: Excel.XmlMap, readonly IsRefresh: boolean, readonly Result: Excel.XlXmlImportResult }) => void): void; + on(obj: Excel.Workbook, event: 'AfterXmlExport', argNames: ['Map', 'Url', 'Result'], handler: (this: Excel.Workbook, parameter: { readonly Map: Excel.XmlMap, readonly Url: string, readonly Result: Excel.XlXmlExportResult }) => void): void; + on(obj: Excel.Workbook, event: 'AfterXmlImport', argNames: ['Map', 'IsRefresh', 'Result'], handler: (this: Excel.Workbook, parameter: { readonly Map: Excel.XmlMap, readonly IsRefresh: boolean, readonly Result: Excel.XlXmlImportResult }) => void): void; on(obj: Excel.Workbook, event: 'BeforeClose' | 'BeforePrint', argNames: ['Cancel'], handler: (this: Excel.Workbook, parameter: { Cancel: boolean }) => void): void; on(obj: Excel.Workbook, event: 'BeforeSave', argNames: ['SaveAsUI', 'Cancel'], handler: (this: Excel.Workbook, parameter: { readonly SaveAsUI: boolean, Cancel: boolean }) => void): void; - on( - obj: Excel.Workbook, event: 'BeforeXmlExport', argNames: ['Map', 'Url', 'Cancel'], handler: ( - this: Excel.Workbook, parameter: { readonly Map: Excel.XmlMap, readonly Url: string, Cancel: boolean }) => void): void; - on( - obj: Excel.Workbook, event: 'BeforeXmlImport', argNames: ['Map', 'Url', 'IsRefresh', 'Cancel'], handler: ( - this: Excel.Workbook, parameter: { readonly Map: Excel.XmlMap, readonly Url: string, readonly IsRefresh: boolean, Cancel: boolean }) => void): void; - on( - obj: Excel.Workbook, event: 'GetIDsOfNames', argNames: ['riid', 'rgszNames', 'cNames', 'lcid', 'rgdispid'], handler: ( - this: Excel.Workbook, parameter: { readonly riid: stdole.GUID, readonly rgszNames: number, readonly cNames: number, readonly lcid: number, rgdispid: number }) => void): void; - on( - obj: Excel.Workbook, event: 'GetTypeInfo', argNames: ['itinfo', 'lcid', 'pptinfo'], handler: ( - this: Excel.Workbook, parameter: { readonly itinfo: number, readonly lcid: number, pptinfo: undefined }) => void): void; + on(obj: Excel.Workbook, event: 'BeforeXmlExport', argNames: ['Map', 'Url', 'Cancel'], handler: (this: Excel.Workbook, parameter: { readonly Map: Excel.XmlMap, readonly Url: string, Cancel: boolean }) => void): void; + on(obj: Excel.Workbook, event: 'BeforeXmlImport', argNames: ['Map', 'Url', 'IsRefresh', 'Cancel'], handler: (this: Excel.Workbook, parameter: { readonly Map: Excel.XmlMap, readonly Url: string, readonly IsRefresh: boolean, Cancel: boolean }) => void): void; + on(obj: Excel.Workbook, event: 'GetIDsOfNames', argNames: ['riid', 'rgszNames', 'cNames', 'lcid', 'rgdispid'], handler: (this: Excel.Workbook, parameter: { readonly riid: stdole.GUID, readonly rgszNames: number, readonly cNames: number, readonly lcid: number, rgdispid: number }) => void): void; + on(obj: Excel.Workbook, event: 'GetTypeInfo', argNames: ['itinfo', 'lcid', 'pptinfo'], handler: (this: Excel.Workbook, parameter: { readonly itinfo: number, readonly lcid: number, pptinfo: undefined }) => void): void; on(obj: Excel.Workbook, event: 'GetTypeInfoCount', argNames: ['pctinfo'], handler: (this: Excel.Workbook, parameter: { pctinfo: number }) => void): void; - on( - obj: Excel.Workbook, event: 'Invoke', argNames: Excel.EventHelperTypes.Workbook_Invoke_ArgNames, handler: ( - this: Excel.Workbook, parameter: Excel.EventHelperTypes.Workbook_Invoke_Parameter) => void): void; + on(obj: Excel.Workbook, event: 'Invoke', argNames: Excel.EventHelperTypes.Workbook_Invoke_ArgNames, handler: (this: Excel.Workbook, parameter: Excel.EventHelperTypes.Workbook_Invoke_Parameter) => void): void; on(obj: Excel.Workbook, event: 'NewChart', argNames: ['Ch'], handler: (this: Excel.Workbook, parameter: { readonly Ch: Excel.Chart }) => void): void; - on(obj: Excel.Workbook, event: 'NewSheet' | 'SheetActivate' | 'SheetCalculate' | 'SheetDeactivate', argNames: ['Sh'], handler: ( - this: Excel.Workbook, parameter: { readonly Sh: any }) => void): void; - on( - obj: Excel.Workbook, event: 'PivotTableCloseConnection' | 'PivotTableOpenConnection', argNames: ['Target'], handler: ( - this: Excel.Workbook, parameter: { readonly Target: Excel.PivotTable }) => void): void; + on(obj: Excel.Workbook, event: 'NewSheet' | 'SheetActivate' | 'SheetCalculate' | 'SheetDeactivate', argNames: ['Sh'], handler: (this: Excel.Workbook, parameter: { readonly Sh: Excel.Chart | Excel.Worksheet }) => void): void; + on(obj: Excel.Workbook, event: 'PivotTableCloseConnection' | 'PivotTableOpenConnection', argNames: ['Target'], handler: (this: Excel.Workbook, parameter: { readonly Target: Excel.PivotTable }) => void): void; on(obj: Excel.Workbook, event: 'QueryInterface', argNames: ['riid', 'ppvObj'], handler: (this: Excel.Workbook, parameter: { readonly riid: stdole.GUID, ppvObj: undefined }) => void): void; - on( - obj: Excel.Workbook, event: 'RowsetComplete', argNames: ['Description', 'Sheet', 'Success'], handler: ( - this: Excel.Workbook, parameter: { readonly Description: string, readonly Sheet: string, readonly Success: boolean }) => void): void; - on( - obj: Excel.Workbook, event: 'SheetBeforeDoubleClick' | 'SheetBeforeRightClick', argNames: ['Sh', 'Target', 'Cancel'], handler: ( - this: Excel.Workbook, parameter: { readonly Sh: any, readonly Target: Excel.Range, Cancel: boolean }) => void): void; - on( - obj: Excel.Workbook, event: 'SheetChange' | 'SheetSelectionChange', argNames: ['Sh', 'Target'], handler: ( - this: Excel.Workbook, parameter: { readonly Sh: any, readonly Target: Excel.Range }) => void): void; - on(obj: Excel.Workbook, event: 'SheetFollowHyperlink', argNames: ['Sh', 'Target'], handler: ( - this: Excel.Workbook, parameter: { readonly Sh: any, readonly Target: Excel.Hyperlink }) => void): void; - on( - obj: Excel.Workbook, event: 'SheetPivotTableAfterValueChange', argNames: ['Sh', 'TargetPivotTable', 'TargetRange'], handler: ( - this: Excel.Workbook, parameter: { readonly Sh: any, readonly TargetPivotTable: Excel.PivotTable, readonly TargetRange: Excel.Range }) => void): void; - on( - obj: Excel.Workbook, event: 'SheetPivotTableBeforeAllocateChanges' | 'SheetPivotTableBeforeCommitChanges', - argNames: ['Sh', 'TargetPivotTable', 'ValueChangeStart', 'ValueChangeEnd', 'Cancel'], handler: ( - this: Excel.Workbook, - parameter: { readonly Sh: any, readonly TargetPivotTable: Excel.PivotTable, readonly ValueChangeStart: number, readonly ValueChangeEnd: number, Cancel: boolean }) => void): void; - on( - obj: Excel.Workbook, event: 'SheetPivotTableBeforeDiscardChanges', argNames: ['Sh', 'TargetPivotTable', 'ValueChangeStart', 'ValueChangeEnd'], handler: ( - this: Excel.Workbook, parameter: { readonly Sh: any, readonly TargetPivotTable: Excel.PivotTable, readonly ValueChangeStart: number, readonly ValueChangeEnd: number }) => void): void; - on( - obj: Excel.Workbook, event: 'SheetPivotTableChangeSync' | 'SheetPivotTableUpdate', argNames: ['Sh', 'Target'], handler: ( - this: Excel.Workbook, parameter: { readonly Sh: any, readonly Target: Excel.PivotTable }) => void): void; + on(obj: Excel.Workbook, event: 'RowsetComplete', argNames: ['Description', 'Sheet', 'Success'], handler: (this: Excel.Workbook, parameter: { readonly Description: string, readonly Sheet: string, readonly Success: boolean }) => void): void; + on(obj: Excel.Workbook, event: 'SheetBeforeDoubleClick' | 'SheetBeforeRightClick', argNames: ['Sh', 'Target', 'Cancel'], handler: (this: Excel.Workbook, parameter: { readonly Sh: Excel.Worksheet, readonly Target: Excel.Range, Cancel: boolean }) => void): void; + on(obj: Excel.Workbook, event: 'SheetChange' | 'SheetSelectionChange', argNames: ['Sh', 'Target'], handler: (this: Excel.Workbook, parameter: { readonly Sh: Excel.Worksheet, readonly Target: Excel.Range }) => void): void; + on(obj: Excel.Workbook, event: 'SheetFollowHyperlink', argNames: ['Sh', 'Target'], handler: (this: Excel.Workbook, parameter: { readonly Sh: Excel.Worksheet, readonly Target: Excel.Hyperlink }) => void): void; + on(obj: Excel.Workbook, event: 'SheetPivotTableAfterValueChange', argNames: ['Sh', 'TargetPivotTable', 'TargetRange'], handler: (this: Excel.Workbook, parameter: { readonly Sh: Excel.Worksheet, readonly TargetPivotTable: Excel.PivotTable, readonly TargetRange: Excel.Range }) => void): void; + on(obj: Excel.Workbook, event: 'SheetPivotTableBeforeAllocateChanges' | 'SheetPivotTableBeforeCommitChanges', argNames: ['Sh', 'TargetPivotTable', 'ValueChangeStart', 'ValueChangeEnd', 'Cancel'], handler: (this: Excel.Workbook, parameter: { readonly Sh: Excel.Worksheet, readonly TargetPivotTable: Excel.PivotTable, readonly ValueChangeStart: number, readonly ValueChangeEnd: number, Cancel: boolean }) => void): void; + on(obj: Excel.Workbook, event: 'SheetPivotTableBeforeDiscardChanges', argNames: ['Sh', 'TargetPivotTable', 'ValueChangeStart', 'ValueChangeEnd'], handler: (this: Excel.Workbook, parameter: { readonly Sh: any, readonly TargetPivotTable: Excel.PivotTable, readonly ValueChangeStart: number, readonly ValueChangeEnd: number }) => void): void; + on(obj: Excel.Workbook, event: 'SheetPivotTableChangeSync' | 'SheetPivotTableUpdate', argNames: ['Sh', 'Target'], handler: (this: Excel.Workbook, parameter: { readonly Sh: Excel.Worksheet, readonly Target: Excel.PivotTable }) => void): void; on(obj: Excel.Workbook, event: 'Sync', argNames: ['SyncEventType'], handler: (this: Excel.Workbook, parameter: { readonly SyncEventType: Office.MsoSyncEventType }) => void): void; on(obj: Excel.Workbook, event: 'WindowActivate' | 'WindowDeactivate' | 'WindowResize', argNames: ['Wn'], handler: (this: Excel.Workbook, parameter: { readonly Wn: Excel.Window }) => void): void; - on( - obj: Excel.Worksheet, event: 'BeforeDoubleClick' | 'BeforeRightClick', argNames: ['Target', 'Cancel'], handler: ( - this: Excel.Worksheet, parameter: { readonly Target: Excel.Range, Cancel: boolean }) => void): void; + on(obj: Excel.Worksheet, event: 'BeforeDoubleClick' | 'BeforeRightClick', argNames: ['Target', 'Cancel'], handler: (this: Excel.Worksheet, parameter: { readonly Target: Excel.Range, Cancel: boolean }) => void): void; on(obj: Excel.Worksheet, event: 'Change' | 'SelectionChange', argNames: ['Target'], handler: (this: Excel.Worksheet, parameter: { readonly Target: Excel.Range }) => void): void; on(obj: Excel.Worksheet, event: 'FollowHyperlink', argNames: ['Target'], handler: (this: Excel.Worksheet, parameter: { readonly Target: Excel.Hyperlink }) => void): void; - on( - obj: Excel.Worksheet, event: 'GetIDsOfNames', argNames: ['riid', 'rgszNames', 'cNames', 'lcid', 'rgdispid'], handler: ( - this: Excel.Worksheet, parameter: { readonly riid: stdole.GUID, readonly rgszNames: number, readonly cNames: number, readonly lcid: number, rgdispid: number }) => void): void; - on( - obj: Excel.Worksheet, event: 'GetTypeInfo', argNames: ['itinfo', 'lcid', 'pptinfo'], handler: ( - this: Excel.Worksheet, parameter: { readonly itinfo: number, readonly lcid: number, pptinfo: undefined }) => void): void; + on(obj: Excel.Worksheet, event: 'GetIDsOfNames', argNames: ['riid', 'rgszNames', 'cNames', 'lcid', 'rgdispid'], handler: (this: Excel.Worksheet, parameter: { readonly riid: stdole.GUID, readonly rgszNames: number, readonly cNames: number, readonly lcid: number, rgdispid: number }) => void): void; + on(obj: Excel.Worksheet, event: 'GetTypeInfo', argNames: ['itinfo', 'lcid', 'pptinfo'], handler: (this: Excel.Worksheet, parameter: { readonly itinfo: number, readonly lcid: number, pptinfo: undefined }) => void): void; on(obj: Excel.Worksheet, event: 'GetTypeInfoCount', argNames: ['pctinfo'], handler: (this: Excel.Worksheet, parameter: { pctinfo: number }) => void): void; - on( - obj: Excel.Worksheet, event: 'Invoke', argNames: Excel.EventHelperTypes.Worksheet_Invoke_ArgNames, handler: ( - this: Excel.Worksheet, parameter: Excel.EventHelperTypes.Worksheet_Invoke_Parameter) => void): void; - on( - obj: Excel.Worksheet, event: 'PivotTableAfterValueChange', argNames: ['TargetPivotTable', 'TargetRange'], handler: ( - this: Excel.Worksheet, parameter: { readonly TargetPivotTable: Excel.PivotTable, readonly TargetRange: Excel.Range }) => void): void; - on( - obj: Excel.Worksheet, event: 'PivotTableBeforeAllocateChanges' | 'PivotTableBeforeCommitChanges', - argNames: ['TargetPivotTable', 'ValueChangeStart', 'ValueChangeEnd', 'Cancel'], handler: ( - this: Excel.Worksheet, parameter: { readonly TargetPivotTable: Excel.PivotTable, readonly ValueChangeStart: number, readonly ValueChangeEnd: number, Cancel: boolean }) => void): void; - on( - obj: Excel.Worksheet, event: 'PivotTableBeforeDiscardChanges', argNames: ['TargetPivotTable', 'ValueChangeStart', 'ValueChangeEnd'], - handler: (this: Excel.Worksheet, parameter: { readonly TargetPivotTable: Excel.PivotTable, readonly ValueChangeStart: number, readonly ValueChangeEnd: number }) => void): void; - on(obj: Excel.Worksheet, event: 'PivotTableChangeSync' | 'PivotTableUpdate', argNames: ['Target'], handler: ( - this: Excel.Worksheet, parameter: { readonly Target: Excel.PivotTable }) => void): void; + on(obj: Excel.Worksheet, event: 'Invoke', argNames: Excel.EventHelperTypes.Worksheet_Invoke_ArgNames, handler: (this: Excel.Worksheet, parameter: Excel.EventHelperTypes.Worksheet_Invoke_Parameter) => void): void; + on(obj: Excel.Worksheet, event: 'PivotTableAfterValueChange', argNames: ['TargetPivotTable', 'TargetRange'], handler: (this: Excel.Worksheet, parameter: { readonly TargetPivotTable: Excel.PivotTable, readonly TargetRange: Excel.Range }) => void): void; + on(obj: Excel.Worksheet, event: 'PivotTableBeforeAllocateChanges' | 'PivotTableBeforeCommitChanges', argNames: ['TargetPivotTable', 'ValueChangeStart', 'ValueChangeEnd', 'Cancel'], handler: (this: Excel.Worksheet, parameter: { readonly TargetPivotTable: Excel.PivotTable, readonly ValueChangeStart: number, readonly ValueChangeEnd: number, Cancel: boolean }) => void): void; + on(obj: Excel.Worksheet, event: 'PivotTableBeforeDiscardChanges', argNames: ['TargetPivotTable', 'ValueChangeStart', 'ValueChangeEnd'], handler: (this: Excel.Worksheet, parameter: { readonly TargetPivotTable: Excel.PivotTable, readonly ValueChangeStart: number, readonly ValueChangeEnd: number }) => void): void; + on(obj: Excel.Worksheet, event: 'PivotTableChangeSync' | 'PivotTableUpdate', argNames: ['Target'], handler: (this: Excel.Worksheet, parameter: { readonly Target: Excel.PivotTable }) => void): void; on(obj: Excel.Worksheet, event: 'QueryInterface', argNames: ['riid', 'ppvObj'], handler: (this: Excel.Worksheet, parameter: { readonly riid: stdole.GUID, ppvObj: undefined }) => void): void; on(obj: Excel.Application, event: 'AddRef' | 'AfterCalculate' | 'Release', handler: (this: Excel.Application, parameter: {}) => void): void; on(obj: Excel.Chart, event: 'Activate' | 'AddRef' | 'Calculate' | 'Deactivate' | 'DragOver' | 'DragPlot' | 'Release' | 'Resize', handler: (this: Excel.Chart, parameter: {}) => void): void; @@ -9719,10 +10159,13 @@ interface ActiveXObject { on(obj: Excel.QueryTable, event: 'AddRef' | 'Release', handler: (this: Excel.QueryTable, parameter: {}) => void): void; on(obj: Excel.Workbook, event: 'Activate' | 'AddinInstall' | 'AddinUninstall' | 'AddRef' | 'Deactivate' | 'Open' | 'Release', handler: (this: Excel.Workbook, parameter: {}) => void): void; on(obj: Excel.Worksheet, event: 'Activate' | 'AddRef' | 'Calculate' | 'Deactivate' | 'Release', handler: (this: Excel.Worksheet, parameter: {}) => void): void; - set(obj: Excel.Chart, propertyName: 'HasAxis', parameterTypes: [any, any], newValue: any): void; - set(obj: Excel.Workbook, propertyName: 'Colors', parameterTypes: [any], newValue: any): void; + set(obj: Excel.Chart, propertyName: 'HasAxis', parameterTypes: [Excel.XlAxisType | undefined, Excel.XlAxisGroup | undefined], newValue: boolean): void; + set(obj: Excel.ControlFormat, propertyName: 'List', parameterTypes: [number], newValue: string): void; + set(obj: Excel.ControlFormat, propertyName: 'List', parameterTypes: never[], newValue: SafeArray): void; + set(obj: Excel.PageSetup, propertyName: 'PrintQuality', parameterTypes: [number], newValue: number): void; + set(obj: Excel.Workbook, propertyName: 'Colors', parameterTypes: [number], newValue: number): 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 + set(obj: Excel.PivotField, propertyName: 'Subtotals', parameterTypes: [Excel.PivotFieldSubtotal], newValue: boolean): void; } interface ActiveXObjectNameMap { @@ -9730,57 +10173,3 @@ interface ActiveXObjectNameMap { 'Excel.Chart': Excel.Chart; 'Excel.Sheet': Excel.Worksheet; } - -interface EnumeratorConstructor { - new(col: Excel.Range): Enumerator; - - new(col: Excel.GroupShapes | Excel.ShapeRange | Excel.Shapes): Enumerator; - new(col: Excel.HPageBreaks): Enumerator; - new(col: Excel.Hyperlinks): Enumerator; - new(col: Excel.IconSet): Enumerator; - new(col: Excel.ListColumns): Enumerator; - new(col: Excel.ListObjects): Enumerator; - new(col: Excel.ListRows): Enumerator; - new(col: Excel.MenuBars): Enumerator; - new(col: Excel.Menus): Enumerator; - new(col: Excel.Names): Enumerator; - new(col: Excel.ODBCErrors): Enumerator; - new(col: Excel.OLEDBErrors): Enumerator; - new(col: Excel.Pages): Enumerator; - new(col: Excel.Parameters): Enumerator; - new(col: Excel.PivotCaches): Enumerator; - new(col: Excel.PivotFilters): Enumerator; - new(col: Excel.PivotFormulas): Enumerator; - new(col: Excel.PivotLineCells): Enumerator; - new(col: Excel.PivotLines): Enumerator; - new(col: Excel.PivotTableChangeList): Enumerator; - new(col: Excel.ProtectedViewWindows): Enumerator; - new(col: Excel.PublishObjects): Enumerator; - new(col: Excel.QueryTables): Enumerator; - new(col: Excel.RecentFiles): Enumerator; - new(col: Excel.Sheets): Enumerator; - new(col: Excel.ShapeNodes): Enumerator; - new(col: Excel.SlicerCacheLevels): Enumerator; - new(col: Excel.SlicerCaches): Enumerator; - new(col: Excel.SlicerItems): Enumerator; - new(col: Excel.SlicerPivotTables): Enumerator; - new(col: Excel.Slicers): Enumerator; - new(col: Excel.SmartTagActions): Enumerator; - new(col: Excel.SmartTagRecognizers): Enumerator; - new(col: Excel.SortFields): Enumerator; - new(col: Excel.SparklineGroup): Enumerator; - new(col: Excel.SparklineGroups): Enumerator; - new(col: Excel.Styles): Enumerator; - new(col: Excel.TableStyleElements): Enumerator; - new(col: Excel.TableStyles): Enumerator; - new(col: Excel.ToolbarButtons): Enumerator; - new(col: Excel.Toolbars): Enumerator; - new(col: Excel.UserAccessList): Enumerator; - new(col: Excel.VPageBreaks): Enumerator; - new(col: Excel.Watches): Enumerator; - new(col: Excel.Windows): Enumerator; - new(col: Excel.Workbooks): Enumerator; - new(col: Excel.XmlMaps): Enumerator; - new(col: Excel.XmlNamespaces): Enumerator; - new(col: Excel.XmlSchemas): Enumerator; -} diff --git a/types/activex-excel/tslint.json b/types/activex-excel/tslint.json index f93cf8562a..7b89accc6d 100644 --- a/types/activex-excel/tslint.json +++ b/types/activex-excel/tslint.json @@ -1,3 +1,7 @@ { - "extends": "dtslint/dt.json" + "extends": "dtslint/dt.json", + "rules": { + "no-const-enum": false, + "max-line-length": false + } } diff --git a/types/activex-interop/index.d.ts b/types/activex-interop/index.d.ts index 3bb13a5351..d59b315fcb 100644 --- a/types/activex-interop/index.d.ts +++ b/types/activex-interop/index.d.ts @@ -51,7 +51,6 @@ interface Enumerator { interface EnumeratorConstructor { new (collection: { Item(index: any): T }): Enumerator; - // new (collection: any): Enumerator; } declare var Enumerator: EnumeratorConstructor; diff --git a/types/activex-office/index.d.ts b/types/activex-office/index.d.ts index 18a7dd285d..6df01eb16e 100644 --- a/types/activex-office/index.d.ts +++ b/types/activex-office/index.d.ts @@ -10,6 +10,8 @@ declare namespace Office { type MsoRGBType = number; + type ByteArray = SafeArray; + const enum BackstageGroupStyle { BackstageGroupStyleError = 2, BackstageGroupStyleNormal = 0, diff --git a/types/activex-outlook/index.d.ts b/types/activex-outlook/index.d.ts index 2b316d80bd..4789c10e19 100644 --- a/types/activex-outlook/index.d.ts +++ b/types/activex-outlook/index.d.ts @@ -5886,7 +5886,3 @@ interface EnumeratorConstructor { new(col: Outlook.Reminders): Enumerator; new(col: Outlook.Views): Enumerator; } - -interface SafeArray { - _brand: SafeArray; -} diff --git a/types/adone/index.d.ts b/types/adone/index.d.ts index c6add2eeea..521bdf6e03 100644 --- a/types/adone/index.d.ts +++ b/types/adone/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/ciferox/adone // Definitions by: am , Maximus // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.4 +// TypeScript Version: 2.6 /// /// diff --git a/types/agenda/agenda-tests.ts b/types/agenda/agenda-tests.ts index a7031d2ef8..aef7ecd7d6 100644 --- a/types/agenda/agenda-tests.ts +++ b/types/agenda/agenda-tests.ts @@ -1,109 +1,110 @@ import Agenda = require("agenda"); -import { Db, Server } from "mongodb"; +import { Db, Server, MongoClient } from "mongodb"; var mongoConnectionString = "mongodb://127.0.0.1/agenda"; -var agenda = new Agenda({ db: { address: mongoConnectionString } }); +(async () => { + var agenda = new Agenda({ db: { address: mongoConnectionString } }); + var agenda = new Agenda({ + mongo: (await MongoClient.connect(mongoConnectionString)).db(), + db: { collection: 'agenda-jobs' }, + }); -agenda.define<{ foo: Error }>('delete old users', (job, done) => { - done(job.attrs.data.foo) + agenda.define<{ foo: Error }>('delete old users', (job, done) => { + done(job.attrs.data.foo) + }); + + agenda.on('ready', () => { + agenda.every('3 minutes', 'delete old users'); + + // Alternatively, you could also do: + agenda.every('*/3 * * * *', 'delete old users'); + + agenda.start(); + }); + + agenda.define('send email report', { priority: 'high', concurrency: 10 }, (job, done) => { + }); + + agenda.on('ready', () => { + agenda.schedule('in 20 minutes', 'send email report', { to: 'admin@example.com' }); + agenda.start(); + }); + + agenda.on('ready', () => { + var weeklyReport = agenda.create('send email report', { to: 'another-guy@example.com' }); + weeklyReport.repeatEvery('1 week').save(); + agenda.start(); + }); + + var agenda = new Agenda({ processEvery: '30 seconds' }); + + agenda.defaultConcurrency(5); + + var agenda = new Agenda({ defaultConcurrency: 5 }); + + agenda.lockLimit(0); + + var agenda = new Agenda({ lockLimit: 0 }); + + agenda.defaultLockLimit(0); + + var agenda = new Agenda({ defaultLockLimit: 0 }); + + agenda.defaultLockLifetime(10000); + + var agenda = new Agenda({ defaultLockLifetime: 10000 }); + + agenda.define('some long running job', function (job, done) { + done(); + }); + + agenda.every('15 minutes', ['printAnalyticsReport', 'sendNotifications', 'updateUserRecords']); + + agenda.schedule('tomorrow at noon', 'printAnalyticsReport', { userCount: 100 }); + + agenda.schedule('tomorrow at noon', ['printAnalyticsReport', 'sendNotifications', 'updateUserRecords']); + + agenda.now('do the hokey pokey'); + + var job = agenda.create<{ userCount: number }>('printAnalyticsReport', { userCount: 100 }); + await job.save(); + + const jobs = await agenda.jobs({ name: 'printAnalyticsReport' }); + jobs.forEach((job) => { + job.save(); + }); + + let numRemoved = await agenda.cancel({ name: 'printAnalyticsReport' }); + + numRemoved = await agenda.purge(); + + await agenda.stop(); + + await job.agenda.now('do the hokey pokey'); + + job.repeatEvery('10 minutes'); + + job.repeatEvery('10 minutes', { timezone: 'America/New_York' }); + + job.repeatEvery('10 minutes', { skipImmediate: true }); + + job.repeatAt('3:30pm'); + + job.schedule('tomorrow at 6pm'); + + job.priority('low'); + job.priority(10); + + job.unique({ 'data.type': 'active', 'data.userId': '123' }); + job.fail('insuficient disk space'); + job.fail(new Error('insufficient disk space')); + const job2 = await job.run(); + await job.remove(); }); -agenda.on('ready', () => { - agenda.every('3 minutes', 'delete old users'); - - // Alternatively, you could also do: - agenda.every('*/3 * * * *', 'delete old users'); - - agenda.start(); -}); - -agenda.define('send email report', { priority: 'high', concurrency: 10 }, (job, done) => { -}); - -agenda.on('ready', () => { - agenda.schedule('in 20 minutes', 'send email report', { to: 'admin@example.com' }); - agenda.start(); -}); - -agenda.on('ready', () => { - var weeklyReport = agenda.create('send email report', { to: 'another-guy@example.com' }); - weeklyReport.repeatEvery('1 week').save(); - agenda.start(); -}); - -var agenda = new Agenda({ processEvery: '30 seconds' }); - -agenda.defaultConcurrency(5); - -var agenda = new Agenda({ defaultConcurrency: 5 }); - -agenda.lockLimit(0); - -var agenda = new Agenda({ lockLimit: 0 }); - -agenda.defaultLockLimit(0); - -var agenda = new Agenda({ defaultLockLimit: 0 }); - -agenda.defaultLockLifetime(10000); - -var agenda = new Agenda({ defaultLockLifetime: 10000 }); - -agenda.define('some long running job', function(job, done) { - done(); -}); - -agenda.every('15 minutes', ['printAnalyticsReport', 'sendNotifications', 'updateUserRecords']); - -agenda.schedule('tomorrow at noon', 'printAnalyticsReport', { userCount: 100 }); - -agenda.schedule('tomorrow at noon', ['printAnalyticsReport', 'sendNotifications', 'updateUserRecords']); - -agenda.now('do the hokey pokey'); - -var job = agenda.create<{ userCount: number }>('printAnalyticsReport', { userCount: 100 }); -job.save(function(err) { - console.log("Job successfully saved"); -}); - -agenda.jobs({ name: 'printAnalyticsReport' }, function(err, jobs) { - // Work with jobs (see below) -}); - -agenda.cancel({ name: 'printAnalyticsReport' }, function(err, numRemoved) { -}); - -agenda.purge(function(err, numRemoved) { -}); - -agenda.stop(function() { - process.exit(0); -}); - -job.agenda.now('do the hokey pokey'); - -job.repeatEvery('10 minutes'); - -job.repeatAt('3:30pm'); - -job.schedule('tomorrow at 6pm'); - -job.priority('low'); -job.priority(10); - -job.unique({ 'data.type': 'active', 'data.userId': '123' }); -job.fail('insuficient disk space'); -job.fail(new Error('insufficient disk space')); -job.run(function(err, job) { - console.log("I don't know why you would need to do this..."); -}); -job.remove(function(err) { - if (!err) console.log("Successfully removed job from collection"); -}) - class ExtendedAgenda extends Agenda { - async start() { } + async start() { } } const extendedAgenda: ExtendedAgenda = new ExtendedAgenda() diff --git a/types/agenda/index.d.ts b/types/agenda/index.d.ts index b29158983d..75246ecda3 100644 --- a/types/agenda/index.d.ts +++ b/types/agenda/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for Agenda v1.0.3 +// Type definitions for Agenda v2.0.0 // Project: https://github.com/agenda/agenda // Definitions by: Meir Gottlieb // Jeff Principe @@ -95,16 +95,14 @@ declare class Agenda extends EventEmitter { /** * Find all Jobs matching `query` and pass same back in cb(). * @param query - * @param cb */ - jobs(query: any, cb: ResultCallback[]>): void; + jobs(query: any): Promise[]>; /** * Removes all jobs in the database without defined behaviors. Useful if you change a definition name and want * to remove old jobs. - * @param cb Called with the number of jobs removed. */ - purge(cb?: ResultCallback): void; + purge(): Promise; /** * Defines a job with the name of jobName. When a job of job name gets run, it will be passed to fn(job, done). @@ -123,46 +121,41 @@ declare class Agenda extends EventEmitter { * @param names The name or names of the job(s) to run. * @param data An optional argument that will be passed to the processing function under job.attrs.data. * @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?: T, 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): Promise>; + every(interval: number | string, names: string[], data?: T, options?: any): Promise[]>; /** * Schedules a job to run name once at a given time. * @param when A Date or a String such as tomorrow at 5pm. * @param names The name or names of the job(s) to run. * @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?: T, cb?: ResultCallback>): Agenda.Job; - schedule(when: Date | string, names: string[], data?: T, cb?: ResultCallback[]>): Agenda.Job[]; + schedule(when: Date | string, names: string, data?: T): Promise>; + schedule(when: Date | string, names: string[], data?: T): Promise[]>; /** * Schedules a job to run name once immediately. * @param name The name of the job to run. * @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?: T, cb?: ResultCallback>): Agenda.Job; + now(name: string, data?: T): Promise>; /** * Cancels any jobs matching the passed mongodb-native query, and removes them from the database. * @param query Mongodb native query. - * @param cb Called with the number of jobs removed. */ - cancel(query: any, cb?: ResultCallback): void; + cancel(query: any): Promise; /** * Starts the job queue processing, checking processEvery time to see if there are new jobs. */ - start(): void; + start(): Promise; /** * Stops the job queue processing. Unlocks currently running jobs. - * @param cb Called after the job processing queue shuts down and unlocks all jobs. */ - stop(cb: Callback): void; + stop(): Promise; } declare namespace Agenda { @@ -210,17 +203,7 @@ declare namespace Agenda { /** * Specifies that Agenda should be initialized using and existing MongoDB connection. */ - mongo?: { - /** - * The MongoDB database connection to use. - */ - db: Db; - - /** - * The name of the collection to use. - */ - collection?: string; - } + mongo?: Db; /** * Specifies that Agenda should connect to MongoDB. @@ -228,8 +211,10 @@ declare namespace Agenda { db?: { /** * The connection URL. + * Required when using `db` option to connect. + * Not required when an existing connection is passed as `mongo` property. */ - address: string; + address?: string; /** * The name of the collection to use. @@ -238,6 +223,7 @@ declare namespace Agenda { /** * Connection options to pass to MongoDB. + * Not required when an existing connection is passed as `mongo` property. */ options?: any; } @@ -350,57 +336,57 @@ declare namespace Agenda { /** * Specifies an interval on which the job should repeat. * @param interval A human-readable format String, a cron format String, or a Number. - * @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. + * @param options An optional argument that can include a timezone field or skipImmediate field. + * The timezone should be a string as accepted by moment-timezone and is considered when using an interval in the cron string format. + * Setting skipImmediate as true will skip the immediate run. The first run will occur only in configured interval. */ - repeatEvery(interval: string | number, options?: { timezone?: string }): Job + repeatEvery(interval: string | number, options?: { timezone?: string, skipImmediate?: boolean }): this /** * 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): this /** * Disables the job. */ - disable(): Job; + disable(): this; /** * Enables the job. */ - enable(): Job; + enable(): this; /** * 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 }): this; /** * 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): this; /** * 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): this; /** * 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): this; /** * 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(): Promise; /** * Returns true if the job is running; otherwise, returns false. @@ -409,27 +395,24 @@ declare namespace Agenda { /** * Saves the job into the database. - * @param cb Called when the job is saved. */ - save(cb?: ResultCallback>): Job; + save(): Promise; /** * Removes the job from the database and cancels the job. - * @param cb Called after the job has beeb removed from the database. */ - remove(cb?: Callback): void; + remove(): Promise; /** * Resets the lock on the job. Useful to indicate that the job hasn't timed out when you have very long running * jobs. - * @param cb Called after the job has been saved to the database. */ - touch(cb?: Callback): void; + touch(): Promise; /** * Calculates next time the job should run */ - computeNextRunAt(): Job; + computeNextRunAt(): this; } interface JobOptions { diff --git a/types/agent-base/agent-base-tests.ts b/types/agent-base/agent-base-tests.ts new file mode 100644 index 0000000000..116ff8af96 --- /dev/null +++ b/types/agent-base/agent-base-tests.ts @@ -0,0 +1,23 @@ +import agent = require('agent-base'); + +agent(); // $ExpectType Agent +agent({ timeout: 1000 }); // $ExpectType Agent + +agent((req, opts) => {}); // $ExpectType Agent +agent((req, opts) => {}, { timeout: 1000 }); // $ExpectType Agent + +agent(async (req, opts) => {}); // $ExpectType Agent +agent(async (req, opts) => {}, { timeout: 1000 }); // $ExpectType Agent + +agent(0); // $ExpectError +agent(1); // $ExpectError +agent(''); // $ExpectError +agent(true); // $ExpectError +agent(null); // $ExpectError + +agent((req, opts) => {}, 0); // $ExpectError +agent((req, opts) => {}, 1); // $ExpectError +agent((req, opts) => {}, ''); // $ExpectError +agent((req, opts) => {}, true); // $ExpectError +agent((req, opts) => {}, null); // $ExpectError +agent((req, opts) => {}, (req, opts) => {}); // $ExpectError diff --git a/types/agent-base/index.d.ts b/types/agent-base/index.d.ts new file mode 100644 index 0000000000..0b1e4d3018 --- /dev/null +++ b/types/agent-base/index.d.ts @@ -0,0 +1,44 @@ +// Type definitions for agent-base 4.2 +// Project: https://github.com/TooTallNate/node-agent-base#readme +// Definitions by: Christopher Quadflieg +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// +import { EventEmitter } from 'events'; + +declare namespace Agent { + type AgentCallback = ( + req?: any, + opts?: { + secureEndpoint: boolean; + } + ) => void; + + interface AgentOptions { + timeout?: number; + host?: string; + port?: number; + [key: string]: any; + } + + interface Agent extends EventEmitter { + _promisifiedCallback: boolean; + timeout: number | null; + options?: AgentOptions; + callback: AgentCallback; + addRequest: (req?: any, opts?: any) => void; + freeSocket: (socket: any, opts: any) => void; + } +} + +/** + * Base `http.Agent` implementation. + * No pooling/keep-alive is implemented by default. + */ +declare function Agent(opts?: Agent.AgentOptions): Agent.Agent; +declare function Agent( + callback: Agent.AgentCallback, + opts?: Agent.AgentOptions +): Agent.Agent; + +export = Agent; diff --git a/types/agent-base/tsconfig.json b/types/agent-base/tsconfig.json new file mode 100644 index 0000000000..dc6db21f70 --- /dev/null +++ b/types/agent-base/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "agent-base-tests.ts" + ] +} diff --git a/types/meteor-univserse-i18n/tslint.json b/types/agent-base/tslint.json similarity index 100% rename from types/meteor-univserse-i18n/tslint.json rename to types/agent-base/tslint.json diff --git a/types/agora-rtc-sdk/agora-rtc-sdk-tests.ts b/types/agora-rtc-sdk/agora-rtc-sdk-tests.ts new file mode 100644 index 0000000000..bfa00378db --- /dev/null +++ b/types/agora-rtc-sdk/agora-rtc-sdk-tests.ts @@ -0,0 +1,27 @@ +let client = AgoraRTC.createClient({ + mode: 'live', + codec: 'vp8' +}); + +let stream = AgoraRTC.createStream({ + video: true, + audio: true, + streamID: 21230, + screen: false +}); + +client.init('74a0b7bb5d3e47c7abca0533d17b0afa', () => { + client.join('74a0b7bb5d3e47c7abca0533d17b0afa', 'testyy', 21230, uid => { + stream.init(() => { + client.publish(stream, err => { + throw(err); + }); + }, err => { + throw(err); + }); + }, err => { + throw(err); + }); +}, err => { + throw(err); +}); diff --git a/types/agora-rtc-sdk/index.d.ts b/types/agora-rtc-sdk/index.d.ts new file mode 100644 index 0000000000..d70385d639 --- /dev/null +++ b/types/agora-rtc-sdk/index.d.ts @@ -0,0 +1,314 @@ +// Type definitions for agora-rtc-sdk 2.3 +// Project: https://github.com/AgoraIO/web-archive#readme +// Definitions by: Menthays +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.2 + +/*~ If this module is a UMD module that exposes a global variable 'myLib' when + *~ loaded outside a module loader environment, declare that global here. + *~ Otherwise, delete this declaration. + */ +export as namespace AgoraRTC; + +/*~ If this module has methods, declare them as functions like so. + */ +export function createClient(config: ClientConfig): Client; +export function createStream(spec: StreamSpec): Stream; +export function checkSystemRequirements(): boolean; +export function getDevices(callback: (devices: any[]) => void): void; + +/*~ You can declare types that are available via importing the module */ +export interface ClientConfig { + mode: 'live' | 'rtc'; + codec: 'vp8' | 'h264'; + proxyServer?: string; + turnServer?: { + turnServerURL: string; + username: string; + password: string; + udpport: string; + tcpport: string; + forceturn: boolean; + }; +} + +export interface StreamSpec { + streamID: number; + audio: boolean; + video: boolean; + screen: boolean; + cameraId?: string; + microphoneId?: string; + mirror?: boolean; + extensionid?: string; + mediaSource?: 'screen' | 'application' | 'window'; + audioProcessing?: { + AGC: boolean; + }; + attributes?: { + resolution: string; + minFrameRate: number; + maxFrameRate: number; + }; +} + +export interface LocalStreamStats { + audioSendBytes: string; + audioSendPackets: string; + videoSendBytes: string; + videoSendPackets: string; + videoSendPacketsLost: string; + videoSendFrameRate: string; + videoSendBandwidth: string; + videoSendResolutionWidth?: string; + videoSendResolutionHeight?: string; + audioCodecName: string; + videoCodecName: string; + timestamp: string; + startTime: string; + duration: string; +} + +export interface RemoteStreamStats { + audioReceiveBytes: string; + audioReceivePackets: string; + audioReceivePacketsLost: string; + videoReceiveBytes: string; + videoReceivePackets: string; + videoReceivePacketsLost: string; + videoReceiveFrameRate?: string; + videoReceiveDecodeFrameRate?: string; + videoReceiveBandwidth?: string; + videoReceivedResolutionWidth?: string; + videoReceivedResolutionHeight?: string; + timestamp: string; + startTime: string; + duration: string; +} + +export type VideoProfile = + | '120p' + | '120p_1' + | '120p_3' + | '180p' + | '180p_1' + | '180p_3' + | '180p_4' + | '240p' + | '240p_1' + | '240p_3' + | '240p_4' + | '360p' + | '360p_1' + | '360p_3' + | '360p_4' + | '360p_6' + | '360p_7' + | '360p_8' + | '360p_9' + | '360p_10' + | '360p_11' + | '480p' + | '480p_1' + | '480p_2' + | '480p_3' + | '480p_4' + | '480p_6' + | '480p_8' + | '480p_9' + | '480p_10' + | '720p' + | '720p_1' + | '720p_2' + | '720p_3' + | '720p_5' + | '720p_6' + | '1080p' + | '1080p_1' + | '1080p_2' + | '1080p_3' + | '1080p_5' + | '1440p' + | '1440p_1' + | '1440p_2' + | '4K' + | '4K_1' + | '4K_3'; + +export type FirefoxVideoProfile = + | '480p' + | '480p_1' + | '480p_2' + | '480p_3' + | '480p_4' + | '480p_6' + | '480p_8' + | '480p_9' + | '480p_10' + | '720p' + | '720p_1' + | '720p_2' + | '720p_3' + | '720p_5' + | '720p_6'; + +export type SafariVideoProfile = + | '480p' + | '480p_1' + | '480p_2' + | '480p_3' + | '480p_4' + | '480p_6' + | '480p_8' + | '480p_9' + | '480p_10' + | '720p' + | '720p_1' + | '720p_2' + | '720p_3' + | '720p_5' + | '720p_6' + | '1080p' + | '1080p_1' + | '1080p_2' + | '1080p_3' + | '1080p_5' + | '1440p' + | '1440p_1' + | '1440p_2' + | '4K' + | '4K_1' + | '4K_3'; + +export type ScreenSharingProfile = + | '480p_1' + | '480p_2' + | '720p_1' + | '720p_2' + | '1080p_1' + | '1080p_2'; + +export type ClientEvent = + | 'stream-published' + | 'stream-added' + | 'stream-removed' + | 'stream-subscribed' + | 'peer-leave' + | 'mute-audio' + | 'unmute-audio' + | 'mute-video' + | 'unmute-video' + | 'client-banned' + | 'active-speaker' + | 'error'; + +export interface Stream { + getStats( + callback: (stats: LocalStreamStats | RemoteStreamStats) => void + ): void; + init(onSuccess: () => void, onFailure: (err: any) => void): void; + getId(): number; + getAttributes(): any; + getAudioLevel(): number; + hasVideo(): boolean; + hasAudio(): boolean; + enableVideo(): void; + disableVideo(): void; + enableAudio(): void; + disableAudio(): void; + setVideoProfile( + profile: + | VideoProfile + | FirefoxVideoProfile + | SafariVideoProfile + | ScreenSharingProfile + ): void; + play(HTMLElementID: string): void; + stop(): void; + close(): void; +} + +export interface Client { + on(eventName: ClientEvent, callback: (evt: any) => void): void; + init( + appId: string, + onSuccess: () => void, + onFailure: (err: any) => void + ): void; + join( + tokenOrKey: string, + channel: string, + uid: number, + onSuccess: (uid: number) => void, + onFailure: (err: any) => void + ): void; + renewChannelKey( + key: string, + onSuccess: () => void, + onFailure: (err: any) => void + ): void; + enableDualStream( + onSuccess: () => void, + onFailure: (err: any) => void + ): void; + setRemoteVideoStreamType(stream: Stream, streamType: 0 | 1): void; + setLowStreamParameter(param: { + width: number; + height: number; + framerate: number; + birate: number; + }): void; + disableDualStream( + onSuccess: () => void, + onFailure: (err: any) => void + ): void; + leave(onSuccess: () => void, onFailure: (err: any) => void): void; + publish(stream: Stream, onFailure: (err: any) => void): void; + unpublish(stream: Stream, onFailure: (err: any) => void): void; + subscribe(stream: Stream, onFailure: (err: any) => void): void; + unsubscribe(stream: Stream, onFailure: (err: any) => void): void; + setProxyServer(proxyServer: ClientConfig['proxyServer']): void; + setTurnServer(turnServer: ClientConfig['turnServer']): void; + setEncryptionSecret(password: string): void; + setEncryptionMode( + encryptionMode: 'aes-128-xts' | 'aes-256-xts' | 'aes-128-ecb' + ): void; +} + +/*~ You can declare properties of the module using const, let, or var */ +export const VERSION: string; + +export const AUDIO_SAMPLE_RATE_32000: 32000; +export const AUDIO_SAMPLE_RATE_44100: 44100; +export const AUDIO_SAMPLE_RATE_48000: 48000; + +export const VIDEO_CODEC_PROFILE_BASELINE: 66; +export const VIDEO_CODEC_PROFILE_MAIN: 77; +export const VIDEO_CODEC_PROFILE_HIGH: 100; + +export const REMOTE_VIDEO_STREAM_HIGH: 0; +export const REMOTE_VIDEO_STREAM_LOW: 1; +export const REMOTE_VIDEO_STREAM_MEDIUM: 2; +/*~ If there are types, properties, or methods inside dotted names + *~ of the module, declare them inside a 'namespace'. + */ +export namespace Logger { + /*~ For example, given this definition, someone could write: + *~ import { subProp } from 'yourModule'; + *~ subProp.foo(); + *~ or + *~ import * as yourMod from 'yourModule'; + *~ yourMod.subProp.foo(); + */ + type DEBUG = 0; + type INFO = 1; + type WARNING = 2; + type ERROR = 3; + type NONE = 4; + function setLogLevel(level: DEBUG|INFO|WARNING|NONE): void; + function log(args: any): void; + function debug(args: any): void; + function info(args: any): void; + function warning(args: any): void; + function error(args: any): void; +} diff --git a/types/agora-rtc-sdk/tsconfig.json b/types/agora-rtc-sdk/tsconfig.json new file mode 100644 index 0000000000..8d3d2c118b --- /dev/null +++ b/types/agora-rtc-sdk/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", + "agora-rtc-sdk-tests.ts" + ] +} diff --git a/types/react-svg/tslint.json b/types/agora-rtc-sdk/tslint.json similarity index 100% rename from types/react-svg/tslint.json rename to types/agora-rtc-sdk/tslint.json diff --git a/types/algoliasearch/index.d.ts b/types/algoliasearch/index.d.ts index b2890573ce..0c2d244b05 100644 --- a/types/algoliasearch/index.d.ts +++ b/types/algoliasearch/index.d.ts @@ -764,6 +764,11 @@ declare namespace algoliasearch { * https://github.com/algolia/algoliasearch-client-js#client-options */ hosts?: { read?: string[]; write?: string[] }; + /** + * enable the experimental feature: caching requests instead of responses + * see https://github.com/algolia/algoliasearch-client-javascript/pull/694 + */ + _useRequestCache?: boolean } /** * Interface describing options available for gettings the logs @@ -1771,6 +1776,14 @@ declare namespace algoliasearch { facets?: { [facetName: string]: { [facetValue: string]: number }; }; + facets_stats?: { + [facetName: string]: { + avg: number, + max: number, + min: number, + sum: number, + }; + }; } interface MultiResponse { diff --git a/types/algoliasearch/lite/index.d.ts b/types/algoliasearch/lite/index.d.ts index a567a917a8..4f068d5647 100644 --- a/types/algoliasearch/lite/index.d.ts +++ b/types/algoliasearch/lite/index.d.ts @@ -4,6 +4,7 @@ // Haroen Viaene // Aurélien Hervé // Samuel Vaillant +// Claas Brüggemann // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.2 @@ -180,6 +181,11 @@ declare namespace algoliasearch { * https://github.com/algolia/algoliasearch-client-js#client-options */ hosts?: { read?: string[]; write?: string[] }; + /** + * enable the experimental feature: caching requests instead of responses + * see https://github.com/algolia/algoliasearch-client-javascript/pull/694 + */ + _useRequestCache?: boolean } interface BrowseResponse { cursor?: string; @@ -565,6 +571,14 @@ declare namespace algoliasearch { facets?: { [facetName: string]: { [facetValue: string]: number }; }; + facets_stats?: { + [facetName: string]: { + avg: number, + max: number, + min: number, + sum: number, + }; + }; } interface MultiResponse { diff --git a/types/almost-equal/almost-equal-tests.ts b/types/almost-equal/almost-equal-tests.ts new file mode 100644 index 0000000000..398017e7ec --- /dev/null +++ b/types/almost-equal/almost-equal-tests.ts @@ -0,0 +1,7 @@ +import * as almostEqual from 'almost-equal'; + +const res1 = almostEqual(1.999999, 2.0); + +const res2 = almostEqual(1.999999, 2.0, almostEqual.DBL_EPSILON); + +const res3 = almostEqual(1.999999, 2.0, almostEqual.FLT_EPSILON, almostEqual.FLT_EPSILON); diff --git a/types/almost-equal/index.d.ts b/types/almost-equal/index.d.ts new file mode 100644 index 0000000000..cacbaa4886 --- /dev/null +++ b/types/almost-equal/index.d.ts @@ -0,0 +1,11 @@ +// Type definitions for almost-equal 1.1 +// Project: https://github.com/mikolalysenko/almost-equal#readme +// Definitions by: Curtis Maddalozzo +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare function almostEqual(value: number, other: number, absoluteTolerance?: number, relativeTolerance?: number): boolean; +declare namespace almostEqual { + const FLT_EPSILON: number; + const DBL_EPSILON: number; +} +export = almostEqual; diff --git a/types/fork-ts-checker-webpack-plugin/tsconfig.json b/types/almost-equal/tsconfig.json similarity index 90% rename from types/fork-ts-checker-webpack-plugin/tsconfig.json rename to types/almost-equal/tsconfig.json index cfd6ee81db..a4a61b092b 100644 --- a/types/fork-ts-checker-webpack-plugin/tsconfig.json +++ b/types/almost-equal/tsconfig.json @@ -7,17 +7,17 @@ "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, - "strictFunctionTypes": true, "baseUrl": "../", "typeRoots": [ "../" ], + "strictFunctionTypes": true, "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true }, "files": [ "index.d.ts", - "fork-ts-checker-webpack-plugin-tests.ts" + "almost-equal-tests.ts" ] } diff --git a/types/almost-equal/tslint.json b/types/almost-equal/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/almost-equal/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/alt/index.d.ts b/types/alt/index.d.ts index 0c69e4020a..9094642e70 100644 --- a/types/alt/index.d.ts +++ b/types/alt/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/goatslacker/alt // Definitions by: Michael Shearer // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 /// diff --git a/types/amp/amp-tests.ts b/types/amp/amp-tests.ts index 1e17bc8507..983c1f993b 100644 --- a/types/amp/amp-tests.ts +++ b/types/amp/amp-tests.ts @@ -32,7 +32,7 @@ new Stream({ highWaterMark: 1, decodeStrings: true, objectMode: true, - destroy: (error?: Error) => { + destroy: (error: Error | null) => { return 'handle error'; }, final: (callback: (error?: Error) => void) => { diff --git a/types/amqp-connection-manager/amqp-connection-manager-tests.ts b/types/amqp-connection-manager/amqp-connection-manager-tests.ts new file mode 100644 index 0000000000..6eae738a3c --- /dev/null +++ b/types/amqp-connection-manager/amqp-connection-manager-tests.ts @@ -0,0 +1,25 @@ +import * as amqp from "amqplib"; +import * as amqpConMgr from 'amqp-connection-manager'; + +// from README.md +const connection = amqpConMgr.connect(['amqp://localhost']); +const channelWrapper: amqpConMgr.ChannelWrapper = connection.createChannel({ + json: true, + setup: async (channel: amqp.ConfirmChannel): Promise => { + // `channel` here is a regular amqplib `ConfirmChannel`. Unfortunately its typings make it return a bluebird-specific promise + // tslint:disable-next-line:await-promise + await channel.assertQueue('rxQueueName', {durable: true}); + } +}); + +connection.on("connect", (_arg: { connection: amqp.Connection, url: string }): void => undefined); +connection.on("disconnect", (_arg: { err: Error }): void => undefined); + +channelWrapper.on("close", () => undefined); +channelWrapper.on("connect", () => undefined); +channelWrapper.on("error", (_error: Error) => undefined); + +channelWrapper.sendToQueue("foo", Buffer.from("bar")) + .catch((error: Error): void => { + // nothing + }); diff --git a/types/amqp-connection-manager/index.d.ts b/types/amqp-connection-manager/index.d.ts new file mode 100644 index 0000000000..ab69aadeb1 --- /dev/null +++ b/types/amqp-connection-manager/index.d.ts @@ -0,0 +1,184 @@ +// Type definitions for amqp-connection-manager 2.0 +// Project: https://github.com/benbria/node-amqp-connection-manager +// Definitions by: rogierschouten +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.8 + +import { ConfirmChannel, Connection, Message, Options, Replies } from "amqplib"; +import { EventEmitter } from "events"; +import { SecureContextOptions } from "tls"; + +/** + * connect() options + */ +export interface AmqpConnectionManagerOptions { + /** + * Interval to send heartbeats to broker. Defaults to 5 seconds. + */ + heartbeatIntervalInSeconds?: number; + + /** + * The time to wait before trying to reconnect. If not specified, defaults to heartbeatIntervalInSeconds + */ + reconnectTimeInSeconds?: number; + + /** + * is a function which returns one or more servers to connect to. This should return either a single URL or an array of URLs. + * This is handy when you're using a service discovery mechanism such as Consul or etcd. Instead of taking a callback, this can also + * return a Promise. Note that if this is supplied, then urls is ignored. + */ + findServers?: ((callback: (urls: string | string[]) => void) => void) | (() => Promise); + + /** + * TLS options + */ + connectionOptions?: SecureContextOptions; +} + +/** + * Creates a new AmqpConnectionManager, which will connect to one of the URLs provided in urls. + * If a broker is unreachable or dies, then AmqpConnectionManager will try the next available broker, round-robin. + * @param urls + * @param options + */ +export function connect(urls: string[], options?: AmqpConnectionManagerOptions): AmqpConnectionManager; + +export type SetupFunc = ((channel: ConfirmChannel, callback: (error?: Error) => void) => void) | ((channel: ConfirmChannel) => Promise); + +export interface CreateChannelOpts { + /** + * Name for this channel. Used for debugging. + */ + name?: string; + /** + * A function to call whenever we reconnect to the broker (and therefore create a new underlying channel.) + * This function should either accept a callback, or return a Promise. See addSetup below + */ + setup?: SetupFunc; + /** + * if true, then ChannelWrapper assumes all messages passed to publish() and sendToQueue() are plain JSON objects. + * These will be encoded automatically before being sent. + */ + json?: boolean; +} + +export interface AmqpConnectionManager extends EventEmitter { + addListener(event: string, listener: (...args: any[]) => void): this; + addListener(event: "connect", listener: (arg: { connection: Connection, url: string }) => void): this; + addListener(event: "disconnect", listener: (arg: {err: Error}) => void): this; + + on(event: string, listener: (...args: any[]) => void): this; + on(event: "connect", listener: (arg: { connection: Connection, url: string }) => void): this; + on(event: "disconnect", listener: (arg: {err: Error}) => void): this; + + once(event: string, listener: (...args: any[]) => void): this; + once(event: "connect", listener: (arg: { connection: Connection, url: string }) => void): this; + once(event: "disconnect", listener: (arg: {err: Error}) => void): this; + + prependListener(event: string, listener: (...args: any[]) => void): this; + prependListener(event: "connect", listener: (arg: { connection: Connection, url: string }) => void): this; + prependListener(event: "disconnect", listener: (arg: {err: Error}) => void): this; + + prependOnceListener(event: string, listener: (...args: any[]) => void): this; + prependOnceListener(event: "connect", listener: (arg: { connection: Connection, url: string }) => void): this; + prependOnceListener(event: "disconnect", listener: (arg: {err: Error}) => void): this; + + /** + * Create a new ChannelWrapper. This is a proxy for the actual channel (which may or may not exist at any moment, depending on whether or not we are currently connected.) + * @param opts + */ + createChannel(opts: CreateChannelOpts): ChannelWrapper; + + /** + * Returns true if the AmqpConnectionManager is connected to a broker, false otherwise. + */ + isConnected(): boolean; + + /** + * Close this AmqpConnectionManager and free all associated resources. + */ + close(): Promise; +} + +export interface ChannelWrapper extends EventEmitter { + addListener(event: string, listener: (...args: any[]) => void): this; + addListener(event: "connect", listener: () => void): this; + addListener(event: "error", listener: (err: Error, info: { name: string }) => void): this; + addListener(event: "close", listener: () => void): this; + + on(event: string, listener: (...args: any[]) => void): this; + on(event: "connect", listener: () => void): this; + on(event: "error", listener: (err: Error, info: { name: string }) => void): this; + on(event: "close", listener: () => void): this; + + once(event: string, listener: (...args: any[]) => void): this; + once(event: "connect", listener: () => void): this; + once(event: "error", listener: (err: Error, info: { name: string }) => void): this; + once(event: "close", listener: () => void): this; + + prependListener(event: string, listener: (...args: any[]) => void): this; + prependListener(event: "connect", listener: () => void): this; + prependListener(event: "error", listener: (err: Error, info: { name: string }) => void): this; + prependListener(event: "close", listener: () => void): this; + + prependOnceListener(event: string, listener: (...args: any[]) => void): this; + prependOnceListener(event: "connect", listener: () => void): this; + prependOnceListener(event: "error", listener: (err: Error, info: { name: string }) => void): this; + prependOnceListener(event: "close", listener: () => void): this; + + /** + * Adds a new 'setup handler'. setup(channel, [cb]) is a function to call when a new underlying channel is created - + * handy for asserting exchanges and queues exists, and whatnot. The channel object here is a ConfirmChannel from amqplib. + * The setup function should return a Promise (or optionally take a callback) - no messages will be sent until this Promise resolves. + * If there is a connection, setup() will be run immediately, and the addSetup Promise/callback won't resolve until setup is complete. + * Note that in this case, if the setup throws an error, no 'error' event will be emitted, since you can just handle the error here + * (although the setup will still be added for future reconnects, even if it throws an error.) + * Setup functions should, ideally, not throw errors, but if they do then the ChannelWrapper will emit an 'error' event. + * @param func + */ + addSetup(func: SetupFunc): Promise; + + /** + * @see amqplib + * @param exchange + * @param routingKey + * @param content + * @param options + * @param callback + */ + publish(exchange: string, routingKey: string, content: Buffer, options?: Options.Publish, callback?: (err: any, ok: Replies.Empty) => void): Promise; + + /** + * @see amqplib + * @param queue + * @param content + * @param options + * @param callback + */ + sendToQueue(queue: string, content: Buffer, options?: Options.Publish, callback?: (err: any, ok: Replies.Empty) => void): Promise; + + /** + * @see amqplib + * @param message + * @param allUpTo + */ + ack(message: Message, allUpTo?: boolean): void; + + /** + * @see amqplib + * @param message + * @param allUpTo + * @param requeue + */ + nack(message: Message, allUpTo?: boolean, requeue?: boolean): void; + + /** + * Returns a count of messages currently waiting to be sent to the underlying channel. + */ + queueLength(): number; + + /** + * Close a channel, clean up resources associated with it. + */ + close(): Promise; +} diff --git a/types/amqp-connection-manager/tsconfig.json b/types/amqp-connection-manager/tsconfig.json new file mode 100644 index 0000000000..d707bd5a65 --- /dev/null +++ b/types/amqp-connection-manager/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", + "amqp-connection-manager-tests.ts" + ] +} diff --git a/types/amqp-connection-manager/tslint.json b/types/amqp-connection-manager/tslint.json new file mode 100644 index 0000000000..d57642e30f --- /dev/null +++ b/types/amqp-connection-manager/tslint.json @@ -0,0 +1,8 @@ +{ + "extends": "dtslint/dt.json", + "rules": { + "strict-export-declare-modifiers": false, + "unified-signatures": false, + "void-return": false + } +} diff --git a/types/amqplib/index.d.ts b/types/amqplib/index.d.ts index 269ed0112e..9ad6d9ceda 100644 --- a/types/amqplib/index.d.ts +++ b/types/amqplib/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/squaremo/amqp.node // Definitions by: Michael Nahkies , Ab Reitsma , Nicolás Fantone , Nick Zelei // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.3 +// TypeScript Version: 2.8 /// diff --git a/types/angular-block-ui/angular-block-ui-tests.ts b/types/angular-block-ui/angular-block-ui-tests.ts index 58547fff4d..4446e73234 100644 --- a/types/angular-block-ui/angular-block-ui-tests.ts +++ b/types/angular-block-ui/angular-block-ui-tests.ts @@ -38,4 +38,9 @@ app.controller('Ctrl', ($scope: ng.IScope, blockUI: angular.blockUI.BlockUIServi blockUI.message("Hello Types"); blockUI.done(); const b: boolean = blockUI.isBlocking(); + + const myBlockUI = blockUI.instances.get("myBlockUI"); + myBlockUI.start(); + myBlockUI.reset(); + myBlockUI.stop(); }); diff --git a/types/angular-block-ui/index.d.ts b/types/angular-block-ui/index.d.ts index f415d386e9..f0dcdcd076 100644 --- a/types/angular-block-ui/index.d.ts +++ b/types/angular-block-ui/index.d.ts @@ -1,6 +1,6 @@ // Type definitions for angular-block-ui 0.2 // Project: https://github.com/McNull/angular-block-ui -// Definitions by: Lasse Nørregaard , Stephan Classen +// Definitions by: Lasse Nørregaard , Stephan Classen , Soner Köksal // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 @@ -164,6 +164,12 @@ declare module 'angular' { * Returns whether currently a block is shown for the instance or not. */ isBlocking(): boolean; + + instances: BlockUIInstances; + } + + interface BlockUIInstances { + get(id: string): BlockUIService; } } } diff --git a/types/angular-desktop-notification/index.d.ts b/types/angular-desktop-notification/index.d.ts index 6281396b66..2e017da49b 100644 --- a/types/angular-desktop-notification/index.d.ts +++ b/types/angular-desktop-notification/index.d.ts @@ -22,7 +22,7 @@ declare module 'angular' { * This is an experimental technology * Ref: https://developer.mozilla.org/en-US/docs/Web/API/Notification/badge */ - badge?: USVString; + badge?: string; /** * The data read-only property of the Notification interface returns a structured clone of the notification's data, @@ -40,7 +40,7 @@ declare module 'angular' { * Note: This feature is available in Web Workers. * Ref: https://developer.mozilla.org/en-US/docs/Web/API/Notification/image */ - image?: USVString; + image?: string; /** * The renotify read-only property of the Notification interface specifies whether the user should be notified after a diff --git a/types/angular-gettext/angular-gettext-tests.ts b/types/angular-gettext/angular-gettext-tests.ts index 766b16a963..1b1d5b6342 100644 --- a/types/angular-gettext/angular-gettext-tests.ts +++ b/types/angular-gettext/angular-gettext-tests.ts @@ -24,6 +24,8 @@ angular.module("myApp").controller("helloController", function (gettextCatalog: angular.module("myApp").controller("helloController", function (gettextCatalog: angular.gettext.gettextCatalog) { var myString2: string = gettextCatalog.getPlural(3, "Bird", "Birds"); + var myStringWithScope: string = gettextCatalog.getPlural(4, "{{color}} Bird", "{{color}} Birds", {color: 'Blue'}); + var myStringWithContext: string = gettextCatalog.getPlural(5, "pick", "picks", null, 'noun'); }); angular.module("myApp").controller("helloController", function (gettextCatalog: angular.gettext.gettextCatalog) { diff --git a/types/angular-gettext/index.d.ts b/types/angular-gettext/index.d.ts index 5b6eb1d90f..6b5fe29e73 100644 --- a/types/angular-gettext/index.d.ts +++ b/types/angular-gettext/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for angular-gettext v2.1.0 +// Type definitions for angular-gettext v2.1.1 // Project: https://angular-gettext.rocketeer.be/ // Definitions by: Ákos Lukács // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -66,7 +66,7 @@ declare module 'angular' { getString(string: string, scope?: any, context?: string): string; /** Translate a plural string with the given context. */ - getPlural(n: number, string: string, stringPlural: string, context?: any): string; + getPlural(n: number, string: string, stringPlural: string, scope?: any, context?: string): string; /** Load a set of translation strings from a given URL.This should be a JSON catalog generated with grunt-angular-gettext. More details https://angular-gettext.rocketeer.be/dev-guide/lazy-loading/ */ loadRemote(url: string): ng.IHttpPromise; diff --git a/types/angular-mocks/angular-mocks-tests.ts b/types/angular-mocks/angular-mocks-tests.ts index f04c9a2a30..662d75c079 100644 --- a/types/angular-mocks/angular-mocks-tests.ts +++ b/types/angular-mocks/angular-mocks-tests.ts @@ -87,7 +87,6 @@ timeoutService.verifyNoPendingTasks(); let intervalService: ng.IIntervalService; let intervalServiceTimeActuallyAdvanced: number; -intervalServiceTimeActuallyAdvanced = intervalService.flush(); intervalServiceTimeActuallyAdvanced = intervalService.flush(1234); /////////////////////////////////////// @@ -1509,12 +1508,30 @@ requestHandler.respond(expectedData); requestHandler.respond({ key: 'value' }); requestHandler.respond({ key: 'value' }, { header: 'value' }); requestHandler.respond({ key: 'value' }, { header: 'value' }, 'responseText'); +requestHandler.respond(404); requestHandler.respond(404, 'data'); requestHandler.respond(404, 'data').respond({}); requestHandler.respond(404, { key: 'value' }); requestHandler.respond(404, { key: 'value' }, { header: 'value' }); requestHandler.respond(404, { key: 'value' }, { header: 'value' }, 'responseText'); +/////////////////////////////////////// +// IFlushPendingTasksService +/////////////////////////////////////// +let $flushPendingTasks: ng.IFlushPendingTasksService; +$flushPendingTasks(); +$flushPendingTasks(42); + +/////////////////////////////////////// +// IVerifyNoPendingTasksService +/////////////////////////////////////// +let $verifyNoPendingTasks: ng.IVerifyNoPendingTasksService; +$verifyNoPendingTasks(); +$verifyNoPendingTasks('task type'); + +/////////////////////////////////////// +// browserTrigger +/////////////////////////////////////// browserTrigger(document.body, 'click'); browserTrigger(angular.element(document.body), 'click'); browserTrigger(angular.element(document.body), 'click', { which: 1, keys: ['ctrl'] }); diff --git a/types/angular-mocks/index.d.ts b/types/angular-mocks/index.d.ts index c652443eac..a2aa4fe29e 100644 --- a/types/angular-mocks/index.d.ts +++ b/types/angular-mocks/index.d.ts @@ -1,6 +1,8 @@ -// Type definitions for Angular JS (ngMock, ngMockE2E module) 1.6 +// Type definitions for Angular JS (ngMock, ngMockE2E module) 1.7 // Project: http://angularjs.org -// Definitions by: Diego Vilar , Tony Curtis +// Definitions by: Diego Vilar +// Tony Curtis +// Georgii Dolzhykov // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.4 @@ -59,7 +61,38 @@ declare module 'angular' { // Augments the original service /////////////////////////////////////////////////////////////////////////// interface ITimeoutService { + /** + * **Deprecated** since version 1.7.3. (Use `$flushPendingTasks` instead.) + * + * --- + * Flushes the queue of pending tasks. + * + * _This method is essentially an alias of `$flushPendingTasks`._ + * + * > For historical reasons, this method will also flush non-`$timeout` pending tasks, such as + * > `$q` promises and tasks scheduled via `$applyAsync` and `$evalAsync`. + * + * @param delay - The maximum timeout amount to flush up until. + */ flush(delay?: number): void; + + /** + * **Deprecated** since version 1.7.3. (Use `$verifyNoPendingTasks` instead.) + * + * --- + * Verifies that there are no pending tasks that need to be flushed. It throws an error if there + * are still pending tasks. + * + * _This method is essentially an alias of `$verifyNoPendingTasks` (called with no arguments)._ + * + * > For historical reasons, this method will also verify non-`$timeout` pending tasks, such as + * > pending `$http` requests, in-progress `$route` transitions, unresolved `$q` promises and + * > tasks scheduled via `$applyAsync` and `$evalAsync`. + * > + * > It is recommended to use `$verifyNoPendingTasks` instead, which additionally supports + * > verifying a specific type of tasks. For example, you can verify there are no pending + * > timeouts with `$verifyNoPendingTasks('$timeout')`. + */ verifyNoPendingTasks(): void; } @@ -69,7 +102,13 @@ declare module 'angular' { // Augments the original service /////////////////////////////////////////////////////////////////////////// interface IIntervalService { - flush(millis?: number): number; + /** + * Runs interval tasks scheduled to be run in the next `millis` milliseconds. + * + * @param millis - The maximum timeout amount to flush up until. + * @return The amount of time moved forward. + */ + flush(millis: number): number; } /////////////////////////////////////////////////////////////////////////// @@ -413,6 +452,65 @@ declare module 'angular' { whenRoute(method: string, url: string): mock.IRequestHandler; } + /////////////////////////////////////////////////////////////////////////// + // FlushPendingTasksService + // see https://docs.angularjs.org/api/ngMock/service/$flushPendingTasks + /////////////////////////////////////////////////////////////////////////// + interface IFlushPendingTasksService { + /** + * Flushes all currently pending tasks and executes the corresponding callbacks. + * + * Optionally, you can also pass a `delay` argument to only flush tasks that are scheduled to be + * executed within `delay` milliseconds. Currently, `delay` only applies to timeouts, since all + * other tasks have a delay of 0 (i.e. they are scheduled to be executed as soon as possible, but + * still asynchronously). + * + * If no delay is specified, it uses a delay such that all currently pending tasks are flushed. + * + * The types of tasks that are flushed include: + * + * - Pending timeouts (via `$timeout`). + * - Pending tasks scheduled via `$applyAsync`. + * - Pending tasks scheduled via `$evalAsync`. + * These include tasks scheduled via `$evalAsync()` indirectly (such as `$q` promises). + * + * > Periodic tasks scheduled via `$interval` use a different queue and are not flushed by + * > `$flushPendingTasks()`. Use `$interval.flush(millis)` instead. + * + * @param millis - The number of milliseconds to flush. + */ + (delay?: number): void; + } + + /////////////////////////////////////////////////////////////////////////// + // VerifyNoPendingTasksService + // see https://docs.angularjs.org/api/ngMock/service/$verifyNoPendingTasks + /////////////////////////////////////////////////////////////////////////// + interface IVerifyNoPendingTasksService { + /** + * Verifies that there are no pending tasks that need to be flushed. It throws an error if there + * are still pending tasks. + * + * You can check for a specific type of tasks only, by specifying a `taskType`. + * + * Available task types: + * + * - `$timeout`: Pending timeouts (via `$timeout`). + * - `$http`: Pending HTTP requests (via `$http`). + * - `$route`: In-progress route transitions (via `$route`). + * - `$applyAsync`: Pending tasks scheduled via `$applyAsync`. + * - `$evalAsync`: Pending tasks scheduled via `$evalAsync`. + * These include tasks scheduled via `$evalAsync()` indirectly (such as `$q` promises). + * + * > Periodic tasks scheduled via `$interval` use a different queue and are not taken into + * > account by `$verifyNoPendingTasks()`. There is currently no way to verify that there are no + * > pending `$interval` tasks. + * + * @param taskType - The type of tasks to check for. + */ + (taskType?: string): void; + } + /////////////////////////////////////////////////////////////////////////// // AnimateService // see https://docs.angularjs.org/api/ngMock/service/$animate @@ -464,7 +562,7 @@ declare module 'angular' { */ respond( status: number, - data: string | object, + data?: string | object, headers?: IHttpHeaders, responseText?: string ): IRequestHandler; @@ -513,6 +611,11 @@ declare module 'angular' { * for keyboard events (keydown, keypress, and keyup). */ charcode?: number; + /** + * [data](https://developer.mozilla.org/en-US/docs/Web/API/CompositionEvent/data) for + * [CompositionEvents](https://developer.mozilla.org/en-US/docs/Web/API/CompositionEvent). + */ + data?: string; /** * The elapsedTime for * [TransitionEvent](https://developer.mozilla.org/docs/Web/API/TransitionEvent) @@ -566,10 +669,11 @@ declare global { * This is a global (window) function that is only available when the `ngMock` module is included. * It can be used to trigger a native browser event on an element, which is useful for unit testing. * - * @param element Either a wrapped jQuery/jqLite node or a DOM element - * @param eventType Optional event type. If none is specified, the function tries to determine - * the right event type for the element, e.g. `change` for `input[text]`. - * @param eventData An optional object which contains additional event data used when creating the event. + * @param element Either a wrapped jQuery/jqLite node or a DOM element. + * @param eventType Optional event type. If none is specified, the function tries to determine the + * right event type for the element, e.g. `change` for `input[text]`. + * @param eventData An optional object which contains additional event data used when creating the + * event. */ function browserTrigger( element: JQuery | Element, diff --git a/types/angular-q-extras/angular-q-extras-tests.ts b/types/angular-q-extras/angular-q-extras-tests.ts new file mode 100644 index 0000000000..0832b6dae0 --- /dev/null +++ b/types/angular-q-extras/angular-q-extras-tests.ts @@ -0,0 +1,34 @@ +interface MyService { + getFirstname(): ng.IPromise; + getLastname(): ng.IPromise; +} + +function TestCtrl($q: ng.IQService, MyService: MyService) { + function arrayCallback(result: [ng.PromiseValue, ng.PromiseValue]) { + const firstnameOk: boolean = $q.isFulfilledState(result[0]); + const lastnameOk: boolean = $q.isFulfilledState(result[1]); + } + + function objectCallback(result: {firstname: ng.PromiseValue, lastname: ng.PromiseValue}) { + const firstnameOk: boolean = $q.isFulfilledState(result.firstname); + const lastnameOk: boolean = $q.isFulfilledState(result.lastname); + } + + $q + .allSettled([ + MyService.getFirstname(), + MyService.getLastname() + ]) + .then(arrayCallback); + + $q + .allSettled({ + firstname: MyService.getFirstname(), + lastname: MyService.getLastname() + }) + .then(objectCallback); +} + +TestCtrl.$inject = ['$q', 'MyService']; + +angular.module('test').controller('TestCtrl', TestCtrl); diff --git a/types/angular-q-extras/index.d.ts b/types/angular-q-extras/index.d.ts new file mode 100644 index 0000000000..f73724ab43 --- /dev/null +++ b/types/angular-q-extras/index.d.ts @@ -0,0 +1,42 @@ +// Type definitions for angular-q-extras 1.1 +// Project: https://github.com/niqdev/angular-q-extras +// Definitions by: Damien Sorel +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 + +declare var _: string; +export = _; + +import * as angular from 'angular'; + +declare module 'angular' { + type PromiseState = 'fulfilled' | 'rejected'; + + interface PromiseValue { + state: PromiseState; + value?: T; + reason?: any; + } + + // tslint:disable-next-line interface-name + interface IQService { + // tslint:disable:max-line-length + allSettled(values: [T1 | IPromise, T2 | IPromise, T3 | IPromise, T4 | IPromise, T5 | IPromise, T6 | IPromise, T7 | IPromise, T8 | IPromise, T9 | IPromise, T10 | IPromise]): IPromise<[PromiseValue, PromiseValue, PromiseValue, PromiseValue, PromiseValue, PromiseValue, PromiseValue, PromiseValue, PromiseValue, PromiseValue]>; + allSettled(values: [T1 | IPromise, T2 | IPromise, T3 | IPromise, T4 | IPromise, T5 | IPromise, T6 | IPromise, T7 | IPromise, T8 | IPromise, T9 | IPromise]): IPromise<[PromiseValue, PromiseValue, PromiseValue, PromiseValue, PromiseValue, PromiseValue, PromiseValue, PromiseValue, PromiseValue]>; + allSettled(values: [T1 | IPromise, T2 | IPromise, T3 | IPromise, T4 | IPromise, T5 | IPromise, T6 | IPromise, T7 | IPromise, T8 | IPromise]): IPromise<[PromiseValue, PromiseValue, PromiseValue, PromiseValue, PromiseValue, PromiseValue, PromiseValue, PromiseValue]>; + allSettled(values: [T1 | IPromise, T2 | IPromise, T3 | IPromise, T4 | IPromise, T5 | IPromise, T6 | IPromise, T7 | IPromise]): IPromise<[PromiseValue, PromiseValue, PromiseValue, PromiseValue, PromiseValue, PromiseValue, PromiseValue]>; + allSettled(values: [T1 | IPromise, T2 | IPromise, T3 | IPromise, T4 | IPromise, T5 | IPromise, T6 | IPromise]): IPromise<[PromiseValue, PromiseValue, PromiseValue, PromiseValue, PromiseValue, PromiseValue]>; + allSettled(values: [T1 | IPromise, T2 | IPromise, T3 | IPromise, T4 | IPromise, T5 | IPromise]): IPromise<[PromiseValue, PromiseValue, PromiseValue, PromiseValue, PromiseValue]>; + allSettled(values: [T1 | IPromise, T2 | IPromise, T3 | IPromise, T4 | IPromise]): IPromise<[PromiseValue, PromiseValue, PromiseValue, PromiseValue]>; + allSettled(values: [T1 | IPromise, T2 | IPromise, T3 | IPromise]): IPromise<[PromiseValue, PromiseValue, PromiseValue]>; + allSettled(values: [T1 | IPromise, T2 | IPromise]): IPromise<[PromiseValue, PromiseValue]>; + // tslint:enable:max-line-length + + allSettled(promises: Array>): IPromise>>; + + allSettled(promises: { [K in keyof T]: (T[K] | IPromise); }): IPromise<{ [K in keyof T]: PromiseValue; }>; + + isFulfilledState(promise: PromiseValue): boolean; + isRejectedState(promise: PromiseValue): boolean; + } +} diff --git a/types/angular-q-extras/tsconfig.json b/types/angular-q-extras/tsconfig.json new file mode 100644 index 0000000000..3047a809eb --- /dev/null +++ b/types/angular-q-extras/tsconfig.json @@ -0,0 +1,23 @@ +{ + "files": [ + "index.d.ts", + "angular-q-extras-tests.ts" + ], + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + } +} diff --git a/types/angular-q-extras/tslint.json b/types/angular-q-extras/tslint.json new file mode 100644 index 0000000000..d88586e5bd --- /dev/null +++ b/types/angular-q-extras/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": "dtslint/dt.json" +} diff --git a/types/angular-route/angular-route-tests.ts b/types/angular-route/angular-route-tests.ts index 677c1589ed..e1e7bd43fd 100644 --- a/types/angular-route/angular-route-tests.ts +++ b/types/angular-route/angular-route-tests.ts @@ -39,6 +39,21 @@ $routeProvider return "I return a string" } }) + .when('/projects/:projectId/dashboard6', { + resolve: { + foo: () => 'foo', + bar: () => 'bar', + }, + resolveAs: 'baz', + resolveRedirectTo: [ + '$http', + ($http: ng.IHttpService) => $http.get('/is-admin').then(() => '/admin/lounge', () => undefined), + ], + }) + .when('/projects/:projectId/dashboard7', { + reloadOnUrl: false, + resolveRedirectTo: () => (Math.random() < 0.5) ? '/some/route' : undefined, + }) .otherwise({ redirectTo: '/' }) .otherwise({ redirectTo: ($routeParams?: ng.route.IRouteParamsService, $locationPath?: string, $locationSearch?: any) => "" }) .otherwise("/"); diff --git a/types/angular-route/index.d.ts b/types/angular-route/index.d.ts index 56bd3f2263..15529f1572 100644 --- a/types/angular-route/index.d.ts +++ b/types/angular-route/index.d.ts @@ -1,6 +1,7 @@ -// Type definitions for Angular JS (ngRoute module) 1.3 +// Type definitions for Angular JS (ngRoute module) 1.7 // Project: http://angularjs.org // Definitions by: Jonathan Park +// George Kalpakas // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 @@ -52,7 +53,7 @@ declare module 'angular' { */ interface IRoute { /** - * {(string|function()=} + * {(string|Function)=} * Controller fn that should be associated with newly created scope or the name of a registered controller if passed as a string. */ controller?: string | InlineAnnotatedFunction; @@ -61,56 +62,122 @@ declare module 'angular' { */ controllerAs?: string; /** - * Undocumented? - */ - name?: string; - /** - * {string=|function()=} + * {(string|Function)=} * Html template as a string or a function that returns an html template as a string which should be used by ngView or ngInclude directives. This property takes precedence over templateUrl. * * If template is a function, it will be called with the following parameters: * * {Array.} - route parameters extracted from the current $location.path() by applying the current route */ - template?: string | { ($routeParams?: angular.route.IRouteParamsService): string; } + template?: string | { ($routeParams?: IRouteParamsService): string; } /** - * {string=|function()=} + * {(string|Function)=} * Path or function that returns a path to an html template that should be used by ngView. * * If templateUrl is a function, it will be called with the following parameters: * * {Array.} - route parameters extracted from the current $location.path() by applying the current route */ - templateUrl?: string | { ($routeParams?: angular.route.IRouteParamsService): string; } + templateUrl?: string | { ($routeParams?: IRouteParamsService): string; } /** - * {Object.=} - An optional map of dependencies which should be injected into the controller. If any of these dependencies are promises, the router will wait for them all to be resolved or one to be rejected before the controller is instantiated. If all the promises are resolved successfully, the values of the resolved promises are injected and $routeChangeSuccess event is fired. If any of the promises are rejected the $routeChangeError event is fired. The map object is: + * {Object.=} + * An optional map of dependencies which should be injected into the controller. If any of these + * dependencies are promises, the router will wait for them all to be resolved or one to be rejected before + * the controller is instantiated. + * If all the promises are resolved successfully, the values of the resolved promises are injected and + * `$routeChangeSuccess` event is fired. If any of the promises are rejected the `$routeChangeError` event + * is fired. + * For easier access to the resolved dependencies from the template, the `resolve` map will be available on + * the scope of the route, under `$resolve` (by default) or a custom name specified by the `resolveAs` + * property (see below). This can be particularly useful, when working with components as route templates. * - * - key - {string}: a name of a dependency to be injected into the controller. - * - factory - {string|function}: If string then it is an alias for a service. Otherwise if function, then it is injected and the return value is treated as the dependency. If the result is a promise, it is resolved before its value is injected into the controller. Be aware that ngRoute.$routeParams will still refer to the previous route within these resolve functions. Use $route.current.params to access the new route parameters, instead. + * > **Note:** If your scope already contains a property with this name, it will be hidden or overwritten. + * > Make sure, you specify an appropriate name for this property, that does not collide with other + * > properties on the scope. + * + * The map object is: + * + * - `key` – `{string}`: a name of a dependency to be injected into the controller. + * - `factory` - `{string|Function}`: If `string` then it is an alias for a service. Otherwise if function, + * then it is called with `$injector#invoke()` and the return value is treated as the dependency. If the + * result is a promise, it is resolved before its value is injected into the controller. Be aware that + * `ngRoute.$routeParams` will still refer to the previous route within these resolve functions. Use + * `$route.current.params` to access the new route parameters, instead. */ resolve?: { [key: string]: any }; /** - * {(string|function())=} - * Value to update $location path with and trigger route redirection. - * - * If redirectTo is a function, it will be called with the following parameters: - * - * - {Object.} - route parameters extracted from the current $location.path() by applying the current route templateUrl. - * - {string} - current $location.path() - * - {Object} - current $location.search() - * - The custom redirectTo function is expected to return a string which will be used to update $location.path() and $location.search(). + * {string=} + * The name under which the `resolve` map will be available on the scope of the route. If omitted, defaults + * to `$resolve`. */ - redirectTo?: string | { ($routeParams?: angular.route.IRouteParamsService, $locationPath?: string, $locationSearch?: any): string }; + resolveAs?: string; /** - * Reload route when only $location.search() or $location.hash() changes. + * {(string|Function)=} + * Value to update `$location` path with and trigger route redirection. * - * This option defaults to true. If the option is set to false and url in the browser changes, then $routeUpdate event is broadcasted on the root scope. + * If `redirectTo` is a function, it will be called with the following parameters: + * + * - `{Object.}` - route parameters extracted from the current `$location.path()` by applying the + * current route templateUrl. + * - `{string}` - current `$location.path()` + * - `{Object}` - current `$location.search()` + * + * The custom `redirectTo` function is expected to return a string which will be used to update + * `$location.url()`. If the function throws an error, no further processing will take place and the + * `$routeChangeError` event will be fired. + * + * Routes that specify `redirectTo` will not have their controllers, template functions or resolves called, + * the `$location` will be changed to the redirect url and route processing will stop. The exception to this + * is if the `redirectTo` is a function that returns `undefined`. In this case the route transition occurs + * as though there was no redirection. + */ + redirectTo?: string | { ($routeParams?: IRouteParamsService, $locationPath?: string, $locationSearch?: any): string }; + /** + * {Function=} + * A function that will (eventually) return the value to update `$location` URL with and trigger route + * redirection. In contrast to `redirectTo`, dependencies can be injected into `resolveRedirectTo` and the + * return value can be either a string or a promise that will be resolved to a string. + * + * Similar to `redirectTo`, if the return value is `undefined` (or a promise that gets resolved to + * `undefined`), no redirection takes place and the route transition occurs as though there was no + * redirection. + * + * If the function throws an error or the returned promise gets rejected, no further processing will take + * place and the `$routeChangeError` event will be fired. + * + * `redirectTo` takes precedence over `resolveRedirectTo`, so specifying both on the same route definition, + * will cause the latter to be ignored. + */ + resolveRedirectTo?: angular.Injectable<(...deps: any[]) => angular.IPromise | string | undefined>; + /** + * {boolean=true} + * Reload route when any part of the URL changes (including the path) even if the new URL maps to the same + * route. + * + * If the option is set to `false` and the URL in the browser changes, but the new URL maps to the same + * route, then a `$routeUpdate` event is broadcasted on the root scope (without reloading the route). + * + * Defaults to `true`. + */ + reloadOnUrl?: boolean; + /** + * {boolean=true} + * Reload route when only `$location.search()` or `$location.hash()` changes. + * + * If the option is set to `false` and the URL in the browser changes, then a `$routeUpdate` event is + * broadcasted on the root scope (without reloading the route). + * + * > Note: This option has no effect if `reloadOnUrl` is set to `false`. + * + * Defaults to `true`. */ reloadOnSearch?: boolean; /** - * Match routes without being case sensitive + * {boolean=false} + * Match routes without being case sensitive. + * If the option is set to `true`, then the particular route can be matched without being case sensitive. * - * This option defaults to false. If the option is set to true, then the particular route can be matched without being case sensitive + * Defaults to `false`. */ caseInsensitiveMatch?: boolean; } diff --git a/types/angular-ui-bootstrap/angular-ui-bootstrap-tests.ts b/types/angular-ui-bootstrap/angular-ui-bootstrap-tests.ts index 9dbbf8e002..f21ee43ab3 100644 --- a/types/angular-ui-bootstrap/angular-ui-bootstrap-tests.ts +++ b/types/angular-ui-bootstrap/angular-ui-bootstrap-tests.ts @@ -57,6 +57,28 @@ testApp.config(( /** * $datepickerPopupConfig tests */ + $datepickerPopupConfig.datepickerMode = 'month'; + $datepickerPopupConfig.formatDay = 'd'; + $datepickerPopupConfig.formatDayHeader = 'E'; + $datepickerPopupConfig.formatDayTitle = 'dd-MM-yyyy'; + $datepickerPopupConfig.formatMonth = 'M'; + $datepickerPopupConfig.formatMonthTitle = 'yy'; + $datepickerPopupConfig.formatYear = 'y'; + $datepickerPopupConfig.initDate = '1389586124979'; + $datepickerPopupConfig.maxDate = '1389586124979'; + $datepickerPopupConfig.maxMode = 'month'; + $datepickerPopupConfig.minDate = '1389586124979'; + $datepickerPopupConfig.minMode = 'month'; + $datepickerPopupConfig.shortcutPropagation = true; + $datepickerPopupConfig.showWeeks = false; + $datepickerPopupConfig.startingDay = 1; + $datepickerPopupConfig.yearRange = 10; + $datepickerPopupConfig.monthColumns = 3; + $datepickerPopupConfig.yearColumns = 9; + $datepickerPopupConfig.yearRows = 6; + $datepickerPopupConfig.ngModelOptions.allowInvalid = false; + $datepickerPopupConfig.ngModelOptions.timezone = "EST"; + $datepickerPopupConfig.ngModelOptions.updateOn = "click"; $datepickerPopupConfig.altInputFormats = ["mm/dd/YYYY", "mm-dd-YY"]; $datepickerPopupConfig.appendToBody = true; $datepickerPopupConfig.currentText = 'Select Today'; diff --git a/types/angular-ui-bootstrap/index.d.ts b/types/angular-ui-bootstrap/index.d.ts index 0c41fcc15c..db08aae252 100644 --- a/types/angular-ui-bootstrap/index.d.ts +++ b/types/angular-ui-bootstrap/index.d.ts @@ -1,6 +1,8 @@ // Type definitions for Angular UI Bootstrap 0.13.3 // Project: https://github.com/angular-ui/bootstrap -// Definitions by: Brian Surowiec , Ryan Southgate +// Definitions by: Brian Surowiec , +// Ryan Southgate +// Alfie Johnson // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 @@ -227,7 +229,7 @@ declare module 'angular' { customClass?: DatepickerCallback; } - interface IDatepickerPopupConfig { + interface IDatepickerPopupConfig extends IDatepickerConfig { /** * A list of alternate formats acceptable for manual entry. diff --git a/types/angular/angular-tests.ts b/types/angular/angular-tests.ts index 1dff1a0451..44f8539af2 100644 --- a/types/angular/angular-tests.ts +++ b/types/angular/angular-tests.ts @@ -214,11 +214,18 @@ mod.factory({ name1(foo: any) {}, name2: ['foo', (foo: any) => {}] }); -mod.filter('name', ($scope: ng.IScope) => {}); -mod.filter('name', ['$scope', ($scope: ng.IScope) => {}]); +mod.filter('name', ($scope: ng.IScope) => () => {}); +mod.filter('name', ['$scope', ($scope: ng.IScope) => () => {}]); mod.filter({ - name1(foo: any) {}, - name2: ['foo', (foo: any) => {}] + name1(foo: any) { return () => {}; }, + name2: ['foo', (foo: any) => () => {}], +}); +const customStatefulFilter: ng.IFilterFunction = (s) => 1; +mod.filter('name', () => customStatefulFilter); +mod.filter('name', ['$scope', () => customStatefulFilter]); +mod.filter({ + name1: () => customStatefulFilter, + name2: ['foo', () => customStatefulFilter], }); mod.provider('name', ($scope: ng.IScope) => ({ $get: () => { } })); mod.provider('name', TestProvider); @@ -304,8 +311,10 @@ namespace TestQ { } const abcObject: AbcObject = null; const abcObjectPromise: angular.IPromise = null; + const abcObjectPromiseLike: PromiseLike = null; const efObject: EfObject = null; const efObjectPromise: angular.IPromise = null; + const efObjectPromiseLike: PromiseLike = null; const ghObject: GhObject = null; const ghObjectPromise: angular.IPromise = null; @@ -397,6 +406,7 @@ namespace TestQ { result = $q.when(abcObject); result = $q.when(abcObjectPromise); + result = $q.when(abcObjectPromiseLike); result = $q.when(efObject, (result: EfObject) => abcObject); result = $q.when(efObject, (result: EfObject) => abcObject, (any) => any); @@ -409,10 +419,21 @@ namespace TestQ { resultOther = $q.when(efObjectPromise, (result: EfObject) => abcObject, (any) => ghObjectPromise); resultOther = $q.when(efObjectPromise, (result: EfObject) => abcObject, (any) => ghObjectPromise, (any) => any); + result = $q.when(efObjectPromiseLike, (result: EfObject) => abcObject); + resultOther = $q.when(efObjectPromiseLike, (result: EfObject) => abcObject, (any) => ghObject); + resultOther = $q.when(efObjectPromiseLike, (result: EfObject) => abcObject, (any) => ghObject); + resultOther = $q.when(efObjectPromiseLike, (result: EfObject) => abcObject, (any) => ghObject, (any) => any); + resultOther = $q.when(efObjectPromiseLike, (result: EfObject) => abcObject, (any) => ghObjectPromise); + resultOther = $q.when(efObjectPromiseLike, (result: EfObject) => abcObject, (any) => ghObjectPromise, (any) => any); + result = $q.when(efObject, (result: EfObject) => abcObjectPromise); result = $q.when(efObject, (result: EfObject) => abcObjectPromise, (any) => any); result = $q.when(efObject, (result: EfObject) => abcObjectPromise, (any) => any, (any) => any); + result = $q.when(efObject, (result: EfObject) => abcObjectPromiseLike); + result = $q.when(efObject, (result: EfObject) => abcObjectPromiseLike, (any) => any); + result = $q.when(efObject, (result: EfObject) => abcObjectPromiseLike, (any) => any, (any) => any); + result = $q.when(efObjectPromise, (result: EfObject) => abcObjectPromise); resultOther = $q.when(efObjectPromise, (result: EfObject) => abcObjectPromise, (any) => ghObject); resultOther = $q.when(efObjectPromise, (result: EfObject) => abcObjectPromise, (any) => ghObject, (any) => any); @@ -513,6 +534,20 @@ namespace TestInjector { anyResult = $injector.invoke(inlineAnnotatedFunction, 'anyContext'); anyResult = $injector.invoke(inlineAnnotatedFunction, undefined, 'anyLocals'); } + + // $injector.loadNewModules + { + const inlineAnnotatedFunction: any[] = [false, (v: boolean) => {}]; + const modA = angular.module('$injector.moduleA', []); + $injector.loadNewModules([modA]); + $injector.loadNewModules([modA.name]); + $injector.loadNewModules([inlineAnnotatedFunction]); + } + + // $injector.modules + { + const module: angular.IModule = $injector.modules['$injector.module']; + } } // Promise signature tests @@ -710,11 +745,12 @@ function test_angular_forEach() { this.push(`${key}: ${value}`); }, log); // expect(log).toEqual(['name: misko', 'gender: male']); - // $ExpectType NodeListOf - angular.forEach(document.getElementsByTagName('img'), (value, key, obj) => { + // TODO: Set minimum version to ts3.1 where this is always HTMLCollectionOf + type Collection = NodeListOf | HTMLCollectionOf; + const collection: Collection = angular.forEach(document.getElementsByTagName('img'), (value, key, obj) => { value; // $ExpectType HTMLImageElement key; // $ExpectType number - obj; // $ExpectType NodeListOf + const collection: Collection = obj; }); // $ExpectType number[] angular.forEach([1, 2, 3], (value, key, obj) => { diff --git a/types/angular/index.d.ts b/types/angular/index.d.ts index 6b82a2bcb4..99977b57b5 100644 --- a/types/angular/index.d.ts +++ b/types/angular/index.d.ts @@ -250,8 +250,8 @@ declare namespace angular { */ factory(name: string, $getFn: Injectable): IModule; factory(object: {[name: string]: Injectable}): IModule; - filter(name: string, filterFactoryFunction: Injectable): IModule; - filter(object: {[name: string]: Injectable}): IModule; + filter(name: string, filterFactoryFunction: Injectable): IModule; + filter(object: {[name: string]: Injectable}): IModule; provider(name: string, serviceProviderFactory: IServiceProviderFactory): IModule; provider(name: string, serviceProviderConstructor: IServiceProviderClass): IModule; provider(name: string, inlineAnnotatedConstructor: any[]): IModule; @@ -1137,12 +1137,12 @@ declare namespace angular { * * @param value Value or a promise */ - resolve(value: IPromise|T): IPromise; + resolve(value: PromiseLike|T): IPromise; /** * @deprecated Since TS 2.4, inference is stricter and no longer produces the desired type when T1 !== T2. * To use resolve with two different types, pass a union type to the single-type-argument overload. */ - resolve(value: IPromise|T2): IPromise; + resolve(value: PromiseLike|T2): IPromise; /** * Wraps an object that might be a value or a (3rd party) then-able promise into a $q promise. This is useful when you are dealing with an object that might or might not be a promise, or if the promise comes from a source that can't be trusted. */ @@ -1152,11 +1152,11 @@ declare namespace angular { * * @param value Value or a promise */ - when(value: IPromise|T): IPromise; - when(value: IPromise|T2): IPromise; - when(value: IPromise|T, successCallback: (promiseValue: T) => IPromise|TResult): IPromise; - when(value: T, successCallback: (promiseValue: T) => IPromise|TResult, errorCallback: null | undefined | ((reason: any) => any), notifyCallback?: (state: any) => any): IPromise; - when(value: IPromise, successCallback: (promiseValue: T) => IPromise|TResult, errorCallback: (reason: any) => TResult2 | IPromise, notifyCallback?: (state: any) => any): IPromise; + when(value: PromiseLike|T): IPromise; + when(value: PromiseLike|T2): IPromise; + when(value: PromiseLike|T, successCallback: (promiseValue: T) => PromiseLike|TResult): IPromise; + when(value: T, successCallback: (promiseValue: T) => PromiseLike|TResult, errorCallback: null | undefined | ((reason: any) => any), notifyCallback?: (state: any) => any): IPromise; + when(value: PromiseLike, successCallback: (promiseValue: T) => PromiseLike|TResult, errorCallback: (reason: any) => TResult2 | PromiseLike, notifyCallback?: (state: any) => any): IPromise; /** * Wraps an object that might be a value or a (3rd party) then-able promise into a $q promise. This is useful when you are dealing with an object that might or might not be a promise, or if the promise comes from a source that can't be trusted. */ @@ -2183,6 +2183,14 @@ declare namespace angular { has(name: string): boolean; instantiate(typeConstructor: {new(...args: any[]): T}, locals?: any): T; invoke(func: Injectable T)>, context?: any, locals?: any): T; + /** + * Add the specified modules to the current injector. + * This method will add each of the injectables to the injector and execute all of the config and run blocks for each module passed to the method. + * @param modules A module, module name or annotated injection function. + */ + loadNewModules(modules: Array void>>): void; + /** An object map of all the modules that have been loaded into the injector. */ + modules: {[moduleName: string]: IModule}; strictDi: boolean; } @@ -2237,4 +2245,13 @@ declare namespace angular { interface IHttpParamSerializer { (obj: Object): string; } + + interface IFilterFunction extends Function { + /** + * By default, filters are only run once the input value changes. By marking the filter as `$stateful`, the filter will be run on every `$digest` to update the output. **This is strongly discouraged.** + * See https://docs.angularjs.org/guide/filter#stateful-filters + */ + $stateful?: boolean; + } + type FilterFactory = (...I: any[]) => IFilterFunction; } diff --git a/types/ansi-escape-sequences/ansi-escape-sequences-tests.ts b/types/ansi-escape-sequences/ansi-escape-sequences-tests.ts new file mode 100644 index 0000000000..ae27a57146 --- /dev/null +++ b/types/ansi-escape-sequences/ansi-escape-sequences-tests.ts @@ -0,0 +1,50 @@ +import * as ansi from 'ansi-escape-sequences'; + +// $ExpectType string +ansi.style.red; +// $ExpectError +ansi.style.invalidStyle; + +// $ExpectType string +ansi.styles('green'); +// $ExpectType string +ansi.styles(['green', 'underline']); +// $ExpectError +ansi.styles('invalidStyle'); +// $ExpectError +ansi.styles(['invalidStyle']); + +// $ExpectType string +ansi.format('what?', 'green'); +// $ExpectType string +ansi.format('what?', ['green', 'bold']); +// $ExpectType string +ansi.format('[green bold]{what?}'); +// $ExpectError +ansi.styles('what?', 'invalidStyle'); +// $ExpectError +ansi.styles('what?', ['invalidStyle']); + +// $ExpectType string +ansi.cursor.up(); +// $ExpectType string +ansi.cursor.up(1); + +// $ExpectType string +ansi.cursor.hide; +// $ExpectType string +ansi.cursor.show; + +// $ExpectType string +ansi.erase.display(); +// $ExpectType string +ansi.erase.display(3); +// $ExpectError +ansi.erase.display(4); + +// $ExpectType string +ansi.erase.inLine(); +// $ExpectType string +ansi.erase.inLine(2); +// $ExpectError +ansi.erase.inLine(3); diff --git a/types/ansi-escape-sequences/index.d.ts b/types/ansi-escape-sequences/index.d.ts new file mode 100644 index 0000000000..437841aefa --- /dev/null +++ b/types/ansi-escape-sequences/index.d.ts @@ -0,0 +1,148 @@ +// Type definitions for ansi-escape-sequences 4.0 +// Project: https://github.com/75lb/ansi-escape-sequences#readme +// Definitions by: Alexander Marks +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 + +export type Style = 'reset'|'bold'|'italic'|'underline'|'fontDefault'|'font2'| + 'font3'|'font4'|'font5'|'font6'|'imageNegative'|'imagePositive'|'black'| + 'red'|'green'|'yellow'|'blue'|'magenta'|'cyan'|'white'|'grey'|'gray'| + 'bg-black'|'bg-red'|'bg-green'|'bg-yellow'|'bg-blue'|'bg-magenta'|'bg-cyan'| + 'bg-white'|'bg-grey'|'bg-gray'; + +/** + * Various formatting styles (aka Select Graphic Rendition codes). + * + * @example + * console.log(ansi.style.red + 'this is red' + ansi.style.reset) + */ +export const style: {[K in Style]: string}; + +/** + * Returns an ansi sequence setting one or more effects. + * + * @param styles a style, or list or styles + * + * @example + * > ansi.styles('green') + * '\u001b[32m' + * + * > ansi.styles([ 'green', 'underline' ]) + * '\u001b[32;4m' + */ +export function styles(styles: Style|ReadonlyArray\n' + + '\n' + + ' \n' + + ' \n' + + ' \n' + + '\n'; + + return webview; +} + +onload = () => { + var webview = CreateWebViewAndGuest(); + document.body.appendChild(webview); +}; + +// #endregion + +// #region Embedding & AppView +chrome.app.runtime.onEmbedRequested.addListener((request) => { + request.allow('foobar.html'); +}); +// Creates an element. +let appview = document.createElement('appview'); +appview = new AppView() || new window.AppView(); +// Appends the element to the document body. +document.body.appendChild(appview); +// Connects the appview to appToEmbed. +appview.connect('id of app'); +document.appendChild(appview); +//#endregion + + + diff --git a/types/chrome-apps/tsconfig.json b/types/chrome-apps/tsconfig.json index 50a50c3193..6e00d1a959 100644 --- a/types/chrome-apps/tsconfig.json +++ b/types/chrome-apps/tsconfig.json @@ -1,10 +1,6 @@ { "compilerOptions": { "module": "commonjs", - "lib": [ - "es2017", - "dom" - ], "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, @@ -13,6 +9,10 @@ "typeRoots": [ "../" ], + "lib": [ + "es2017", + "dom" + ], "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true diff --git a/types/chrome/index.d.ts b/types/chrome/index.d.ts index 0bfec6bfd8..49f079e159 100644 --- a/types/chrome/index.d.ts +++ b/types/chrome/index.d.ts @@ -4959,6 +4959,7 @@ declare namespace chrome.runtime { export interface ConnectInfo { name?: string; + includeTlsChannelId?: boolean; } export interface InstalledDetails { @@ -6564,7 +6565,7 @@ declare namespace chrome.tabs { * @param callback Optional. * Parameter window: Contains details about the window whose tabs were highlighted. */ - export function highlight(highlightInfo: HighlightInfo, callback: (window: chrome.windows.Window) => void): void; + export function highlight(highlightInfo: HighlightInfo, callback?: (window: chrome.windows.Window) => void): void; /** * Gets all tabs that have the specified properties, or all tabs if no properties are specified. * @since Chrome 16. @@ -7383,6 +7384,10 @@ declare namespace chrome.webRequest { type: ResourceType; /** The time when this signal is triggered, in milliseconds since the epoch. */ timeStamp: number; + /** The origin where the request was initiated. This does not change through redirects. If this is an opaque origin, the string 'null' will be used. + * @since Since Chrome 63. + */ + initiator?: string; } export interface WebRequestDetails extends ResourceRequest { diff --git a/types/classnames/index.d.ts b/types/classnames/index.d.ts index 40e3ce835c..84073ec109 100644 --- a/types/classnames/index.d.ts +++ b/types/classnames/index.d.ts @@ -12,7 +12,7 @@ type ClassValue = string | number | ClassDictionary | ClassArray | undefined | null | boolean; interface ClassDictionary { - [id: string]: boolean | undefined | null; + [id: string]: any; } // This is the only way I found to break circular references between ClassArray and ClassValue @@ -21,7 +21,9 @@ interface ClassArray extends Array { } // tslint:disable-line no-emp type ClassNamesFn = (...classes: ClassValue[]) => string; -declare const classNames: ClassNamesFn; +type ClassNamesExport = ClassNamesFn & { default: ClassNamesFn }; + +declare const classNames: ClassNamesExport; export = classNames; export as namespace classNames; diff --git a/types/cleave.js/cleave.js-tests.tsx b/types/cleave.js/cleave.js-tests.tsx index eb682d432b..a826d2607a 100644 --- a/types/cleave.js/cleave.js-tests.tsx +++ b/types/cleave.js/cleave.js-tests.tsx @@ -1,6 +1,7 @@ import * as React from "react"; import Cleave = require("cleave.js"); import CleaveReact = require("cleave.js/react"); +import { Props } from "cleave.js/react/props"; const ExampleSelector1 = () => { const cleave = new Cleave("#my-input", { phone: true }); @@ -29,3 +30,14 @@ const ExampleReact1 = (props: any) => { /> ); }; + +const ExampleReact2 = (props: Props) => { + return ( + + ); +}; diff --git a/types/cleave.js/options/index.d.ts b/types/cleave.js/options/index.d.ts index 60e2e99e40..b1dc95920b 100644 --- a/types/cleave.js/options/index.d.ts +++ b/types/cleave.js/options/index.d.ts @@ -19,6 +19,12 @@ export interface CleaveOptions { datePattern?: ReadonlyArray; } +// Time Options +export interface CleaveOptions { + time?: boolean; + timePattern?: ReadonlyArray; +} + // Numeral Options export type NumeralThousandsGroupStyleType = "lakh" | "thousand" | "wan" | "none"; @@ -45,4 +51,5 @@ export interface CleaveOptions { noImmediatePrefix?: boolean; rawValueTrimPrefix?: boolean; uppercase?: boolean; + onValueChanged?(event: any): void; } diff --git a/types/cleave.js/react/index.d.ts b/types/cleave.js/react/index.d.ts index 1f50cbdbf3..bf158b8f4d 100644 --- a/types/cleave.js/react/index.d.ts +++ b/types/cleave.js/react/index.d.ts @@ -1,13 +1,5 @@ import * as React from "react"; -import { CleaveOptions } from "../options"; - -type InitHandler = (owner: React.ReactInstance) => void; - -interface Props extends React.InputHTMLAttributes { - onInit?: InitHandler; - options: CleaveOptions; - htmlRef?: (i: any) => void; -} +import { Props } from "./props"; declare var Cleave: React.ComponentClass; export = Cleave; diff --git a/types/cleave.js/react/props.d.ts b/types/cleave.js/react/props.d.ts new file mode 100644 index 0000000000..6ce47db62c --- /dev/null +++ b/types/cleave.js/react/props.d.ts @@ -0,0 +1,10 @@ +import * as React from "react"; +import { CleaveOptions } from "../options"; + +export type InitHandler = (owner: React.ReactInstance) => void; + +export interface Props extends React.InputHTMLAttributes { + onInit?: InitHandler; + options: CleaveOptions; + htmlRef?: (i: any) => void; +} diff --git a/types/cleave.js/tsconfig.json b/types/cleave.js/tsconfig.json index ec4da5d047..1cf200a1d2 100644 --- a/types/cleave.js/tsconfig.json +++ b/types/cleave.js/tsconfig.json @@ -23,6 +23,7 @@ "index.d.ts", "options/creditCard.d.ts", "options/index.d.ts", - "react/index.d.ts" + "react/index.d.ts", + "react/props.d.ts" ] } \ No newline at end of file diff --git a/types/cli-truncate/cli-truncate-tests.ts b/types/cli-truncate/cli-truncate-tests.ts new file mode 100644 index 0000000000..677108e6ad --- /dev/null +++ b/types/cli-truncate/cli-truncate-tests.ts @@ -0,0 +1,19 @@ +import cliTruncate = require('cli-truncate'); + +// Truncate at different positions +// $ExpectType string +cliTruncate('unicorn', 4); // default position: 'end' + +// $ExpectType string +cliTruncate('unicorn', 4, {position: 'start'}); + +// $ExpectType string +cliTruncate('unicorn', 4, {position: 'middle'}); + +// Truncate Unicode surrogate pairs +// $ExpectType string +cliTruncate('uni\uD83C\uDE00corn', 5); + +// Truncate full-width characters +// $ExpectType string +cliTruncate('안녕하세요', 3); diff --git a/types/cli-truncate/index.d.ts b/types/cli-truncate/index.d.ts new file mode 100644 index 0000000000..f02ec427b8 --- /dev/null +++ b/types/cli-truncate/index.d.ts @@ -0,0 +1,12 @@ +// Type definitions for cli-truncate 1.1 +// Project: https://github.com/sindresorhus/cli-truncate +// Definitions by: Daniel Byrne +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export = cliTruncate; + +declare function cliTruncate( + input: string, + columns: number, + options?: {position?: 'start' | 'middle' | 'end'}, +): string; diff --git a/types/cli-truncate/tsconfig.json b/types/cli-truncate/tsconfig.json new file mode 100644 index 0000000000..efc2a3a1c7 --- /dev/null +++ b/types/cli-truncate/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", + "cli-truncate-tests.ts" + ] +} diff --git a/types/cli-truncate/tslint.json b/types/cli-truncate/tslint.json new file mode 100644 index 0000000000..d88586e5bd --- /dev/null +++ b/types/cli-truncate/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": "dtslint/dt.json" +} diff --git a/types/clipboard/clipboard-tests.ts b/types/clipboard/clipboard-tests.ts index a2ae8f9354..1a9a170087 100644 --- a/types/clipboard/clipboard-tests.ts +++ b/types/clipboard/clipboard-tests.ts @@ -14,6 +14,12 @@ const cb5 = new ClipboardJS(".btn", { action: elem => "copy", target: elem => null }); +const cb6 = new ClipboardJS(".btn", { + action: elem => "copy", + text: trigger => trigger.getAttribute('aria-label'), + target: trigger => trigger.nextElementSibling, + container: document.getElementById('modal') +}); cb1.destroy(); ClipboardJS.isSupported(); diff --git a/types/clipboard/index.d.ts b/types/clipboard/index.d.ts index 2405c0c6f0..ceb15b885b 100644 --- a/types/clipboard/index.d.ts +++ b/types/clipboard/index.d.ts @@ -49,6 +49,14 @@ declare namespace ClipboardJS { * @returns Text to be copied. */ text?(elem: Element): string; + + /** + * For use in Bootstrap Modals or with any + * other library that changes the focus + * you'll want to set the focused element + * as the container value. + */ + container?: Element; } interface Event { diff --git a/types/cls-hooked/index.d.ts b/types/cls-hooked/index.d.ts index 6d0a68aa6e..57e6b79c60 100644 --- a/types/cls-hooked/index.d.ts +++ b/types/cls-hooked/index.d.ts @@ -14,6 +14,7 @@ export interface Namespace { get(key: string): any; run(fn: (...args: any[]) => void): void; runAndReturn(fn: (...args: any[]) => T): T; + runPromise(fn: (...args: any[]) => Promise): Promise; bind(fn: F, context?: any): F; // tslint:disable-line: ban-types bindEmitter(emitter: EventEmitter): void; createContext(): any; diff --git a/types/codemirror/index.d.ts b/types/codemirror/index.d.ts index e7fa7c368e..729b8a86d7 100644 --- a/types/codemirror/index.d.ts +++ b/types/codemirror/index.d.ts @@ -3,6 +3,7 @@ // Definitions by: mihailik // nrbernard // Pr1st0n +// rileymiller // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped export = CodeMirror; @@ -14,10 +15,19 @@ declare function CodeMirror(callback: (host: HTMLElement) => void , options?: Co declare namespace CodeMirror { export var Doc : CodeMirror.DocConstructor; export var Pos: CodeMirror.PositionConstructor; - export var Pass: any; + export var Pass: {toString(): "CodeMirror.PASS"}; + /** Find the column position at a given string index using a given tabsize. */ + function countColumn(line: string, index: number | null, tabSize: number): number; function fromTextArea(host: HTMLTextAreaElement, options?: EditorConfiguration): CodeMirror.EditorFromTextArea; + /** Compare two positions, return 0 if they are the same, a negative number when a is less, and a positive number otherwise. */ + function cmpPos(a: Position, b: Position): number; + + /** Utility function that computes an end position from a change (an object with from, to, and text properties, as passed to various event handlers). + The returned position will be the end of the changed range, after the change is applied. */ + function changeEnd(change: EditorChange): Position; + /** It contains a string that indicates the version of the library. This is a triple of integers "major.minor.patch", where patch is zero for releases, and something else (usually one) for dev snapshots. */ var version: string; @@ -49,6 +59,14 @@ declare namespace CodeMirror { CodeMirror.registerHelper("hint", "foo", myFoo), the value CodeMirror.hint.foo will point to myFoo. */ function registerHelper(namespace: string, name: string, helper: any): void; + /** Given a state object, returns a {state, mode} object with the inner mode and its state for the current position. */ + function innerMode(mode: Mode, state: any): { state: any, mode: Mode }; + + /** Sometimes, it is useful to add or override mode object properties from external code. + The CodeMirror.extendMode function can be used to add properties to mode objects produced for a specific mode. + Its first argument is the name of the mode, its second an object that specifies the properties that should be added. + This is mostly useful to add utilities that can later be looked up through getMode. */ + function extendMode(name: string, properties: Mode): void; function on(element: any, eventName: string, handler: Function): void; function off(element: any, eventName: string, handler: Function): void; @@ -127,6 +145,10 @@ declare namespace CodeMirror { state: any; } + interface KeyMap { + [keyName: string]: false | string | ((instance: Editor) => void | typeof Pass); + } + interface Editor { /** Tells you whether the editor currently has focus. */ @@ -157,11 +179,11 @@ declare namespace CodeMirror { Maps added in this way have a higher precedence than the extraKeys and keyMap options, and between them, the maps added earlier have a lower precedence than those added later, unless the bottom argument was passed, in which case they end up below other keymaps added with this method. */ - addKeyMap(map: any, bottom?: boolean): void; + addKeyMap(map: string | KeyMap, bottom?: boolean): void; /** Disable a keymap added with addKeyMap.Either pass in the keymap object itself , or a string, which will be compared against the name property of the active keymaps. */ - removeKeyMap(map: any): void; + removeKeyMap(map: string | KeyMap): void; /** Enable a highlighting overlay.This is a stateless mini - mode that can be used to add extra highlighting. For example, the search add - on uses it to highlight the term that's currently being searched. @@ -318,6 +340,9 @@ declare namespace CodeMirror { you should probably follow up by calling this method to ensure CodeMirror is still looking as intended. */ refresh(): void; + /** Gets the inner mode at a given position. This will return the same as getMode for simple modes, but will return an inner mode for nesting modes (such as htmlmixed). */ + getModeAt(pos: Position): any; + /** Retrieves information about the token the current mode found before the given position (a {line, ch} object). */ getTokenAt(pos: CodeMirror.Position, precise?: boolean): Token; @@ -549,8 +574,10 @@ declare namespace CodeMirror { /** Return true if any text is selected. */ somethingSelected(): boolean; - /** Set the cursor position.You can either pass a single { line , ch } object , or the line and the character as two separate parameters. */ - setCursor(pos: CodeMirror.Position): void; + /** Set the cursor position. You can either pass a single {line, ch} object, or the line and the character as two separate parameters. + Will replace all selections with a single, empty selection at the given position. + The supported options are the same as for setSelection */ + setCursor(pos: CodeMirror.Position | number, ch?: number, options?: { bias?: number, origin?: string, scroll?: boolean }): void; /** Set a single selection range. anchor and head should be {line, ch} objects. head defaults to anchor when not given. */ setSelection(anchor: CodeMirror.Position, head: CodeMirror.Position, options?: { bias?: number, origin?: string, scroll?: boolean }): void; @@ -703,9 +730,9 @@ declare namespace CodeMirror { /** Array of strings representing the text that replaced the changed range (split by line). */ text: string[]; /** Text that used to be between from and to, which is overwritten by this change. */ - removed: string[]; + removed?: string[]; /** String representing the origin of the change event and wether it can be merged with history */ - origin: string; + origin?: string; } interface EditorChangeLinkedList extends CodeMirror.EditorChange { @@ -714,8 +741,9 @@ declare namespace CodeMirror { } interface EditorChangeCancellable extends CodeMirror.EditorChange { - /** may be used to modify the change. All three arguments to update are optional, and can be left off to leave the existing value for that field intact. */ - update(from?: CodeMirror.Position, to?: CodeMirror.Position, text?: string[]): void; + /** may be used to modify the change. All three arguments to update are optional, and can be left off to leave the existing value for that field intact. + If the change came from undo/redo, `update` is undefined and the change cannot be modified. */ + update?(from?: CodeMirror.Position, to?: CodeMirror.Position, text?: string[]): void; cancel(): void; } @@ -778,7 +806,7 @@ declare namespace CodeMirror { keyMap?: string; /** Can be used to specify extra keybindings for the editor, alongside the ones defined by keyMap. Should be either null, or a valid keymap value. */ - extraKeys?: any; + extraKeys?: string | KeyMap; /** Whether CodeMirror should scroll or wrap for long lines. Defaults to false (scroll). */ lineWrapping?: boolean; @@ -1076,7 +1104,7 @@ declare namespace CodeMirror { * This function should read one token from the stream it is given as an argument, optionally update its state, * and return a style string, or null for tokens that do not have to be styled. Multiple styles can be returned, separated by spaces. */ - token(stream: StringStream, state: T): string | null; + token?: (stream: StringStream, state: T) => string | null; /** * A function that produces a state object to be used at the start of a document. diff --git a/types/codemirror/test/index.ts b/types/codemirror/test/index.ts index 39c601f159..bd2aefac88 100644 --- a/types/codemirror/test/index.ts +++ b/types/codemirror/test/index.ts @@ -4,7 +4,18 @@ var myCodeMirror: CodeMirror.Editor = CodeMirror(document.body); var myCodeMirror2: CodeMirror.Editor = CodeMirror(document.body, { value: "function myScript(){return 100;}\n", - mode: "javascript" + mode: "javascript", + extraKeys: { + Enter: (cm) => { console.log("save"); }, + Esc: (cm) => { return CodeMirror.Pass; } + } +}); + +// $ExpectError +var myCodeMirror2_1: CodeMirror.Editor = CodeMirror(document.body, { + extraKeys: { + "Shift-Enter": (cm) => { return 42; } // not a valid return value + } }); var range = myCodeMirror2.findWordAt(CodeMirror.Pos(0, 2)); @@ -13,9 +24,9 @@ var head = range.head; var from = range.from(); var to = range.to(); -var myTextArea: HTMLTextAreaElement; +var myTextArea: HTMLTextAreaElement = undefined!; var myCodeMirror3: CodeMirror.Editor = CodeMirror(function (elt) { - myTextArea.parentNode.replaceChild(elt, myTextArea); + myTextArea.parentNode!.replaceChild(elt, myTextArea); }, { value: myTextArea.value }); var myCodeMirror4: CodeMirror.Editor = CodeMirror.fromTextArea(myTextArea); @@ -67,6 +78,15 @@ myCodeMirror.on( (instance: CodeMirror.Editor, line: CodeMirror.LineHandle, element: HTMLElement) => { } ); +myCodeMirror.on( + "beforeChange", + (instance: CodeMirror.Editor, change: CodeMirror.EditorChangeCancellable) => { + // $ExpectError + change.update(); + if (change.update != null) change.update(); + } +); + CodeMirror.registerHelper("lint", "javascript", {}); myCodeMirror.isReadOnly(); diff --git a/types/codemirror/tsconfig.json b/types/codemirror/tsconfig.json index 2ff349d98e..a2c6a52430 100644 --- a/types/codemirror/tsconfig.json +++ b/types/codemirror/tsconfig.json @@ -7,7 +7,7 @@ ], "noImplicitAny": true, "noImplicitThis": true, - "strictNullChecks": false, + "strictNullChecks": true, "strictFunctionTypes": true, "baseUrl": "../", "typeRoots": [ diff --git a/types/com.wikitude.phonegap.wikitudeplugin/com.wikitude.phonegap.wikitudeplugin-tests.ts b/types/com.wikitude.phonegap.wikitudeplugin/com.wikitude.phonegap.wikitudeplugin-tests.ts new file mode 100644 index 0000000000..c46d48d563 --- /dev/null +++ b/types/com.wikitude.phonegap.wikitudeplugin/com.wikitude.phonegap.wikitudeplugin-tests.ts @@ -0,0 +1,33 @@ +const startupConfiguration: any = { camera_position: 'back' }; + +// Some code samples from the wikitude ionic starter +WikitudePlugin.loadARchitectWorld( + success => { + console.log('ARchitect World loaded successfully.'); + }, + fail => { + console.log('Failed to load ARchitect World!'); + }, + 'www/assets/07_3dModels_6_3dModelAtGeoLocation/index.html', + ['geo'], + startupConfiguration +); + +WikitudePlugin.setOnUrlInvokeCallback(url => { + if (url.indexOf('captureScreen') > -1) { + WikitudePlugin.captureScreen( + absoluteFilePath => { + WikitudePlugin.callJavaScript( + `World.testFunction('Screenshot saved at: ${absoluteFilePath}');` + ); + }, + errorMessage => { + console.log(errorMessage); + }, + true, + null + ); + } else { + alert(url + 'not handled'); + } +}); diff --git a/types/com.wikitude.phonegap.wikitudeplugin/index.d.ts b/types/com.wikitude.phonegap.wikitudeplugin/index.d.ts new file mode 100644 index 0000000000..50307d57c8 --- /dev/null +++ b/types/com.wikitude.phonegap.wikitudeplugin/index.d.ts @@ -0,0 +1,82 @@ +// Type definitions for com.wikitude.phonegap.wikitudeplugin 7.2 +// Project: https://github.com/Wikitude/wikitude-cordova-plugin +// Definitions by: zbarbuto +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.2 + +// The following types are taken directly (unmodified) from the wikitude-ionic-3-starter-app +// https://github.com/pbreuss/wikitude-ionic-3-starter-app +// Latest commit at time of writing was 647cd546f6d1805765c4cee725566e246ca6259d + +/** + * Wrapper for the Wikitude SDK Phonegap Plugin - to use with IONIC2 + * (c) 2016 Schneeweis.Technology + */ +interface WikitudePlugin { + isDeviceSupported( + successCallback: (success: string) => void, + errorCallback: (message: string) => void, + requiredFeatures: [string] + ): void; + + loadARchitectWorld( + successCallback: (success: string) => void, + errorCallback: (message: string) => void, + architectWorldPath: string, + requiredFeatures: [string], + startupConfiguration: JSON | object + ): void; + + close(): void; + + hide(): void; + + show(): void; + + // test type ok? + callJavaScript(js: any): void; + + setOnUrlInvokeCallback(onUrlInvokeCallback: (success: string) => void): void; + + setLocation(latitude: any, longitude: any, altitude: any, accuracy: any): void; + + captureScreen( + successCallback: (success: string) => void, + errorCallback: (message: string) => void, + includeWebView: boolean, + imagePathInBundleOrNullForPhotoLibrary: string | null + ): void; + + setErrorHandler(errorHandler: (message: string) => void): void; + + setDeviceSensorsNeedCalibrationHandler( + startCalibrationHandler: (message: string) => void + ): void; + + setDeviceSensorsFinishedCalibrationHandler( + finishedCalibrationHandler: (message: string) => void + ): void; + + setBackButtonCallback(onBackButtonCallback: (message: string) => void): void; + + /* Lifecycle updates */ + + onResume(): void; + onBackButton(): void; + onPause(): void; + + onWikitudeOK(): void; + onWikitudeError(): void; + + _sdkKey: string; + FeatureGeo: string; + Feature2DTracking: string; + CameraPositionUndefined: number; + CameraPositionFront: number; + CameraPositionBack: number; + CameraFocusRangeNone: number; + CameraFocusRangeNear: number; + CameraFocusRangeFar: number; +} + +declare var WikitudePlugin: WikitudePlugin; diff --git a/types/com.wikitude.phonegap.wikitudeplugin/tsconfig.json b/types/com.wikitude.phonegap.wikitudeplugin/tsconfig.json new file mode 100644 index 0000000000..ed0ce7783e --- /dev/null +++ b/types/com.wikitude.phonegap.wikitudeplugin/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", + "com.wikitude.phonegap.wikitudeplugin-tests.ts" + ] +} diff --git a/types/com.wikitude.phonegap.wikitudeplugin/tslint.json b/types/com.wikitude.phonegap.wikitudeplugin/tslint.json new file mode 100644 index 0000000000..f93cf8562a --- /dev/null +++ b/types/com.wikitude.phonegap.wikitudeplugin/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": "dtslint/dt.json" +} diff --git a/types/cometd/index.d.ts b/types/cometd/index.d.ts index 0ac377c241..cc97b304fe 100644 --- a/types/cometd/index.d.ts +++ b/types/cometd/index.d.ts @@ -21,12 +21,16 @@ declare namespace CometD { } interface CometD { + + websocketEnabled?: boolean; onListenerException: (exception: any, subscriptionHandle: any, isListener: boolean, message: string) => void; init(options: CometD.ConfigurationOptions): void; configure(config: CometD.ConfigurationOptions): void; + + subscribe(channel: string, listener: (message: any) => void): void; addListener(channel: string, listener: (message: any) => void): void; removeListener(listener: (message: any) => void): void; diff --git a/types/common-prefix/common-prefix-tests.ts b/types/common-prefix/common-prefix-tests.ts new file mode 100644 index 0000000000..5de96a5358 --- /dev/null +++ b/types/common-prefix/common-prefix-tests.ts @@ -0,0 +1,4 @@ +import common = require('common-prefix'); // common is(string: ReadOnlyArray) => string + +// $ExpectType string +common(['a']); diff --git a/types/common-prefix/index.d.ts b/types/common-prefix/index.d.ts new file mode 100644 index 0000000000..482e880f05 --- /dev/null +++ b/types/common-prefix/index.d.ts @@ -0,0 +1,8 @@ +// Type definitions for common-prefix 1.1 +// Project: https://github.com/hughsk/common-prefix +// Definitions by: Sean Marvi Oliver Genabe +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare function common(strings: ReadonlyArray): string; + +export = common; diff --git a/types/common-prefix/tsconfig.json b/types/common-prefix/tsconfig.json new file mode 100644 index 0000000000..e7b8748dee --- /dev/null +++ b/types/common-prefix/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es5" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "strictFunctionTypes": true + }, + "files": [ + "index.d.ts", + "common-prefix-tests.ts" + ] +} diff --git a/types/common-prefix/tslint.json b/types/common-prefix/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/common-prefix/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/commondir/commondir-tests.ts b/types/commondir/commondir-tests.ts new file mode 100644 index 0000000000..33adefb491 --- /dev/null +++ b/types/commondir/commondir-tests.ts @@ -0,0 +1,14 @@ +import commondir = require('commondir'); + +// $ExpectType string +commondir('wwwroot', [ + 'static_files/png/', + '../gif/image.gif', +]); + +// $ExpectType string +commondir([ + '/x/y/z', + '/x/y', + '/x/y/w/q', +]); diff --git a/types/commondir/index.d.ts b/types/commondir/index.d.ts new file mode 100644 index 0000000000..ac75d00d00 --- /dev/null +++ b/types/commondir/index.d.ts @@ -0,0 +1,20 @@ +// Type definitions for commondir 1.0 +// Project: https://github.com/substack/node-commondir +// Definitions by: Leonard Thieu +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export = commondir; + +/** + * Compute the closest common parent directory for an array absolutePaths. + * + * @see \`{@link https://github.com/substack/node-commondir#commondirabsolutepaths }\` + */ +declare function commondir(basedir: string, relativePaths: string[]): string; +/** + * Compute the closest common parent directory for an array relativePaths which will be resolved for each dir in + * relativePaths according to: path.resolve(basedir, dir). + * + * @see \`{@link https://github.com/substack/node-commondir#commondirbasedir-relativepaths }\` + */ +declare function commondir(absolutePaths: string[]): string; diff --git a/types/commondir/tsconfig.json b/types/commondir/tsconfig.json new file mode 100644 index 0000000000..e00a5278b8 --- /dev/null +++ b/types/commondir/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", + "commondir-tests.ts" + ] +} diff --git a/types/commondir/tslint.json b/types/commondir/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/commondir/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/commonmark/index.d.ts b/types/commonmark/index.d.ts index 01b9541efa..96bb2774c5 100644 --- a/types/commonmark/index.d.ts +++ b/types/commonmark/index.d.ts @@ -64,7 +64,7 @@ export class Node { /** * either Bullet or Ordered (or undefined). */ - listType: 'Bullet' | 'Ordered'; + listType: 'bullet' | 'ordered'; /** * true if list is tight */ diff --git a/types/compute-quantile/compute-quantile-tests.ts b/types/compute-quantile/compute-quantile-tests.ts new file mode 100644 index 0000000000..8a4c51ea3d --- /dev/null +++ b/types/compute-quantile/compute-quantile-tests.ts @@ -0,0 +1,13 @@ +import quantile = require('compute-quantile'); + +// $ExpectType number +quantile([1, 2, 3], 0.5); + +// $ExpectType number +quantile([1, 2, 3], 0.5, undefined); + +// $ExpectType number +quantile([1, 2, 3], 0.5, {}); + +// $ExpectType number +quantile([1, 2, 3], 0.5, { sorted: true }); diff --git a/types/compute-quantile/index.d.ts b/types/compute-quantile/index.d.ts new file mode 100644 index 0000000000..05d83b65f4 --- /dev/null +++ b/types/compute-quantile/index.d.ts @@ -0,0 +1,23 @@ +// Type definitions for compute-quantile 1.0 +// Project: https://github.com/compute-io/quantile +// Definitions by: mrmlnc +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/** + * Computes a quantile for a numeric array. + */ +declare function quantile(array: ArrayLike, quantile: number, options?: quantile.Options): number; + +declare namespace quantile { + interface Options { + /** + * If the input `array` is already sorted in `__ascending__` order, you can set the `sorted` option to `true`. + * + * @default + * false + */ + sorted?: boolean; + } +} + +export = quantile; diff --git a/types/compute-quantile/tsconfig.json b/types/compute-quantile/tsconfig.json new file mode 100644 index 0000000000..29d10580e3 --- /dev/null +++ b/types/compute-quantile/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", + "compute-quantile-tests.ts" + ] +} diff --git a/types/compute-quantile/tslint.json b/types/compute-quantile/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/compute-quantile/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/config-yaml/config-yaml-tests.ts b/types/config-yaml/config-yaml-tests.ts new file mode 100644 index 0000000000..4ddf61e69f --- /dev/null +++ b/types/config-yaml/config-yaml-tests.ts @@ -0,0 +1,5 @@ +import yaml = require('config-yaml'); + +yaml('./simple.yaml'); +yaml('./simple.yaml', { encoding: 'gbk' }); +yaml('./simple.yaml', { encoding: 'utf-8' }); diff --git a/types/config-yaml/index.d.ts b/types/config-yaml/index.d.ts new file mode 100644 index 0000000000..6f2be7957b --- /dev/null +++ b/types/config-yaml/index.d.ts @@ -0,0 +1,19 @@ +// Type definitions for config-yaml 1.1 +// Project: https://github.com/neolao/config-yaml#readme +// Definitions by: My Self +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +// TypeScript Version: 2.1 + +/// +import * as fs from 'fs'; + +export = Yaml; + +declare namespace Yaml { + interface Options { + encoding: string; + } +} + +declare function Yaml(path: fs.PathLike, options?: Partial): any; diff --git a/types/config-yaml/tsconfig.json b/types/config-yaml/tsconfig.json new file mode 100644 index 0000000000..fa349a2f41 --- /dev/null +++ b/types/config-yaml/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "allowSyntheticDefaultImports": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "config-yaml-tests.ts" + ] +} diff --git a/types/config-yaml/tslint.json b/types/config-yaml/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/config-yaml/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/connect-mongo/index.d.ts b/types/connect-mongo/index.d.ts index cf3d5ddb3e..ee110ab6b0 100644 --- a/types/connect-mongo/index.d.ts +++ b/types/connect-mongo/index.d.ts @@ -104,11 +104,11 @@ declare namespace connectMongo { } export class MongoStore extends session.Store { - get: (sid: string, callback: (err: any, session: Express.Session) => void) => void; + get: (sid: string, callback: (err: any, session: Express.Session | null) => void) => void; set: (sid: string, session: Express.Session, callback?: (err: any) => void) => void; destroy: (sid: string, callback?: (err: any) => void) => void; length: (callback: (err: any, length: number) => void) => void; - clear: (callback?: (err: any) => void) => void; + clear: (callback?: (err?: any) => void) => void; touch: (sid: string, session: Express.Session, callback?: (err: any) => void) => void; } } diff --git a/types/connect-mongo/tsconfig.json b/types/connect-mongo/tsconfig.json index ca12068b57..c0c9ab3043 100644 --- a/types/connect-mongo/tsconfig.json +++ b/types/connect-mongo/tsconfig.json @@ -7,7 +7,10 @@ "paths": { "mongodb": [ "mongodb/v2" - ] + ], + "mongoose": [ + "mongoose/v4" + ] }, "noImplicitAny": true, "noImplicitThis": true, @@ -25,4 +28,4 @@ "index.d.ts", "connect-mongo-tests.ts" ] -} \ No newline at end of file +} diff --git a/types/connect-mongodb-session/connect-mongodb-session-tests.ts b/types/connect-mongodb-session/connect-mongodb-session-tests.ts new file mode 100644 index 0000000000..963be905c0 --- /dev/null +++ b/types/connect-mongodb-session/connect-mongodb-session-tests.ts @@ -0,0 +1,39 @@ +import * as express from 'express' +import session = require('express-session') +import connectMongo = require('connect-mongodb-session') +let MongoDBStore = connectMongo(session) + +var app = express(); +var store = new MongoDBStore({ + uri: 'mongodb://localhost:27017/connect_mongodb_session_test', + collection: 'mySessions' +}, function(error) { + // some connection error occur +}); + +store.on('connected', function() { + store.client; // The underlying MongoClient object from the MongoDB driver +}); + +// Catch errors +store.on('error', function(error) { +}); + +app.use(require('express-session')({ + secret: 'This is a secret', + cookie: { + maxAge: 1000 * 60 * 60 * 24 * 7 // 1 week + }, + store: store, + // Boilerplate options, see: + // * https://www.npmjs.com/package/express-session#resave + // * https://www.npmjs.com/package/express-session#saveuninitialized + resave: true, + saveUninitialized: true +})); + +app.get('/', function(req, res) { + res.send('Hello ' + JSON.stringify(req.session)); +}); + +const server = app.listen(3000); \ No newline at end of file diff --git a/types/connect-mongodb-session/index.d.ts b/types/connect-mongodb-session/index.d.ts new file mode 100644 index 0000000000..c328a211b2 --- /dev/null +++ b/types/connect-mongodb-session/index.d.ts @@ -0,0 +1,31 @@ +// Type definitions for connect-mongodb-session +// Project: https://github.com/kcbanner/connect-mongodb-session +// Definitions by: Nattapong Sirilappanich +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 + +/// + +import session = require('express-session'); +import * as express from 'express'; +import {MongoClient, MongoClientOptions} from 'mongodb' + +declare function connect(fn : (options?: session.SessionOptions) => express.RequestHandler) : connectMongodbSession.MongoDBStore + +declare namespace connectMongodbSession { + export interface MongoDBStore extends session.Store { + client : MongoClient + new(connection?: ConnectionInfo, callback?: (error : Error) => void) : MongoDBStore + } + + export interface ConnectionInfo { + idField? : string + collection : string + connectionOptions?: MongoClientOptions + databaseName?: string + expires?: number + uri : string + } +} + +export = connect \ No newline at end of file diff --git a/types/connect-mongodb-session/tsconfig.json b/types/connect-mongodb-session/tsconfig.json new file mode 100644 index 0000000000..61b0db83b2 --- /dev/null +++ b/types/connect-mongodb-session/tsconfig.json @@ -0,0 +1,27 @@ +{ + "compilerOptions": { + "baseUrl": "../", + "forceConsistentCasingInFileNames": true, + "lib": [ + "es6" + ], + "module": "commonjs", + "noEmit": true, + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": false, + "strictFunctionTypes": true, + "typeRoots": [ + "../" + ], + "types": [ + ] + }, + "files": [ + "connect-mongodb-session-tests.ts", + "index.d.ts" + ], + "exclude": [ + "node_modules" + ] +} \ No newline at end of file diff --git a/types/interact.js/tslint.json b/types/connect-mongodb-session/tslint.json similarity index 100% rename from types/interact.js/tslint.json rename to types/connect-mongodb-session/tslint.json diff --git a/types/console-log-level/console-log-level-tests.ts b/types/console-log-level/console-log-level-tests.ts new file mode 100644 index 0000000000..3df123421b --- /dev/null +++ b/types/console-log-level/console-log-level-tests.ts @@ -0,0 +1,20 @@ +import consoleLogLevel = require("console-log-level"); + +const logger1 = consoleLogLevel({ + level: "trace", + stderr: undefined, + prefix: () => "SOME PREFIX" +}); + +const logger2 = consoleLogLevel({ + level: "trace", + stderr: true, + prefix: "OTHER PREFIX" +}); + +logger1.trace("hello %s", "world"); +logger2.debug("hello %s", "world"); +logger2.info("hello %s", "world"); +logger2.warn("hello %s", "world"); +logger2.error("hello %s", "world"); +logger2.fatal("hello %s", "world"); diff --git a/types/console-log-level/index.d.ts b/types/console-log-level/index.d.ts new file mode 100644 index 0000000000..3a70f850df --- /dev/null +++ b/types/console-log-level/index.d.ts @@ -0,0 +1,23 @@ +// Type definitions for console-log-level 1.4 +// Project: https://github.com/watson/console-log-level +// Definitions by: Ali Ijaz Sheikh +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 + +type PrefixFunction = (level: string) => string; + +declare namespace consoleLogLevel { + type LogLevelNames = + "trace" | "debug" | "info" | "warn" | "error" | "fatal"; + type Logger = Record void>; +} + +interface Options { + level?: consoleLogLevel.LogLevelNames; + prefix?: string | PrefixFunction; + stderr?: boolean; +} + +declare function consoleLogLevel(opts: Options): consoleLogLevel.Logger; + +export = consoleLogLevel; diff --git a/types/console-log-level/tsconfig.json b/types/console-log-level/tsconfig.json new file mode 100644 index 0000000000..3fcb21220b --- /dev/null +++ b/types/console-log-level/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", + "console-log-level-tests.ts" + ] +} diff --git a/types/console-log-level/tslint.json b/types/console-log-level/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/console-log-level/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/console-stamp/console-stamp-tests.ts b/types/console-stamp/console-stamp-tests.ts index d4dad4d695..55408d318a 100644 --- a/types/console-stamp/console-stamp-tests.ts +++ b/types/console-stamp/console-stamp-tests.ts @@ -15,6 +15,8 @@ var options2 = { label: "white", metadata: "green" }, - label: true + label: true, + labelPrefix: '[', + labelSuffix: ']' }; consoleStamp(console, options2); diff --git a/types/console-stamp/index.d.ts b/types/console-stamp/index.d.ts index c7b9547cc8..5912b6876e 100644 --- a/types/console-stamp/index.d.ts +++ b/types/console-stamp/index.d.ts @@ -1,6 +1,7 @@ // Type definitions for console-stamp 0.2.0 // Project: https://github.com/starak/node-console-stamp // Definitions by: Eric Byers +// Guus De Graeve // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -16,6 +17,16 @@ declare function consoleStamp(console: {}, options?: { */ label?: boolean; + /** + * A custom prefix for the label. + */ + labelPrefix?: string; + + /** + * A custom suffix for the label. + */ + labelSuffix?: string; + /** * An array containing the methods to include in the patch */ diff --git a/types/consolidate/index.d.ts b/types/consolidate/index.d.ts index bfe432214f..23f431d8f8 100644 --- a/types/consolidate/index.d.ts +++ b/types/consolidate/index.d.ts @@ -2,13 +2,13 @@ // Project: https://github.com/visionmedia/consolidate.js // Definitions by: Carlos Ballesteros Velasco , Theo Sherry , Nicolas Henry // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.3 +// TypeScript Version: 2.8 // Imported from: https://github.com/soywiz/typescript-node-definitions/consolidate.d.ts /// -/// +import Promise = require("bluebird"); declare var cons: Consolidate; diff --git a/types/consolidate/tslint.json b/types/consolidate/tslint.json index a41bf5d19a..a403f5da2b 100644 --- a/types/consolidate/tslint.json +++ b/types/consolidate/tslint.json @@ -4,6 +4,7 @@ "adjacent-overload-signatures": false, "array-type": false, "arrow-return-shorthand": false, + "await-promise": false, "ban-types": false, "callable-types": false, "comment-format": false, diff --git a/types/cookie-session/index.d.ts b/types/cookie-session/index.d.ts index 001ba646d5..a0b7a2e6b0 100644 --- a/types/cookie-session/index.d.ts +++ b/types/cookie-session/index.d.ts @@ -78,17 +78,17 @@ declare namespace CookieSessionInterfaces { /** * Is true if the session has been changed during the request. */ - isChanged: boolean; + isChanged?: boolean; /** * Is true if the session is new. */ - isNew: boolean; + isNew?: boolean; /** * Determine if the session has been populated with data or is empty. */ - isPopulated: boolean; + isPopulated?: boolean; [propertyName: string]: any; } @@ -97,7 +97,7 @@ declare namespace CookieSessionInterfaces { /** * Represents the session for the given request. */ - session: CookieSessionObject; + session?: CookieSessionObject; /** * Represents the session options for the current request. These options are a shallow clone of what was provided at middleware construction and can be altered to change cookie setting behavior on a per-request basis. diff --git a/types/cookiejar/cookiejar-tests.ts b/types/cookiejar/cookiejar-tests.ts new file mode 100644 index 0000000000..9cc131e433 --- /dev/null +++ b/types/cookiejar/cookiejar-tests.ts @@ -0,0 +1,92 @@ +import cookiejarLib = require('cookiejar'); + +const { Cookie, CookieAccessInfo, CookieJar } = cookiejarLib; + +// Original test: https://github.com/bmeck/node-cookiejar/blob/master/tests/test.js + +let testCookie = new Cookie("a=1;domain=.test.com;path=/"); +// assert.equal(testCookie.name, "a"); +// assert.equal(testCookie.value, "1"); +// assert.equal(testCookie.domain, ".test.com"); +// assert.equal(testCookie.path, "/"); +// assert.equal(testCookie.secure, false); +// assert.equal(testCookie.expiration_date, Infinity); + +// assert.deepEqual(testCookie, new Cookie("a=1;domain=.test.com;path=/")); +// assert.ok(testCookie.collidesWith(new Cookie("a=1;domain=.test.com;path=/"))); + +testCookie = new Cookie("a=1;path=/", ".test.com"); +// assert.equal(testCookie.domain, ".test.com"); + +// Test CookieJar +const testCookieJar = new CookieJar(); +testCookieJar.setCookies([ + "a=1;domain=.test.com;path=/", + "b=2;domain=test.com;path=/", + "c=3;domain=test.com;path=/;expires=January 1, 1970" +].join(':')); + +let testCookies = testCookieJar.getCookies(new CookieAccessInfo("test.com", "/")); +// assert.equal(testCookies.length, 2, "Expires on setCookies fail\n" + testCookies.toString()); +// assert.equal(testCookies.toValueString(), 'a=1;b=2', "Cannot get value string of multiple cookies"); + +testCookies = testCookieJar.getCookies(new CookieAccessInfo("www.test.com", "/")); +// assert.equal(testCookies.length, 2, "Wildcard domain fail\n" + testCookies.toString()); + +testCookieJar.setCookies("b=2;domain=test.com;path=/;expires=January 1, 1970"); +testCookies = testCookieJar.getCookies(new CookieAccessInfo("test.com", "/")); +// assert.equal(testCookies.length, 1, "Delete cookie fail\n" + testCookies.toString()); +// assert.equal(String(testCookieJar.getCookies(new CookieAccessInfo("test.com", "/"))), "a=1; domain=.test.com; path=/"); + +testCookie = new Cookie("a=1;domain=test.com;path=/;HttpOnly"); +// assert.ok(testCookie.noscript, "HttpOnly flag parsing failed\n" + testCookie.toString()); + +const testCookieJar2 = new CookieJar(); +testCookieJar2.setCookies([ + "a=1;domain=.test.com;path=/", + "a=1;domain=.test.com;path=/", + "a=2;domain=.test.com;path=/", + "b=3;domain=.test.com;path=/" +]); +testCookies = testCookieJar2.getCookies(new CookieAccessInfo("test.com", "/")); +// assert.equal(testCookies.length, 2); +// assert.equal(testCookies[0].value, 2); + +// Test pure appending +testCookieJar2.setCookie("d=4;domain=.test.com;path=/"); +testCookies = testCookieJar2.getCookies(new CookieAccessInfo("test.com", "/")); +// assert.equal(testCookies.length, 3); +// assert.equal(testCookies[2].value, 4); + +// Test Ignore Trailing Semicolons (Github Issue #6) +testCookie = new Cookie("a=1;domain=.test.com;path=/;;;;"); +// assert.equal(testCookie.name, "a"); +// assert.equal(testCookie.value, "1"); +// assert.equal(testCookie.domain, ".test.com"); +// assert.equal(testCookie.path, "/"); +// assert.deepEqual(testCookie, new Cookie("a=1;domain=.test.com;path=/")); + +// Test request_path and request_domain +testCookieJar2.setCookie(new Cookie("sub=4;path=/", "test.com")); +testCookie = testCookieJar2.getCookie("sub", new CookieAccessInfo("sub.test.com", "/")); +// assert.equal(testCookie, undefined); + +testCookie = testCookieJar2.getCookie("sub", new CookieAccessInfo("test.com", "/")); +// assert.equal(testCookie.name, "sub"); +// assert.equal(testCookie.domain, "test.com"); + +testCookieJar2.setCookie(new Cookie("sub=4;path=/accounts", "test.com", "/accounts")); +testCookie = testCookieJar2.getCookie("sub", new CookieAccessInfo("test.com", "/foo")); +// assert.equal(testCookie, undefined); + +testCookie = testCookieJar2.getCookie("sub", new CookieAccessInfo("test.com", "/accounts")); +// assert.equal(testCookie.path, "/accounts"); + +testCookieJar2.setCookie(new Cookie("sub=5;path=/", "test.com", "/accounts")); +testCookies = testCookieJar2.getCookies(new CookieAccessInfo("test.com")); +// assert.equal(testCookies.length, 4); + +testCookieJar2.setCookie(new Cookie("sub=5;path=/", "test.com", "/accounts")); +testCookie = testCookieJar2.getCookie('sub', CookieAccessInfo.All); +// assert(testCookie); +// assert.equal(testCookie.name, 'sub'); diff --git a/types/cookiejar/index.d.ts b/types/cookiejar/index.d.ts new file mode 100644 index 0000000000..ba50b63ea2 --- /dev/null +++ b/types/cookiejar/index.d.ts @@ -0,0 +1,116 @@ +// Type definitions for CookieJar 2.1 +// Project: https://github.com/bmeck/node-cookiejar +// Definitions by: Rafal Proszowski +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.2 + +export class CookieAccessInfo { + /** + * Class to determine matching qualities of a cookie + * @param domain string domain to match + * @param path string path to match + * @param secure boolean access is secure (ssl generally) + * @param script boolean access is from a script + */ + constructor(domain: string, path?: string, secure?: boolean, script?: boolean); + + static All: CookieAccessInfo; + domain: string; // domain to match + path: string; // path to match + secure: boolean; // access is secure (ssl generally) + script: boolean; // access is from a script +} + +export class Cookie { + name: string; // name of the cookie + value: string; // string associated with the cookie + domain: string; // domain to match (on a cookie a '.' at the start means a wildcard matching anything ending in the rest) + explicit_domain: boolean; // if the domain was explicitly set via the cookie string + path: string; // base path to match (matches any path starting with this '/' is root) + explicit_path: boolean; // if the path was explicitly set via the cookie string + noscript: boolean; // if it should be kept from scripts + secure: boolean; // should it only be transmitted over secure means + expiration_date: number; // number of millis since 1970 at which this should be removed + + /** + * It turns input into a Cookie (singleton if given a Cookie), the + * request_domain argument is used to default the domain if it is not + * explicit in the cookie string, the request_path argument is used to set + * the path if it is not explicit in a cookie String. + * + * Explicit domains/paths will cascade, implied domains/paths must exactly + * match (see http://en.wikipedia.org/wiki/HTTP_cookie#Domain_and_Pat). + * @param cookie string or a cookie to work on + * @param requestDomain string argument is used to default the domain if it is not explicit in the cookie string + * @param requestPath string argument is used to set the path if it is not explicit in a cookie String + */ + constructor(cookie: string | Cookie, requestDomain?: string, requestPath?: string); + + /** + * the set-cookie: string for this cookie + */ + toString(): string; + + /** + * the cookie: string for this cookie + */ + toValueString(): string; + + /** + * parses the string onto this cookie or a new one if called directly + * @param cookie string to be parsed into a Cookie + * @param requestDomain string definind the requesting domain + * @param requestPath string defining the requesting path + */ + parse(cookie: string, requestDomain?: string, requestPath?: string): Cookie; + + /** + * returns true if the access_info allows retrieval of this cookie + * @param accessInfo CookieAccessInfo + */ + matches(accessInfo: CookieAccessInfo): boolean; + + /** + * returns true if the cookies cannot exist in the same space + * (domain and path match) + * @param cookie Cookie + */ + collidesWith(cookie: Cookie): boolean; +} + +export class CookieJar { + /** + * class to hold numerous cookies from multiple domains correctly + */ + constructor(); + + /** + * modify (or add if not already-existing) a cookie to the jar + * @param cookie string | Cookie + * @param requestDomain string argument is used to default the domain if it is not explicit in the cookie string + * @param requestPath string argument is used to set the path if it is not explicit in a cookie String + */ + setCookie(cookie: string | Cookie, requestDomain?: string, requestPath?: string): Cookie | false; + + /** + * modify (or add if not already-existing) a large number of cookies to the + * jar + * @param cookie string or list of strings defining cookies + * @param requestDomain string argument is used to default the domain if it is not explicit in the cookie string + * @param requestPath string argument is used to set the path if it is not explicit in a cookie String + */ + setCookies(cookie: string | ReadonlyArray, requestDomain?: string, requestPath?: string): ReadonlyArray | false; + + /** + * get a cookie with the name and access_info matching + * @param cookieName string to be parsed into a Cookie + * @param accessInfo CookieAccessInfo + */ + getCookie(cookieName: string, accessInfo: CookieAccessInfo): Cookie; + + /** + * grab all cookies matching this access_info + * @param accessInfo CookieAccessInfo + */ + getCookies(accessInfo: CookieAccessInfo): ReadonlyArray; +} diff --git a/types/cookiejar/tsconfig.json b/types/cookiejar/tsconfig.json new file mode 100644 index 0000000000..7fbf974ede --- /dev/null +++ b/types/cookiejar/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", + "cookiejar-tests.ts" + ] +} diff --git a/types/cookiejar/tslint.json b/types/cookiejar/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/cookiejar/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/copy-webpack-plugin/index.d.ts b/types/copy-webpack-plugin/index.d.ts index eedf42f450..59c1b8d0cb 100644 --- a/types/copy-webpack-plugin/index.d.ts +++ b/types/copy-webpack-plugin/index.d.ts @@ -61,7 +61,7 @@ interface CopyWebpackPluginConfiguration { } interface CopyWebpackPlugin { - new (patterns?: CopyPattern[], options?: CopyWebpackPluginConfiguration): Plugin + new (patterns?: (string | CopyPattern)[], options?: CopyWebpackPluginConfiguration): Plugin } declare const copyWebpackPlugin: CopyWebpackPlugin diff --git a/types/cosmiconfig/cosmiconfig-tests.ts b/types/cosmiconfig/cosmiconfig-tests.ts index c477eedb3e..f25337f3d3 100644 --- a/types/cosmiconfig/cosmiconfig-tests.ts +++ b/types/cosmiconfig/cosmiconfig-tests.ts @@ -1,4 +1,5 @@ -import cosmiconfig, { CosmiconfigResult } from "cosmiconfig"; +import cosmiconfig = require("cosmiconfig"); +import { CosmiconfigResult } from "cosmiconfig"; import * as path from "path"; const explorer = cosmiconfig("yourModuleName", { diff --git a/types/cosmiconfig/index.d.ts b/types/cosmiconfig/index.d.ts index 16ba1967f3..94e28e9dab 100644 --- a/types/cosmiconfig/index.d.ts +++ b/types/cosmiconfig/index.d.ts @@ -3,57 +3,62 @@ // Definitions by: ozum // szeck87 // saadq +// jinwoo // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.2 /// -export interface Config { - [key: string]: any; +declare function cosmiconfig(moduleName: string, options?: cosmiconfig.ExplorerOptions): cosmiconfig.Explorer; + +declare namespace cosmiconfig { + interface Config { + [key: string]: any; + } + + type CosmiconfigResult = { + config: Config; + filepath: string; + isEmpty?: boolean; + } | null; + + interface LoaderResult { + config: Config | null; + filepath: string; + } + + type SyncLoader = (filepath: string, content: string) => Config | null; + type AsyncLoader = (filepath: string, content: string) => Config | null | Promise; + + interface LoaderEntry { + sync?: SyncLoader; + async?: AsyncLoader; + } + + interface Loaders { + [key: string]: LoaderEntry; + } + + interface Explorer { + search(searchFrom?: string): Promise; + searchSync(searchFrom?: string): null | CosmiconfigResult; + load(loadPath: string): Promise; + loadSync(loadPath: string): CosmiconfigResult; + clearLoadCache(): void; + clearSearchCache(): void; + clearCaches(): void; + } + + // These are the user options with defaults applied. + interface ExplorerOptions { + stopDir?: string; + cache?: boolean; + transform?: (result: CosmiconfigResult) => Promise | CosmiconfigResult; + packageProp?: string; + loaders?: Loaders; + searchPlaces?: string[]; + ignoreEmptySearchPlaces?: boolean; + } } -export type CosmiconfigResult = { - config: Config; - filepath: string; - isEmpty?: boolean; -} | null; - -export interface LoaderResult { - config: Config | null; - filepath: string; -} - -export type SyncLoader = (filepath: string, content: string) => Config | null; -export type AsyncLoader = (filepath: string, content: string) => Config | null | Promise; - -export interface LoaderEntry { - sync?: SyncLoader; - async?: AsyncLoader; -} - -export interface Loaders { - [key: string]: LoaderEntry; -} - -export interface Explorer { - search(searchFrom?: string): Promise; - searchSync(searchFrom?: string): null | CosmiconfigResult; - load(loadPath: string): Promise; - loadSync(loadPath: string): CosmiconfigResult; - clearLoadCache(): void; - clearSearchCache(): void; - clearCaches(): void; -} - -// These are the user options with defaults applied. -export interface ExplorerOptions { - stopDir?: string; - cache?: boolean; - transform?: (result: CosmiconfigResult) => Promise | CosmiconfigResult; - packageProp?: string; - loaders?: Loaders; - searchPlaces?: string[]; - ignoreEmptySearchPlaces?: boolean; -} - -export default function cosmiconfig(moduleName: string, options?: ExplorerOptions): Explorer; +export = cosmiconfig; diff --git a/types/couchbase/couchbase-tests.ts b/types/couchbase/couchbase-tests.ts index 547133754b..e6ea7c12d3 100644 --- a/types/couchbase/couchbase-tests.ts +++ b/types/couchbase/couchbase-tests.ts @@ -1,14 +1,167 @@ import couchbase = require('couchbase'); var cluster = new couchbase.Cluster('couchbase://127.0.0.1'); + +cluster.authenticate('username', 'password'); +cluster.authenticate({username: 'username', password: 'password'}); +cluster.authenticate(new couchbase.ClassicAuthenticator({'bucket': 'password'}, 'username', 'password')); + var bucket = cluster.openBucket('default'); +var N1qlQuery = couchbase.N1qlQuery; -bucket.upsert('testdoc', { name: 'Frank' }, (error) => { - if (error) throw error; +bucket.on('connect', () => console.error('Connected!')); +bucket.on('error', err => console.error('Connection failed!')); - bucket.get('testdoc', (err, result) => { - if (err) throw err; +bucket.once('connect', () => console.error('Connected!')); +bucket.once('error', err => console.error('Connection failed!')); - console.log(result.value); - // {name: Frank} +bucket.manager().createPrimaryIndex(function() { + bucket.upsert('user:king_arthur', { + 'email': 'kingarthur@couchbase.com', 'interests': ['Holy Grail', 'African Swallows'] + }, + function(err, result) { + bucket.get('user:king_arthur', function(err, result) { + console.log('Got result: %j', result.value); + bucket.query( + N1qlQuery.fromString('SELECT * FROM bucketname WHERE $1 in interests LIMIT 1'), + ['African Swallows'], + function(err, rows) { + console.log("Got rows: %j", rows); + }); + }); }); -}); \ No newline at end of file +}); + +// Ensure bucket.upsert is composable with normal callbacks +function composable(callback: (err?: Error) => void) { + bucket.upsert('key', {value: 1}, callback); +} + +// From https://developer.couchbase.com/documentation/server/current/sdk/nodejs/n1ql-queries-with-sdk.html +function n1ql_a() { + const n1qlquery = N1qlQuery.fromString('SELECT name, email FROM users WHERE name=$1'); + bucket.query(n1qlquery, ['Monty Python'], function(err, rows) { + // ... + }); +} + +function n1ql_b() { + const q = N1qlQuery.fromString('SELECT * FROM `travel-sample` LIMIT 10'); + const req = bucket.query(q); + req.on('row', function(row) { + console.log('Got a row'); + }); + req.on('error', function(err) { + console.error('Got error %j', err); + }); + req.on('end', function(meta) { + console.log('All rows received. Metadata is %j:', meta); + }); +} + +function n1ql_c() { + // Insert a document with a random x value + bucket.upsert('test-doc', {x: Math.round(Math.random()*10000000)}, function(err, res) { + if (err) { + throw err; + } + + var qs = 'SELECT t.*, TOSTRING(META().cas) AS `_cas` FROM `travel-sample` t WHERE META().id="test-doc"'; + var q = couchbase.N1qlQuery.fromString(qs); + q.consistency(couchbase.N1qlQuery.Consistency.REQUEST_PLUS); + bucket.query(q, function(err, rows) { + if (err) { + throw err; + } + + if (rows.length !== 1) { + throw new Error('unexpected number of rows'); + } + + console.log('Query Result:', rows[0]); + + var cas = rows[0]._cas; + var doc = rows[0]; + delete(doc._cas); + doc.y = doc.x; + + bucket.replace('test-doc', doc, {cas: cas}, function(err) { + if (err) { + throw err; + } + + bucket.get('test-doc', function(err, res) { + if (err) { + throw err; + } + + console.log('Updated:', res.value); + + process.exit(0); + }); + }); + }); + }); +} + +// From https://developer.couchbase.com/documentation/server/current/sdk/nodejs/full-text-searching-with-sdk.html +const SearchQuery = couchbase.SearchQuery; +const SearchFacet = couchbase.SearchFacet; + +function search_a() { + let searchQuery = SearchQuery.new('travel-search', SearchQuery.term('office')); + bucket.query(searchQuery, function(err, res, meta) { + for (var i = 0; i < res.length; ++i) { + console.log('Hit:', res[i].id); + } + }); +} + +function search_b() { + const searchQuery = SearchQuery.new('travel-search', SearchQuery.term('office')); + searchQuery.addFacet('countries', SearchFacet.term('country', 5)); + bucket.query(searchQuery, function(err, res, meta) { + console.log('Total Countries:', meta.facets['countries'].total); + }); +} + +// From https://developer.couchbase.com/documentation/server/5.1/sdk/nodejs/view-queries-with-sdk.html +const ViewQuery = couchbase.ViewQuery; + +function view_a() { + var query = ViewQuery.from('beer', 'by_name').skip(6).limit(3); + bucket.query(query, function(err, results) { + for(let i in results) + console.log(results[i]); + }); +} + +function view_b() { + var SpatialQuery = couchbase.SpatialQuery; + + var query = SpatialQuery.from('spatial', 'by_location').limit(10); + bucket.query(query, function(err, results) { + for(let i in results) + console.log(results[i]); + }); +} + +// From https://developer.couchbase.com/documentation/server/current/sdk/nodejs/sample-app-backend.html +function userSearch(location: string | undefined, description: string | undefined) { + var qp = couchbase.SearchQuery.conjuncts(couchbase.SearchQuery.term('hotel').field('type')); + if (location && location !== '*') { + qp.and(couchbase.SearchQuery.disjuncts( + couchbase.SearchQuery.matchPhrase(location).field("country"), + couchbase.SearchQuery.matchPhrase(location).field("city"), + couchbase.SearchQuery.matchPhrase(location).field("state"), + couchbase.SearchQuery.matchPhrase(location).field("address") + )); + } + + if (description && description !== '*') { + qp.and( + couchbase.SearchQuery.disjuncts( + couchbase.SearchQuery.matchPhrase(description).field("description"), + couchbase.SearchQuery.matchPhrase(description).field("name") + )); + } +} diff --git a/types/couchbase/index.d.ts b/types/couchbase/index.d.ts index eb945af458..813ee8f110 100644 --- a/types/couchbase/index.d.ts +++ b/types/couchbase/index.d.ts @@ -1,6 +1,7 @@ -// Type definitions for Couchbase Node.js SDK 2.1.2 +// Type definitions for Couchbase Node.js SDK 2.4.5 // Project: https://github.com/couchbase/couchnode // Definitions by: Marwan Aouida +// Brian Crowell // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped /// @@ -144,10 +145,75 @@ declare enum errors { restError } +/** + * Virtual base for authenticators. + */ +declare interface Authenticator { + username: string; + password: string; +} + +/** + * Authenticator for using classic authentication. + */ +declare class ClassicAuthenticator implements Authenticator { + /** + * Create a new instance of the ClassicAuthenticator class. + * @param buckets Map of bucket names to passwords. + * @param username Cluster administration username. + * @param password Cluster administration password. + */ + constructor(buckets: {[key: string]: string}, username: string, password: string); + + username: string; + password: string; +} + +/** + * Authenticator for using role-based authentication. + */ +declare class PasswordAuthenticator implements Authenticator { + /** + * Create a new instance of the PasswordAuthenticator class. + * @param username RBAC username. + * @param password RBAC password. + */ + constructor(username: string, password: string); + + username: string; + password: string; +} + +/** + * Authenticator for performing certificate-based authentication. + */ +declare class CertAuthenticator implements Authenticator { + /** + * Create a new instance of the CertAuthenticator class. + */ + constructor(); + + username: string; + password: string; +} + /** * Represents a singular cluster containing your buckets. */ declare class Cluster { + /** + * Authenticate to the cluster using role-based authentication. + * @param username RBAC username. + * @param password RBAC password. + */ + authenticate(username: string, password: string): void; + + /** + * Authenticate to the cluster using a specific authentication type. + * @param auther + */ + authenticate(auther: Authenticator): void; + /** * Create a new instance of the Cluster class. * @param cnstr The connection string for your cluster. @@ -255,7 +321,17 @@ interface CouchbaseError extends Error { /** * The error code for this error. */ - code: errors; + code?: errors; + + /** + * Possible response body included with the error. + */ + responseBody?: any; + + /** + * Possible inner error for this error. + */ + innerError?: CouchbaseError; } interface AppendOptions { @@ -352,10 +428,198 @@ interface InsertOptions { replicate_to?: number; } +interface CreateIndexOptions { + /** + * If a secondary index already exists, an error will be thrown unless this is set to true. + */ + ignoreIfExists?: boolean; + + /** + * True to defer building of the index until buildDeferredIndexes is called (or a direct call to the corresponding query service API). + */ + deferred?: boolean; +} + +interface CreatePrimaryIndexOptions { + /** + * The custom name for the primary index. + */ + name?: string; + + /** + * If a primary index already exists, an error will be thrown unless this is set to true. + */ + ignoreIfExists?: boolean; + + /** + * True to defer building of the index until buildDeferredIndexes is called (or a direct call to the corresponding query service API). + */ + deferred?: boolean; +} + +interface DropIndexOptions { + /** + * If true, attempting to drop on a bucket without the specified index won't cause an error to be thrown. + */ + ignoreIfNotExists?: boolean; +} + +interface DropPrimaryIndexOptions { + /** + * The custom name for the primary index. + */ + name?: string; + + /** + * If true, attempting to drop on a bucket without the specified index won't cause an error to be thrown. + */ + ignoreIfNotExists?: boolean; +} + +interface CreatePrimaryIndexOptions { + /** + * The custom name for the primary index. + */ + name?: string; + + /** + * If a primary index already exists, an error will be thrown unless this is set to true. + */ + ignoreIfExists?: boolean; + + /** + * True to defer building of the index until buildDeferredIndexes is called (or a direct call to the corresponding query service API). + */ + deferred?: boolean; +} + +interface IndexInfo { + /** + * ID for the index. + */ + id: string; + + /** + * Name for the index. + */ + name: string; + + /** + * List of index keys. + */ + index_key: string[]; + + /** + * True if this is a primary index. + */ + is_primary: boolean; + + /** + * ID for the keyspace to which the index belongs. + */ + keyspace_id: string; + + /** + * ID for the namespace to which the index belongs. + */ + namespace_id: string; + + /** + * ID for the datastore to which the index belongs. + */ + store_id: string; + + /** + * The current state of the index. + * + * Values include `online` and `pending`. + */ + state: string; + + /** + * The type of view, which will always be `gsi`. + */ + using: 'gsi'; +} + +interface WatchIndexesOptions { + /** + * Timeout for the operation in milliseconds. + */ + timeout?: number; +} + /** * A class for performing management operations against a bucket. This class should not be instantiated directly, but instead through the use of the Bucket#manager method instead. */ interface BucketManager { + /** + * Builds any indexes that were previously created with the deferred attribute. + * @param callback The callback function. + */ + buildDeferredIndexes(callback: (err: CouchbaseError | null, deferredIndexes: string[]) => void): void; + + /** + * Creates a non-primary GSI index with an optional name. + * @param indexName The name of the index. + * @param fields The JSON fields to index. + * @param options + * @param callback The callback function. + */ + createIndex(indexName: string, fields: string[], callback: (err: CouchbaseError | null) => void): void; + + /** + * Creates a non-primary GSI index with an optional name. + * @param indexName The name of the index. + * @param fields The JSON fields to index. + * @param options + * @param callback The callback function. + */ + createIndex(indexName: string, fields: string[], options: CreateIndexOptions, callback: (err: CouchbaseError | null) => void): void; + + /** + * Creates a primary GSI index with an optional name. + * @param options + * @param callback The callback function. + */ + createPrimaryIndex(callback: (err: CouchbaseError | null) => void): void; + + /** + * Creates a primary GSI index with an optional name. + * @param options + * @param callback The callback function. + */ + createPrimaryIndex(options: CreateIndexOptions, callback: (err: CouchbaseError | null) => void): void; + + /** + * Drops a specific GSI index by name. + * @param indexName The name of the index. + * @param options + * @param callback The callback function. + */ + dropIndex(indexName: string, callback: (err: CouchbaseError | null) => void): void; + + /** + * Drops a specific GSI index by name. + * @param indexName The name of the index. + * @param options + * @param callback The callback function. + */ + dropIndex(indexName: string, options: DropIndexOptions, callback: (err: CouchbaseError | null) => void): void; + + /** + * Drops a primary GSI index. + * @param options + * @param callback The callback function. + */ + dropPrimaryIndex(callback: (err: CouchbaseError | null) => void): void; + + /** + * Drops a primary GSI index. + * @param options + * @param callback The callback function. + */ + dropPrimaryIndex(options: DropPrimaryIndexOptions, callback: (err: CouchbaseError | null) => void): void; /** * Flushes the cluster, deleting all data stored within this bucket. Note that this method requires the Flush permission to be enabled on the bucket from the management console before it will work. @@ -376,6 +640,12 @@ interface BucketManager { */ getDesignDocuments(callback: Function): void; + /** + * Retrieves a list of the indexes currently configured on the cluster. + * @param callback The callback function. + */ + getIndexes(callback: (err: CouchbaseError | null, indexes: IndexInfo[] | null) => void): void; + /** * Registers a design document to this bucket, failing if it already exists. * @param name @@ -401,6 +671,21 @@ interface BucketManager { * @returns {} */ upsertDesignDocument(name: string, data: any, callback: Function): void; + + /** + * Watches a list of indexes, waiting for them to become available for use. + * @param watchList List of indexes to watch. + * @param callback The callback function. + */ + watchIndexes(watchList: string[], callback: (err: Error | null) => void): void; + + /** + * Watches a list of indexes, waiting for them to become available for use. + * @param watchList List of indexes to watch. + * @param options + * @param callback The callback function. + */ + watchIndexes(watchList: string[], options: WatchIndexesOptions, callback: (err: Error | null) => void): void; } /** @@ -571,6 +856,9 @@ declare namespace ViewQuery { * Class for dynamically construction of N1QL queries. This class should never be constructed directly, instead you should use the N1qlQuery.fromString static method to instantiate a N1qlStringQuery. */ declare class N1qlQuery { + // Private declaration to avoid other queries being misstaken for N1qlQuery + private __nominal: void; + /** * Creates a query object directly from the passed query string. * @param str @@ -703,10 +991,654 @@ declare namespace SpatialQuery { } } +declare abstract class SearchQuery { + /** + * Creates a new search query from an index name and search query definition. + * @param indexName The FTS index to search in. + * @param query The body of the FTS query. + */ + static new(indexName: string, query: SearchQuery.Query): SearchQuery; + + /** + * Creates a compound BooleanQuery composed of several other query objects. + */ + static boolean(): SearchQuery.BooleanQuery; + + /** + * Creates a BooleanFieldQuery for searching boolean fields in an index. + */ + static booleanField(val: boolean): SearchQuery.BooleanFieldQuery; + + /** + * Creates a query for matches all of a list of subqueries in an index. + */ + static conjuncts(queries: ReadonlyArray): SearchQuery.ConjunctionQuery; + + /** + * Creates a query for matches all of a list of subqueries in an index. + */ + static conjuncts(...queries: SearchQuery.Query[]): SearchQuery.ConjunctionQuery; + + /** + * Creates a search query for matching date ranges in an index. + */ + static dateRange(): SearchQuery.DateRangeQuery; + + /** + * Creates a query for matches any of a list of subqueries in an index. + */ + static disjuncts(queries: ReadonlyArray): SearchQuery.DisjunctionQuery; + + /** + * Creates a query for matches any of a list of subqueries in an index. + */ + static disjuncts(...queries: SearchQuery.Query[]): SearchQuery.DisjunctionQuery; + + /** + * Creates a query which allows you to match a list of document IDs in an index. + */ + static docIds(ids: ReadonlyArray): SearchQuery.DocIdQuery; + + /** + * Creates a query which allows you to match a list of document IDs in an index. + */ + static docIds(...ids: string[]): SearchQuery.DocIdQuery; + + /** + * Creates a geographical bounding-box based query. + * @param tl_lat Top-left latitude. + * @param tl_lon Top-left longitude. + * @param br_lat Bottom-right latitude. + * @param br_lon Bottom-right longitude. + */ + static geoBoundingBoxQuery(tl_lat: number, tl_lon: number, br_lat: number, br_lon: number): SearchQuery.GeoBoundingBoxQuery; + + /** + * Creates a geographical distance based query. + */ + static geoDistanceQuery(): SearchQuery.GeoDistanceQuery; + + /** + * Creates a search query for matching text. + */ + static match(match: string): SearchQuery.MatchQuery; + + /** + * Creates a search query which matches anything. + */ + static matchAll(): SearchQuery.MatchAllQuery; + + /** + * Creates a search query which matches nothing. + */ + static matchNone(): SearchQuery.MatchAllQuery; + + /** + * Creates a search query for matching phrases in an index. + */ + static matchPhrase(phrase: string): SearchQuery.MatchPhraseQuery; + + /** + * Creates a search query for matching numeric ranges in an index. + */ + static numericRange(): SearchQuery.NumericRangeQuery; + + /** + * Creates a search query for a prefix in an index. + */ + static phrase(terms: ReadonlyArray): SearchQuery.PhraseQuery; + + /** + * Creates a search query for a prefix in an index. + */ + static prefix(prefix: string): SearchQuery.PrefixQuery; + /** + * Creates a query for matches any of a list of subqueries in an index. + */ + + /** + * Creates a search query for matching string. + */ + static queryString(query: string): SearchQuery.QueryStringQuery; + + /** + * Creates a search query for matching against a regexp query in an index. + */ + static regexp(regexp: string): SearchQuery.RegexpQuery; + + /** + * Creates a search query for searching terms in an index. + */ + static term(term: string): SearchQuery.TermQuery; + + /** + * Creates a search query for matching term ranges in the index. + */ + static termRange(): SearchQuery.TermRangeQuery; + + /** + * Creates a search query for matching a string with wildcards in an index. + */ + static wildcard(wildcard: string): SearchQuery.WildcardQuery; + + /** + * Adds a SearchFacet object to return information about as part of the execution of this query. + */ + addFacet(name: string, facet: SearchFacet): this; + + /** + * Specify the consistency level for this query. + */ + consistency(val: SearchQuery.Consistency): this; + + /** + * Includes information about the internal search semantics used to execute your query. + */ + explain(explain: boolean): this; + + /** + * Specifies the fields you wish to receive in the result set. + */ + fields(fields: ReadonlyArray): this; + + /** + * Specifies the fields you wish to receive in the result set. + */ + fields(...fields: string[]): this; + + /** + * Request a particular highlight style and field list for this query. + */ + highlight(style: SearchQuery.HighlightStyle, fields: ReadonlyArray): this; + + /** + * Request a particular highlight style and field list for this query. + */ + highlight(style: SearchQuery.HighlightStyle, ...fields: string[]): this; + + /** + * Specifies the maximum number of results to return. + * @param limit Maximum number of results to return. + */ + limit(limit: number): this; + + /** + * Specifies how many results to skip from the beginning of the result set. + * @param skip How many results to skip from the beginning of the result set. + */ + skip(skip: number): this; + + /** + * Specifies the fields you wish to sort by in your result set. + */ + sort(fields: ReadonlyArray): this; + + /** + * Specifies the fields you wish to sort by in your result set. + */ + sort(...fields: (string | SearchSort)[]): this; + + /** + * Specifies the maximum time to wait for this query to complete. + * @param timeout Maximum time to wait (in milliseconds) for this query to complete. + */ + timeout(timeout: number): this; +} + +declare namespace SearchQuery { + abstract class Query { + } + + abstract class BooleanQuery extends Query { + /** + * Specifies a predicate query which must match. + * @param query + */ + must(query: Query): this; + + /** + * Specifies a predicate query which must not match. + * @param query + */ + mustNot(query: Query): this; + + /** + * Specifies a predicate query which should match. + * @param query + */ + should(query: Query): this; + + /** + * Specifies the minimum score for should predicate matches. + * @param shouldMin + */ + shouldMin(shouldMin: number): this; + + /** + * Defines the amount to boost the query. + * @param boost Amount to boost the query. + */ + boost(boost: number): this; + } + + abstract class BooleanFieldQuery extends Query { + /** + * Defines the amount to boost the query. + * @param boost Amount to boost the query. + */ + boost(boost: number): this; + + /** + * Specifies the field to query. + * @param boost The field to query. + */ + field(field: string): this; + } + + abstract class ConjunctionQuery extends Query { + /** + * Specifies additional predicate queries. + * @param queries Additional predicate queries. + */ + and(queries: ReadonlyArray): this; + + /** + * Specifies additional predicate queries. + * @param queries Additional predicate queries. + */ + and(...queries: SearchQuery.Query[]): this; + + /** + * Defines the amount to boost the query. + * @param boost Amount to boost the query. + */ + boost(boost: number): this; + } + + abstract class DateRangeQuery extends Query { + /** + * Defines the lower bound of the date range query. + * @param start The lower bound of the query. + * @param inclusive True to set an inclusive bound. Defaults to true. + */ + start(start: Date | string, inclusive?: boolean): this; + + /** + * Defines the upper bound of the date range query. + * @param end The upper bound of the query. + * @param inclusive True to set an inclusive bound. Defaults to false. + */ + end(end: Date | string, inclusive?: boolean): this; + + /** + * Defines the amount to boost the query. + * @param boost Amount to boost the query. + */ + boost(boost: number): this; + + /** + * Specifies the field to query. + * @param field The field to query. + */ + field(field: string): this; + } + + abstract class DisjunctionQuery extends Query { + /** + * Specifies additional predicate queries. + * @param queries Additional predicate queries. + */ + or(queries: ReadonlyArray): this; + + /** + * Specifies additional predicate queries. + * @param queries Additional predicate queries. + */ + or(...queries: SearchQuery.Query[]): this; + + /** + * Defines the amount to boost the query. + * @param boost Amount to boost the query. + */ + boost(boost: number): this; + } + + abstract class DocIdQuery extends Query { + /** + * Defines the amount to boost the query. + * @param boost Amount to boost the query. + */ + boost(boost: number): this; + + /** + * Specifies the field to query. + * @param field The field to query. + */ + field(field: string): this; + } + + abstract class GeoBoundingBoxQuery extends Query { + /** + * Defines the amount to boost the query. + * @param boost Amount to boost the query. + */ + boost(boost: number): this; + + /** + * Specifies the field to query. + * @param field The field to query. + */ + field(field: string): this; + } + + abstract class GeoDistanceQuery extends Query { + /** + * Defines the amount to boost the query. + * @param boost Amount to boost the query. + */ + boost(boost: number): this; + + /** + * Specifies the field to query. + * @param field The field to query. + */ + field(field: string): this; + } + + abstract class MatchAllQuery extends Query { + } + + abstract class MatchNoneQuery extends Query { + } + + abstract class MatchPhraseQuery extends Query { + /** + * Defines the amount to boost the query. + * @param boost Amount to boost the query. + */ + boost(boost: number): this; + + /** + * Specifies the field to query. + * @param field The field to query. + */ + field(field: string): this; + + /** + * Specifies the analyzer to use for the query. + * @param analyzer Analyzer to use for the query. + */ + analyzer(analyzer: string): this; + } + + abstract class MatchQuery extends Query { + /** + * Defines the amount to boost the query. + * @param boost Amount to boost the query. + */ + boost(boost: number): this; + + /** + * Specifies the field to query. + * @param field The field to query. + */ + field(field: string): this; + + /** + * Defines the level of fuzziness for the query. + * @param fuzziness Level of fuzziness for the query. + */ + fuzziness(fuzziness: number): this; + + /** + * Specifies the prefix length to consider for the query. + * @param prefixLength Prefix length to consider for the query. + */ + prefixLength(prefixLength: number): this; + + /** + * Specifies the analyzer to use for the query. + * @param analyzer Analyzer to use for the query. + */ + analyzer(analyzer: string): this; + } + + abstract class NumericRangeQuery extends Query { + /** + * Defines the lower bound of the numeric range query. + * @param min The lower bound of the query. + * @param inclusive True to set an inclusive bound. Defaults to true. + */ + min(min: number, inclusive?: boolean): this; + + /** + * Defines the upper bound of the numeric range query. + * @param max The upper bound of the query. + * @param inclusive True to set an inclusive bound. Defaults to false. + */ + max(max: number, inclusive?: boolean): this; + + /** + * Defines the amount to boost the query. + * @param boost Amount to boost the query. + */ + boost(boost: number): this; + + /** + * Specifies the field to query. + * @param field The field to query. + */ + field(field: string): this; + } + + abstract class PhraseQuery extends Query { + /** + * Defines the amount to boost the query. + * @param boost Amount to boost the query. + */ + boost(boost: number): this; + + /** + * Specifies the field to query. + * @param field The field to query. + */ + field(field: string): this; + } + + abstract class PrefixQuery extends Query { + /** + * Defines the amount to boost the query. + * @param boost Amount to boost the query. + */ + boost(boost: number): this; + + /** + * Specifies the field to query. + * @param field The field to query. + */ + field(field: string): this; + } + + abstract class QueryStringQuery extends Query { + /** + * Defines the amount to boost the query. + * @param boost Amount to boost the query. + */ + boost(boost: number): this; + } + + abstract class RegexpQuery extends Query { + /** + * Defines the amount to boost the query. + * @param boost Amount to boost the query. + */ + boost(boost: number): this; + + /** + * Specifies the field to query. + * @param field The field to query. + */ + field(field: string): this; + } + + abstract class TermQuery extends Query { + /** + * Defines the amount to boost the query. + * @param boost Amount to boost the query. + */ + boost(boost: number): this; + + /** + * Specifies the field to query. + * @param field The field to query. + */ + field(field: string): this; + + /** + * Defines the level of fuzziness for the query. + * @param fuzziness Level of fuzziness for the query. + */ + fuzziness(fuzziness: number): this; + + /** + * Specifies the prefix length to consider for the query. + * @param prefixLength Prefix length to consider for the query. + */ + prefixLength(prefixLength: number): this; + } + + abstract class TermRangeQuery extends Query { + /** + * Defines the lower bound of the term range query. + * @param min The lower bound of the query. + * @param inclusive True to set an inclusive bound. Defaults to true. + */ + min(min: string, inclusive?: boolean): this; + + /** + * Defines the upper bound of the term range query. + * @param max The upper bound of the query. + * @param inclusive True to set an inclusive bound. Defaults to false. + */ + max(max: string, inclusive?: boolean): this; + + /** + * Defines the amount to boost the query. + * @param boost Amount to boost the query. + */ + boost(boost: number): this; + + /** + * Specifies the field to query. + * @param field The field to query. + */ + field(field: string): this; + } + + abstract class WildcardQuery extends Query { + /** + * Defines the amount to boost the query. + * @param boost Amount to boost the query. + */ + boost(boost: number): this; + + /** + * Specifies the field to query. + * @param boost The field to query. + */ + field(field: string): this; + } + + /** + * Enumeration for specifying FTS consistency semantics. + */ + enum Consistency { + /** + * This is the default (for single-statement requests). + */ + NOT_BOUNDED, + } + + /** + * Enumeration for specifying FTS highlight styling. + */ + enum HighlightStyle { + /** + * This causes hits to be highlighted using the default style. + */ + DEFAULT, + + /** + * This causes hits to be highlighted using HTML tags. + */ + HTML, + + /** + * This causes hits to be highlighted with ANSI character codes. + */ + ANSI, + } +} + +declare class SearchFacet { +} + +declare namespace SearchFacet { + class TermFacet extends SearchFacet { + } + + function term(field: string, size: number): TermFacet; + + class NumericFacet extends SearchFacet { + addRange(name: string, min: number, max: number): this; + } + + function numeric(field: string, size: number): NumericFacet; + + class DateFacet extends SearchFacet { + addRange(name: string, start: string, end: string): this; + } + + function date(field: string, size: number): DateFacet; +} + +declare class SearchSort { + /** + * Specifies whether to sort descending or not. + */ + descending(descending: boolean): this; +} + +declare namespace SearchSort { + class ScoreSort extends SearchSort { + } + + function score(): ScoreSort; + + class IdSort extends SearchSort { + } + + function id(): IdSort; + + class FieldSort extends SearchSort { + type(type: string): this; + mode(mode: string): this; + missing(missing: string): this; + } + + function field(field: string): FieldSort; + + class GeoDistanceSort extends SearchSort { + unit(unit: string): this; + } + + function geoDistance(field: string, lat: number, lon: number): GeoDistanceSort; +} + /** * The Bucket class represents a connection to a Couchbase bucket. Never instantiate this class directly. Instead use the Cluster#openBucket method instead. */ -interface Bucket { +interface Bucket extends events.EventEmitter { /** * Returns the version of the Node.js library as a string. */ @@ -763,7 +1695,7 @@ interface Bucket { * @param fragment The document's contents to append. * @param callback The callback function. */ - append(key: any | Buffer, fragment: any, callback: Bucket.OpCallback): void; + append(key: string | Buffer, fragment: any, callback: Bucket.OpCallback): void; /** * @@ -772,7 +1704,7 @@ interface Bucket { * @param options The options object. * @param callback The callback function. */ - append(key: any | Buffer, fragment: any, options: AppendOptions, callback: Bucket.OpCallback): void; + append(key: string | Buffer, fragment: any, options: AppendOptions, callback: Bucket.OpCallback): void; /** * Increments or decrements a key's numeric value. @@ -781,7 +1713,7 @@ interface Bucket { * @param delta The amount to add or subtract from the counter value. This value may be any non-zero integer. * @param callback The callback function. */ - counter(key: any | Buffer, delta: number, callback: Bucket.OpCallback): void; + counter(key: string | Buffer, delta: number, callback: Bucket.OpCallback): void; /** * @@ -790,7 +1722,7 @@ interface Bucket { * @param options The options object. * @param callback The callback function. */ - counter(key: any | Buffer, delta: number, options: CounterOptions, callback: Bucket.OpCallback): void; + counter(key: string | Buffer, delta: number, options: CounterOptions, callback: Bucket.OpCallback): void; /** * Shuts down this connection. @@ -808,14 +1740,14 @@ interface Bucket { * @param key The target document key. * @param callback The callback function. */ - get(key: any | Buffer, callback: Bucket.OpCallback): void; + get(key: string | Buffer, callback: Bucket.OpCallback): void; /** * @param key The target document key. * @param options The options object. * @param callback The callback function. */ - get(key: any | Buffer, options: any, callback: Bucket.OpCallback): void; + get(key: string | Buffer, options: any, callback: Bucket.OpCallback): void; /** * Lock the document on the server and retrieve it. When an document is locked, its CAS changes and subsequent operations on the document (without providing the current CAS) will fail until the lock is no longer held. @@ -824,7 +1756,7 @@ interface Bucket { * @param key The target document key. * @param callback The callback function. */ - getAndLock(key: any, callback: Bucket.OpCallback): void; + getAndLock(key: string, callback: Bucket.OpCallback): void; /** * Lock the document on the server and retrieve it. When an document is locked, its CAS changes and subsequent operations on the document (without providing the current CAS) will fail until the lock is no longer held. @@ -835,7 +1767,7 @@ interface Bucket { * @param callback The callback function. * @returns {} */ - getAndLock(key: any, options: GetAndLockOptions, callback: Bucket.OpCallback): void; + getAndLock(key: string, options: GetAndLockOptions, callback: Bucket.OpCallback): void; /** * Retrieves a document and updates the expiry of the item at the same time. @@ -844,7 +1776,7 @@ interface Bucket { * @param options The options object. * @param callback The callback function. */ - getAndTouch(key: any | Buffer, expiry: number, options: any, callback: Bucket.OpCallback): void; + getAndTouch(key: string | Buffer, expiry: number, options: any, callback: Bucket.OpCallback): void; /** * Retrieves a document and updates the expiry of the item at the same time. @@ -852,21 +1784,21 @@ interface Bucket { * @param expiry The expiration time to use. If a value of 0 is provided, then the current expiration time is cleared and the key is set to never expire. Otherwise, the key is updated to expire in the time provided (in seconds). * @param callback The callback function. */ - getAndTouch(key: any | Buffer, expiry: number, callback: Bucket.OpCallback): void; + getAndTouch(key: string | Buffer, expiry: number, callback: Bucket.OpCallback): void; /** * Retrieves a list of keys * @param keys The target document keys. * @param callback The callback function. */ - getMulti(key: any[] | Buffer[], callback: Bucket.MultiGetCallback): void; + getMulti(key: ReadonlyArray, callback: Bucket.MultiGetCallback): void; /** * Get a document from a replica server in your cluster. * @param key The target document key. * @param callback The callback function. */ - getReplica(key: any | Buffer, callback: Bucket.OpCallback): void; + getReplica(key: string | Buffer, callback: Bucket.OpCallback): void; /** * Get a document from a replica server in your cluster. @@ -874,7 +1806,7 @@ interface Bucket { * @param options The options object. * @param callback The callback function. */ - getReplica(key: any | Buffer, options: GetReplicaOptions, callback: Bucket.OpCallback): void; + getReplica(key: string | Buffer, options: GetReplicaOptions, callback: Bucket.OpCallback): void; /** * Identical to Bucket#upsert but will fail if the document already exists. @@ -882,7 +1814,7 @@ interface Bucket { * @param value The document's contents. * @param callback The callback function. */ - insert(key: any | Buffer, value: any, callback: Bucket.OpCallback): void; + insert(key: string | Buffer, value: any, callback: Bucket.OpCallback): void; /** * Identical to Bucket#upsert but will fail if the document already exists. @@ -891,7 +1823,7 @@ interface Bucket { * @param options The options object. * @param callback The callback function. */ - insert(key: any | Buffer, value: any, options: InsertOptions, callback: Bucket.OpCallback): void; + insert(key: string | Buffer, value: any, options: InsertOptions, callback: Bucket.OpCallback): void; /** * Returns an instance of a BuckerManager for performing management operations against a bucket. @@ -904,7 +1836,7 @@ interface Bucket { * @param fragment The document's contents to prepend. * @param callback The callback function. */ - prepend(key: any, fragment: any, callback: Bucket.OpCallback): void; + prepend(key: string, fragment: any, callback: Bucket.OpCallback): void; /** * Like Bucket#append, but prepends data to the existing value. @@ -913,31 +1845,43 @@ interface Bucket { * @param options The options object. * @param callback The callback function. */ - prepend(key: any, fragment: any, options: PrependOptions, callback: Bucket.OpCallback): void; + prepend(key: string, fragment: any, options: PrependOptions, callback: Bucket.OpCallback): void; /** - * Executes a previously prepared query object. This could be a ViewQuery or a N1qlQuery. - * Note: N1qlQuery queries are currently an uncommitted interface and may be subject to change in 2.0.0's final release. + * Executes a previously prepared query object. * @param query The query to execute. * @param callback The callback function. */ - query(query: ViewQuery | N1qlQuery, callback: Bucket.QueryCallback): Bucket.ViewQueryResponse | Bucket.N1qlQueryResponse; + query(query: ViewQuery | SpatialQuery, callback?: Bucket.QueryCallback): Bucket.ViewQueryResponse; /** - * Executes a previously prepared query object. This could be a ViewQuery or a N1qlQuery. - * Note: N1qlQuery queries are currently an uncommitted interface and may be subject to change in 2.0.0's final release. + * Executes a previously prepared query object. + * @param query The query to execute. + * @param callback The callback function. + */ + query(query: N1qlQuery, callback?: Bucket.N1qlQueryCallback): Bucket.N1qlQueryResponse; + + /** + * Executes a previously prepared query object. + * @param query The query to execute. + * @param callback The callback function. + */ + query(query: SearchQuery, callback?: Bucket.FtsQueryCallback): Bucket.FtsQueryResponse; + + /** + * Executes a previously prepared query object. * @param query The query to execute. * @param params A list or map to do replacements on a N1QL query. * @param callback The callback function. */ - query(query: ViewQuery | N1qlQuery, params: Object | Array, callback: Bucket.QueryCallback): Bucket.ViewQueryResponse | Bucket.N1qlQueryResponse; + query(query: N1qlQuery, params: {[param: string]: any} | any[], callback?: Bucket.N1qlQueryCallback): Bucket.N1qlQueryResponse; /** * Deletes a document on the server. * @param key The target document key. * @param callback The callback function. */ - remove(key: any | Buffer, callback: Bucket.OpCallback): void; + remove(key: string | Buffer, callback: Bucket.OpCallback): void; /** * Deletes a document on the server. @@ -945,7 +1889,7 @@ interface Bucket { * @param options The options object. * @param callback The callback function. */ - remove(key: any | Buffer, options: RemoveOptions, callback: Bucket.OpCallback): void; + remove(key: string | Buffer, options: RemoveOptions, callback: Bucket.OpCallback): void; /** * Identical to Bucket#upsert, but will only succeed if the document exists already (i.e. the inverse of Bucket#insert). @@ -953,7 +1897,7 @@ interface Bucket { * @param value The document's contents. * @param callback The callback function. */ - replace(key: any | Buffer, value: any, callback: Bucket.OpCallback): void; + replace(key: string | Buffer, value: any, callback: Bucket.OpCallback): void; /** * Identical to Bucket#upsert, but will only succeed if the document exists already (i.e. the inverse of Bucket#insert). @@ -962,7 +1906,7 @@ interface Bucket { * @param options The options object. * @param callback The callback function. */ - replace(key: any | Buffer, value: any, options: ReplaceOptions, callback: Bucket.OpCallback): void; + replace(key: string | Buffer, value: any, options: ReplaceOptions, callback: Bucket.OpCallback): void; /** * Configures a custom set of transcoder functions for encoding and decoding values that are being stored or retreived from the server. @@ -978,7 +1922,7 @@ interface Bucket { * @param options The options object. * @param callback The callback function. */ - touch(key: any | Buffer, expiry: number, options: TouchOptions, callback: Bucket.OpCallback): void; + touch(key: string | Buffer, expiry: number, options: TouchOptions, callback: Bucket.OpCallback): void; /** * Unlock a previously locked document on the server. See the Bucket#lock method for more details on locking. @@ -986,7 +1930,7 @@ interface Bucket { * @param cas The CAS value returned when the key was locked. This operation will fail if the CAS value provided does not match that which was the result of the original lock operation. * @param callback The callback function. */ - unlock(key: any | Buffer, cas: Bucket.CAS, callback: Bucket.OpCallback): void; + unlock(key: string | Buffer, cas: Bucket.CAS, callback: Bucket.OpCallback): void; /** * Unlock a previously locked document on the server. See the Bucket#lock method for more details on locking. @@ -995,7 +1939,7 @@ interface Bucket { * @param options The options object. * @param callback The callback function. */ - unlock(key: any | Buffer, cas: Bucket.CAS, options: any, callback: Bucket.OpCallback): void; + unlock(key: string | Buffer, cas: Bucket.CAS, options: any, callback: Bucket.OpCallback): void; /** * Stores a document to the bucket. @@ -1003,7 +1947,7 @@ interface Bucket { * @param value The document's contents. * @param callback The callback function. */ - upsert(key: any | Buffer, value: any, callback: Bucket.OpCallback): void; + upsert(key: string | Buffer, value: any, callback: Bucket.OpCallback): void; /** * Stores a document to the bucket. @@ -1012,13 +1956,28 @@ interface Bucket { * @param options The options object. * @param callback The callback function. */ - upsert(key: any | Buffer, value: any, options: UpsertOptions, callback: Bucket.OpCallback): void; + upsert(key: string | Buffer, value: any, options: UpsertOptions, callback: Bucket.OpCallback): void; + + addListener(event: 'connect', listener: () => void): this; + addListener(event: 'error', listener: (error: CouchbaseError) => void): this; + + on(event: 'connect', listener: () => void): this; + on(event: 'error', listener: (error: CouchbaseError) => void): this; + + once(event: 'connect', listener: () => void): this; + once(event: 'error', listener: (error: CouchbaseError) => void): this; + + prependListener(event: 'connect', listener: () => void): this; + prependListener(event: 'error', listener: (error: CouchbaseError) => void): this; + + prependOnceListener(event: 'connect', listener: () => void): this; + prependOnceListener(event: 'error', listener: (error: CouchbaseError) => void): this; } declare namespace Bucket { /** - * his is used as a callback from executed queries. It is a shortcut method that automatically subscribes to the rows and error events of the Bucket.ViewQueryResponse. + * This is used as a callback from executed queries. It is a shortcut method that automatically subscribes to the rows and error events of the Bucket.ViewQueryResponse. */ interface QueryCallback { /** @@ -1026,7 +1985,31 @@ declare namespace Bucket { * @param rows The rows returned from the query. * @param meta The metadata returned by the query. */ - (error: CouchbaseError, rows: any[], meta: Bucket.ViewQueryResponse.Meta): void; + (error: CouchbaseError | null, rows: any[] | null, meta: Bucket.ViewQueryResponse.Meta): void; + } + + /** + * This is used as a callback from executed queries. It is a shortcut method that automatically subscribes to the rows and error events of the Bucket.ViewQueryResponse. + */ + interface N1qlQueryCallback { + /** + * @param error The error for the operation. This can either be an Error object or a falsy value. + * @param rows The rows returned from the query. + * @param meta The metadata returned by the query. + */ + (error: CouchbaseError | null, rows: any[] | null, meta: Bucket.N1qlQueryResponse.Meta): void; + } + + /** + * This is used as a callback from executed queries. It is a shortcut method that automatically subscribes to the rows and error events of the Bucket.ViewQueryResponse. + */ + interface FtsQueryCallback { + /** + * @param error The error for the operation. This can either be an Error object or a falsy value. + * @param rows The rows returned from the query. + * @param meta The metadata returned by the query. + */ + (error: CouchbaseError | null, rows: any[] | null, meta: Bucket.FtsQueryResponse.Meta): void; } /** @@ -1036,10 +2019,10 @@ declare namespace Bucket { */ interface OpCallback { /** - * @param error The error for the operation. This can either be an Error object or a value which evaluates to false (null, undefined, 0 or false). + * @param error The error for the operation. This can either be an Error object or a value which evaluates to false. * @param result The result of the operation that was executed. This usually contains at least a cas property, and on some operations will contain a value property as well. */ - (error: CouchbaseError | number, result: any): void; + (error: CouchbaseError | null, result: any): void; } /** @@ -1081,7 +2064,7 @@ declare namespace Bucket { /** * The CAS value is a special object that indicates the current state of the item on the server. Each time an object is mutated on the server, the value is changed. CAS objects can be used in conjunction with mutation operations to ensure that the value on the server matches the local value retrieved by the client. This is useful when doing document updates on the server as you can ensure no changes were applied by other clients while you were in the process of mutating the document locally. - * In the Node.js SDK, the CAS is represented as an opaque value. As such,y ou cannot generate CAS objects, but should rather use the values returned from a Bucket.OpCallback. + * In the Node.js SDK, the CAS is represented as an opaque value. As such, you cannot generate CAS objects, but should rather use the values returned from a Bucket.OpCallback. */ interface CAS { @@ -1091,7 +2074,30 @@ declare namespace Bucket { * An event emitter allowing you to bind to various query result set events. */ interface N1qlQueryResponse extends events.EventEmitter { + addListener(event: 'end', listener: (meta: N1qlQueryResponse.Meta) => void): this; + addListener(event: 'error', listener: (error: CouchbaseError) => void): this; + addListener(event: 'row', listener: (row: any, meta: N1qlQueryResponse.Meta) => void): this; + addListener(event: 'rows', listener: (rows: any[], meta: N1qlQueryResponse.Meta) => void): this; + on(event: 'end', listener: (meta: N1qlQueryResponse.Meta) => void): this; + on(event: 'error', listener: (error: CouchbaseError) => void): this; + on(event: 'row', listener: (row: any, meta: N1qlQueryResponse.Meta) => void): this; + on(event: 'rows', listener: (rows: any[], meta: N1qlQueryResponse.Meta) => void): this; + + once(event: 'end', listener: (meta: N1qlQueryResponse.Meta) => void): this; + once(event: 'error', listener: (error: CouchbaseError) => void): this; + once(event: 'row', listener: (row: any, meta: N1qlQueryResponse.Meta) => void): this; + once(event: 'rows', listener: (rows: any[], meta: N1qlQueryResponse.Meta) => void): this; + + prependListener(event: 'end', listener: (meta: N1qlQueryResponse.Meta) => void): this; + prependListener(event: 'error', listener: (error: CouchbaseError) => void): this; + prependListener(event: 'row', listener: (row: any, meta: N1qlQueryResponse.Meta) => void): this; + prependListener(event: 'rows', listener: (rows: any[], meta: N1qlQueryResponse.Meta) => void): this; + + prependOnceListener(event: 'end', listener: (meta: N1qlQueryResponse.Meta) => void): this; + prependOnceListener(event: 'error', listener: (error: CouchbaseError) => void): this; + prependOnceListener(event: 'row', listener: (row: any, meta: N1qlQueryResponse.Meta) => void): this; + prependOnceListener(event: 'rows', listener: (rows: any[], meta: N1qlQueryResponse.Meta) => void): this; } namespace N1qlQueryResponse { @@ -1118,7 +2124,30 @@ declare namespace Bucket { * An event emitter allowing you to bind to various query result set events. */ interface ViewQueryResponse extends events.EventEmitter { + addListener(event: 'end', listener: (meta: ViewQueryResponse.Meta) => void): this; + addListener(event: 'error', listener: (error: CouchbaseError) => void): this; + addListener(event: 'row', listener: (row: any, meta: ViewQueryResponse.Meta) => void): this; + addListener(event: 'rows', listener: (rows: any[], meta: ViewQueryResponse.Meta) => void): this; + on(event: 'end', listener: (meta: ViewQueryResponse.Meta) => void): this; + on(event: 'error', listener: (error: CouchbaseError) => void): this; + on(event: 'row', listener: (row: any, meta: ViewQueryResponse.Meta) => void): this; + on(event: 'rows', listener: (rows: any[], meta: ViewQueryResponse.Meta) => void): this; + + once(event: 'end', listener: (meta: ViewQueryResponse.Meta) => void): this; + once(event: 'error', listener: (error: CouchbaseError) => void): this; + once(event: 'row', listener: (row: any, meta: ViewQueryResponse.Meta) => void): this; + once(event: 'rows', listener: (rows: any[], meta: ViewQueryResponse.Meta) => void): this; + + prependListener(event: 'end', listener: (meta: ViewQueryResponse.Meta) => void): this; + prependListener(event: 'error', listener: (error: CouchbaseError) => void): this; + prependListener(event: 'row', listener: (row: any, meta: ViewQueryResponse.Meta) => void): this; + prependListener(event: 'rows', listener: (rows: any[], meta: ViewQueryResponse.Meta) => void): this; + + prependOnceListener(event: 'end', listener: (meta: ViewQueryResponse.Meta) => void): this; + prependOnceListener(event: 'error', listener: (error: CouchbaseError) => void): this; + prependOnceListener(event: 'row', listener: (row: any, meta: ViewQueryResponse.Meta) => void): this; + prependOnceListener(event: 'rows', listener: (rows: any[], meta: ViewQueryResponse.Meta) => void): this; } namespace ViewQueryResponse { @@ -1132,4 +2161,73 @@ declare namespace Bucket { total_rows: number; } } + + /** + * An event emitter allowing you to bind to various query result set events. + */ + interface FtsQueryResponse extends events.EventEmitter { + addListener(event: 'end', listener: (meta: FtsQueryResponse.Meta) => void): this; + addListener(event: 'error', listener: (error: CouchbaseError) => void): this; + addListener(event: 'row', listener: (row: any, meta: FtsQueryResponse.Meta) => void): this; + addListener(event: 'rows', listener: (rows: any[], meta: FtsQueryResponse.Meta) => void): this; + + on(event: 'end', listener: (meta: FtsQueryResponse.Meta) => void): this; + on(event: 'error', listener: (error: CouchbaseError) => void): this; + on(event: 'row', listener: (row: any, meta: FtsQueryResponse.Meta) => void): this; + on(event: 'rows', listener: (rows: any[], meta: FtsQueryResponse.Meta) => void): this; + + once(event: 'end', listener: (meta: FtsQueryResponse.Meta) => void): this; + once(event: 'error', listener: (error: CouchbaseError) => void): this; + once(event: 'row', listener: (row: any, meta: FtsQueryResponse.Meta) => void): this; + once(event: 'rows', listener: (rows: any[], meta: FtsQueryResponse.Meta) => void): this; + + prependListener(event: 'end', listener: (meta: FtsQueryResponse.Meta) => void): this; + prependListener(event: 'error', listener: (error: CouchbaseError) => void): this; + prependListener(event: 'row', listener: (row: any, meta: FtsQueryResponse.Meta) => void): this; + prependListener(event: 'rows', listener: (rows: any[], meta: FtsQueryResponse.Meta) => void): this; + + prependOnceListener(event: 'end', listener: (meta: FtsQueryResponse.Meta) => void): this; + prependOnceListener(event: 'error', listener: (error: CouchbaseError) => void): this; + prependOnceListener(event: 'row', listener: (row: any, meta: FtsQueryResponse.Meta) => void): this; + prependOnceListener(event: 'rows', listener: (rows: any[], meta: FtsQueryResponse.Meta) => void): this; + } + + namespace FtsQueryResponse { + /** + * The meta-information available from a search query response. + */ + interface Meta { + /** + * The status information for this query, includes properties + * such as total, failed, and successful. + */ + status: any; + + /** + * Any non-fatal errors that occurred during query processing. + */ + errors: any; + + /** + * The total number of hits that were available for this search query. + */ + totalHits: number; + + /** + * The resulting facet information for any facets that were specified + * in the search query. + */ + facets: any; + + /** + * The time spent processing this query. + */ + took: number; + + /** + * The maximum score out of all the results in this query. + */ + maxScore: number; + } + } } diff --git a/types/cqrs-domain/index.d.ts b/types/cqrs-domain/index.d.ts index f826b45ffd..33db11b857 100644 --- a/types/cqrs-domain/index.d.ts +++ b/types/cqrs-domain/index.d.ts @@ -252,7 +252,7 @@ declare namespace Domain { /** * @param data is the command data - * @callback callback is optional, if not defined as function argument you can throw errors or return errors here (sync way) + * @param callback is optional, if not defined as function argument you can throw errors or return errors here (sync way) */ type preLoadConditionHandler = (data: any, callback?: (err: string | Error) => string | Error) => void | string | Error; @@ -295,7 +295,7 @@ declare namespace Domain { /** * @param data is the command data * @param aggregate is the aggregate object - * @callback callback is optional, if not defined as function argument you can throw errors or return errors here (sync way) + * @param callback is optional, if not defined as function argument you can throw errors or return errors here (sync way) */ type preConditionHandler = (data: any, aggregate: AggregateModel, callback?: (err: string | Error) => string | Error) => void | string | Error; diff --git a/types/create-react-class/index.d.ts b/types/create-react-class/index.d.ts index 9a1b0b12b5..9b9d2b2ad5 100644 --- a/types/create-react-class/index.d.ts +++ b/types/create-react-class/index.d.ts @@ -2,7 +2,7 @@ // Project: https://facebook.github.io/react/ // Definitions by: John Gozde // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import { ComponentSpec, ClassicComponentClass } from "react"; diff --git a/types/create-subscription/index.d.ts b/types/create-subscription/index.d.ts index 79003980ee..8c7d8c1ced 100644 --- a/types/create-subscription/index.d.ts +++ b/types/create-subscription/index.d.ts @@ -3,7 +3,7 @@ // Definitions by: Asana // Vincent Siao // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from "react"; diff --git a/types/crossfilter/crossfilter-tests.ts b/types/crossfilter/crossfilter-tests.ts index 5d9981b6d1..e96d83a7e2 100644 --- a/types/crossfilter/crossfilter-tests.ts +++ b/types/crossfilter/crossfilter-tests.ts @@ -1,4 +1,4 @@ - +import * as crossfilter from 'crossfilter'; interface Payment { diff --git a/types/crossfilter/index.d.ts b/types/crossfilter/index.d.ts index a009e920dd..bae8a06565 100644 --- a/types/crossfilter/index.d.ts +++ b/types/crossfilter/index.d.ts @@ -110,7 +110,6 @@ declare namespace CrossFilter { } } -declare var crossfilter: CrossFilter.CrossFilterStatic; declare module "crossfilter" { var crossfilter: CrossFilter.CrossFilterStatic; export = crossfilter; diff --git a/types/crypto-js/index.d.ts b/types/crypto-js/index.d.ts index 22e5c1253c..faeeac78e6 100644 --- a/types/crypto-js/index.d.ts +++ b/types/crypto-js/index.d.ts @@ -9,11 +9,15 @@ export as namespace CryptoJS; declare var CryptoJS: CryptoJS.Hashes; declare namespace CryptoJS { - interface Base {} + interface Base { + create(): any; + } interface BufferedBlockAlgorithm extends Base {} - interface Hasher extends BufferedBlockAlgorithm {} + interface Hasher extends BufferedBlockAlgorithm { + update(messageUpdate: WordArray|string): Hasher; + } interface Cipher extends BufferedBlockAlgorithm { createEncryptor(secretPassphrase: string, option?: CipherOption): Encryptor; @@ -25,7 +29,7 @@ declare namespace CryptoJS { interface StreamCipher extends Cipher {} interface CipherHelper { - encrypt(message: string, secretPassphrase: string | WordArray, option?: CipherOption): WordArray; + encrypt(message: string | LibWordArray, secretPassphrase: string | WordArray, option?: CipherOption): WordArray; decrypt(encryptedMessage: string | WordArray, secretPassphrase: string | WordArray, option?: CipherOption): DecryptedMessage; } interface Encryptor { @@ -141,6 +145,7 @@ declare namespace CryptoJS { lib: { WordArray: { create: (v: any) => LibWordArray; + random: (v: number) => string; }; }; mode: { diff --git a/types/crypto-random-string/crypto-random-string-tests.ts b/types/crypto-random-string/crypto-random-string-tests.ts new file mode 100644 index 0000000000..1a66c25981 --- /dev/null +++ b/types/crypto-random-string/crypto-random-string-tests.ts @@ -0,0 +1,4 @@ +import generate = require('crypto-random-string'); + +// $ExpectType string +generate(10); diff --git a/types/crypto-random-string/index.d.ts b/types/crypto-random-string/index.d.ts new file mode 100644 index 0000000000..dc41e18428 --- /dev/null +++ b/types/crypto-random-string/index.d.ts @@ -0,0 +1,13 @@ +// Type definitions for crypto-random-string 1.0 +// Project: https://github.com/sindresorhus/crypto-random-string +// Definitions by: Manuel Warum +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/** + * Generate a hexadecimal string of the given length. + * @param length the length of the random string. + * @return a string of the specified length. + */ +declare function cryptoRandomString(length: number): string; + +export = cryptoRandomString; diff --git a/types/crypto-random-string/tsconfig.json b/types/crypto-random-string/tsconfig.json new file mode 100644 index 0000000000..fd68e9d080 --- /dev/null +++ b/types/crypto-random-string/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", + "crypto-random-string-tests.ts" + ] +} diff --git a/types/crypto-random-string/tslint.json b/types/crypto-random-string/tslint.json new file mode 100644 index 0000000000..f93cf8562a --- /dev/null +++ b/types/crypto-random-string/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": "dtslint/dt.json" +} diff --git a/types/css-to-style/css-to-style-tests.ts b/types/css-to-style/css-to-style-tests.ts new file mode 100644 index 0000000000..ede5ae8f06 --- /dev/null +++ b/types/css-to-style/css-to-style-tests.ts @@ -0,0 +1,9 @@ +import toStyle from "css-to-style"; + +toStyle(); // $ExpectError + +toStyle({}); // $ExpectError + +toStyle(1); // $ExpectError + +toStyle(''); // $ExpectType CSSStyleDeclaration diff --git a/types/css-to-style/index.d.ts b/types/css-to-style/index.d.ts new file mode 100644 index 0000000000..eb450341f9 --- /dev/null +++ b/types/css-to-style/index.d.ts @@ -0,0 +1,9 @@ +// Type definitions for css-to-style 1.2 +// Project: https://github.com/jacobbuck/css-to-style +// Definitions by: Ben Grynhaus +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 + +declare function toStyle(cssText: string): CSSStyleDeclaration; + +export default toStyle; diff --git a/types/css-to-style/tsconfig.json b/types/css-to-style/tsconfig.json new file mode 100644 index 0000000000..8b3a9292b3 --- /dev/null +++ b/types/css-to-style/tsconfig.json @@ -0,0 +1,16 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": ["es5", "dom"], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": ["../"], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": ["index.d.ts", "css-to-style-tests.ts"] +} diff --git a/types/css-to-style/tslint.json b/types/css-to-style/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/css-to-style/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/cssnano/cssnano-tests.ts b/types/cssnano/cssnano-tests.ts new file mode 100644 index 0000000000..17828e1b02 --- /dev/null +++ b/types/cssnano/cssnano-tests.ts @@ -0,0 +1,17 @@ +import cssnano = require('cssnano'); +import { Transformer } from 'postcss'; + +const nano1: Transformer = cssnano(); +const nano2: Transformer = cssnano({ + configFile: '/path/to/config', +}); +const nano3: Transformer = cssnano({ + preset: 'default', +}); +const nano4: Transformer = cssnano({ + preset: ['default', { + discardComments: { + removeAll: true, + }, + }], +}); diff --git a/types/cssnano/index.d.ts b/types/cssnano/index.d.ts new file mode 100644 index 0000000000..bf298f1854 --- /dev/null +++ b/types/cssnano/index.d.ts @@ -0,0 +1,19 @@ +// Type definitions for cssnano 4.0 +// Project: https://github.com/cssnano/cssnano +// Definitions by: Armando Meziat +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.2 + +import { Plugin } from 'postcss'; + +declare namespace cssnano { + interface CssNanoOptions { + configFile?: string; + preset?: [string, object] | string; + } + + type CssNano = Plugin; +} + +declare const cssnano: cssnano.CssNano; +export = cssnano; diff --git a/types/cssnano/package.json b/types/cssnano/package.json new file mode 100644 index 0000000000..3c7b1f0f76 --- /dev/null +++ b/types/cssnano/package.json @@ -0,0 +1,6 @@ +{ + "private": true, + "dependencies": { + "postcss": "5 - 7" + } +} diff --git a/types/cssnano/tsconfig.json b/types/cssnano/tsconfig.json new file mode 100644 index 0000000000..5667012b67 --- /dev/null +++ b/types/cssnano/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", + "cssnano-tests.ts" + ] +} diff --git a/types/cssnano/tslint.json b/types/cssnano/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/cssnano/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/csso/csso-tests.ts b/types/csso/csso-tests.ts new file mode 100644 index 0000000000..74e0b51dd9 --- /dev/null +++ b/types/csso/csso-tests.ts @@ -0,0 +1,40 @@ +import csso = require('csso'); + +csso.minify('.test { color: #ff0000; }').css; +csso.minify('.test { color: #ff0000; }').map; +csso.minify('.test { color: #ff0000; }', { + sourceMap: true, + filename: '', + debug: true, + beforeCompress: () => {}, + afterCompress: () => {}, + restructure: false, + forceMediaMerge: true, + clone: false, + comments: '', + logger: () => {} +}); + +csso.minifyBlock('color: rgba(255, 0, 0, 1); color: #ff0000').css; +csso.minifyBlock('color: rgba(255, 0, 0, 1); color: #ff0000').map; +csso.minifyBlock('color: rgba(255, 0, 0, 1); color: #ff0000', { + sourceMap: true, + filename: '', + debug: true, + beforeCompress: () => {}, + afterCompress: () => {}, + restructure: false, + forceMediaMerge: true, + clone: false, + comments: '', + logger: () => {} +}); + +csso.compress({}).ast; +csso.compress({}, { + restructure: false, + forceMediaMerge: true, + clone: false, + comments: '', + logger: () => {} +}).ast; diff --git a/types/csso/index.d.ts b/types/csso/index.d.ts new file mode 100644 index 0000000000..f89f395129 --- /dev/null +++ b/types/csso/index.d.ts @@ -0,0 +1,107 @@ +// Type definitions for csso 3.5 +// Project: https://github.com/css/csso +// Definitions by: Christian Rackerseder +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.6 + +declare namespace csso { + interface Result { + /** + * Resulting CSS. + */ + css: string; + /** + * Instance of SourceMapGenerator or null. + */ + map: object | null; + } + + interface CompressOptions { + /** + * Disable or enable a structure optimisations. + * @default true + */ + restructure?: boolean; + /** + * Enables merging of @media rules with the same media query by splitted by other rules. + * The optimisation is unsafe in general, but should work fine in most cases. Use it on your own risk. + * @default false + */ + forceMediaMerge?: boolean; + /** + * Transform a copy of input AST if true. Useful in case of AST reuse. + * @default false + */ + clone?: boolean; + /** + * Specify what comments to leave: + * - 'exclamation' or true – leave all exclamation comments + * - 'first-exclamation' – remove every comment except first one + * - false – remove all comments + * @default true + */ + comments?: string | boolean; + /** + * Usage data for advanced optimisations. + */ + usage?: object; + /** + * Function to track every step of transformation. + */ + logger?: () => void; + } + + interface MinifyOptions { + /** + * Generate a source map when true. + * @default false + */ + sourceMap?: boolean; + /** + * Filename of input CSS, uses for source map generation. + * @default '' + */ + filename?: string; + /** + * Output debug information to stderr. + * @default false + */ + debug?: boolean; + /** + * Called right after parse is run. + */ + beforeCompress?: BeforeCompressFn | BeforeCompressFn[]; + /** + * Called right after compress() is run. + */ + afterCompress?: AfterCompressFn | AfterCompressFn[]; + restructure?: boolean; + } + + type BeforeCompressFn = (ast: object, options: CompressOptions) => void; + type AfterCompressFn = (compressResult: string, options: CompressOptions) => void; +} + +interface Csso { + /** + * Minify source CSS passed as String + * @param source + * @param options + */ + minify(source: string, options?: csso.MinifyOptions & csso.CompressOptions): csso.Result; + + /** + * The same as minify() but for list of declarations. Usually it's a style attribute value. + * @param source + * @param options + */ + minifyBlock(source: string, options?: csso.MinifyOptions & csso.CompressOptions): csso.Result; + + /** + * Does the main task – compress an AST. + */ + compress(ast: object, options?: csso.CompressOptions): { ast: object }; +} + +declare const csso: Csso; +export = csso; diff --git a/types/csso/tsconfig.json b/types/csso/tsconfig.json new file mode 100644 index 0000000000..9ed6695bc9 --- /dev/null +++ b/types/csso/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", + "csso-tests.ts" + ] +} diff --git a/types/csso/tslint.json b/types/csso/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/csso/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/cytoscape/cytoscape-tests.ts b/types/cytoscape/cytoscape-tests.ts index 39be1cd0e7..0cffa42b31 100644 --- a/types/cytoscape/cytoscape-tests.ts +++ b/types/cytoscape/cytoscape-tests.ts @@ -2,14 +2,8 @@ // TODO: document all aliases as aliases, not as duplicates! -const assert = (tag: boolean) => { if (!tag) throw new Error(); }; -const aliases = (...obj: Array<{}>) => { if (obj.slice(1).some((alias) => alias !== obj[0])) throw new Error(); }; -const events = (obj: any) => { - aliases(obj.on, obj.bind, obj.listen, obj.addListener); - aliases(obj.promiseOn, obj.pon); - aliases(obj.off, obj.unbind, obj.unlisten, obj.removeListener); - aliases(obj.emit, obj.trigger); -}; +const assert = (tag: boolean) => {}; +const aliases = (...obj: Array<{}>) => {}; // definitions function oneOf(a: A, b: B, c: C, d: D, e: E): A | B | C | D | E; @@ -129,7 +123,7 @@ cy.on('zoom', (event) => { } }); cy.off('zoom'); -events(cy); +// events(cy); - TODO cy.add({ data: { id: 'g' }, position: {x: 200, y: 150} }); cy.add([ @@ -347,19 +341,32 @@ const positions = oneOf({a: {x: 100, y: 100}}, (node: cytoscape.NodeCollection): // layout.stop(); // }); -// TODO: cy.style +cy.style(cy.style()); +cy.style([cy.style()]); +// $ExpectType string cy.png({ - output: oneOf('base64uri', 'base64', 'blob', undefined), + output: oneOf('base64uri', 'base64', undefined), bg: oneOf('#ffffff', undefined), full: true, scale: 2, maxWidth: 100, maxHeight: 100 }); +// $ExpectType Blob +cy.png({ + output: 'blob', + bg: oneOf('#ffffff', undefined), + full: true, + scale: 2, + maxWidth: 100, + maxHeight: 100 +}); + aliases(cy.jpg, cy.jpeg); +// $ExpectType string cy.jpg({ - output: oneOf('base64uri', 'base64', 'blob', undefined), + output: oneOf('base64uri', 'base64', undefined), bg: oneOf('#ffffff', undefined), full: true, scale: 2, @@ -367,6 +374,17 @@ cy.jpg({ maxHeight: 100, quality: 0.5 }); +// $ExpectType Blob +cy.jpg({ + output: 'blob', + bg: oneOf('#ffffff', undefined), + full: true, + scale: 2, + maxWidth: 100, + maxHeight: 100, + quality: 0.5 +}); + cy.json(cy.json()); // Types possible to call methods @@ -383,11 +401,24 @@ assert(eles.removed()); assert(!eles.inside()); eles.restore(); -([ele, eles, node, nodes, edge, edges] as cytoscape.CollectionReturnValue[]).forEach((elem) => { - aliases(elem.clone, elem.copy); - events(elem); - aliases(elem.data, elem.attr); - aliases(elem.removeData, elem.removeAttr); +([ele, eles, node, nodes, edge, edges] as [ + cytoscape.SingularElementReturnValue, + cytoscape.CollectionReturnValue, + cytoscape.NodeSingular, + cytoscape.NodeCollection, + cytoscape.EdgeSingular, + cytoscape.EdgeCollection +]).forEach((elemType) => { + aliases(elemType.clone, elemType.copy); + // events(elemType); - TODO + aliases(elemType.removeData, elemType.removeAttr); +}); +([ele, node, edge] as [ + cytoscape.SingularElementReturnValue, + cytoscape.NodeSingular, + cytoscape.EdgeSingular +]).forEach((elemType) => { + aliases(elemType.data, elemType.attr); }); // TODO: tests for data flow @@ -429,6 +460,8 @@ aliases(eles.renderedBoundingBox, eles.renderedBoundingbox); const flags: boolean[] = [ node.grabbed(), node.grabbable(), node.locked(), ele.active(), ]; +nodes.lock(); node.lock(); +nodes.unlock(); node.unlock(); const edgePoints: cytoscape.Position[] = [ ...edge.controlPoints(), ...edge.segmentPoints(), edge.sourceEndpoint(), edge.targetEndpoint(), edge.midpoint() @@ -437,6 +470,13 @@ const edgePoints: cytoscape.Position[] = [ aliases(eles.layout, eles.createLayout, eles.makeLayout); const layout = eles.layout({name: 'random'}).run(); +layout.on('layoutstop', () => { + cy.fit(); +}); +layout.on('layoutstop', {}, (obj) => { + console.log(obj); +}); + eles.select(); assert(ele.selected()); // as we selected all, and this too aliases(eles.unselect, eles.deselect); @@ -457,6 +497,27 @@ eles.style(eles.style()); aliases(eles.style, eles.css); aliases(ele.renderedCss, ele.renderedStyle); +nodes.forEach((child) => { + child.animate({ + position: node.position(), + duration: 300, + complete: () => { + console.log(child.id()); + } + }); +}); + +nodes.animate({ + renderedPosition: node.position() +}, { + style: { backgroundColor: 'red' }, + duration: 1000, + queue: true, + complete: () => console.log('end'), + step: () => console.log('step'), + easing: 'ease-in-out-quint' +}); + eles.anySame(nodes); aliases(eles.contains, eles.has); aliases(eles.allAreNeighbors, eles.allAreNeighbours); @@ -485,11 +546,25 @@ eles.difference(collNodes).abscomp().intersection(collSel).symdiff(collNodes); const diff = collSel.diff(collNodes); cy.collection().merge(diff.left).merge(diff.right).merge(diff.both).unmerge(collSel).filter((ele, i, eles) => true); -eles.sort((a, b) => 1).map((ele, i, eles) => [i, ele]); -eles.reduce((prev, ele, i, eles) => [...prev, [ele, i]], []).concat(['finish']); -const min = eles.min((ele, i, eles) => ele.id.length + i); min.ele.scratch('min', min.value); -const max = eles.max((ele, i, eles) => ele.id.length + i); max.ele.scratch('max', max.value); +nodes.map(n => n.degree(false)); +edges.map(e => e.source()); +eles.map(e => e.id()); +eles.map(e => e.isNode() ? e.degree(false) : e.source()); +eles.map(e => e.isEdge() ? e.source() : e.degree(false)); -// TODO: traversing (need to actively check the nodes/edeges distinction) +eles.sort((a, b) => a.id.length - b.id.length).map((ele, i, eles) => [i, ele]); +eles.reduce((prev, ele, i, eles) => [...prev, [ele, i]], []).concat(['finish']); + +const min = eles.min((ele, i, eles) => ele.isNode() ? ele.degree(false) : ele.source().degree(false)); +min.ele.scratch('min', min.value).scratch('min').value; +const max = eles.max((ele, i, eles) => ele.isEdge() ? ele.source().degree(false) : ele.degree(false)); +max.ele.scratch('max', max.value); + +nodes.min(n => n.degree(false)); +nodes.max(n => n.degree(false)); +edges.max(n => n.source().id().length); +edges.max(n => n.source().id().length); + +// TODO: traversing (need to actively check the nodes/edges distinction) // TODO: algorithms // TODO: compound nodes (there aren't any in current test case) diff --git a/types/cytoscape/index.d.ts b/types/cytoscape/index.d.ts index a3226defd2..59482ad507 100644 --- a/types/cytoscape/index.d.ts +++ b/types/cytoscape/index.d.ts @@ -482,7 +482,8 @@ declare namespace cytoscape { * @param namespace A namespace string. * @param value The value to set at the specified namespace. */ - scratch(namespace?: string, value?: any): Scratchpad; + scratch(namespace?: string): Scratchpad; + scratch(namespace: string, value: any): this; /** * Remove scratchpad data. You should remove scratchpad data only at your own namespaces. @@ -490,7 +491,7 @@ declare namespace cytoscape { * * @param namespace A namespace string. */ - removeScratch(namespace: string): void; + removeScratch(namespace: string): this; } /** @@ -508,25 +509,25 @@ declare namespace cytoscape { * @param eventsMap A map of event names to handler functions. */ - on(events: EventNames, handler: EventHandler): void; - on(events: EventNames, selector: Selector, handler: EventHandler): void; - on(events: EventNames, selector: Selector, data: any, handler: EventHandler): void; - on(eventsMap: { [value: string]: EventHandler }, selector?: Selector, data?: any): void; + on(events: EventNames, handler: EventHandler): this; + on(events: EventNames, selector: Selector, handler: EventHandler): this; + on(events: EventNames, selector: Selector, data: any, handler: EventHandler): this; + on(eventsMap: { [value: string]: EventHandler }, selector?: Selector, data?: any): this; - bind(events: EventNames, handler: EventHandler): void; - bind(events: EventNames, selector: Selector, handler: EventHandler): void; - bind(events: EventNames, selector: Selector, data: any, handler: EventHandler): void; - bind(eventsMap: { [value: string]: EventHandler }, selector?: Selector, data?: any): void; + bind(events: EventNames, handler: EventHandler): this; + bind(events: EventNames, selector: Selector, handler: EventHandler): this; + bind(events: EventNames, selector: Selector, data: any, handler: EventHandler): this; + bind(eventsMap: { [value: string]: EventHandler }, selector?: Selector, data?: any): this; - listen(events: EventNames, handler: EventHandler): void; - listen(events: EventNames, selector: Selector, handler: EventHandler): void; - listen(events: EventNames, selector: Selector, data: any, handler: EventHandler): void; - listen(eventsMap: { [value: string]: EventHandler }, selector?: Selector, data?: any): void; + listen(events: EventNames, handler: EventHandler): this; + listen(events: EventNames, selector: Selector, handler: EventHandler): this; + listen(events: EventNames, selector: Selector, data: any, handler: EventHandler): this; + listen(eventsMap: { [value: string]: EventHandler }, selector?: Selector, data?: any): this; - addListener(events: EventNames, handler: EventHandler): void; - addListener(events: EventNames, selector: Selector, handler: EventHandler): void; - addListener(events: EventNames, selector: Selector, data: any, handler: EventHandler): void; - addListener(eventsMap: { [value: string]: EventHandler }, selector?: Selector, data?: any): void; + addListener(events: EventNames, handler: EventHandler): this; + addListener(events: EventNames, selector: Selector, handler: EventHandler): this; + addListener(events: EventNames, selector: Selector, data: any, handler: EventHandler): this; + addListener(eventsMap: { [value: string]: EventHandler }, selector?: Selector, data?: any): this; /** * Get a promise that is resolved with the first @@ -542,7 +543,7 @@ declare namespace cytoscape { * @param events A space separated list of event names. * @param handler The handler function that is called when one of the specified events occurs. */ - one(events: EventNames, handler: EventHandler): void; + one(events: EventNames, handler: EventHandler): this; /** * Bind to events that occur in the graph, and trigger the handler only once. * @@ -550,7 +551,7 @@ declare namespace cytoscape { * @param handler The handler function that is called when one of the specified events occurs. * @param selector A selector to specify elements for which the handler is triggered. */ - one(events: EventNames, selector: Selector, handler: EventHandler): void; + one(events: EventNames, selector: Selector, handler: EventHandler): this; /** * Bind to events that occur in the graph, and trigger the handler only once. * @@ -559,7 +560,7 @@ declare namespace cytoscape { * @param selector A selector to specify elements for which the handler is triggered. * @param data A plain object which is passed to the handler in the event object argument. */ - one(events: EventNames, selector: Selector, data: any, handler: EventHandler): void; + one(events: EventNames, selector: Selector, data: any, handler: EventHandler): this; /** * Bind to events that occur in the graph, and trigger the handler only once. * @@ -567,7 +568,7 @@ declare namespace cytoscape { * @param selector A selector to specify elements for which the handler is triggered. * @param data A plain object which is passed to the handler in the event object argument. */ - one(eventsMap: { [value: string]: EventHandler }, selector?: Selector, data?: any): void; + one(eventsMap: { [value: string]: EventHandler }, selector?: Selector, data?: any): this; /** * Remove event handlers. @@ -578,17 +579,17 @@ declare namespace cytoscape { * @param handler [optional] A reference to the handler function to remove. * @param eventsMap A map of event names to handler functions to remove. */ - off(events: EventNames, selector?: Selector, handler?: EventHandler): void; - off(eventsMap: { [value: string]: EventHandler }, selector?: Selector): void; + off(events: EventNames, selector?: Selector, handler?: EventHandler): this; + off(eventsMap: { [value: string]: EventHandler }, selector?: Selector): this; - unbind(events: EventNames, selector?: Selector, handler?: EventHandler): void; - unbind(eventsMap: { [value: string]: EventHandler }, selector?: Selector): void; + unbind(events: EventNames, selector?: Selector, handler?: EventHandler): this; + unbind(eventsMap: { [value: string]: EventHandler }, selector?: Selector): this; - unlisten(events: EventNames, selector?: Selector, handler?: EventHandler): void; - unlisten(eventsMap: { [value: string]: EventHandler }, selector?: Selector): void; + unlisten(events: EventNames, selector?: Selector, handler?: EventHandler): this; + unlisten(eventsMap: { [value: string]: EventHandler }, selector?: Selector): this; - removeListener(events: EventNames, selector?: Selector, handler?: EventHandler): void; - removeListener(eventsMap: { [value: string]: EventHandler }, selector?: Selector): void; + removeListener(events: EventNames, selector?: Selector, handler?: EventHandler): this; + removeListener(eventsMap: { [value: string]: EventHandler }, selector?: Selector): this; /** * Trigger one or more events. @@ -596,14 +597,14 @@ declare namespace cytoscape { * @param events A space separated list of event names to trigger. * @param extraParams [optional] An array of additional parameters to pass to the handler. */ - trigger(events: EventNames, extraParams?: any[]): void; - emit(events: EventNames, extraParams?: any[]): void; + trigger(events: EventNames, extraParams?: any[]): this; + emit(events: EventNames, extraParams?: any[]): this; /** * Run a callback as soon as the graph becomes ready. If the graph is already ready, then the callback is called immediately. * @param fn The callback run as soon as the graph is ready, inside which this refers to the core (cy). */ - ready(fn: EventHandler): void; + ready(fn: EventHandler): this; } interface ZoomOptionsModel { @@ -695,7 +696,7 @@ declare namespace cytoscape { * * @param bool A truthy value enables panning; a falsey value disables it. */ - panningEnabled(bool: boolean): void; + panningEnabled(bool: boolean): this; /** * Get whether panning by user events (e.g. dragging the graph background) is enabled. If cy.boxSelectionEnabled() === true, then the user must taphold to initiate panning. @@ -709,7 +710,7 @@ declare namespace cytoscape { * * @param bool A truthy value enables user panning; a falsey value disables it. */ - userPanningEnabled(bool: boolean): void; + userPanningEnabled(bool: boolean): this; /** * Get the zoom level. * http://js.cytoscape.org/#cy.zoom @@ -722,7 +723,7 @@ declare namespace cytoscape { * @param level The zoom level to set. * @param options The options for zooming. */ - zoom(level?: number | ZoomOptions): void; + zoom(level?: number | ZoomOptions): this; /** * Set or get whether zooming is enabled. Get if no parameter provided. @@ -730,7 +731,7 @@ declare namespace cytoscape { * * @param bool A truthy value enables zooming; a falsey value disables it. */ - zoomingEnabled(bool?: boolean): void; + zoomingEnabled(bool?: boolean): this; /** * Get whether zooming by user events (e.g. mouse wheel, pinch-to-zoom) @@ -745,7 +746,7 @@ declare namespace cytoscape { * * @param bool A truthy value enables user zooming; a falsey value disables it. */ - userZoomingEnabled(bool?: boolean): void; + userZoomingEnabled(bool?: boolean): this; /** * Get the minimum zoom level. @@ -758,7 +759,7 @@ declare namespace cytoscape { * * @param zoom The new minimum zoom level to use. */ - minZoom(zoom: number): void; + minZoom(zoom: number): this; /** * Get the maximum zoom level. @@ -771,7 +772,7 @@ declare namespace cytoscape { * * @param zoom The new maximum zoom level to use. */ - maxZoom(zoom: number): void; + maxZoom(zoom: number): this; /** * Set the viewport state (pan & zoom) in one call. @@ -780,7 +781,7 @@ declare namespace cytoscape { * @param zoom The zoom level to set. * @param pan The pan to set (a rendered position). */ - viewport(zoom: number, pan: Position): void; + viewport(zoom: number, pan: Position): this; /** * Get whether box selection is enabled. @@ -795,7 +796,7 @@ declare namespace cytoscape { * * @param bool A truthy value enables box selection; a falsey value disables it. */ - boxSelectionEnabled(bool: boolean): void; + boxSelectionEnabled(bool: boolean): this; /** * Get the on-screen width of the viewport in pixels. @@ -832,7 +833,7 @@ declare namespace cytoscape { * * @param bool A truthy value enables autolocking; a falsey value disables it. */ - autolock(bool: boolean): void; + autolock(bool: boolean): this; /** * Get whether nodes are automatically ungrabified @@ -847,7 +848,7 @@ declare namespace cytoscape { * * @param bool A truthy value enables autolocking; a falsey value disables it. */ - autoungrabify(bool: boolean): void; + autoungrabify(bool: boolean): this; /** * Get whether nodes are automatically unselectified @@ -862,7 +863,7 @@ declare namespace cytoscape { * * @param bool A truthy value enables autolocking; a falsey value disables it. */ - autounselectify(bool: boolean): void; + autounselectify(bool: boolean): this; /** * Force the renderer to redraw (i.e. draw a new frame). @@ -872,7 +873,7 @@ declare namespace cytoscape { * but it should not be needed for most developers. * http://js.cytoscape.org/#cy.forceRender */ - forceRender(): void; + forceRender(): this; /** * Force the renderer to recalculate the viewport bounds. @@ -914,7 +915,7 @@ declare namespace cytoscape { /** An object containing centring options from which the graph will be animated. */ center?: CenterOptions; /** easing - A transition-timing-function easing style string that shapes the animation progress curve. */ - easing?: string; // TODO: explicit type + easing?: Css.TransitionTimingFunction; /** duration - The duration of the animation in milliseconds. */ duration?: number; @@ -949,7 +950,7 @@ declare namespace cytoscape { * Get an animation of the viewport. * http://js.cytoscape.org/#cy.animation */ - animation(options: AnimationOptions): any; + animation(options: AnimationOptions): AnimationManipulation; /** * Add a delay between animations for the viewport. @@ -963,7 +964,7 @@ declare namespace cytoscape { * Get a delay animation of the viewport. * http://js.cytoscape.org/#cy.delayAnimation */ - delayAnimation(duration: number): void; + delayAnimation(duration: number): AnimationManipulation; /** * Stop all viewport animations that are currently running. @@ -994,7 +995,7 @@ declare namespace cytoscape { * An analogue to run a layout on a subset of the graph exists as eles.layout(). * http://js.cytoscape.org/#cy.layout */ - layout(layout: LayoutOptions): LayoutManipulation; + layout(layout: LayoutOptions): Layouts; /** * Get a new layout, which can be used to algorithmically * position the nodes in the graph. @@ -1007,15 +1008,18 @@ declare namespace cytoscape { * Note that you must call layout.run() in order for it to affect the graph. * An analogue to make a layout on a subset of the graph exists as eles.makeLayout(). */ - makeLayout(options: LayoutOptions): LayoutManipulation; - createLayout(options: LayoutOptions): LayoutManipulation; + makeLayout(options: LayoutOptions): Layouts; + createLayout(options: LayoutOptions): Layouts; } /** * Get the entry point to modify the visual style of the graph after initialisation. * http://js.cytoscape.org/#core/style */ - interface ElementStylesheet extends StylesheetStyle { + interface ElementStylesheetStyle extends StylesheetStyle { + json(): any; + } + interface ElementStylesheetCSS extends StylesheetCSS { json(): any; } @@ -1023,11 +1027,11 @@ declare namespace cytoscape { /** * Get the current style object. */ - style(): ElementStylesheet | string; + style(): ElementStylesheetStyle | ElementStylesheetCSS; /** * Assign a new stylesheet to replace the existing one. */ - style(sheet: Stylesheet): Stylesheet; + style(sheet: Stylesheet | Stylesheet[] | string): Stylesheet; } /** @@ -1052,10 +1056,6 @@ declare namespace cytoscape { * http://js.cytoscape.org/#core/export */ interface ExportOptions { - /** - * output Whether the output should be 'base64uri' (default), 'base64', or 'blob'. - */ - output?: "base64uri" | "base64" | "blob"; /** * The background colour of the image (transparent by default). */ @@ -1077,6 +1077,18 @@ declare namespace cytoscape { */ maxHeight?: number; } + interface ExportStringOptions extends ExportOptions { + /** + * output Whether the output should be 'base64uri' (default), 'base64', or 'blob'. + */ + output?: "base64uri" | "base64"; + } + interface ExportBlobOptions extends ExportOptions { + /** + * output Whether the output should be 'base64uri' (default), 'base64', or 'blob'. + */ + output?: "blob"; + } interface ExportJpgOptions extends ExportOptions { /** @@ -1086,22 +1098,29 @@ declare namespace cytoscape { */ quality?: number; } + interface ExportJpgStringOptions extends ExportJpgOptions, ExportStringOptions { + } + interface ExportJpgBlobOptions extends ExportJpgOptions, ExportBlobOptions { + } interface CoreExport { /** * Export the current graph view as a PNG image in Base64 representation. */ - png(options?: ExportOptions): string; + png(options?: ExportStringOptions): string; + png(options?: ExportBlobOptions): Blob; /** * Export the current graph view as a JPG image in Base64 representation. */ - jpg(options?: ExportJpgOptions): string; + jpg(options?: ExportJpgStringOptions): string; + jpg(options?: ExportJpgBlobOptions): Blob; /** * Export the current graph view as a JPG image in Base64 representation. */ - jpeg(options?: ExportJpgOptions): string; + jpeg(options?: ExportJpgStringOptions): string; + jpeg(options?: ExportJpgBlobOptions): Blob; /** * Export the graph as JSON, the same format used at initialisation. @@ -1118,19 +1137,21 @@ declare namespace cytoscape { * http://js.cytoscape.org/#collection */ interface Collection - extends Singular, + extends CollectionGraphManipulation, CollectionEvents, CollectionData, CollectionPosition, CollectionLayout, CollectionSelection, CollectionStyle, CollectionAnimation, CollectionComparision, CollectionIteration, - CollectionBuildingFiltering, CollectionAlgorithms { } + CollectionBuildingFiltering, CollectionAlgorithms { } /** * ele --> Cy.Singular * a collection of a single element (node or edge) + * NB: every singular collection is a general collection too (but not vice versa)! */ - interface Singular extends + interface Singular + extends Collection, SingularGraphManipulation, SingularData, SingularPosition, SingularSelection, SingularStyle, SingularAnimation { } @@ -1145,8 +1166,8 @@ declare namespace cytoscape { /** * The output is a collection of node and edge elements OR single element. */ - type CollectionArgument = EdgeCollection | NodeCollection | SingularElementArgument; - type CollectionReturnValue = EdgeCollection & NodeCollection & SingularElementReturnValue; + type CollectionArgument = Collection | EdgeCollection | NodeCollection | SingularElementArgument; + type CollectionReturnValue = Collection & EdgeCollection & NodeCollection & SingularElementReturnValue; /** * edges -> Cy.EdgeCollection @@ -1154,7 +1175,7 @@ declare namespace cytoscape { * * The output is a collection of edge elements OR single edge. */ - interface EdgeCollection extends Collection, EdgeSingular, + interface EdgeCollection extends Collection, EdgeCollectionTraversing { } /** * nodes -> Cy.NodeCollection @@ -1162,7 +1183,7 @@ declare namespace cytoscape { * * The output is a collection of node elements OR single node. */ - interface NodeCollection extends Collection, NodeSingular, + interface NodeCollection extends Collection, NodeCollectionMetadata, NodeCollectionPosition, NodeCollectionTraversing, NodeCollectionCompound { } @@ -1172,14 +1193,14 @@ declare namespace cytoscape { * edge --> Cy.EdgeSingular * a collection of a single edge */ - interface EdgeSingular extends Singular, + interface EdgeSingular extends Singular, EdgeCollection, EdgeSingularData, EdgeSingularPoints, EdgeSingularTraversing { } /** * node --> Cy.NodeSingular * a collection of a single node */ - interface NodeSingular extends Singular, + interface NodeSingular extends Singular, NodeCollection, NodeSingularMetadata, NodeSingularPosition, NodeSingularCompound { } /** @@ -1248,9 +1269,18 @@ declare namespace cytoscape { /** * http://js.cytoscape.org/#eles.on */ - on(events: EventNames, selector: string, data: any, handler: EventHandler): void; - on(events: EventNames, selector: string, handler: EventHandler): void; - on(events: EventNames, handler: EventHandler): void; + on(events: EventNames, selector: string, data: any, handler: EventHandler): this; + on(events: EventNames, selector: string, handler: EventHandler): this; + on(events: EventNames, handler: EventHandler): this; + bind(events: EventNames, selector: string, data: any, handler: EventHandler): this; + bind(events: EventNames, selector: string, handler: EventHandler): this; + bind(events: EventNames, handler: EventHandler): this; + listen(events: EventNames, selector: string, data: any, handler: EventHandler): this; + listen(events: EventNames, selector: string, handler: EventHandler): this; + listen(events: EventNames, handler: EventHandler): this; + addListener(events: EventNames, selector: string, data: any, handler: EventHandler): this; + addListener(events: EventNames, selector: string, handler: EventHandler): this; + addListener(events: EventNames, handler: EventHandler): this; /** * http://js.cytoscape.org/#eles.promiseOn * alias: pon @@ -1266,25 +1296,29 @@ declare namespace cytoscape { * @param event The event object. * http://js.cytoscape.org/#eles.one */ - one(events: EventNames, selector: string, data: any, handler: EventHandler): void; - one(events: EventNames, selector: string, handler: EventHandler): void; - one(events: EventNames, handler: EventHandler): void; + one(events: EventNames, selector: string, data: any, handler: EventHandler): this; + one(events: EventNames, selector: string, handler: EventHandler): this; + one(events: EventNames, handler: EventHandler): this; /** * http://js.cytoscape.org/#eles.once */ - once(events: EventNames, selector: string, data: any, handler: EventHandler): void; - once(events: EventNames, selector: string, handler: EventHandler): void; - once(events: EventNames, handler: EventHandler): void; + once(events: EventNames, selector: string, data: any, handler: EventHandler): this; + once(events: EventNames, selector: string, handler: EventHandler): this; + once(events: EventNames, handler: EventHandler): this; /** * http://js.cytoscape.org/#eles.off * alias unbind, unlisten, removeListener */ - off(events: EventNames, selector?: string, handler?: EventHandler): void; + off(events: EventNames, selector?: string, handler?: EventHandler): this; + unbind(events: EventNames, selector?: string, handler?: EventHandler): this; + unlisten(events: EventNames, selector?: string, handler?: EventHandler): this; + removeListener(events: EventNames, selector?: string, handler?: EventHandler): this; /** * http://js.cytoscape.org/#eles.trigger * alias: emit */ - trigger(events: EventNames, extra?: string[]): void; + trigger(events: EventNames, extra?: string[]): this; + emit(events: EventNames, extra?: string[]): this; } /** @@ -1329,12 +1363,12 @@ declare namespace cytoscape { * @param name The name of the field to set. * @param value The value to set for the field. */ - data(name: string, value: any): void; + data(name: string, value: any): this; /** * Update multiple data fields at once via an object. * @param obj The object containing name- value pairs to update data fields. */ - data(obj: any): void; + data(obj: any): this; /** * Get a particular data field for the element. * @param name The name of the field to get. @@ -1345,12 +1379,12 @@ declare namespace cytoscape { * @param name The name of the field to set. * @param value The value to set for the field. */ - attr(name: string, value: any): void; + attr(name: string, value: any): this; /** * Update multiple data fields at once via an object. * @param obj The object containing name- value pairs to update data fields. */ - attr(obj: any): void; + attr(obj: any): this; /** * Get or set the scratchpad at a particular namespace, @@ -1362,7 +1396,8 @@ declare namespace cytoscape { * @param namespace A namespace string. * @param value The value to set at the specified namespace. */ - scratch(namespace?: string, value?: any): Scratchpad; + scratch(namespace?: string): Scratchpad; + scratch(namespace: string, value: any): this; /** * Remove scratchpad data. @@ -1370,7 +1405,7 @@ declare namespace cytoscape { * http://js.cytoscape.org/#ele.removeScratch * @param namespace A namespace string. */ - removeScratch(namespace: string): void; + removeScratch(namespace: string): this; /** * A shortcut to get the ID of an element. @@ -1398,13 +1433,13 @@ declare namespace cytoscape { * Get whether the element is a node. * http://js.cytoscape.org/#ele.isNode */ - isNode(): boolean; + isNode(): this is NodeSingular; /** * Get whether the element is an edge. * http://js.cytoscape.org/#ele.isEdge */ - isEdge(): boolean; + isEdge(): this is EdgeSingular; } /** * http://js.cytoscape.org/#collection/data @@ -1559,18 +1594,6 @@ declare namespace cytoscape { */ point(pos: Position): this; - /** - * Shift the positions of the nodes by a given model position vector. - * @param dimension The position dimension to shift. - * @param value The value to shift the dimension. - */ - shift(dimension: PositionDimension, value?: number): this; - /** - * Shift the positions of the nodes by a given model position vector. - * @param pos An object specifying name-value pairs representing dimensions to shift. - */ - shift(pos: Position): this; - /** * Get or set the rendered (on-screen) position of a node. * http://js.cytoscape.org/#node.renderedPosition @@ -1582,8 +1605,8 @@ declare namespace cytoscape { * @param pos An object specifying name-value pairs representing dimensions to set. */ renderedPosition(dimension?: PositionDimension): Position; - renderedPosition(dimension: PositionDimension, value: Position): void; - renderedPosition(pos: { [name: string]: number }): void; + renderedPosition(dimension: PositionDimension, value: Position): this; + renderedPosition(pos: { [name: string]: number }): this; /** * Set the value of a specified rendered position dimension. @@ -1592,8 +1615,8 @@ declare namespace cytoscape { * @param pos An object specifying name-value pairs representing dimensions to set. */ renderedPoint(dimension?: PositionDimension): Position; - renderedPoint(dimension: PositionDimension, value: Position): void; - renderedPoint(pos: { [name: string]: number }): void; + renderedPoint(dimension: PositionDimension, value: Position): this; + renderedPoint(pos: { [name: string]: number }): this; /** * @@ -1606,8 +1629,8 @@ declare namespace cytoscape { * @param pos An object specifying name-value pairs representing dimensions to set. */ relativePosition(dimension?: PositionDimension): Position; - relativePosition(dimension: PositionDimension, value: Position): void; - relativePosition(pos: { [name: string]: number }): void; + relativePosition(dimension: PositionDimension, value: Position): this; + relativePosition(pos: { [name: string]: number }): this; /** * Get the value of a specified relative position dimension. @@ -1616,8 +1639,8 @@ declare namespace cytoscape { * @param pos An object specifying name-value pairs representing dimensions to set. */ relativePoint(dimension?: PositionDimension): Position; - relativePoint(dimension: PositionDimension, value: Position): void; - relativePoint(pos: { [name: string]: number }): void; + relativePoint(dimension: PositionDimension, value: Position): this; + relativePoint(pos: { [name: string]: number }): this; /** * Get whether a node is currently grabbed, meaning the user has hold of the node. @@ -1640,43 +1663,55 @@ declare namespace cytoscape { * @param ele The element being iterated over for which the function should return a position to set. * @param ix The index of the element when iterating over the elements in the collection. */ - type ElementPositionFunction = (ele: NodeSingular, ix: number) => void; - type ElementCollectionFunction = (ele: NodeSingular, ix: number, eles: CollectionArgument) => void; + type ElementPositionFunction = (ele: NodeSingular, ix: number) => Position; + type ElementCollectionFunction = (ele: NodeSingular, ix: number, eles: CollectionArgument) => Position; /** * http://js.cytoscape.org/#collection/position--dimensions */ interface NodeCollectionPosition { + /** + * Shift the positions of the nodes by a given model position vector. + * @param dimension The position dimension to shift. + * @param value The value to shift the dimension. + */ + shift(dimension: PositionDimension, value?: number): this; + /** + * Shift the positions of the nodes by a given model position vector. + * @param pos An object specifying name-value pairs representing dimensions to shift. + */ + shift(pos: Position): this; + /** * Set the positions via a function. * @param handler A callback function that returns the position to set for each element. * @param pos An object specifying name-value pairs representing dimensions to set. * http://js.cytoscape.org/#nodes.positions */ - positions(handler: ElementPositionFunction | Position): void; - modelPositions(handler: ElementPositionFunction | Position): void; - points(handler: ElementPositionFunction | Position): void; + positions(handler: ElementPositionFunction | Position): this; + modelPositions(handler: ElementPositionFunction | Position): this; + points(handler: ElementPositionFunction | Position): this; /** * Allow the user to grab the nodes. * http://js.cytoscape.org/#nodes.grabify */ - grabify(): void; + grabify(): this; /** * Disallow the user to grab the nodes. * http://js.cytoscape.org/#nodes.ungrabify */ - ungrabify(): void; + ungrabify(): this; /** * Lock the nodes such that their positions can not be changed. * http://js.cytoscape.org/#nodes.lock */ - lock(): void; + lock(): this; /** * Unlock the nodes such that their positions can be changed. * http://js.cytoscape.org/#nodes.unlock */ - unlock(): void; + unlock(): this; } /** * http://js.cytoscape.org/#collection/position--dimensions @@ -1766,9 +1801,9 @@ declare namespace cytoscape { * * @param options The layout options. */ - layout(options: LayoutOptions): LayoutManipulation; - makeLayout(options: LayoutOptions): LayoutManipulation; - createLayout(options: LayoutOptions): LayoutManipulation; + layout(options: LayoutOptions): Layouts; + makeLayout(options: LayoutOptions): Layouts; + createLayout(options: LayoutOptions): Layouts; } /** @@ -1781,7 +1816,7 @@ declare namespace cytoscape { animationDuration?: number; // easing of animation, if enabled animationEasing?: number; - // collection of elements involved in the layout; set by cy.layout() or eles.layout() + // collection of elements involved in the layout; set by cy.layout() or eles.layout(s) eles: CollectionArgument; // whether to fit the viewport to the graph fit?: boolean; @@ -1847,23 +1882,23 @@ declare namespace cytoscape { * Make the elements selected (NB other elements outside the collection are not affected). * http://js.cytoscape.org/#eles.select */ - select(): void; + select(): this; /** * Make the elements not selected (NB other elements outside the collection are not affected). * http://js.cytoscape.org/#eles.unselect */ - unselect(): void; - deselect(): void; + unselect(): this; + deselect(): this; /** * Make the selection states of the elements mutable. * http://js.cytoscape.org/#eles.selectify */ - selectify(): void; + selectify(): this; /** * Make the selection states of the elements immutable. * http://js.cytoscape.org/#eles.unselectify */ - unselectify(): void; + unselectify(): this; } /** @@ -1879,34 +1914,34 @@ declare namespace cytoscape { * http://js.cytoscape.org/#eles.addClass * @param classes A space-separated list of class names to add to the elements. */ - addClass(classes: ClassNames): void; + addClass(classes: ClassNames): this; /** * Remove classes from elements. * @param classes A space-separated list of class names to remove from the elements. * http://js.cytoscape.org/#eles.removeClass */ - removeClass(classes: ClassNames): void; + removeClass(classes: ClassNames): this; /** * Toggle whether the elements have the specified classes. * @param classes A space-separated list of class names to toggle on the elements. * @param toggle [optional] Instead of automatically toggling, adds the classes on truthy values or removes them on falsey values. * http://js.cytoscape.org/#eles.toggleClass */ - toggleClass(classes: ClassNames, toggle?: boolean): void; + toggleClass(classes: ClassNames, toggle?: boolean): this; /** * Replace the current list of classes on the elements with the specified list. * @param classes A space-separated list of class names that replaces the current class list. * http://js.cytoscape.org/#eles.classes * Note: can be used to clear all classes (no arguments). */ - classes(classes?: ClassNames): void; + classes(classes?: ClassNames): this; /** * Add classes to the elements, and then remove the classes after a specified duration. * @param classes A space-separated list of class names to flash on the elements. * @param duration [optional] The duration in milliseconds that the classes should be added on the elements. After the duration, the classes are removed. * http://js.cytoscape.org/#eles.flashClass */ - flashClass(classes: ClassNames, duration?: number): void; + flashClass(classes: ClassNames, duration?: number): this; /** * Set a particular style property value. @@ -2031,19 +2066,15 @@ declare namespace cytoscape { /** A function to call each time the animation steps. */ step?(): void; /** A transition-timing-function easing style string that shapes the animation progress curve. */ - easing?(): void; + easing?: Css.TransitionTimingFunction; } - interface ElementAnimateOptionPos { + interface ElementAnimateOptionPos extends ElementAnimateOptionsBase { /** A position to which the elements will be animated. */ - position?: Position; - /** A rendered position to which the elements will be animated. */ - renderedPosition?: Position; + position: Position; } - interface ElementAnimateOptionRen { - /** A position to which the elements will be animated. */ - position?: Position; + interface ElementAnimateOptionRen extends ElementAnimateOptionsBase { /** A rendered position to which the elements will be animated. */ - renderedPosition?: Position; + renderedPosition: Position; } interface CollectionAnimation { /** @@ -2051,28 +2082,28 @@ declare namespace cytoscape { * @param options An object containing the details of the animation. * http://js.cytoscape.org/#eles.animate */ - animate(options: ElementAnimateOptionPos | ElementAnimateOptionRen): void; + animate(options: ElementAnimateOptionPos | ElementAnimateOptionRen, params?: ElementAnimateOptionsBase): this; /** * Add a delay between animations for the elements. * @param duration How long the delay should be in milliseconds. * @param complete A function to call when the delay is complete. * http://js.cytoscape.org/#eles.delay */ - delay(duration: number, complete: () => void): void; + delay(duration: number, complete: () => void): this; /** * Stop all animations that are currently running. * @param clearQueue A boolean, indicating whether the queue of animations should be emptied. * @param jumpToEnd A boolean, indicating whether the currently-running animations should jump to their ends rather than just stopping midway. * http://js.cytoscape.org/#eles.stop */ - stop(clearQueue: boolean, jumpToEnd: boolean): void; + stop(clearQueue: boolean, jumpToEnd: boolean): this; /** * Remove all queued animations for the elements. * http://js.cytoscape.org/#eles.clearQueue */ - clearQueue(): void; + clearQueue(): this; } - interface SingularAnimationOptions { + interface SingularAnimationOptionsBase { /** A position to which the elements will be animated. */ position: Position; /** A rendered position to which the elements will be animated. */ @@ -2082,7 +2113,15 @@ declare namespace cytoscape { /** The duration of the animation in milliseconds. */ duration: number; /** A transition-timing-function easing style string that shapes the animation progress curve. */ - easing(): void; + easing: Css.TransitionTimingFunction; + } + interface SingularAnimationOptionsPos extends SingularAnimationOptionsBase { + /** A position to which the elements will be animated. */ + position: Position; + } + interface SingularAnimationOptionsRen extends SingularAnimationOptionsBase { + /** A rendered position to which the elements will be animated. */ + renderedPosition: Position; } interface SingularAnimation { /** @@ -2093,14 +2132,14 @@ declare namespace cytoscape { * Get an animation for the element. * @param options An object containing the details of the animation. */ - animation(options: SingularAnimationOptions): void; + animation(options: SingularAnimationOptionsRen | SingularAnimationOptionsPos): AnimationManipulation; /** * Get a delay animation for the element. * @param duration How long the delay should be in milliseconds. * http://js.cytoscape.org/#ele.delayAnimation */ - delayAnimation(duration: number): void; + delayAnimation(duration: number): AnimationManipulation; } /** @@ -2216,8 +2255,8 @@ declare namespace cytoscape { * eles - The collection of elements being iterated. * @param thisArg [optional] The value for this within the iterating function. */ - each(each: (ele: TIn, i: number, eles: this) => void | boolean, thisArg?: any): void; - forEach(each: (ele: TIn, i: number, eles: this) => void | boolean, thisArg?: any): void; + each(each: (ele: TIn, i: number, eles: this) => void | boolean, thisArg?: any): this; + forEach(each: (ele: TIn, i: number, eles: this) => void | boolean, thisArg?: any): this; /** * Get an element at a particular index in the collection. @@ -2257,7 +2296,7 @@ declare namespace cytoscape { /** * Get the collection as an array, maintaining the order of the elements. */ - toArray(): SingularElementReturnValue[]; + toArray(): TOut[]; } /** @@ -2299,7 +2338,7 @@ declare namespace cytoscape { /** * http://js.cytoscape.org/#collection/building--filtering */ - interface CollectionBuildingFiltering { + interface CollectionBuildingFiltering { /** * Get an element in the collection from its ID in a very performant way. * @param id The ID of the element to get. @@ -2346,12 +2385,12 @@ declare namespace cytoscape { * Get the elements in both this collection and another specified collection. * http://js.cytoscape.org/#eles.intersection */ - intersection: CollectionSymmetricDifferenceFunc; - intersect: CollectionSymmetricDifferenceFunc; - and: CollectionSymmetricDifferenceFunc; - n: CollectionSymmetricDifferenceFunc; - '&': CollectionSymmetricDifferenceFunc; - '.': CollectionSymmetricDifferenceFunc; + intersection: CollectionBuildingIntersectionFunc; + intersect: CollectionBuildingIntersectionFunc; + and: CollectionBuildingIntersectionFunc; + n: CollectionBuildingIntersectionFunc; + '&': CollectionBuildingIntersectionFunc; + '.': CollectionBuildingIntersectionFunc; /** * Get the elements that are in the calling collection @@ -2406,7 +2445,7 @@ declare namespace cytoscape { * var col = cy.collection(); // new, empty collection * col.merge('#j').merge('#e'); */ - merge(eles: CollectionArgument | string): this; + merge(eles: CollectionArgument | Selector): this; /** * Perform an in-place operation on the calling collection to remove the given elements. * @param eles The elements to remove in-place or a selector representing the elements to remove . @@ -2431,7 +2470,7 @@ declare namespace cytoscape { * col.merge( cy.nodes() ); * col.unmerge('#e'); */ - unmerge(eles: CollectionArgument | string): this; + unmerge(eles: CollectionArgument | Selector): this; /** * Get a new collection containing elements that are accepted by the specified filter. @@ -2442,7 +2481,7 @@ declare namespace cytoscape { * ele - The element being considered. * http://js.cytoscape.org/#eles.filter */ - filter(selector: Selector | ((ele: TOut, i: number, eles: CollectionArgument) => boolean)): CollectionReturnValue; + filter(selector: Selector | ((ele: TIn, i: number, eles: CollectionArgument) => boolean)): CollectionReturnValue; /** * Get the nodes that match the specified selector. * @@ -2468,7 +2507,7 @@ declare namespace cytoscape { * * http://js.cytoscape.org/#eles.sort */ - sort(sort: (ele1: CollectionArgument, ele2: CollectionArgument) => number): CollectionReturnValue; + sort(sort: (ele1: TIn, ele2: TIn) => number): CollectionReturnValue; /** * Get an array containing values mapped from the collection. @@ -2481,7 +2520,7 @@ declare namespace cytoscape { * * http://js.cytoscape.org/#eles.map */ - map(fn: (ele: CollectionArgument, i: number, eles: CollectionArgument) => any, thisArg?: any): any[]; + map(fn: (ele: TIn, i: number, eles: CollectionArgument) => T, thisArg?: any): T[]; /** * Reduce a single value by applying a @@ -2491,15 +2530,15 @@ declare namespace cytoscape { * given the previous value and the current element. * prevVal The value accumulated from previous elements. * ele The current element. - * ix The index of the current element. + * i The index of the current element. * eles The collection of elements being reduced. * @param initialValue The initial value for reducing * It is used also for type inference of output, but the type can be * also stated explicitly as generic * http://js.cytoscape.org/#eles.reduce */ - reduce(fn: (prevVal: T, ele: SingularElementReturnValue, - ix: number, eles: CollectionReturnValue) => T, initialValue: T): T; + reduce(fn: (prevVal: T, ele: TIn, + i: number, eles: CollectionArgument) => T, initialValue: T): T; /** * Find a minimum value in a collection. @@ -2512,15 +2551,15 @@ declare namespace cytoscape { * * http://js.cytoscape.org/#eles.min */ - min(fn: (ele: CollectionArgument, i: number, eles: CollectionArgument) => any, thisArg?: any): { + min(fn: (ele: TIn, i: number, eles: CollectionArgument) => T, thisArg?: any): { /** * The minimum value found. */ - value: any, + value: T, /** * The element that corresponds to the minimum value. */ - ele: CollectionArgument + ele: SingularElementReturnValue }; /** @@ -2534,15 +2573,15 @@ declare namespace cytoscape { * * http://js.cytoscape.org/#eles.max */ - max(fn: (ele: CollectionArgument, i: number, eles: CollectionArgument) => any, thisArg?: any): { + max(fn: (ele: TIn, i: number, eles: CollectionArgument) => T, thisArg?: any): { /** - * The maximum value found. + * The minimum value found. */ - value: any, + value: T, /** - * The element that corresponds to the maximum value. + * The element that corresponds to the minimum value. */ - ele: CollectionArgument + ele: SingularElementReturnValue }; } @@ -2640,14 +2679,14 @@ declare namespace cytoscape { * @param selector An optional selector that is used to filter the resultant collection. * http://js.cytoscape.org/#edge.source */ - source(selector?: Selector): NodeCollection; + source(selector?: Selector): NodeSingular; /** * Get target node of this edge. * @param selector An optional selector that is used to filter the resultant collection. * http://js.cytoscape.org/#edge.target */ - target(selector?: Selector): NodeCollection; + target(selector?: Selector): NodeSingular; } interface EdgeCollectionTraversing { // http://js.cytoscape.org/#collection/traversing @@ -2747,28 +2786,28 @@ declare namespace cytoscape { * * @param selector [optional] An optional selector that is used to filter the resultant collection. */ - outgoers(selector?: Selector): EdgeCollection; + outgoers(selector?: Selector): CollectionReturnValue; /** * Recursively get edges (and their targets) coming out of the nodes in the collection (i.e. the outgoers, the outgoers' outgoers, ...). * * @param selector [optional] An optional selector that is used to filter the resultant collection. */ - successors(selector?: Selector): EdgeCollection; + successors(selector?: Selector): CollectionReturnValue; /** * Get edges (and their sources) coming into the nodes in the collection. * * @param selector [optional] An optional selector that is used to filter the resultant collection. */ - incomers(selector?: Selector): EdgeCollection; + incomers(selector?: Selector): CollectionReturnValue; /** * Recursively get edges (and their sources) coming into the nodes in the collection (i.e. the incomers, the incomers' incomers, ...). * * @param selector [optional] An optional selector that is used to filter the resultant collection. */ - predecessors(selector?: Selector): EdgeCollection; + predecessors(selector?: Selector): CollectionReturnValue; } /** @@ -2780,13 +2819,13 @@ declare namespace cytoscape { /** * The handler returns true when it finds the desired node, and it returns false to cancel the search. - * i - The index indicating this node is the ith visited node. - * depth - How many edge hops away this node is from the root nodes. * v - The current node. * e - The edge connecting the previous node to the current node. * u - The previous node. + * i - The index indicating this node is the ith visited node. + * depth - How many edge hops away this node is from the root nodes. */ - type SearchVisitFunction = (i: number, depth: number, v: NodeCollection, e: EdgeCollection, u: NodeCollection) => boolean; + type SearchVisitFunction = (v: NodeCollection, e: EdgeCollection, u: NodeCollection, i: number, depth: number) => boolean | void; interface SearchFirstOptions { /** * The root nodes (selector or collection) to start the search from. @@ -2958,7 +2997,7 @@ declare namespace cytoscape { */ interface SearchPageRankResult { /** function that computes the rank of a given node (either object or selector string) */ - rank(node: NodeCollection): void; + rank(node: NodeCollection): number; } /** @@ -3168,7 +3207,7 @@ declare namespace cytoscape { * returning the minimum spanning tree, assuming undirected edges. * http://js.cytoscape.org/#eles.kruskal */ - kruskal(handler: (edge: EdgeCollection) => number): void; + kruskal(handler: (edge: EdgeCollection) => number): CollectionReturnValue; /** * Finds the minimum cut in a graph using the Karger-Stein algorithm. * The optimal result is found with a high probability, but without guarantee. @@ -4641,10 +4680,14 @@ declare namespace cytoscape { * @param handler The handler function that is called * when one of the specified events occurs. */ - on(events: EventNames, data: any, handler: EventHandler): void; - bind(events: EventNames, data: any, handler: EventHandler): void; - listen(events: EventNames, data: any, handler: EventHandler): void; - addListener(events: EventNames, data: any, handler: EventHandler): void; + on(events: EventNames, handler: EventHandler): this; + on(events: EventNames, data: any, handler: EventHandler): this; + bind(events: EventNames, handler: EventHandler): this; + bind(events: EventNames, data: any, handler: EventHandler): this; + listen(events: EventNames, handler: EventHandler): this; + listen(events: EventNames, data: any, handler: EventHandler): this; + addListener(events: EventNames, handler: EventHandler): this; + addListener(events: EventNames, data: any, handler: EventHandler): this; /** * Get a promise that is resolved with the first of any of @@ -4660,8 +4703,8 @@ declare namespace cytoscape { * @param data [optional] A plain object which is passed to the handler in the event object argument. * @param handler The handler function that is called when one of the specified events occurs. */ - one(events: EventNames, handler: EventHandler): void; - one(events: EventNames, data: any, handler: EventHandler): void; + one(events: EventNames, handler: EventHandler): this; + one(events: EventNames, data: any, handler: EventHandler): this; /** * Remove event handlers on the layout. @@ -4670,10 +4713,10 @@ declare namespace cytoscape { * @param events A space separated list of event names. * @param handler [optional] A reference to the handler function to remove. */ - off(events: EventNames, handler?: EventHandler): void; - unbind(events: EventNames, handler?: EventHandler): void; - unlisten(events: EventNames, handler?: EventHandler): void; - removeListener(events: EventNames, handler?: EventHandler): void; + off(events: EventNames, handler?: EventHandler): this; + unbind(events: EventNames, handler?: EventHandler): this; + unlisten(events: EventNames, handler?: EventHandler): this; + removeListener(events: EventNames, handler?: EventHandler): this; /** * Trigger one or more events on the layout. @@ -4681,7 +4724,7 @@ declare namespace cytoscape { * @param events A space separated list of event names to trigger. * @param extraParams [optional] An array of additional parameters to pass to the handler. */ - trigger(events: EventNames, extraParams?: any[]): void; + trigger(events: EventNames, extraParams?: any[]): this; } /** @@ -4702,7 +4745,7 @@ declare namespace cytoscape { * If the animation is complete, it restarts from the beginning. * http://js.cytoscape.org/#ani.play */ - play(): void; + play(): this; /** * Get whether the animation is currently playing. * http://js.cytoscape.org/#ani.playing diff --git a/types/d3-hierarchy/d3-hierarchy-tests.ts b/types/d3-hierarchy/d3-hierarchy-tests.ts index 65b1f5c392..16b372993d 100644 --- a/types/d3-hierarchy/d3-hierarchy-tests.ts +++ b/types/d3-hierarchy/d3-hierarchy-tests.ts @@ -13,8 +13,10 @@ import * as d3Hierarchy from 'd3-hierarchy'; // ----------------------------------------------------------------------- let num: number; +let numOrUndefined: number | undefined; let size: [number, number]; -let idString: string; +let sizeOrNull: [number, number] | null; +let idString: string | undefined; // ----------------------------------------------------------------------- // Hierarchy @@ -47,16 +49,20 @@ let hierarchyRootDatum: HierarchyDatum = { ] }; -let hierarchyNodeArray: Array>; +let hierarchyNodeArray: Array> = []; +let hierarchyNodeArrayOrUndefined: Array> | undefined; let hierarchyNode: d3Hierarchy.HierarchyNode; -let hierarchyPointNodeArray: Array>; +let hierarchyPointNodeArray: Array> = []; +let hierarchyPointNodeArrayOrUndefined: Array> | undefined; let hierarchyPointNode: d3Hierarchy.HierarchyPointNode; -let hierarchyRectangularNodeArray: Array>; +let hierarchyRectangularNodeArray: Array> = []; +let hierarchyRectangularNodeArrayOrUndefined: Array> | undefined; let hierarchyRectangularNode: d3Hierarchy.HierarchyRectangularNode; -let hierarchyCircularNodeArray: Array>; +let hierarchyCircularNodeArray: Array> = []; +let hierarchyCircularNodeArrayOrUndefined: Array> | undefined; let hierarchyCircularNode: d3Hierarchy.HierarchyCircularNode; // Create Hierarchy Layout Root Node ===================================== @@ -65,6 +71,10 @@ let hierarchyRootNode: d3Hierarchy.HierarchyNode; hierarchyRootNode = d3Hierarchy.hierarchy(hierarchyRootDatum); +hierarchyRootNode = d3Hierarchy.hierarchy(hierarchyRootDatum, (d) => { + return d.children; +}); + hierarchyRootNode = d3Hierarchy.hierarchy(hierarchyRootDatum, (d) => { return d.children || null; }); @@ -79,10 +89,11 @@ num = hierarchyRootNode.height; // children, parent ------------------------------------------------------ -hierarchyNodeArray = hierarchyRootNode.children; +hierarchyNodeArrayOrUndefined = hierarchyRootNode.children; -let parentNode: d3Hierarchy.HierarchyNode; +let parentNode: d3Hierarchy.HierarchyNode | null; parentNode = hierarchyNodeArray.length ? hierarchyNodeArray[0].parent : null; +parentNode = hierarchyNodeArray[0].parent; // id -------------------------------------------------------------------- @@ -93,17 +104,17 @@ idString = hierarchyRootNode.id; const ancestors: Array> = hierarchyRootNode.ancestors(); const descendants: Array> = hierarchyRootNode.descendants(); -// leaves() --------------------------------------------------------------- +// leaves() -------------------------------------------------------------- hierarchyNodeArray = hierarchyRootNode.leaves(); -// path() ------------------------------------------------------------------- +// path() ---------------------------------------------------------------- hierarchyNode = descendants[descendants.length - 1]; const path: Array> = hierarchyRootNode.path(hierarchyNode); -// links() and HierarchyLink<...> ------------------------------------------ +// links() and HierarchyLink<...> ---------------------------------------- let links: Array>; @@ -115,26 +126,26 @@ link = links[0]; hierarchyNode = link.source; hierarchyNode = link.target; -// sum() and value ---------------------------------------------------------- +// sum() and value ------------------------------------------------------- hierarchyRootNode = hierarchyRootNode.sum((d) => d.val); -num = hierarchyRootNode.value; +numOrUndefined = hierarchyRootNode.value; -// count() and value ---------------------------------------------------------- +// count() and value ----------------------------------------------------- hierarchyRootNode = hierarchyRootNode.count(); -num = hierarchyRootNode.value; +numOrUndefined = hierarchyRootNode.value; -// sort --------------------------------------------------------------------- +// sort ------------------------------------------------------------------ hierarchyRootNode = hierarchyRootNode.sort((a, b) => { console.log('Raw values in data of a and b:', a.data.val, ' and ', b.data.val); // a and b are of type HierarchyNode - return b.height - a.height || b.value - a.value; + return b.height - a.height || b.value! - a.value!; }); -// each(), eachAfter(), eachBefore() ---------------------------------------- +// each(), eachAfter(), eachBefore() ------------------------------------- hierarchyRootNode = hierarchyRootNode.each((node) => { console.log('Raw value of node:', node.data.val); // node type is HierarchyNode @@ -151,7 +162,7 @@ hierarchyRootNode = hierarchyRootNode.eachBefore((node) => { console.log('Aggregated value of node:', node.value); // node type is HierarchyNode }); -// copy() -------------------------------------------------------------------- +// copy() ---------------------------------------------------------------- let copiedHierarchyNode: d3Hierarchy.HierarchyNode; copiedHierarchyNode = hierarchyRootNode.copy(); @@ -161,12 +172,12 @@ copiedHierarchyNode = hierarchyRootNode.copy(); // ----------------------------------------------------------------------- interface HierarchyDatumWithParentId extends HierarchyDatum { - parentId: string; + parentId: string | null; } interface TabularHierarchyDatum { name: string; - parentId: string; + parentId: string | null; val: number; } @@ -178,7 +189,7 @@ tabularData = [ { name: 'n121', parentId: 'n12', val: 30 } ]; -let idStringAccessor: (d: TabularHierarchyDatum, i?: number, data?: TabularHierarchyDatum[]) => (string | null | '' | undefined); +let idStringAccessor: (d: TabularHierarchyDatum, i: number, data: TabularHierarchyDatum[]) => (string | null | '' | undefined); // Create Stratify Operator --------------------------------------------- @@ -189,6 +200,10 @@ stratificatorizer = d3Hierarchy.stratify(); // id(...) +stratificatorizer = stratificatorizer.id((d) => { + return d.name; // d is of type TabularHierarchyDatum +}); + stratificatorizer = stratificatorizer.id((d, i, data) => { console.log('Length of tabular array: ', data.length); console.log('Name of first entry in tabular array: ', data[0].name); // data of type Array @@ -199,6 +214,10 @@ idStringAccessor = stratificatorizer.id(); // parentId(...) +stratificatorizer = stratificatorizer.parentId((d) => { + return d.parentId; // d is of type TabularHierarchyDatum +}); + stratificatorizer = stratificatorizer.parentId((d, i, data) => { console.log('Length of tabular array: ', data.length); console.log('Name of first entry in tabular array: ', data[0].name); // data of type Array @@ -209,7 +228,8 @@ idStringAccessor = stratificatorizer.parentId(); // Use Stratify Operator ------------------------------------------------ -const stratifiedRootNode: d3Hierarchy.HierarchyNode = stratificatorizer(tabularData); +const stratifiedRootNode: d3Hierarchy.HierarchyNode = stratificatorizer(tabularData); +const pId: string | null = stratifiedRootNode.data.parentId; // ----------------------------------------------------------------------- // Cluster @@ -225,16 +245,14 @@ clusterLayout = d3Hierarchy.cluster(); // size() ---------------------------------------------------------------- -clusterLayout = clusterLayout.size(null); clusterLayout = clusterLayout.size([200, 200]); -size = clusterLayout.size(); +sizeOrNull = clusterLayout.size(); // nodeSize() ------------------------------------------------------------ -clusterLayout = clusterLayout.nodeSize(null); clusterLayout = clusterLayout.nodeSize([10, 10]); -size = clusterLayout.nodeSize(); +sizeOrNull = clusterLayout.nodeSize(); // separation() ---------------------------------------------------------- @@ -266,10 +284,11 @@ num = clusterRootNode.height; // children, parent ------------------------------------------------------ -hierarchyPointNodeArray = clusterRootNode.children; +hierarchyPointNodeArrayOrUndefined = clusterRootNode.children; -let parentPointNode: d3Hierarchy.HierarchyPointNode; +let parentPointNode: d3Hierarchy.HierarchyPointNode | null; parentPointNode = hierarchyPointNodeArray.length ? hierarchyPointNodeArray[0].parent : null; +parentPointNode = hierarchyPointNodeArray[0].parent; // id -------------------------------------------------------------------- @@ -280,17 +299,17 @@ idString = clusterRootNode.id; const pointNodeAncestors: Array> = clusterRootNode.ancestors(); const pointNodeDescendants: Array> = clusterRootNode.descendants(); -// leaves() --------------------------------------------------------------- +// leaves() -------------------------------------------------------------- hierarchyPointNodeArray = clusterRootNode.leaves(); -// path() ------------------------------------------------------------------- +// path() ---------------------------------------------------------------- hierarchyPointNode = pointNodeDescendants[pointNodeDescendants.length - 1]; const clusterPath: Array> = clusterRootNode.path(hierarchyPointNode); -// links() and HierarchyPointLink<...> ------------------------------------------ +// links() and HierarchyPointLink<...> ----------------------------------- let pointLinks: Array>; @@ -302,27 +321,27 @@ pointLink = pointLinks[0]; hierarchyPointNode = pointLink.source; hierarchyPointNode = pointLink.target; -// sum() and value ---------------------------------------------------------- +// sum() and value ------------------------------------------------------- clusterRootNode = clusterRootNode.sum((d) => d.val); -num = clusterRootNode.value; +numOrUndefined = clusterRootNode.value; -// count() and value ---------------------------------------------------------- +// count() and value ----------------------------------------------------- clusterRootNode = clusterRootNode.count(); -num = clusterRootNode.value; +numOrUndefined = clusterRootNode.value; -// sort --------------------------------------------------------------------- +// sort ------------------------------------------------------------------ clusterRootNode = clusterRootNode.sort((a, b) => { console.log('x-coordinates of a:', a.x, ' and b:', b.x); // a and b are of type HierarchyPointNode console.log('Raw values in data of a and b:', a.data.val, ' and ', b.data.val); // a and b are of type HierarchyPointNode - return b.height - a.height || b.value - a.value; + return b.height - a.height || b.value! - a.value!; }); -// each(), eachAfter(), eachBefore() ---------------------------------------- +// each(), eachAfter(), eachBefore() ------------------------------------- clusterRootNode = clusterRootNode.each((node) => { console.log('ParentId:', node.data.parentId); // node type is HierarchyPointNode @@ -339,7 +358,7 @@ clusterRootNode = clusterRootNode.eachBefore((node) => { console.log('X-coordinate of node:', node.x); // node type is HierarchyPointNode }); -// copy() -------------------------------------------------------------------- +// copy() ---------------------------------------------------------------- let copiedClusterNode: d3Hierarchy.HierarchyPointNode; copiedClusterNode = clusterRootNode.copy(); @@ -348,26 +367,24 @@ copiedClusterNode = clusterRootNode.copy(); // Tree // ----------------------------------------------------------------------- -// Create tree layout generator ======================================= +// Create tree layout generator ========================================== let treeLayout: d3Hierarchy.TreeLayout; treeLayout = d3Hierarchy.tree(); -// Configure tree layout generator ==================================== +// Configure tree layout generator ======================================= // size() ---------------------------------------------------------------- -treeLayout = treeLayout.size(null); treeLayout = treeLayout.size([200, 200]); -size = treeLayout.size(); +sizeOrNull = treeLayout.size(); // nodeSize() ------------------------------------------------------------ -treeLayout = treeLayout.nodeSize(null); treeLayout = treeLayout.nodeSize([10, 10]); -size = treeLayout.nodeSize(); +sizeOrNull = treeLayout.nodeSize(); // separation() ---------------------------------------------------------- @@ -416,18 +433,17 @@ tilingFn = treemapLayout.tile(); // size() ---------------------------------------------------------------- -treemapLayout = treemapLayout.size(null); treemapLayout = treemapLayout.size([400, 200]); size = treemapLayout.size(); -// round() ------------------------------------------------------------ +// round() --------------------------------------------------------------- treemapLayout = treemapLayout.round(true); let roundFlag: boolean = treemapLayout.round(); -// padding() ---------------------------------------------------------------- +// padding() ------------------------------------------------------------- treemapLayout = treemapLayout.padding(1); treemapLayout = treemapLayout.padding((node) => { @@ -437,7 +453,7 @@ treemapLayout = treemapLayout.padding((node) => { numberRectangularNodeAccessor = treemapLayout.padding(); -// paddingInner() ---------------------------------------------------------------- +// paddingInner() -------------------------------------------------------- treemapLayout = treemapLayout.paddingInner(1); treemapLayout = treemapLayout.paddingInner((node) => { @@ -447,7 +463,7 @@ treemapLayout = treemapLayout.paddingInner((node) => { numberRectangularNodeAccessor = treemapLayout.paddingInner(); -// paddingOuter() ---------------------------------------------------------------- +// paddingOuter() -------------------------------------------------------- treemapLayout = treemapLayout.paddingOuter(1); treemapLayout = treemapLayout.paddingOuter((node) => { @@ -457,7 +473,7 @@ treemapLayout = treemapLayout.paddingOuter((node) => { numberRectangularNodeAccessor = treemapLayout.paddingOuter(); -// paddingTop() ---------------------------------------------------------------- +// paddingTop() ---------------------------------------------------------- treemapLayout = treemapLayout.paddingTop(1); treemapLayout = treemapLayout.paddingTop((node) => { @@ -467,7 +483,7 @@ treemapLayout = treemapLayout.paddingTop((node) => { numberRectangularNodeAccessor = treemapLayout.paddingTop(); -// paddingRight() ---------------------------------------------------------------- +// paddingRight() -------------------------------------------------------- treemapLayout = treemapLayout.paddingRight(1); treemapLayout = treemapLayout.paddingRight((node) => { @@ -477,7 +493,7 @@ treemapLayout = treemapLayout.paddingRight((node) => { numberRectangularNodeAccessor = treemapLayout.paddingRight(); -// paddingBottom() ---------------------------------------------------------------- +// paddingBottom() ------------------------------------------------------- treemapLayout = treemapLayout.paddingBottom(1); treemapLayout = treemapLayout.paddingBottom((node) => { @@ -487,7 +503,7 @@ treemapLayout = treemapLayout.paddingBottom((node) => { numberRectangularNodeAccessor = treemapLayout.paddingBottom(); -// paddingLeft() ---------------------------------------------------------------- +// paddingLeft() --------------------------------------------------------- treemapLayout = treemapLayout.paddingLeft(1); treemapLayout = treemapLayout.paddingLeft((node) => { @@ -527,7 +543,7 @@ tilingFactoryFn = d3Hierarchy.treemapResquarify.ratio(2); treemapLayout.tile(d3Hierarchy.treemapResquarify.ratio(2)); -// Use HierarchyRectangularNode ================================================ +// Use HierarchyRectangularNode ========================================== // x and y coordinates --------------------------------------------------- @@ -544,10 +560,11 @@ num = treemapRootNode.height; // children, parent ------------------------------------------------------ -hierarchyRectangularNodeArray = treemapRootNode.children; +hierarchyRectangularNodeArrayOrUndefined = treemapRootNode.children; -let parentRectangularNode: d3Hierarchy.HierarchyRectangularNode; +let parentRectangularNode: d3Hierarchy.HierarchyRectangularNode | null; parentRectangularNode = hierarchyRectangularNodeArray.length ? hierarchyRectangularNodeArray[0].parent : null; +parentRectangularNode = hierarchyRectangularNodeArray[0].parent; // id -------------------------------------------------------------------- @@ -558,17 +575,17 @@ idString = treemapRootNode.id; const rectangularNodeAncestors: Array> = treemapRootNode.ancestors(); const rectangularNodeDescendants: Array> = treemapRootNode.descendants(); -// leaves() --------------------------------------------------------------- +// leaves() -------------------------------------------------------------- hierarchyRectangularNodeArray = treemapRootNode.leaves(); -// path() ------------------------------------------------------------------- +// path() ---------------------------------------------------------------- hierarchyRectangularNode = rectangularNodeDescendants[rectangularNodeDescendants.length - 1]; const treemapPath: Array> = treemapRootNode.path(hierarchyRectangularNode); -// links() and HierarchyRectangularLink<...> ------------------------------------------ +// links() and HierarchyRectangularLink<...> ----------------------------- let rectangularLinks: Array>; @@ -580,26 +597,26 @@ rectangularLink = rectangularLinks[0]; hierarchyRectangularNode = rectangularLink.source; hierarchyRectangularNode = rectangularLink.target; -// sum() and value ---------------------------------------------------------- +// sum() and value ------------------------------------------------------- treemapRootNode = treemapRootNode.sum((d) => d.val); -num = treemapRootNode.value; +numOrUndefined = treemapRootNode.value; -// count() and value ---------------------------------------------------------- +// count() and value ----------------------------------------------------- treemapRootNode = treemapRootNode.count(); -num = treemapRootNode.value; -// sort --------------------------------------------------------------------- +numOrUndefined = treemapRootNode.value; +// sort ------------------------------------------------------------------ treemapRootNode = treemapRootNode.sort((a, b) => { console.log('x0-coordinates of a:', a.x0, ' and b:', b.x0); // a and b are of type HierarchyRectangularNode console.log('Raw values in data of a and b:', a.data.val, ' and ', b.data.val); // a and b are of type HierarchyRectangularNode - return b.height - a.height || b.value - a.value; + return b.height - a.height || b.value! - a.value!; }); -// each(), eachAfter(), eachBefore() ---------------------------------------- +// each(), eachAfter(), eachBefore() ------------------------------------- treemapRootNode = treemapRootNode.each((node) => { console.log('ParentId:', node.data.parentId); // node type is HierarchyRectangularNode @@ -616,7 +633,7 @@ treemapRootNode = treemapRootNode.eachBefore((node) => { console.log('X0-coordinate of node:', node.x0); // node type is HierarchyRectangularNode }); -// copy() -------------------------------------------------------------------- +// copy() ---------------------------------------------------------------- let copiedTreemapNode: d3Hierarchy.HierarchyRectangularNode; copiedTreemapNode = treemapRootNode.copy(); @@ -625,34 +642,33 @@ copiedTreemapNode = treemapRootNode.copy(); // Partition // ----------------------------------------------------------------------- -// Create partition layout generator ======================================= +// Create partition layout generator ===================================== let partitionLayout: d3Hierarchy.PartitionLayout; partitionLayout = d3Hierarchy.partition(); -// Configure partition layout generator ==================================== +// Configure partition layout generator ================================== // size() ---------------------------------------------------------------- -partitionLayout = partitionLayout.size(null); partitionLayout = partitionLayout.size([400, 200]); size = partitionLayout.size(); -// round() ------------------------------------------------------------ +// round() --------------------------------------------------------------- partitionLayout = partitionLayout.round(true); roundFlag = partitionLayout.round(); -// padding() ---------------------------------------------------------------- +// padding() ------------------------------------------------------------- partitionLayout = partitionLayout.padding(1); num = partitionLayout.padding(); -// Use partition layout generator ========================================== +// Use partition layout generator ======================================== let partitionRootNode: d3Hierarchy.HierarchyRectangularNode; @@ -662,54 +678,57 @@ partitionRootNode = partitionLayout(stratifiedRootNode); // Pack // ----------------------------------------------------------------------- -let numberCircularNodeAccessor: (node: d3Hierarchy.HierarchyCircularNode) => number; +type CircularAccessor = (node: d3Hierarchy.HierarchyCircularNode) => number; +let numberCircularNodeAccessor: CircularAccessor; +let numberCircularNodeAccessorOrNull: CircularAccessor | null; -// Create pack layout generator ======================================= +// Create pack layout generator ========================================== let packLayout: d3Hierarchy.PackLayout; packLayout = d3Hierarchy.pack(); -// Configure pack layout generator ==================================== +// Configure pack layout generator ======================================= // size() ---------------------------------------------------------------- -packLayout = packLayout.size(null); packLayout = packLayout.size([400, 400]); size = packLayout.size(); -// radius() ------------------------------------------------------------ +// radius() -------------------------------------------------------------- + +packLayout = packLayout.radius(null); packLayout = packLayout.radius((node) => { console.log('Radius property of node before completing accessor: ', node.r); // node is of type HierarchyCircularNode console.log('Parent id of node: ', node.data.parentId); // node is of type HierarchyCircularNode - return node.value; + return node.value!; }); -numberCircularNodeAccessor = packLayout.radius(); +numberCircularNodeAccessorOrNull = packLayout.radius(); -// padding() ---------------------------------------------------------------- +// padding() ------------------------------------------------------------- packLayout = packLayout.padding(1); packLayout = packLayout.padding((node) => { console.log('Radius property of node: ', node.r); // node is of type HierarchyCircularNode console.log('Parent id of node: ', node.data.parentId); // node is of type HierarchyCircularNode - return node.value > 10 ? 2 : 1; + return node.value! > 10 ? 2 : 1; }); numberCircularNodeAccessor = packLayout.padding(); -// Use partition layout generator ========================================== +// Use partition layout generator ======================================== let packRootNode: d3Hierarchy.HierarchyCircularNode; packRootNode = packLayout(stratifiedRootNode); -// Use HierarchyCircularNode ================================================ +// Use HierarchyCircularNode ============================================= -// x and y coordinates and radius r ------------------------------------------ +// x and y coordinates and radius r -------------------------------------- num = packRootNode.x; num = packRootNode.y; @@ -723,10 +742,11 @@ num = packRootNode.height; // children, parent ------------------------------------------------------ -hierarchyCircularNodeArray = packRootNode.children; +hierarchyCircularNodeArrayOrUndefined = packRootNode.children; -let parentCircularNode: d3Hierarchy.HierarchyCircularNode; +let parentCircularNode: d3Hierarchy.HierarchyCircularNode | null; parentCircularNode = hierarchyCircularNodeArray.length ? hierarchyCircularNodeArray[0].parent : null; +parentCircularNode = hierarchyCircularNodeArray[0].parent; // id -------------------------------------------------------------------- @@ -737,17 +757,17 @@ idString = packRootNode.id; const circularNodeAncestors: Array> = packRootNode.ancestors(); const circularNodeDescendants: Array> = packRootNode.descendants(); -// leaves() --------------------------------------------------------------- +// leaves() -------------------------------------------------------------- hierarchyCircularNodeArray = packRootNode.leaves(); -// path() ------------------------------------------------------------------- +// path() ---------------------------------------------------------------- hierarchyCircularNode = circularNodeDescendants[circularNodeDescendants.length - 1]; const packPath: Array> = packRootNode.path(hierarchyCircularNode); -// links() and HierarchyRectangularLink<...> ------------------------------------------ +// links() and HierarchyRectangularLink<...> ----------------------------- let circularLinks: Array>; @@ -759,26 +779,27 @@ circularLink = circularLinks[0]; hierarchyCircularNode = circularLink.source; hierarchyCircularNode = circularLink.target; -// sum() and value ---------------------------------------------------------- +// sum() and value ------------------------------------------------------- packRootNode = packRootNode.sum((d) => d.val); -num = packRootNode.value; +numOrUndefined = packRootNode.value; -// count() and value ---------------------------------------------------------- +// count() and value ----------------------------------------------------- packRootNode = packRootNode.count(); -num = packRootNode.value; -// sort --------------------------------------------------------------------- +numOrUndefined = packRootNode.value; + +// sort ------------------------------------------------------------------ packRootNode = packRootNode.sort((a, b) => { console.log('radius of a:', a.r, ' and b:', b.r); // a and b are of type HierarchyCircularNode console.log('Raw values in data of a and b:', a.data.val, ' and ', b.data.val); // a and b are of type HierarchyCircularNode - return b.height - a.height || b.value - a.value; + return b.height - a.height || b.value! - a.value!; }); -// each(), eachAfter(), eachBefore() ---------------------------------------- +// each(), eachAfter(), eachBefore() ------------------------------------- packRootNode = packRootNode.each((node) => { console.log('ParentId:', node.data.parentId); // node type is HierarchyCircularNode @@ -795,7 +816,7 @@ packRootNode = packRootNode.eachBefore((node) => { console.log('Radius of node:', node.r); // node type is HierarchyCircularNode }); -// copy() -------------------------------------------------------------------- +// copy() ---------------------------------------------------------------- let copiedPackNode: d3Hierarchy.HierarchyCircularNode; copiedPackNode = packRootNode.copy(); diff --git a/types/d3-hierarchy/index.d.ts b/types/d3-hierarchy/index.d.ts index 440a779217..0ec823cc78 100644 --- a/types/d3-hierarchy/index.d.ts +++ b/types/d3-hierarchy/index.d.ts @@ -1,65 +1,208 @@ // Type definitions for D3JS d3-hierarchy module 1.1 // Project: https://github.com/d3/d3-hierarchy/ -// Definitions by: Tom Wanzek , Alex Ford , Boris Yankov +// Definitions by: Tom Wanzek +// Alex Ford +// Boris Yankov +// denisname // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// Last module patch version validated against: 1.1.1 +// Last module patch version validated against: 1.1.6 // ----------------------------------------------------------------------- // Hierarchy // ----------------------------------------------------------------------- export interface HierarchyLink { + /** + * The source of the link. + */ source: HierarchyNode; + + /** + * The target of the link. + */ target: HierarchyNode; } export interface HierarchyNode { - data: Datum; - readonly depth: number; - readonly height: number; - parent: HierarchyNode | null; - children?: Array>; /** - * Aggregated numeric value as calculated by sum(value) or count(), - * if previously invoked. + * The associated data, as specified to the constructor. + */ + data: Datum; + + /** + * Zero for the root node, and increasing by one for each descendant generation. + */ + readonly depth: number; + + /** + * Zero for leaf nodes, and the greatest distance from any descendant leaf for internal nodes. + */ + readonly height: number; + + /** + * The parent node, or null for the root node. + */ + parent: this | null; + + /** + * An array of child nodes, if any; undefined for leaf nodes. + */ + children?: this[]; + + /** + * Aggregated numeric value as calculated by `sum(value)` or `count()`, if previously invoked. */ readonly value?: number; + /** - * Optional Node Id string set by StratifyOperator, if - * hierarchical data was created from tabular data using stratify() + * Optional node id string set by `StratifyOperator`, if hierarchical data was created from tabular data using stratify(). */ readonly id?: string; - ancestors(): Array>; - descendants(): Array>; - leaves(): Array>; - path(target: HierarchyNode): Array>; + + /** + * Returns the array of ancestors nodes, starting with this node, then followed by each parent up to the root. + */ + ancestors(): this[]; + + /** + * Returns the array of descendant nodes, starting with this node, then followed by each child in topological order. + */ + descendants(): this[]; + + /** + * Returns the array of leaf nodes in traversal order; leaves are nodes with no children. + */ + leaves(): this[]; + + /** + * Returns the shortest path through the hierarchy from this node to the specified target node. + * The path starts at this node, ascends to the least common ancestor of this node and the target node, and then descends to the target node. + * + * @param target The target node. + */ + path(target: this): this[]; + + /** + * Returns an array of links for this node, where each link is an object that defines source and target properties. + * The source of each link is the parent node, and the target is a child node. + */ links(): Array>; + + /** + * Evaluates the specified value function for this node and each descendant in post-order traversal, and returns this node. + * The `node.value` property of each node is set to the numeric value returned by the specified function plus the combined value of all descendants. + * + * @param value The value function is passed the node’s data, and must return a non-negative number. + */ sum(value: (d: Datum) => number): this; + + /** + * Computes the number of leaves under this node and assigns it to `node.value`, and similarly for every descendant of node. + * If this node is a leaf, its count is one. Returns this node. + */ count(): this; - sort(compare: (a: HierarchyNode, b: HierarchyNode) => number): this; - each(func: (node: HierarchyNode) => void): this; - eachAfter(func: (node: HierarchyNode) => void): this; - eachBefore(func: (node: HierarchyNode) => void): this; - copy(): HierarchyNode; + + /** + * Sorts the children of this node, if any, and each of this node’s descendants’ children, + * in pre-order traversal using the specified compare function, and returns this node. + * + * @param compare The compare function is passed two nodes a and b to compare. + * If a should be before b, the function must return a value less than zero; + * if b should be before a, the function must return a value greater than zero; + * otherwise, the relative order of a and b are not specified. See `array.sort` for more. + */ + sort(compare: (a: this, b: this) => number): this; + + /** + * Invokes the specified function for node and each descendant in breadth-first order, + * such that a given node is only visited if all nodes of lesser depth have already been visited, + * as well as all preceding nodes of the same depth. + * + * @param func The specified function is passed the current node. + */ + each(func: (node: this) => void): this; + + /** + * Invokes the specified function for node and each descendant in post-order traversal, + * such that a given node is only visited after all of its descendants have already been visited. + * + * @param func The specified function is passed the current node. + */ + eachAfter(func: (node: this) => void): this; + + /** + * Invokes the specified function for node and each descendant in pre-order traversal, + * such that a given node is only visited after all of its ancestors have already been visited. + * + * @param func The specified function is passed the current node. + */ + eachBefore(func: (node: this) => void): this; + + /** + * Return a deep copy of the subtree starting at this node. The returned deep copy shares the same data, however. + * The returned node is the root of a new tree; the returned node’s parent is always null and its depth is always zero. + */ + copy(): this; } -export function hierarchy(data: Datum, children?: (d: Datum) => (Datum[] | null)): HierarchyNode; +/** + * Constructs a root node from the specified hierarchical data. + * + * @param data The root specified data. + * @param children The specified children accessor function invoked for each datum, starting with the root data. + * Must return an array of data representing the children, and return null or undefined if the current datum has no children. + * If children is not specified, it defaults to: `(d) => d.children`. + */ +export function hierarchy(data: Datum, children?: (d: Datum) => (Datum[] | null | undefined)): HierarchyNode; // ----------------------------------------------------------------------- // Stratify // ----------------------------------------------------------------------- -// TODO: Review the comment in the API documentation related to 'reserved properties': id, parentId, children. If this is referring to the element on node, it should be 'parent'? - export interface StratifyOperator { + /** + * Generates a new hierarchy from the specified tabular data. Each node in the returned object has a shallow copy of the properties + * from the corresponding data object, excluding the following reserved properties: id, parentId, children. + * + * @param data The root specified data. + * @throws Error on missing id, ambiguous id, cycle, multiple roots or no root. + */ (data: Datum[]): HierarchyNode; + + /** + * Returns the current id accessor, which defaults to: `(d) => d.id`. + */ id(): (d: Datum, i: number, data: Datum[]) => (string | null | '' | undefined); - id(id: (d: Datum, i?: number, data?: Datum[]) => (string | null | '' | undefined)): this; + /** + * Sets the id accessor to the given function. + * The id accessor is invoked for each element in the input data passed to the stratify operator. + * The returned string is then used to identify the node's relationships in conjunction with the parent id. + * For leaf nodes, the id may be undefined, null or the empty string; otherwise, the id must be unique. + * + * @param id The id accessor. + */ + id(id: (d: Datum, i: number, data: Datum[]) => (string | null | '' | undefined)): this; + + /** + * Returns the current parent id accessor, which defaults to: `(d) => d.parentId`. + */ parentId(): (d: Datum, i: number, data: Datum[]) => (string | null | '' | undefined); - parentId(parentId: (d: Datum, i?: number, data?: Datum[]) => (string | null | '' | undefined)): this; + /** + * Sets the parent id accessor to the given function. + * The parent id accessor is invoked for each element in the input data passed to the stratify operator. + * The returned string is then used to identify the node's relationships in conjunction with the id. + * For the root node, the parent id should be undefined, null or the empty string. + * There must be exactly one root node in the input data, and no circular relationships. + * + * @param parentId The parent id accessor. + */ + parentId(parentId: (d: Datum, i: number, data: Datum[]) => (string | null | '' | undefined)): this; } +/** + * Constructs a new stratify operator with the default settings. + */ export function stratify(): StratifyOperator; // ----------------------------------------------------------------------- @@ -67,52 +210,86 @@ export function stratify(): StratifyOperator; // ----------------------------------------------------------------------- export interface HierarchyPointLink { + /** + * The source of the link. + */ source: HierarchyPointNode; + + /** + * The target of the link. + */ target: HierarchyPointNode; } -export interface HierarchyPointNode { +export interface HierarchyPointNode extends HierarchyNode { + /** + * The x-coordinate of the node. + */ x: number; + + /** + * The y-coordinate of the node. + */ y: number; - data: Datum; - readonly depth: number; - readonly height: number; - parent: HierarchyPointNode | null; - children?: Array>; + /** - * Aggregated numeric value as calculated by sum(value) or count(), - * if previously invoked. + * Returns an array of links for this node, where each link is an object that defines source and target properties. + * The source of each link is the parent node, and the target is a child node. */ - readonly value?: number; - /** - * Optional Node Id string set by StratifyOperator, if - * hierarchical data was created from tabular data using stratify() - */ - readonly id?: string; - ancestors(): Array>; - descendants(): Array>; - leaves(): Array>; - path(target: HierarchyPointNode): Array>; links(): Array>; - sum(value: (d: Datum) => number): this; - count(): this; - sort(compare: (a: HierarchyPointNode, b: HierarchyPointNode) => number): this; - each(func: (node: HierarchyPointNode) => void): this; - eachAfter(func: (node: HierarchyPointNode) => void): this; - eachBefore(func: (node: HierarchyPointNode) => void): this; - copy(): HierarchyPointNode; } export interface ClusterLayout { + /** + * Lays out the specified root hierarchy. + * You may want to call `root.sort` before passing the hierarchy to the cluster layout. + * + * @param root The specified root hierarchy. + */ (root: HierarchyNode): HierarchyPointNode; + + /** + * Returns the current layout size, which defaults to [1, 1]. A layout size of null indicates that a node size will be used instead. + */ size(): [number, number] | null; + /** + * Sets this cluster layout’s size to the specified [width, height] array and returns the cluster layout. + * The size represent an arbitrary coordinate system; for example, to produce a radial layout, + * a size of [360, radius] corresponds to a breadth of 360° and a depth of radius. + * + * @param size The specified two-element size array. + */ size(size: [number, number]): this; + + /** + * Returns the current node size, which defaults to null. A node size of null indicates that a layout size will be used instead. + */ nodeSize(): [number, number] | null; + /** + * Sets this cluster layout’s node size to the specified [width, height] array and returns this cluster layout. + * When a node size is specified, the root node is always positioned at <0, 0>. + * + * @param size The specified two-element size array. + */ nodeSize(size: [number, number]): this; + + /** + * Returns the current separation accessor, which defaults to: `(a, b) => a.parent == b.parent ? 1 : 2`. + */ separation(): (a: HierarchyPointNode, b: HierarchyPointNode) => number; + /** + * Sets the separation accessor to the specified function and returns this cluster layout. + * The separation accessor is used to separate neighboring leaves. + * + * @param separation The separation function is passed two leaves a and b, and must return the desired separation. + * The nodes are typically siblings, though the nodes may be more distantly related if the layout decides to place such nodes adjacent. + */ separation(separation: (a: HierarchyPointNode, b: HierarchyPointNode) => number): this; } +/** + * Creates a new cluster layout with default settings. + */ export function cluster(): ClusterLayout; // ----------------------------------------------------------------------- @@ -120,15 +297,56 @@ export function cluster(): ClusterLayout; // ----------------------------------------------------------------------- export interface TreeLayout { + /** + * Lays out the specified root hierarchy. + * You may want to call `root.sort` before passing the hierarchy to the tree layout. + * + * @param root The specified root hierarchy. + */ (root: HierarchyNode): HierarchyPointNode; + + /** + * Returns the current layout size, which defaults to [1, 1]. A layout size of null indicates that a node size will be used instead. + */ size(): [number, number] | null; + /** + * Sets this tree layout’s size to the specified [width, height] array and returns the tree layout. + * The size represent an arbitrary coordinate system; for example, to produce a radial layout, + * a size of [360, radius] corresponds to a breadth of 360° and a depth of radius. + * + * @param size The specified two-element size array. + */ size(size: [number, number]): this; + + /** + * Returns the current node size, which defaults to null. A node size of null indicates that a layout size will be used instead. + */ nodeSize(): [number, number] | null; + /** + * Sets this tree layout’s node size to the specified [width, height] array and returns this tree layout. + * When a node size is specified, the root node is always positioned at <0, 0>. + * + * @param size The specified two-element size array. + */ nodeSize(size: [number, number]): this; + + /** + * Returns the current separation accessor, which defaults to: `(a, b) => a.parent == b.parent ? 1 : 2`. + */ separation(): (a: HierarchyPointNode, b: HierarchyPointNode) => number; + /** + * Sets the separation accessor to the specified function and returns this tree layout. + * The separation accessor is used to separate neighboring nodes. + * + * @param separation The separation function is passed two nodes a and b, and must return the desired separation. + * The nodes are typically siblings, though the nodes may be more distantly related if the layout decides to place such nodes adjacent. + */ separation(separation: (a: HierarchyPointNode, b: HierarchyPointNode) => number): this; } +/** + * Creates a new tree layout with default settings. + */ export function tree(): TreeLayout; // ----------------------------------------------------------------------- @@ -136,91 +354,283 @@ export function tree(): TreeLayout; // ----------------------------------------------------------------------- export interface HierarchyRectangularLink { + /** + * The source of the link. + */ source: HierarchyRectangularNode; + + /** + * The target of the link. + */ target: HierarchyRectangularNode; } -export interface HierarchyRectangularNode { +export interface HierarchyRectangularNode extends HierarchyNode { + /** + * The left edge of the rectangle. + */ x0: number; + + /** + * The top edge of the rectangle + */ y0: number; + + /** + * The right edge of the rectangle. + */ x1: number; + + /** + * The bottom edge of the rectangle. + */ y1: number; - data: Datum; - readonly depth: number; - readonly height: number; - parent: HierarchyRectangularNode | null; - children?: Array>; + /** - * Aggregated numeric value as calculated by sum(value) or count(), - * if previously invoked. + * Returns an array of links for this node, where each link is an object that defines source and target properties. + * The source of each link is the parent node, and the target is a child node. */ - readonly value?: number; - /** - * Optional Node Id string set by StratifyOperator, if - * hierarchical data was created from tabular data using stratify() - */ - readonly id?: string; - ancestors(): Array>; - descendants(): Array>; - leaves(): Array>; - path(target: HierarchyRectangularNode): Array>; links(): Array>; - sum(value: (d: Datum) => number): this; - count(): this; - sort(compare: (a: HierarchyRectangularNode, b: HierarchyRectangularNode) => number): this; - each(func: (node: HierarchyRectangularNode) => void): this; - eachAfter(func: (node: HierarchyRectangularNode) => void): this; - eachBefore(func: (node: HierarchyRectangularNode) => void): this; - copy(): HierarchyRectangularNode; } export interface TreemapLayout { + /** + * Lays out the specified root hierarchy. + * You must call `root.sum` before passing the hierarchy to the treemap layout. + * You probably also want to call `root.sort` to order the hierarchy before computing the layout. + * + * @param root The specified root hierarchy. + */ (root: HierarchyNode): HierarchyRectangularNode; + + /** + * Returns the current tiling method, which defaults to `d3.treemapSquarify` with the golden ratio. + */ tile(): (node: HierarchyRectangularNode, x0: number, y0: number, x1: number, y1: number) => void; + /** + * Sets the tiling method to the specified function and returns this treemap layout. + * + * @param tile The specified tiling function. + */ tile(tile: (node: HierarchyRectangularNode, x0: number, y0: number, x1: number, y1: number) => void): this; + + /** + * Returns the current size, which defaults to [1, 1]. + */ size(): [number, number]; + /** + * Sets this treemap layout’s size to the specified [width, height] array and returns this treemap layout. + * + * @param size The specified two-element size array. + */ size(size: [number, number]): this; + + /** + * Returns the current rounding state, which defaults to false. + */ round(): boolean; + /** + * Enables or disables rounding according to the given boolean and returns this treemap layout. + * + * @param round The specified boolean flag. + */ round(round: boolean): this; + + /** + * Returns the current inner padding function. + */ padding(): (node: HierarchyRectangularNode) => number; + /** + * Sets the inner and outer padding to the specified number and returns this treemap layout. + * + * @param padding The specified padding value. + */ padding(padding: number): this; + /** + * Sets the inner and outer padding to the specified function and returns this treemap layout. + * + * @param padding The specified padding function. + */ padding(padding: (node: HierarchyRectangularNode) => number): this; + + /** + * Returns the current inner padding function, which defaults to the constant zero. + */ paddingInner(): (node: HierarchyRectangularNode) => number; + /** + * Sets the inner padding to the specified number and returns this treemap layout. + * The inner padding is used to separate a node’s adjacent children. + * + * @param padding The specified inner padding value. + */ paddingInner(padding: number): this; + /** + * Sets the inner padding to the specified function and returns this treemap layout. + * The function is invoked for each node with children, being passed the current node. + * The inner padding is used to separate a node’s adjacent children. + * + * @param padding The specified inner padding function. + */ paddingInner(padding: (node: HierarchyRectangularNode) => number): this; + + /** + * Returns the current top padding function. + */ paddingOuter(): (node: HierarchyRectangularNode) => number; + /** + * Sets the top, right, bottom and left padding to the specified function and returns this treemap layout. + * + * @param padding The specified padding outer value. + */ paddingOuter(padding: number): this; + /** + * Sets the top, right, bottom and left padding to the specified function and returns this treemap layout. + * + * @param padding The specified padding outer function. + */ paddingOuter(padding: (node: HierarchyRectangularNode) => number): this; + + /** + * Returns the current top padding function, which defaults to the constant zero. + */ paddingTop(): (node: HierarchyRectangularNode) => number; + /** + * Sets the top padding to the specified number and returns this treemap layout. + * The top padding is used to separate the top edge of a node from its children. + * + * @param padding The specified top padding value. + */ paddingTop(padding: number): this; + /** + * Sets the top padding to the specified function and returns this treemap layout. + * The function is invoked for each node with children, being passed the current node. + * The top padding is used to separate the top edge of a node from its children. + * + * @param padding The specified top padding function. + */ paddingTop(padding: (node: HierarchyRectangularNode) => number): this; + + /** + * Returns the current right padding function, which defaults to the constant zero. + */ paddingRight(): (node: HierarchyRectangularNode) => number; + /** + * Sets the right padding to the specified number and returns this treemap layout. + * The right padding is used to separate the right edge of a node from its children. + * + * @param padding The specified right padding value. + */ paddingRight(padding: number): this; + /** + * Sets the right padding to the specified function and returns this treemap layout. + * The function is invoked for each node with children, being passed the current node. + * The right padding is used to separate the right edge of a node from its children. + * + * @param padding The specified right padding function. + */ paddingRight(padding: (node: HierarchyRectangularNode) => number): this; + + /** + * Returns the current bottom padding function, which defaults to the constant zero. + */ paddingBottom(): (node: HierarchyRectangularNode) => number; + /** + * Sets the bottom padding to the specified number and returns this treemap layout. + * The bottom padding is used to separate the bottom edge of a node from its children. + * + * @param padding The specified bottom padding value. + */ paddingBottom(padding: number): this; + /** + * Sets the bottom padding to the specified function and returns this treemap layout. + * The function is invoked for each node with children, being passed the current node. + * The bottom padding is used to separate the bottom edge of a node from its children. + * + * @param padding The specified bottom padding function. + */ paddingBottom(padding: (node: HierarchyRectangularNode) => number): this; + + /** + * Returns the current left padding function, which defaults to the constant zero. + */ paddingLeft(): (node: HierarchyRectangularNode) => number; + /** + * Sets the left padding to the specified number and returns this treemap layout. + * The left padding is used to separate the left edge of a node from its children. + * + * @param padding The specified left padding value. + */ paddingLeft(padding: number): this; + /** + * Sets the left padding to the specified function and returns this treemap layout. + * The function is invoked for each node with children, being passed the current node. + * The left padding is used to separate the left edge of a node from its children. + * + * @param padding The specified left padding function. + */ paddingLeft(padding: (node: HierarchyRectangularNode) => number): this; } +/** + * Creates a new treemap layout with default settings. + */ export function treemap(): TreemapLayout; -// Tiling functions --------------------------------------------------------------------------------- +// Tiling functions ------------------------------------------------------ +/** + * Recursively partitions the specified nodes into an approximately-balanced binary tree, + * choosing horizontal partitioning for wide rectangles and vertical partitioning for tall rectangles. + */ export function treemapBinary(node: HierarchyRectangularNode, x0: number, y0: number, x1: number, y1: number): void; + +/** + * Divides the rectangular area specified by x0, y0, x1, y1 horizontally according the value of each of the specified node’s children. + * The children are positioned in order, starting with the left edge (x0) of the given rectangle. + * If the sum of the children’s values is less than the specified node’s value (i.e., if the specified node has a non-zero internal value), + * the remaining empty space will be positioned on the right edge (x1) of the given rectangle. + */ export function treemapDice(node: HierarchyRectangularNode, x0: number, y0: number, x1: number, y1: number): void; + +/** + * Divides the rectangular area specified by x0, y0, x1, y1 vertically according the value of each of the specified node’s children. + * The children are positioned in order, starting with the top edge (y0) of the given rectangle. + * If the sum of the children’s values is less than the specified node’s value (i.e., if the specified node has a non-zero internal value), + * the remaining empty space will be positioned on the bottom edge (y1) of the given rectangle. + */ export function treemapSlice(node: HierarchyRectangularNode, x0: number, y0: number, x1: number, y1: number): void; + +/** + * If the specified node has odd depth, delegates to treemapSlice; otherwise delegates to treemapDice. + */ export function treemapSliceDice(node: HierarchyRectangularNode, x0: number, y0: number, x1: number, y1: number): void; // TODO: Test Factory code export interface RatioSquarifyTilingFactory { (node: HierarchyRectangularNode, x0: number, y0: number, x1: number, y1: number): void; + + /** + * Specifies the desired aspect ratio of the generated rectangles. + * Note that the orientation of the generated rectangles (tall or wide) is not implied by the ratio. + * Furthermore, the rectangles ratio are not guaranteed to have the exact specified aspect ratio. + * If not specified, the aspect ratio defaults to the golden ratio, φ = (1 + sqrt(5)) / 2, per Kong et al. + * + * @param ratio The specified ratio value greater than or equal to one. + */ ratio(ratio: number): RatioSquarifyTilingFactory; } +/** + * Implements the squarified treemap algorithm by Bruls et al., which seeks to produce rectangles of a given aspect ratio. + */ export const treemapSquarify: RatioSquarifyTilingFactory; + +/** + * Like `d3.treemapSquarify`, except preserves the topology (node adjacencies) of the previous layout computed by `d3.treemapResquarify`, + * if there is one and it used the same target aspect ratio. This tiling method is good for animating changes to treemaps because + * it only changes node sizes and not their relative positions, thus avoiding distracting shuffling and occlusion. + * The downside of a stable update, however, is a suboptimal layout for subsequent updates: only the first layout uses the Bruls et al. squarified algorithm. + */ export const treemapResquarify: RatioSquarifyTilingFactory; // ----------------------------------------------------------------------- @@ -228,15 +638,53 @@ export const treemapResquarify: RatioSquarifyTilingFactory; // ----------------------------------------------------------------------- export interface PartitionLayout { + /** + * Lays out the specified root hierarchy. + * You must call `root.sum` before passing the hierarchy to the partition layout. + * You probably also want to call `root.sort` to order the hierarchy before computing the layout. + * + * @param root The specified root hierarchy. + */ (root: HierarchyNode): HierarchyRectangularNode; + + /** + * Returns the current size, which defaults to [1, 1]. + */ size(): [number, number]; + /** + * Sets this partition layout’s size to the specified [width, height] array and returns this partition layout. + * + * @param size The specified two-element size array. + */ size(size: [number, number]): this; + + /** + * Returns the current rounding state, which defaults to false. + */ round(): boolean; + /** + * Enables or disables rounding according to the given boolean and returns this partition layout. + * + * @param round The specified boolean flag. + */ round(round: boolean): this; + + /** + * Returns the current padding, which defaults to zero. + */ padding(): number; + /** + * Sets the padding to the specified number and returns this partition layout. + * The padding is used to separate a node’s adjacent children. + * + * @param padding The specified padding value. + */ padding(padding: number): this; } +/** + * Creates a new partition layout with the default settings. + */ export function partition(): PartitionLayout; // ----------------------------------------------------------------------- @@ -244,54 +692,110 @@ export function partition(): PartitionLayout; // ----------------------------------------------------------------------- export interface HierarchyCircularLink { + /** + * The source of the link. + */ source: HierarchyCircularNode; + + /** + * The target of the link. + */ target: HierarchyCircularNode; } -export interface HierarchyCircularNode { +export interface HierarchyCircularNode extends HierarchyNode { + /** + * The x-coordinate of the circle’s center. + */ x: number; + + /** + * The y-coordinate of the circle’s center. + */ y: number; + + /** + * The radius of the circle. + */ r: number; - data: Datum; - readonly depth: number; - readonly height: number; - parent: HierarchyCircularNode | null; - children?: Array>; + /** - * Aggregated numeric value as calculated by sum(value) or count(), - * if previously invoked. + * Returns an array of links for this node, where each link is an object that defines source and target properties. + * The source of each link is the parent node, and the target is a child node. */ - readonly value?: number; - /** - * Optional Node Id string set by StratifyOperator, if - * hierarchical data was created from tabular data using stratify() - */ - readonly id?: string; - ancestors(): Array>; - descendants(): Array>; - leaves(): Array>; - path(target: HierarchyCircularNode): Array>; links(): Array>; - sum(value: (d: Datum) => number): this; - count(): this; - sort(compare: (a: HierarchyCircularNode, b: HierarchyCircularNode) => number): this; - each(func: (node: HierarchyCircularNode) => void): this; - eachAfter(func: (node: HierarchyCircularNode) => void): this; - eachBefore(func: (node: HierarchyCircularNode) => void): this; - copy(): HierarchyCircularNode; } export interface PackLayout { + /** + * Lays out the specified root hierarchy. + * You must call `root.sum` before passing the hierarchy to the pack layout. + * You probably also want to call `root.sort` to order the hierarchy before computing the layout. + * + * @param root The specified root hierarchy. + */ (root: HierarchyNode): HierarchyCircularNode; + + /** + * Returns the current radius accessor, which defaults to null. + */ radius(): null | ((node: HierarchyCircularNode) => number); - radius(radius: (node: HierarchyCircularNode) => number): this; + /** + * Sets the pack layout’s radius accessor to the specified function and returns this pack layout. + * If the radius accessor is null, the radius of each leaf circle is derived from the leaf `node.value` (computed by `node.sum`); + * the radii are then scaled proportionally to fit the layout size. + * If the radius accessor is not null, the radius of each leaf circle is specified exactly by the function. + * + * @param radius The specified radius accessor. + */ + radius(radius: null | ((node: HierarchyCircularNode) => number)): this; + + /** + * Returns the current size, which defaults to [1, 1]. + */ size(): [number, number]; + /** + * Sets this pack layout’s size to the specified [width, height] array and returns this pack layout. + * + * @param size The specified two-element size array. + */ size(size: [number, number]): this; + + /** + * Returns the current padding accessor, which defaults to the constant zero. + */ padding(): (node: HierarchyCircularNode) => number; + /** + * Sets this pack layout’s padding accessor to the specified number and returns this pack layout. + * Returns the current padding accessor, which defaults to the constant zero. + * + * When siblings are packed, tangent siblings will be separated by approximately the specified padding; + * the enclosing parent circle will also be separated from its children by approximately the specified padding. + * If an explicit radius is not specified, the padding is approximate because a two-pass algorithm + * is needed to fit within the layout size: the circles are first packed without padding; + * a scaling factor is computed and applied to the specified padding; and lastly the circles are re-packed with padding. + * + * @param padding The specified padding value. + */ padding(padding: number): this; + /** + * Sets this pack layout’s padding accessor to the specified function and returns this pack layout. + * Returns the current padding accessor, which defaults to the constant zero. + * + * When siblings are packed, tangent siblings will be separated by approximately the specified padding; + * the enclosing parent circle will also be separated from its children by approximately the specified padding. + * If an explicit radius is not specified, the padding is approximate because a two-pass algorithm + * is needed to fit within the layout size: the circles are first packed without padding; + * a scaling factor is computed and applied to the specified padding; and lastly the circles are re-packed with padding. + * + * @param padding The specified padding function. + */ padding(padding: (node: HierarchyCircularNode) => number): this; } +/** + * Creates a new pack layout with the default settings. + */ export function pack(): PackLayout; // ----------------------------------------------------------------------- @@ -299,8 +803,19 @@ export function pack(): PackLayout; // ----------------------------------------------------------------------- export interface PackCircle { + /** + * The radius of the circle. + */ r: number; + + /** + * The x-coordinate of the circle’s center. + */ x?: number; + + /** + * The y-coordinate of the circle’s center. + */ y?: number; } @@ -309,6 +824,19 @@ export interface PackCircle { // For invocation of packEnclose the x and y coordinates are mandatory. It seems easier to just comment // on the mandatory nature, then to create separate interfaces and having to deal with recasting. +/** + * Packs the specified array of circles, each of which must have a `circle.r` property specifying the circle’s radius. + * The circles are positioned according to the front-chain packing algorithm by Wang et al. + * + * @param circles The specified array of circles to pack. + */ export function packSiblings(circles: Datum[]): Datum[]; +/** + * Computes the smallest circle that encloses the specified array of circles, each of which must have + * a `circle.r` property specifying the circle’s radius, and `circle.x` and `circle.y` properties specifying the circle’s center. + * The enclosing circle is computed using the Matoušek-Sharir-Welzl algorithm. (See also Apollonius’ Problem.) + * + * @param circles The specified array of circles to pack. + */ export function packEnclose(circles: Datum[]): { r: number, x: number, y: number }; diff --git a/types/d3-hierarchy/tsconfig.json b/types/d3-hierarchy/tsconfig.json index 7fbc1fb5df..da64c5832c 100644 --- a/types/d3-hierarchy/tsconfig.json +++ b/types/d3-hierarchy/tsconfig.json @@ -7,7 +7,7 @@ ], "noImplicitAny": true, "noImplicitThis": true, - "strictNullChecks": false, + "strictNullChecks": true, "strictFunctionTypes": true, "baseUrl": "../", "typeRoots": [ diff --git a/types/d3-quadtree/d3-quadtree-tests.ts b/types/d3-quadtree/d3-quadtree-tests.ts index eda00fe130..8180bc0f44 100644 --- a/types/d3-quadtree/d3-quadtree-tests.ts +++ b/types/d3-quadtree/d3-quadtree-tests.ts @@ -13,19 +13,21 @@ import * as d3Quadtree from 'd3-quadtree'; // --------------------------------------------------------------------------- // custom type guard -function isLeaf(a: any): a is d3Quadtree.QuadtreeLeaf { - return a.data !== undefined; +function isLeaf(a: d3Quadtree.QuadtreeInternalNode | d3Quadtree.QuadtreeLeaf): a is d3Quadtree.QuadtreeLeaf { + return a.length === undefined; } let num: number; -let extent: [[number, number], [number, number]]; +let num4: 4; +let undef: undefined; +let extent: [[number, number], [number, number]] | undefined; interface TestDatum { x: number; y: number; } -let testDatum: TestDatum; +let testDatum: TestDatum | undefined; let testData: TestDatum[] = [ { x: 10, y: 20 }, @@ -83,7 +85,6 @@ quadtree = d3Quadtree.quadtree(testData); // explicitly typed to Test // test without data quadtree = d3Quadtree.quadtree(); -// quadtree = d3Quadtree.quadtree(); fails, wrong underlying data type // Configure Quadtree ======================================================== @@ -111,12 +112,14 @@ quadtree = quadtree.cover(50, 90); // add(...) ------------------------------------------------------------------ quadtree = quadtree.add({ x: 35, y: 35 }); -// quadtree = quadtree.add({x: 35}); // fails, incompatible data type +// $ExpectError +quadtree = quadtree.add({x: 35}); // fails, incompatible data type // addAll(...) --------------------------------------------------------------- quadtree = quadtree.addAll(testData); -// quadtree = quadtree.addAll([{x: 35}, {x: 55, y: 13}]); // fails, incompatible data type +// $ExpectError +quadtree = quadtree.addAll([{x: 35}, {x: 55, y: 13}]); // fails, incompatible data type // remove(...) --------------------------------------------------------------- @@ -191,9 +194,10 @@ quadtree = quadtree.visit((node, x0, y0, x1, y1) => { } }); -// quadtree = quadtree.visit(function (node, x0, y0, x1, y1) { -// return 10; // fails wrong return type -// }); +// $ExpectError +quadtree = quadtree.visit((node, x0, y0, x1, y1) => { + return 10; // fails wrong return type +}); // visitAfter() --------------------------------------------------------------- @@ -232,3 +236,15 @@ quadNode = internalNode[0]; quadNode = internalNode[1]; quadNode = internalNode[2]; quadNode = internalNode[3]; + +num = internalNode.length; +num4 = internalNode.length; + +quadtree = quadtree.visit((node, x0, y0, x1, y1) => { + if (isLeaf(node)) { + undef = node.length; + } else { + num = node.length; + num4 = node.length; + } +}); diff --git a/types/d3-quadtree/index.d.ts b/types/d3-quadtree/index.d.ts index 8128c9e306..8e66ba411c 100644 --- a/types/d3-quadtree/index.d.ts +++ b/types/d3-quadtree/index.d.ts @@ -1,17 +1,34 @@ // Type definitions for D3JS d3-quadtree module 1.0 // Project: https://github.com/d3/d3-quadtree/ -// Definitions by: Tom Wanzek , Alex Ford , Boris Yankov +// Definitions by: Tom Wanzek +// Alex Ford +// Boris Yankov +// denisname // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 -// Last module patch version validated against: 1.0.1 +// Last module patch version validated against: 1.0.3 /** * Leaf node of the quadtree. */ export interface QuadtreeLeaf { + /** + * The data associated with this point, as passed to quadtree.add. + */ data: T; + + /** + * The next datum in this leaf, if any. + */ next?: QuadtreeLeaf; + + /** + * The length property may be used to distinguish leaf nodes from internal nodes: it is undefined for leaf nodes, and 4 for internal nodes. + */ + length?: undefined; } + /** * Internal nodes of the quadtree are represented as four-element arrays in left-to-right, top-to-bottom order: * @@ -22,32 +39,170 @@ export interface QuadtreeLeaf { * * A child quadrant may be undefined if it is empty. */ -export interface QuadtreeInternalNode extends Array | QuadtreeLeaf | undefined> { } +export interface QuadtreeInternalNode extends Array | QuadtreeLeaf | undefined> { + /** + * The length property may be used to distinguish leaf nodes from internal nodes: it is undefined for leaf nodes, and 4 for internal nodes. + */ + length: 4; +} export interface Quadtree { + /** + * Returns the current x-accessor, which defaults to: `x(d) => d[0]`. + */ x(): (d: T) => number; + /** + * Sets the current x-coordinate accessor and returns the quadtree. + * The x-accessors must be consistent, returning the same value given the same input. + * + * @param x The x-coordinate accessor. + */ x(x: (d: T) => number): this; + + /** + * Returns the current y-accessor, which defaults to: `y(d) => d[1]`. + */ y(): (d: T) => number; + /** + * Sets the current y-coordinate accessor and returns the quadtree. + * The y-accessors must be consistent, returning the same value given the same input. + * + * @param y The y-coordinate accessor. + */ y(y: (d: T) => number): this; + + /** + * Returns the quadtree's current extent `[[x0, y0], [x1, y1]]`, + * where `x0` and `y0` are the inclusive lower bounds and `x1` and `y1` are the inclusive upper bounds, + * or `undefined` if the quadtree has no extent. + */ extent(): [[number, number], [number, number]] | undefined; + /** + * Expands the quadtree to cover the specified points `[[x0, y0], [x1, y1]]` and returns the quadtree. + * The extent may also be expanded by calling `quadtree.cover` or `quadtree.add`. + * + * @param extend The specified points to cover. + */ extent(extend: [[number, number], [number, number]]): this; + + /** + * Expands the quadtree to cover the specified point ⟨x,y⟩, and returns the quadtree. + * * If the quadtree’s extent already covers the specified point, this method does nothing. + * * If the quadtree has an extent, the extent is repeatedly doubled to cover the specified point, wrapping the root node as necessary. + * * If the quadtree is empty, the extent is initialized to the extent `[[⌊x⌋, ⌊y⌋], [⌈x⌉, ⌈y⌉]]`. + * Rounding is necessary such that if the extent is later doubled, the boundaries of existing quadrants do not change due to floating point error. + * + * @param x The x-coordinate for the specified point to cover. + * @param y The y-coordinate for the specified point to cover. + */ cover(x: number, y: number): this; + + /** + * Adds the specified datum to the quadtree, deriving its coordinates ⟨x,y⟩ using the current x- and y-accessors, and returns the quadtree. + * If the new point is outside the current extent of the quadtree, the quadtree is automatically expanded to cover the new point. + * + * @param datum The specified datum to add. + */ add(datum: T): this; + + /** + * Adds the specified array of data to the quadtree, deriving each element’s coordinates ⟨x,y⟩ using the current x- and y-accessors, and return this quadtree. + * This is approximately equivalent to calling quadtree.add repeatedly. + * However, this method results in a more compact quadtree because the extent of the data is computed first before adding the data. + * + * @param data The specified array of data to add. + */ addAll(data: T[]): this; + + /** + * Removes the specified datum to the quadtree, deriving its coordinates ⟨x,y⟩ using the current x- and y-accessors, and returns the quadtree. + * If the specified datum does not exist in this quadtree, this method does nothing. + * + * @param datum The specified datum to remove. + */ remove(datum: T): this; + + /** + * Removes the specified data to the quadtree, deriving their coordinates ⟨x,y⟩ using the current x- and y-accessors, and returns the quadtree. + * If a specified datum does not exist in this quadtree, it is ignored. + * + * @param data The specified array of data to remove. + */ removeAll(data: T[]): this; + + /** + * Returns a copy of the quadtree. All nodes in the returned quadtree are identical copies of the corresponding node in the quadtree; + * however, any data in the quadtree is shared by reference and not copied. + */ copy(): Quadtree; + + /** + * Returns the root node of the quadtree. + */ root(): QuadtreeInternalNode | QuadtreeLeaf; + + /** + * Returns an array of all data in the quadtree. + */ data(): T[]; + + /** + * Returns the total number of data in the quadtree. + */ size(): number; + + /** + * Returns the datum closest to the position ⟨x,y⟩ with the given search radius. If radius is not specified, it defaults to infinity. + * If there is no datum within the search area, returns undefined. + * + * @param x The x-coordinate for the search position. + * @param y The y-coordinate for the search position. + * @param radius The optional search radius. + */ find(x: number, y: number, radius?: number): T | undefined; - // TODO: Review below, when validating to strictNullChecks. - // tslint:disable-next-line:void-return - visit(callback: (node: QuadtreeInternalNode | QuadtreeLeaf, x0: number, y0: number, x1: number, y1: number) => (void | boolean)): this; + + /** + * Visits each node in the quadtree in pre-order traversal, invoking the specified callback with arguments `node`, `x0`, `y0`, `x1`, `y1` for each node, + * where `node` is the node being visited, ⟨x0, y0⟩ are the lower bounds of the node, and ⟨x1, y1⟩ are the upper bounds, and returns the quadtree. + * + * If the callback returns true for a given node, then the children of that node are not visited; otherwise, all child nodes are visited. + * This can be used to quickly visit only parts of the tree. + * Note, however, that child quadrants are always visited in sibling order: top-left, top-right, bottom-left, bottom-right. + * In cases such as search, visiting siblings in a specific order may be faster. + * + * @param callback The callback invoked for each node. + */ + visit(callback: (node: QuadtreeInternalNode | QuadtreeLeaf, x0: number, y0: number, x1: number, y1: number) => void | boolean): this; + + /** + * Visits each node in the quadtree in post-order traversal, invoking the specified callback with arguments `node`, `x0`, `y0`, `x1`, `y1` for each node, + * where `node` is the node being visited, ⟨x0, y0⟩ are the lower bounds of the node, and ⟨x1, y1⟩ are the upper bounds, and returns the quadtree. + * + * @param callback The callback invoked for each node. + */ visitAfter(callback: (node: QuadtreeInternalNode | QuadtreeLeaf, x0: number, y0: number, x1: number, y1: number) => void): this; } -export function quadtree(): Quadtree<[number, number]>; -export function quadtree(data: Array<[number, number]>): Quadtree<[number, number]>; -export function quadtree(): Quadtree; -export function quadtree(data: T[], x?: (d: T) => number, y?: (d: T) => number): Quadtree; +/** + * Creates a new, empty quadtree with an empty extent and the default x- and y-accessors. + * + * The generic refers to the data type. If omitted, the default setting assumes that, + * the data used with the quadtree are two-element arrays. + * The first element corresponds to the x-dimension, the second to the y-dimension. + * When using another type, The x- and y-accessors must be specified. + */ +export function quadtree(): Quadtree; +/** + * Creates a new quadtree with the specified array of data. + * If `x` and `y` are also specified, sets the x- and y- accessors to the specified functions before adding the specified array of data to the quadtree, otherwise use the default x- and y-accessors. + * + * The generic refers to the data type. If omitted, the default setting assumes that, + * the data used with the quadtree are two-element arrays. + * The first element corresponds to the x-dimension, the second to the y-dimension. + * When using another type, The x- and y-accessors must be specified. + * + * @param data The specified array of data to add. + * @param x The x-coordinate accessor. + * @param y The y-coordinate accessor. + */ +export function quadtree(data: T[], x?: (d: T) => number, y?: (d: T) => number): Quadtree; diff --git a/types/d3-quadtree/tsconfig.json b/types/d3-quadtree/tsconfig.json index cbbb70a658..0f4239c3a6 100644 --- a/types/d3-quadtree/tsconfig.json +++ b/types/d3-quadtree/tsconfig.json @@ -7,7 +7,7 @@ ], "noImplicitAny": true, "noImplicitThis": true, - "strictNullChecks": false, + "strictNullChecks": true, "strictFunctionTypes": true, "baseUrl": "../", "typeRoots": [ diff --git a/types/d3-selection/d3-selection-tests.ts b/types/d3-selection/d3-selection-tests.ts index 54ddb5ea11..b99c81e39a 100644 --- a/types/d3-selection/d3-selection-tests.ts +++ b/types/d3-selection/d3-selection-tests.ts @@ -796,7 +796,7 @@ newDiv2 = body.append(function(d, i, g) { const index: number = i; const group: HTMLBodyElement[] | d3Selection.ArrayLike = g; console.log('Body element foo property: ', d.foo); // data of type BodyDatum - return this.ownerDocument.createElement('div'); // this-type HTMLBodyElement + return this.ownerDocument!.createElement('div'); // this-type HTMLBodyElement }); // newDiv2 = body.append(function(d) { @@ -828,7 +828,7 @@ const typeValueFunction = function( i: number, g: HTMLBodyElement[] | d3Selection.ArrayLike ) { - return this.ownerDocument.createElement('p'); // this-type HTMLParagraphElement + return this.ownerDocument!.createElement('p'); // this-type HTMLParagraphElement }; const beforeValueFunction = function( diff --git a/types/d3-selection/index.d.ts b/types/d3-selection/index.d.ts index d1e127dfdf..d9988636fd 100644 --- a/types/d3-selection/index.d.ts +++ b/types/d3-selection/index.d.ts @@ -22,7 +22,7 @@ export type BaseType = Element | EnterElement | Document | Window | null; */ export interface ArrayLike { length: number; - item(index: number): T; + item(index: number): T | null; [index: number]: T; } diff --git a/types/d3-shape/d3-shape-tests.ts b/types/d3-shape/d3-shape-tests.ts index e668d152f8..8ad3e4809a 100644 --- a/types/d3-shape/d3-shape-tests.ts +++ b/types/d3-shape/d3-shape-tests.ts @@ -1184,7 +1184,7 @@ interface SymbolDatum { let customSymbol: d3Shape.SymbolType; customSymbol = { - draw(context: CanvasPathMethods, size: number): void { + draw(context: d3Shape.CanvasPath_D3Shape, size: number): void { // draw custom symbol using canvas path methods } }; diff --git a/types/d3-shape/index.d.ts b/types/d3-shape/index.d.ts index 47e5c10feb..83222d0ff0 100644 --- a/types/d3-shape/index.d.ts +++ b/types/d3-shape/index.d.ts @@ -7,6 +7,27 @@ import { Path } from 'd3-path'; +// ----------------------------------------------------------------------------------- +// Shared Types and Interfaces +// ----------------------------------------------------------------------------------- + +/** + * @deprecated + * This interface is used to bridge the gap between two incompatible versions of TypeScript (see [#25944](https://github.com/Microsoft/TypeScript/pull/25944)). + * Use `CanvasPathMethods` instead with TS <= 3.0 and `CanvasPath` with TS >= 3.1. + */ +export interface CanvasPath_D3Shape { + arc(x: number, y: number, radius: number, startAngle: number, endAngle: number, anticlockwise?: boolean): void; + arcTo(x1: number, y1: number, x2: number, y2: number, radius: number): void; + bezierCurveTo(cp1x: number, cp1y: number, cp2x: number, cp2y: number, x: number, y: number): void; + closePath(): void; + ellipse(x: number, y: number, radiusX: number, radiusY: number, rotation: number, startAngle: number, endAngle: number, anticlockwise?: boolean): void; + lineTo(x: number, y: number): void; + moveTo(x: number, y: number): void; + quadraticCurveTo(cpx: number, cpy: number, x: number, y: number): void; + rect(x: number, y: number, w: number, h: number): void; +} + // ----------------------------------------------------------------------------------- // Arc Generator // ----------------------------------------------------------------------------------- @@ -2264,13 +2285,13 @@ export function linkRadial(): LinkRadial number): this; } +/** + * Represents the union of the Selection and Transition types for any usages that operate on both. + * Typically used for functions which take in either a selection or transition and set or update attributes. + */ +export type SelectionOrTransition = Selection | Transition; + /** * Returns a new transition with the specified name. If a name is not specified, null is used. * The new transition is only exclusive with other transitions of the same name. diff --git a/types/d3-zoom/d3-zoom-tests.ts b/types/d3-zoom/d3-zoom-tests.ts index 8051898b8b..819f344422 100644 --- a/types/d3-zoom/d3-zoom-tests.ts +++ b/types/d3-zoom/d3-zoom-tests.ts @@ -166,7 +166,7 @@ svgZoom = svgZoom.touchable(true); svgZoom = svgZoom.touchable(function(d, i, group) { const that: SVGRectElement = this; const datum: SVGDatum = d; - const g: SVGRectElement[] | NodeListOf = group; + const g: SVGRectElement[] | ArrayLike = group; return "ontouchstart" in this && datum.height > 0; }); diff --git a/types/dat.gui/index.d.ts b/types/dat.gui/index.d.ts index 967b5ae13b..5c20fd51fe 100644 --- a/types/dat.gui/index.d.ts +++ b/types/dat.gui/index.d.ts @@ -51,8 +51,7 @@ export class GUI { __folders: GUI[]; domElement: HTMLElement; - add(target: Object, propName:string): GUIController; - add(target: Object, propName:string, min: number, max: number): GUIController; + add(target: Object, propName:string, min?: number, max?: number, step?: number): GUIController; add(target: Object, propName:string, status: boolean): GUIController; add(target: Object, propName:string, items:string[]): GUIController; add(target: Object, propName:string, items:number[]): GUIController; @@ -64,6 +63,7 @@ export class GUI { destroy(): void; addFolder(propName:string): GUI; + removeFolder(subFolder:GUI):void; open(): void; close(): void; diff --git a/types/datatables.net-scroller/datatables.net-scroller-tests.ts b/types/datatables.net-scroller/datatables.net-scroller-tests.ts new file mode 100644 index 0000000000..cb93306ba0 --- /dev/null +++ b/types/datatables.net-scroller/datatables.net-scroller-tests.ts @@ -0,0 +1,13 @@ +$(document).ready(() => { + const config: DataTables.Settings = { + // Scroller extension options + scroller: { + trace: true, + rowHeight: 30, + serverWait: 1000, + displayBuffer: 10, + boundaryScale: 0.6, + loadingIndicator: true + } + }; +}); diff --git a/types/datatables.net-scroller/index.d.ts b/types/datatables.net-scroller/index.d.ts new file mode 100644 index 0000000000..fe97507712 --- /dev/null +++ b/types/datatables.net-scroller/index.d.ts @@ -0,0 +1,106 @@ +// Type definitions for datatables.net-scroller 1.4 +// Project: https://datatables.net +// Definitions by: Konstantin Rohde +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.4 + +/// +/// + +declare namespace DataTables { + interface Settings { + /* + * Select extension options + */ + scroller?: boolean | ScrollerSettings; + } + + interface ScrollerSettings { + /* + * Indicate if Scroller show show trace information on the console or not. + */ + trace?: boolean; + + /* + * Scroller will attempt to automatically calculate the height of rows for it's internal + * calculations. However the height that is used can be overridden using this parameter. + */ + rowHeight?: number | string; + + /* + * When using server-side processing, Scroller will wait a small amount of time to allow + * the scrolling to finish before requesting more data from the server. + */ + serverWait?: number; + + /* + * The display buffer is what Scroller uses to calculate how many rows it should pre-fetch + * for scrolling. + */ + displayBuffer?: number; + + /* + * Scroller uses the boundary scaling factor to decide when to redraw the table - which it + * typically does before you reach the end of the currently loaded data set (in order to + * allow the data to look continuous to a user scrolling through the data). + */ + boundaryScale?: number; + + /* + * Show (or not) the loading element in the background of the table. Note that you should + * include the dataTables.scroller.css file for this to be displayed correctly. + */ + loadingIndicator?: boolean; + } + + interface Api { + scroller: ScrollerMethodsModel; + } + + interface ScrollerMethodsModel { + /* + * Calculate and store information about how many rows are to be displayed + * in the scrolling viewport, based on current dimensions in the browser's + * rendering. + */ + measure(redraw?: boolean): Api; + /* + * Get information about current displayed record range. + */ + page(): PageInfo; + /* + * Get Scroller Api + */ + scroller(): ScrollerMethods; + } + + interface ScrollerMethods extends Api { + /* + * Calculate the pixel position from the top of the scrolling container for + * a given row + */ + rowToPixels(rowIdx: number, intParse?: boolean, virtual?: boolean): number; + /* + * Calculate the row number that will be found at the given pixel position + * (y-scroll). + */ + pixelsToRow(pixels: number, intParse?: boolean, virtual?: boolean): number; + scrollToRow(rowIdx: number, animate?: boolean): Api; + } + + /* + * start: {int}, // the 0-indexed record at the top of the viewport + * end: {int}, // the 0-indexed record at the bottom of the viewport + */ + interface PageInfo { + start: number; + end: number; + } + + interface RowMethods { + /** + * Scroll to a row + */ + scrollTo(animate?: boolean): Api; + } +} diff --git a/types/react-dnd-html5-backend/tsconfig.json b/types/datatables.net-scroller/tsconfig.json similarity index 84% rename from types/react-dnd-html5-backend/tsconfig.json rename to types/datatables.net-scroller/tsconfig.json index dca11ac9e1..29e1854557 100644 --- a/types/react-dnd-html5-backend/tsconfig.json +++ b/types/datatables.net-scroller/tsconfig.json @@ -7,7 +7,7 @@ ], "noImplicitAny": true, "noImplicitThis": true, - "strictNullChecks": false, + "strictNullChecks": true, "strictFunctionTypes": true, "baseUrl": "../", "typeRoots": [ @@ -19,6 +19,6 @@ }, "files": [ "index.d.ts", - "react-dnd-html5-backend-tests.ts" + "datatables.net-scroller-tests.ts" ] -} \ No newline at end of file +} diff --git a/types/datatables.net-scroller/tslint.json b/types/datatables.net-scroller/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/datatables.net-scroller/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/datatables.net/datatables.net-tests.ts b/types/datatables.net/datatables.net-tests.ts index 423dcaf4c9..de739a673a 100644 --- a/types/datatables.net/datatables.net-tests.ts +++ b/types/datatables.net/datatables.net-tests.ts @@ -1002,6 +1002,9 @@ const static_6 = new $.fn.dataTable.Api("selector"); const version: boolean = $.fn.dataTable.versionCheck("1.10.0"); const isDataTable: boolean = $.fn.dataTable.isDataTable("selector"); +const isDataTable_3: boolean = $.fn.dataTable.isDataTable(dt.row("selector").node()); +const isDataTable_2: boolean = $.fn.dataTable.isDataTable($("selector")); +const isDataTable_4: boolean = $.fn.dataTable.isDataTable($("selector").dataTable().api()); const escapeRegex: string = $.fn.dataTable.util.escapeRegex(""); const throttle_1 = $.fn.dataTable.util.throttle((data) => { @@ -1070,3 +1073,92 @@ const util_1: boolean = dt.any(); const util_2: number = dt.count(); //#endregion "Methods-Util" + +//#region "ExtSettings" + +const ext_classes_settings: DataTables.ExtClassesSettings = { +}; +const ext_classes_settings_full: DataTables.ExtClassesSettings = { + sFilter: "", + sFilterInput: "", + sFooterTH: "", + sHeaderTH: "", + sInfo: "", + sJUIFooter: "", + sJUIHeader: "", + sLength: "", + sLengthSelect: "", + sNoFooter: "", + sPageButton: "", + sPageButtonActive: "", + sPageButtonDisabled: "", + sPaging: "", + sProcessing: "", + sRowEmpty: "", + sScrollBody: "", + sScrollFoot: "", + sScrollFootInner: "", + sScrollHead: "", + sScrollHeadInner: "", + sScrollWrapper: "", + sSortable: "", + sSortableAsc: "", + sSortableDesc: "", + sSortableNone: "", + sSortAsc: "", + sSortColumn: "", + sSortDesc: "", + sSortIcon: "", + sSortJUI: "", + sSortJUIAsc: "", + sSortJUIAscAllowed: "", + sSortJUIDesc: "", + sSortJUIDescAllowed: "", + sSortJUIWrapper: "", + sStripeEven: "", + sStripeOdd: "", + sTable: "", + sWrapper: "" +}; + +const ext_type_settings: DataTables.ExtTypeSettings = { + detect: [], + search: {}, + order: {} +}; +ext_type_settings.detect.push((d: string, s: DataTables.Settings) => { + return null; +}); +ext_type_settings.detect.push((d: string, s: DataTables.Settings) => { + return ""; +}); + +const ext_settings: DataTables.ExtSettings = { + aTypes: [], + afnFiltering: [], + afnSortData: {}, + aoFeatures: [], + builder: "", + classes: ext_classes_settings, + errMode: "", + feature: [], + fnVersionCheck: (version: string) => "", + iApiIndex: 0, + internal: {}, + legacy: {}, + oApi: {}, + oJUIClasses: {}, + oPagination: {}, + oSort: {}, + oStdClasses: ext_classes_settings, + ofnSearch: {}, + order: {}, + pager: {}, + renderer: {}, + sVersion: "", + search: [], + selector: {}, + type: ext_type_settings +}; + + //#endregion "ExtSettings" diff --git a/types/datatables.net/index.d.ts b/types/datatables.net/index.d.ts index a8f63a999e..ed87028502 100644 --- a/types/datatables.net/index.d.ts +++ b/types/datatables.net/index.d.ts @@ -1094,13 +1094,13 @@ declare namespace DataTables { (): JQueryDataTables; /** - * Check is a table node is a DataTable or not + * Check if a table node is a DataTable already or not. * * Usage: * $.fn.dataTable.isDataTable("selector"); - * @param table Selector string for table + * @param table The table to check. */ - isDataTable(table: string): boolean; + isDataTable(table: string | Node | JQuery | Api): boolean; /** * Helpers for `columns.render`. @@ -2026,7 +2026,10 @@ declare namespace DataTables { sVersion: string; search: any[]; selector: object; - type: object; + /** + * Type based plug-ins. + */ + type: ExtTypeSettings; } interface ExtClassesSettings { @@ -2208,4 +2211,36 @@ declare namespace DataTables { sJUIFooter?: string; } //#endregion "ext internal" + + interface ExtTypeSettings { + /** + * Type detection functions for plug-in development. + * + * @see https://datatables.net/manual/plug-ins/type-detection + */ + detect: FunctionExtTypeSettingsDetect[]; + /** + * Type based ordering functions for plug-in development. + * + * @see https://datatables.net/manual/plug-ins/sorting + * @default {} + */ + order: object; + /** + * Type based search formatting for plug-in development. + * + * @default {} + * @example + * $.fn.dataTable.ext.type.search['title-numeric'] = function ( d ) { + * return d.replace(/\n/g," ").replace( /<.*?>/g, "" ); + * } + */ + search: object; + } + + /** + * @param data Data from the column cell to be analysed. + * @param DataTables settings object. + */ + type FunctionExtTypeSettingsDetect = (data: any, settings: Settings) => (string | null); } diff --git a/types/dav/dav-tests.ts b/types/dav/dav-tests.ts new file mode 100644 index 0000000000..b4218494cd --- /dev/null +++ b/types/dav/dav-tests.ts @@ -0,0 +1,250 @@ +import * as dav from "dav"; + +(() => { + const xhr = new dav.transport.Basic( + new dav.Credentials({ + username: 'xxx', + password: 'xxx' + }) + ); + + dav.createAccount({ server: 'http://dav.example.com', xhr }) + .then((account) => { + account.calendars.forEach(() => { + }); + }); + const client = new dav.Client(xhr); + + client.createAccount({ + server: 'http://dav.example.com', + accountType: 'carddav' + }).then((account) => { + account.addressBooks.forEach(() => { + }); + }); +})(); + +(() => { + const client = new dav.Client( + new dav.transport.Basic( + new dav.Credentials({ + username: 'xxx', + password: 'xxx' + }) + ), + { + baseUrl: 'https://mail.mozilla.com' + } + ); + + const req = dav.request.basic({ + method: 'PUT', + data: 'BEGIN:VCALENDAR\nEND:VCALENDAR', + etag: '12345' + }); + + client.send(req, '/calendars/123.ics') + .then(() => { }); +})(); + +(() => { + const xhr = new dav.transport.Basic( + new dav.Credentials({ + username: 'xxx', + password: 'xxx' + }) + ); + + const req = dav.request.basic({ + method: 'PUT', + data: 'BEGIN:VCALENDAR\nEND:VCALENDAR', + etag: '12345' + }); + + xhr.send(req, 'https://mail.mozilla.com/calendars/123.ics') + .then(() => { + }); +})(); + +dav.debug.enabled = true; + +(() => { + const xhr = new dav.transport.Basic( + new dav.Credentials({ + username: 'Killer BOB', + password: 'blacklodge' + }) + ); + + const client = new dav.Client(xhr, { baseUrl: 'https://mail.mozilla.com' }); + + const url = 'https://mail.mozilla.com/'; + const req = dav.request.basic({ + method: 'PUT', + data: 'BEGIN:VCALENDAR\nEND:VCALENDAR', + etag: 'abc123' + }); + + const sandbox = dav.createSandbox(); + client.send(req, url, { sandbox }); + xhr.send(req, url, { sandbox }); + + client.createAccount({ sandbox: {}, server: 'http://dav.example.com' }); + dav.createAccount({ + sandbox: {}, + server: 'http://dav.example.com', + xhr + }); + + let calendar = new dav.Calendar(); + client.createCalendarObject(calendar, { + data: 'BEGIN:VCALENDAR\nEND:VCALENDAR', + filename: 'test.ics' + }); + dav.createCalendarObject( + calendar, + { + data: 'BEGIN:VCALENDAR\nEND:VCALENDAR', + filename: 'test.ics', + xhr + }); + + let object = new dav.CalendarObject(); + client.updateCalendarObject(object); + dav.updateCalendarObject( + object, + { + xhr + } + ); + + object = new dav.CalendarObject(); + client.deleteCalendarObject(object); + dav.deleteCalendarObject( + object, + { + xhr + } + ); + + calendar = new dav.Calendar(); + client.syncCalendar(calendar, { syncMethod: 'webdav' }); + dav.syncCalendar( + calendar, + { + syncMethod: 'webdav', + xhr + } + ); + + let account = new dav.Account(); + client.syncCaldavAccount(account, { syncMethod: 'webdav' }); + dav.syncCaldavAccount( + account, + { + syncMethod: 'webdav', + xhr + } + ); + + let addressBook = new dav.AddressBook(); + client.createCard(addressBook, { + data: 'BEGIN:VCARD\nEND:VCARD', + filename: 'test.vcf' + }); + dav.createCard(addressBook, + { + data: 'BEGIN:VCARD\nEND:VCARD', + filename: 'test.vcf', + xhr + }); + + let vcard = new dav.VCard(); + client.updateCard(vcard); + dav.updateCard( + vcard, + { + xhr + } + ); + vcard = new dav.VCard(); + client.deleteCard(vcard); + dav.deleteCard( + vcard, + { + xhr + }); + + addressBook = new dav.AddressBook(); + client.syncAddressBook(addressBook, { + syncMethod: 'basic' + }); + + dav.syncAddressBook( + addressBook, + { + syncMethod: 'basic', + xhr + }); + + account = new dav.Account(); + client.syncCarddavAccount(account, { syncMethod: 'basic' }); + + dav.syncCarddavAccount( + account, + { + syncMethod: 'basic', + xhr + }); +})(); + +(() => { + const xhr = new dav.transport.Basic( + new dav.Credentials({ username: 'admin', password: 'admin' }) + ); + + const req: dav.Request = { + method: 'GET', + transformRequest: (xhr: any) => xhr + }; + + const sandbox = dav.createSandbox(); + xhr.send(req, 'http://127.0.0.1:1337', { sandbox }); + sandbox.requestList; + + xhr.send(req, 'http://127.0.0.1:1337'); +})(); + +(() => { + const credentials = new dav.Credentials({ + clientId: '605300196874-1ki833poa7uqabmh3hq' + + '6u1onlqlsi54h.apps.googleusercontent.com', + clientSecret: 'jQTKlOhF-RclGaGJot3HIcVf', + redirectUrl: 'https://oauth.gaiamobile.org/authenticated', + tokenUrl: 'https://accounts.google.com/o/oauth2/token', + authorizationCode: 'gareth' + }); + + const xhr = new dav.transport.OAuth2(credentials); + + const req = { method: 'GET' }; + + credentials.accessToken = 'EXPIRED'; + credentials.refreshToken = '1/oPHTPFgECWFPrs7KgHdis24u6Xl4E4EnRrkkiwLfzdk'; + credentials.expiration = Date.now() - 1; + + xhr.send(req, 'http://127.0.0.1:1337', { + retry: false + }); + + credentials.accessToken = 'Little Bear'; + credentials.refreshToken = 'spicy tamales'; + const expiration = credentials.expiration = Date.now() + 60 * 60 * 1000; + + credentials.accessToken = 'EXPIRED'; + credentials.refreshToken = 'raspberry pie'; + credentials.expiration = Date.now() + 60 * 60 * 1000; + + credentials.accessToken = 'EXPIRED'; + credentials.refreshToken = 'soda'; +})(); diff --git a/types/dav/index.d.ts b/types/dav/index.d.ts new file mode 100644 index 0000000000..063cc38e60 --- /dev/null +++ b/types/dav/index.d.ts @@ -0,0 +1,804 @@ +// Type definitions for dav 1.7 +// Project: https://github.com/lambdabaa/dav/ +// Definitions by: ToastHawaii +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.2 + +export let version: string; + +/** + * Perform an initial download of a caldav or carddav account's data. + * @param options + * @returns a Promise which will be fulfilled with a dav.Account object. + */ +export function createAccount(options: CreateAccountOptions): Promise; + +export interface CreateAccountOptions { + /** + * one of 'caldav' or 'carddav'. Defaults to 'caldav'. + */ + accountType?: "caldav" | "carddav"; + + /** + * list of caldav filters to send with request. + */ + filters?: object[]; + + /** + * whether or not to load dav collections. + */ + loadCollections?: boolean; + + /** + * whether or not to load dav objects. + */ + loadObjects?: boolean; + + /** + * request sandox. + */ + sandbox?: Sandbox | {}; + + /** + * some url for server (needn't be base url). + */ + server: string; + + /** + * VTIMEZONE calendar object. + */ + timezone?: string; + + /** + * request sender. + */ + + xhr?: transport.Transport; +} + +/** + * Create a calendar object on the parameter calendar. + * @param calendar the calendar to put the object on. + * @param options + * @returns a Promise which will be fulfilled when the calendar has been created. + */ +export function createCalendarObject(calendar: Calendar, options: CreateCalendarObjectOptions): Promise; + +export interface CreateCalendarObjectOptions { + /** + * rfc 5545 VCALENDAR object. + */ + data: string; + + /** + * name for the calendar ics file. + */ + filename: string; + + /** + * request sandbox. + */ + sandbox?: Sandbox; + + /** + * request sender. + */ + xhr?: transport.Transport; +} + +/** + * Persist updates to the parameter calendar object to the server. + * @param calendarObject updated calendar object. + * @param options + * @returns a Promise which will be fulfilled when the calendar has been updated. + */ +export function updateCalendarObject(calendarObject: CalendarObject, options: UpdateCalendarObjectOptions): Promise; + +export interface UpdateCalendarObjectOptions { + /** + * request sandbox. + */ + sandbox?: Sandbox; + + /** + * request sender. + */ + xhr?: transport.Transport; +} + +/** + * Delete the parameter calendar object on the server. + * @param calendarObject target calendar object. + * @param options + * @returns a Promise which will be fulfilled when the calendar has been deleted. + */ +export function deleteCalendarObject(calendarObject: CalendarObject, options: DeleteCalendarObjectOptions): Promise; + +export interface DeleteCalendarObjectOptions { + /** + * request sandbox. + */ + sandbox?: Sandbox; + + /** + * request sender. + */ + xhr?: transport.Transport; +} + +/** + * Fetch changes from the remote server to the parameter calendar. + * @param calendar the calendar to fetch changes for. + * @param options + * @returns a Promise which will be fulfilled with an updated dav.Calendar object once sync is complete. + */ +export function syncCalendar(calendar: Calendar, options: SyncCalendarOptions): Promise; + +export interface SyncCalendarOptions { + /** + * list of caldav filters to send with request. + */ + filters?: object[]; + + /** + * request sandbox. + */ + sandbox?: Sandbox; + + /** + * either 'basic' or 'webdav'. If unspecified, will try to do webdav sync + * and failover to basic sync if rfc 6578 is not supported by the server. + */ + syncMethod?: "basic" | "webdav"; + + /** + * VTIMEZONE calendar object. + */ + timezone?: string; + + /** + * request sender. + */ + xhr?: transport.Transport; +} + +/** + * Fetch changes from the remote server to the account's calendars. + * @param account the calendar account to sync. + * @param options + * @returns a Promise which will be fulfilled with an updated dav.Account object once sync is complete. + */ +export function syncCaldavAccount(account: Account, options: SyncCaldavAccountOptions): Promise; + +export interface SyncCaldavAccountOptions { + /** + * list of caldav filters to send with request. + */ + filters?: object[]; + + /** + * request sandbox. + */ + sandbox?: Sandbox; + + /** + * either 'basic' or 'webdav'. If unspecified, will try to do webdav sync + * and failover to basic sync if rfc 6578 is not supported by the server. + */ + syncMethod?: "basic" | "webdav"; + + /** + * VTIMEZONE calendar object. + */ + timezone?: string; + + /** + * request sender. + */ + xhr?: transport.Transport; +} + +/** + * Create a vcard object on the parameter address book. + * @param addressBook the address book to put the object on. + * @param options + * @returns a Promise which will be fulfilled when the vcard has been created. + */ +export function createCard(addressBook: AddressBook, options: CreateCardOptions): Promise; + +export interface CreateCardOptions { + /** + * VCARD object. + */ + data: string; + /** + * name for the vcard vcf file. + */ + filename: string; + + /** + * request sandbox. + */ + sandbox?: Sandbox; + /** + * request sender. + */ + xhr?: transport.Transport; +} + +/** + * Persist updates to the parameter vcard object to the server. + * @param card updated vcard object. + * @param options + * @returns a Promise which will be fulfilled when the vcard has been updated. + */ +export function updateCard(card: VCard, options: UpdateCardOptions): Promise; + +export interface UpdateCardOptions { + /** + * request sandbox. + */ + sandbox?: Sandbox; + /** + * request sender. + */ + xhr?: transport.Transport; +} + +/** + * Delete the parameter vcard object on the server. + * @param card target vcard object. + * @param options + * @returns a Promise which will be fulfilled when the vcard has been deleted. + */ +export function deleteCard(card: VCard, options: DeleteCardOptions): Promise; + +export interface DeleteCardOptions { + /** + * request sandbox. + */ + sandbox?: Sandbox; + /** + * request sender. + */ + xhr?: transport.Transport; +} + +/** + * Fetch changes from the remote server to the parameter address books. + * @param addressBook the address book to fetch changes for. + * @param options + * @returns a Promise which will be fulfilled with an updated AddressBook object once sync is complete. + */ +export function syncAddressBook(addressBook: AddressBook, options: SyncAddressBookOptions): Promise; + +export interface SyncAddressBookOptions { + /** + * request sandbox. + */ + sandbox?: Sandbox; + /** + * either 'basic' or 'webdav'.If unspecified, will try to do webdav sync + * and failover to basic sync if rfc 6578 is not supported by the server. + */ + syncMethod?: "basic" | "webdav"; + + /** + * request sender. + */ + xhr?: transport.Transport; +} + +/** + * Fetch changes from the remote server to the account's address books. + * @param account the address book account to sync. + * @param options + * @returns a Promise which will be fulfilled with an updated Account object once sync is complete. + */ +export function syncCarddavAccount(account: Account, options: SyncCarddavAccountOptions): Promise; + +export interface SyncCarddavAccountOptions { + /** + * list of caldav filters to send with request. + */ + filters?: object[]; + + /** + * request sandbox. + */ + sandbox?: Sandbox; + + /** + * either 'basic' or 'webdav'. If unspecified, will try to do webdav sync + * and failover to basic sync if rfc 6578 is not supported by the server. + */ + syncMethod?: "basic" | "webdav"; + + /** + * VTIMEZONE calendar object. + */ + timezone?: string; + + /** + * request sender. + */ + xhr?: transport.Transport; +} + +/** + * Create a request sandbox. + */ +export class Sandbox { + constructor(); + + requestList: any[]; + + add(request: any): void; + + /** + * abort sandboxed requests as a group. + */ + abort(): void; +} + +/** + * @deprecated + */ +export function createSandbox(): Sandbox; + +export namespace transport { + class Transport { + /** + * @param credentials user authorization. + */ + constructor(credentials: Credentials); + + send(request: Request, url: string, options?: TransportOptions): Promise; + } + + interface TransportOptions { + /** + * request sandbox. + */ + sandbox?: Sandbox; + + retry?: boolean; + } + + class Basic extends Transport { + /** + * Create a new Basic object. This sends dav requests using http basic authentication. + * @param credentials user authorization. + */ + constructor(credentials: Credentials); + + /** + * + * @param request object with request info. + * @param url + * @param options + * @return a promise that will be resolved with an xhr request after + * its readyState is 4 or the result of applying an optional request + * `transformResponse` function to the xhr object after its readyState + * is 4. + */ + send(request: Request, url: string, options?: TransportOptions): Promise; + } + + /** + * Create a new OAuth2 object.This sends dav requests authorized via rfc 6749 oauth2. + * @param credentials user authorization. + */ + class OAuth2 extends Transport { + constructor(credentials: Credentials); + + /** + * + * @param request object with request info. + * @param url + * @param options + * @return a promise that will be resolved with an xhr request after + * its readyState is 4 or the result of applying an optional request + * `transformResponse` function to the xhr object after its readyState + * is 4. + */ + send(request: Request, url: string, options?: TransportOptions): Promise; + } +} + +export namespace request { + /** + * + * @param options + * @returns + */ + function addressBookQuery(options: AddressBookQueryOptions): string; + + interface AddressBookQueryOptions { + /** + * value for Depth header. + */ + depth?: string; + + /** + * list of props to request. + */ + props: object[]; + } + + /** + * + * @param options + * @returns + */ + function basic(options: BasicOptions): Request; + + interface BasicOptions { + /** + * put request body. + */ + data: string; + + /** + * http method. + */ + method: string; + + /** + * cached calendar object etag. + */ + etag: string; + } + + /** + * + * @param options + * @returns + */ + function calendarQuery(options: CalendarQueryOptions): string; + + interface CalendarQueryOptions { + /** + * value for Depth header. + */ + depth?: string; + + /** + * list of filters to send with request. + */ + filters: object[]; + + /** + * list of props to request. + */ + props: object[]; + + /** + * VTIMEZONE calendar object. + */ + timezone: string; + } + + /** + * + * @param options + * @returns + */ + function propfind(options: PropfindOptions): string; + + interface PropfindOptions { + /** + * value for Depth header. + */ + depth?: string; + + /** + * list of props to request. + */ + props: object[]; + } + + /** + * + * @param options + * @returns + */ + function syncCollection(options: SyncCollectionOptions): string; + + interface SyncCollectionOptions { + /** + * option value for Depth header. + */ + depth?: string; + + /** + * list of props to request. + */ + props: object[]; + + /** + * indicates scope of the sync report request. + */ + syncLevel: number; + + /** + * synchronization token provided by the server. + */ + syncToken: string; + } +} + +export class Client { + /** + * Create a new Client object. The client interface allows consumers to set + * their credentials and transport once and then make authorized requests + * without passing them to each request. Each of the other, public API + * methods should be available on Client objects. + * @param xhr request sender. + * @param options + */ + constructor(xhr: transport.Transport, options?: ClientOptions); + + /** + * Send a request using this client's transport (and perhaps baseUrl). + * @param req dav request. + * @param options + * @return a promise that will be resolved with an xhr request after + * its readyState is 4 or the result of applying an optional request + * `transformResponse` function to the xhr object after its readyState + * is 4. + */ + send(req: Request, uri: string, options?: ClientSendOptions): Promise; + + /** + * Perform an initial download of a caldav or carddav account's data. + * @param options + * @returns a Promise which will be fulfilled with a dav.Account object. + */ + createAccount(options?: CreateAccountOptions): Promise; + + /** + * Create a calendar object on the parameter calendar. + * @param calendar the calendar to put the object on. + * @param options + * @returns a Promise which will be fulfilled when the calendar has been created. + */ + createCalendarObject(calendar: Calendar, options?: CreateCalendarObjectOptions): Promise; + + /** + * Persist updates to the parameter calendar object to the server. + * @param calendarObject updated calendar object. + * @param options + * @returns a Promise which will be fulfilled when the calendar has been updated. + */ + updateCalendarObject(calendarObject: CalendarObject, options?: UpdateCalendarObjectOptions): Promise; + + /** + * Delete the parameter calendar object on the server. + * @param calendarObject target calendar object. + * @param options + * @returns a Promise which will be fulfilled when the calendar has been deleted. + */ + deleteCalendarObject(calendarObject: CalendarObject, options?: DeleteCalendarObjectOptions): Promise; + + /** + * Fetch changes from the remote server to the parameter calendar. + * @param calendar the calendar to fetch changes for. + * @param options + * @returns a Promise which will be fulfilled with an updated dav.Calendar object once sync is complete. + */ + syncCalendar(calendar: Calendar, options?: SyncCalendarOptions): Promise; + + /** + * Fetch changes from the remote server to the account's calendars. + * @param account the calendar account to sync. + * @param options + * @returns a Promise which will be fulfilled with an updated dav.Account object once sync is complete. + */ + syncCaldavAccount(account: Account, options?: SyncCaldavAccountOptions): Promise; + + /** + * Create a vcard object on the parameter address book. + * @param addressBook the address book to put the object on. + * @param options + * @returns a Promise which will be fulfilled when the vcard has been created. + */ + createCard(addressBook: AddressBook, options?: CreateCardOptions): Promise; + + /** + * Persist updates to the parameter vcard object to the server. + * @param card updated vcard object. + * @param options + * @returns a Promise which will be fulfilled when the vcard has been updated. + */ + updateCard(card: VCard, options?: UpdateCardOptions): Promise; + + /** + * + * Delete the parameter vcard object on the server. + * @param card target vcard object. + * @param options + * @returns a Promise which will be fulfilled when the vcard has been deleted. + */ + deleteCard(card: VCard, options?: DeleteCardOptions): Promise; + + /** + * Fetch changes from the remote server to the parameter address books. + * @param addressBook the address book to fetch changes for. + * @param options + * @returns a Promise which will be fulfilled with an updated AddressBook object once sync is complete. + */ + syncAddressBook(addressBook: AddressBook, options?: SyncAddressBookOptions): Promise; + + /** + * Fetch changes from the remote server to the account's address books. + * @param account the address book account to sync. + * @param options + * @returns a Promise which will be fulfilled with an updated Account object once sync is complete. + */ + syncCarddavAccount(account: Account, options?: SyncCarddavAccountOptions): Promise; +} + +export interface ClientOptions { + /** + * root url to resolve relative request urls with. + */ + baseUrl: string; +} + +export interface ClientSendOptions { + /** + * request sandbox. + */ + sandbox?: Sandbox; + /** + * relative url for request. + */ + url?: string; +} + +export type Partial = { + [P in keyof T]?: T[P]; +}; + +export class Account { + constructor(options?: AccountOptions); + server: string; + credentials: Credentials; + rootUrl: string; + principalUrl: string; + homeUrl: string; + calendars: Calendar[]; + addressBooks: AddressBook[]; +} + +export type AccountOptions = Partial; + +export class Credentials { + constructor(options?: CredentialsOptions); + + /** + * username (perhaps email) for calendar user. + */ + username: string; + + /** + * plaintext password for calendar user. + */ + password: string; + + /** + * oauth client id. + */ + clientId: string; + + /** + * oauth client secret. + */ + clientSecret: string; + + /** + * oauth code. + */ + authorizationCode: string; + + /** + * oauth redirect url. + */ + redirectUrl: string; + + /** + * oauth token url. + */ + tokenUrl: string; + + /** + * oauth access token. + */ + accessToken: string; + + /** + * oauth refresh token. + */ + refreshToken: string; + + /** + * unix time for access token expiration. + */ + expiration: number; +} +export type CredentialsOptions = Partial; + +export class DAVCollection { + constructor(options: DAVCollectionOptions); + data: string; + objects: T[]; + account: Account; + ctag: string; + description: string; + displayName: string; + reports: string[]; + resourcetype: string; + syncToken: string; + url: string; +} +export type DAVCollectionOptions = Partial>; + +export class AddressBook extends DAVCollection { + constructor(options?: AddressBookOptions); +} +export type AddressBookOptions = Partial; + +export class Calendar extends DAVCollection { + constructor(options?: CalendarOptions); + + components: string[]; + timezone: string; +} +export type CalendarOptions = Partial; + +export class DAVObject { + constructor(options: DAVObjectOptions); + data: string; + etag: string; + url: string; +} +export type DAVObjectOptions = Partial; + +export class CalendarObject extends DAVObject { + constructor(options?: CalendarObjectOptions); + calendar: Calendar; + calendarData: string; +} +export type CalendarObjectOptions = Partial; + +export class VCard extends DAVObject { + constructor(options?: VCardOptions); + addressBook: AddressBook; + addressData: string; +} + +export type VCardOptions = Partial; + +export class Request { + constructor(options?: RequestOptions); + method: string; + requestData?: string; + transformRequest?: (xhr: any) => any; + transformResponse?: (xhr: any) => any; + onerror?: (error: Error) => any; +} + +export type RequestOptions = Partial; + +export namespace debug { + let enabled: boolean; +} + +export namespace ns { + const CALENDAR_SERVER = 'http://calendarserver.org/ns/'; + const CALDAV_APPLE = 'http://apple.com/ns/ical/'; + const CALDAV = 'urn:ietf:params:xml:ns:caldav'; + const CARDDAV = 'urn:ietf:params:xml:ns:carddav'; + const DAV = 'DAV:'; +} diff --git a/types/dav/tsconfig.json b/types/dav/tsconfig.json new file mode 100644 index 0000000000..344edfe56a --- /dev/null +++ b/types/dav/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", + "dav-tests.ts" + ] +} \ No newline at end of file diff --git a/types/dav/tslint.json b/types/dav/tslint.json new file mode 100644 index 0000000000..2750cc0197 --- /dev/null +++ b/types/dav/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } \ No newline at end of file diff --git a/types/db-migrate-base/index.d.ts b/types/db-migrate-base/index.d.ts index a881fa6a06..c1c9189a50 100644 --- a/types/db-migrate-base/index.d.ts +++ b/types/db-migrate-base/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/db-migrate/db-migrate-base // Definitions by: nickiannone // Definitions: https://github.com/nickiannone/DefinitelyTyped -// TypeScript Version: 2.3 +// TypeScript Version: 2.8 /// diff --git a/types/db-migrate-pg/index.d.ts b/types/db-migrate-pg/index.d.ts index 09cba26317..71726463e4 100644 --- a/types/db-migrate-pg/index.d.ts +++ b/types/db-migrate-pg/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/db-migrate/pg // Definitions by: nickiannone // Definitions: https://github.com/nickiannone/DefinitelyTyped -// TypeScript Version: 2.3 +// TypeScript Version: 2.8 import * as pg from "pg"; import * as DbMigrateBase from "db-migrate-base"; diff --git a/types/dc/dc-tests.ts b/types/dc/dc-tests.ts index 643594276d..c431e3c714 100644 --- a/types/dc/dc-tests.ts +++ b/types/dc/dc-tests.ts @@ -1,3 +1,8 @@ +import * as crossfilter from 'crossfilter'; +import * as d3 from "d3"; +import * as dc from "dc"; + + interface IYelpData { city: string; review_count: number; diff --git a/types/dc/index.d.ts b/types/dc/index.d.ts index 4ba0e5e4ab..9100acdc26 100644 --- a/types/dc/index.d.ts +++ b/types/dc/index.d.ts @@ -5,10 +5,6 @@ // matthias jobst // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// this makes only sense together with d3 and crossfilter so you need the d3.d.ts and crossfilter.d.ts files - -/// - import * as d3 from "d3"; export = dc; diff --git a/types/dd-trace/dd-trace-tests.ts b/types/dd-trace/dd-trace-tests.ts index 6281802d36..007ccc30a4 100644 --- a/types/dd-trace/dd-trace-tests.ts +++ b/types/dd-trace/dd-trace-tests.ts @@ -1,16 +1,20 @@ -import * as ddTrace from 'dd-trace'; +import * as tracer from 'dd-trace'; import SpanContext = require('dd-trace/src/opentracing/span_context'); -const tracer = ddTrace.init({ +tracer.init({ service: 'MyLovelyService', hostname: 'localhost', port: 8126, + logger: { + debug: msg => { }, + error: err => { } + } }); tracer .trace('web.request', { service: 'my_service', - childOf: new SpanContext({ traceId: 1337, spanId: 42 }), + childOf: new SpanContext({ traceId: 1337, spanId: 42 }), // Childof must be an instance of this type. See: https://github.com/DataDog/dd-trace-js/blob/master/src/opentracing/tracer.js#L99 tags: { env: 'dev' } @@ -19,3 +23,13 @@ tracer span.setTag('my_tag', 'my_value'); span.finish(); }); + +const parentScope = tracer.scopeManager().active(); +const span = tracer.startSpan('memcached', { + childOf: parentScope && parentScope.span(), + tags: { + 'service.name': 'my-memcached', + 'resource.name': 'get', + 'span.type': 'memcached', + }, +}); diff --git a/types/dd-trace/index.d.ts b/types/dd-trace/index.d.ts index 7ce1e89b09..a6bbe7dde9 100644 --- a/types/dd-trace/index.d.ts +++ b/types/dd-trace/index.d.ts @@ -1,11 +1,11 @@ -// Type definitions for dd-trace-js 0.2 +// Type definitions for dd-trace-js 0.5 // Project: https://github.com/DataDog/dd-trace-js // Definitions by: Colin Bradley +// Eloy Durán // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -import Tracer = require('./src/opentracing/tracer'); -import Span = require('./src/opentracing/span'); -import SpanContext = require('./src/opentracing/span_context'); +import { Tracer, Span, SpanContext } from "opentracing"; +import DatadogSpanContext = require('./src/opentracing/span_context'); declare var trace: TraceProxy; export = trace; @@ -42,6 +42,11 @@ declare class TraceProxy extends Tracer { * @returns The current span or null if outside a trace context. */ currentSpan(): Span | null; + + /** + * Get the scope manager to manager context propagation for the tracer. + */ + scopeManager(): ScopeManager; } interface TracerOptions { @@ -91,6 +96,16 @@ interface TracerOptions { * @default true */ plugins?: boolean; + + /** + * Custom logger to be used by the tracer (if debug = true), + * should support debug() and error() methods + * see https://datadog.github.io/dd-trace-js/#custom-logging__anchor + */ + logger?: { + debug: (message: string) => void + error: (err: Error) => void + }; } interface ExperimentalOptions { @@ -129,11 +144,44 @@ interface TraceOptions { /** * The parent span or span context for the new span. Generally this is not needed as it will be * fetched from the current context. + * If creating your own, this must be an instance of DatadogSpanContext from ./src/opentracing/span_context + * See: https://github.com/DataDog/dd-trace-js/blob/master/src/opentracing/tracer.js#L99 */ - childOf?: Span | SpanContext; + childOf?: Span | SpanContext | DatadogSpanContext; /** * Global tags that should be assigned to every span. */ - tags?: { [key: string]: any; } | string; + tags?: { [key: string]: any } | string; +} + +declare class ScopeManager { + /** + * Get the current active scope or null if there is none. + * + * @todo The dd-trace source returns null, but opentracing's childOf span + * option is typed as taking undefined or a scope, so using undefined + * here instead. + */ + active(): Scope | undefined; + + /** + * Activate a new scope wrapping the provided span. + * + * @param span The span for which to activate the new scope. + * @param finishSpanOnClose Whether to automatically finish the span when the scope is closed. + */ + activate(span: Span, finishSpanOnClose?: boolean): Scope; +} + +declare class Scope { + /** + * Get the span wrapped by this scope. + */ + span(): Span; + + /** + * Close the scope, and finish the span if the scope was created with `finishSpanOnClose` set to true. + */ + close(): void; } diff --git a/types/dd-trace/package.json b/types/dd-trace/package.json new file mode 100644 index 0000000000..90deb3c97b --- /dev/null +++ b/types/dd-trace/package.json @@ -0,0 +1,6 @@ +{ + "private": true, + "dependencies": { + "opentracing": ">=0.14.1" + } +} diff --git a/types/dd-trace/src/opentracing/reference.d.ts b/types/dd-trace/src/opentracing/reference.d.ts deleted file mode 100644 index 57def49166..0000000000 --- a/types/dd-trace/src/opentracing/reference.d.ts +++ /dev/null @@ -1,29 +0,0 @@ -import Span = require('./span'); -import SpanContext = require('./span_context'); - -declare class Reference { - /** - * @return The Reference type (e.g., REFERENCE_CHILD_OF or - * REFERENCE_FOLLOWS_FROM). - */ - type(): string; - - /** - * @return The SpanContext being referred to (e.g., the - * parent in a REFERENCE_CHILD_OF Reference). - */ - referencedContext(): SpanContext; - - /** - * Initialize a new Reference instance. - * - * @param type - the Reference type constant (e.g., - * REFERENCE_CHILD_OF or REFERENCE_FOLLOWS_FROM). - * @param referencedContext - the SpanContext being referred - * to. As a convenience, a Span instance may be passed in instead - * (in which case its .context() is used here). - */ - constructor(type: string, referencedContext: SpanContext | Span); -} - -export = Reference; \ No newline at end of file diff --git a/types/dd-trace/src/opentracing/span.d.ts b/types/dd-trace/src/opentracing/span.d.ts deleted file mode 100644 index e61a611efd..0000000000 --- a/types/dd-trace/src/opentracing/span.d.ts +++ /dev/null @@ -1,120 +0,0 @@ -import Tracer = require('./tracer'); -import SpanContext = require('./span_context'); - -declare class Span { - /** - * Returns the SpanContext object associated with this Span. - */ - context(): SpanContext; - - /** - * Returns the Tracer object used to create this Span. - */ - tracer(): Tracer; - - /** - * Sets the string name for the logical operation this span represents. - */ - setOperationName(name: string): this; - - /** - * Sets a key:value pair on this Span that also propagates to future - * children of the associated Span. - * - * setBaggageItem() enables powerful functionality given a full-stack - * opentracing integration (e.g., arbitrary application data from a web - * client can make it, transparently, all the way into the depths of a - * storage system), and with it some powerful costs: use this feature with - * care. - * - * IMPORTANT NOTE #1: setBaggageItem() will only propagate baggage items to - * *future* causal descendants of the associated Span. - * - * IMPORTANT NOTE #2: Use this thoughtfully and with care. Every key and - * value is copied into every local *and remote* child of the associated - * Span, and that can add up to a lot of network and cpu overhead. - */ - setBaggageItem(key: string, value: string): this; - - /** - * Returns the value for a baggage item given its key. - * - * @param key - * The key for the given trace attribute. - * @return String value for the given key, or undefined if the key does not - * correspond to a set trace attribute. - */ - getBaggageItem(key: string): string | undefined; - - /** - * Adds a single tag to the span. See `addTags()` for details. - */ - setTag(key: string, value: any): this; - - /** - * Adds the given key value pairs to the set of span tags. - * - * Multiple calls to addTags() results in the tags being the superset of - * all calls. - * - * The behavior of setting the same key multiple times on the same span - * is undefined. - * - * The supported type of the values is implementation-dependent. - * Implementations are expected to safely handle all types of values but - * may choose to ignore unrecognized / unhandle-able values (e.g. objects - * with cyclic references, function objects). - */ - addTags(keyValueMap: { - [key: string]: any; - }): this; - - /** - * Add a log record to this Span, optionally at a user-provided timestamp. - * - * For example: - * - * span.log({ - * size: rpc.size(), // numeric value - * URI: rpc.URI(), // string value - * payload: rpc.payload(), // Object value - * "keys can be arbitrary strings": rpc.foo(), - * }); - * - * span.log({ - * "error.description": someError.description(), - * }, someError.timestampMillis()); - * - * @param keyValuePairs - * An object mapping string keys to arbitrary value types. All - * Tracer implementations should support bool, string, and numeric - * value types, and some may also support Object values. - * @param timestamp - * An optional parameter specifying the timestamp in milliseconds - * since the Unix epoch. Fractional values are allowed so that - * timestamps with sub-millisecond accuracy can be represented. If - * not specified, the implementation is expected to use its notion - * of the current time of the call. - */ - - log(keyValuePairs: { - [key: string]: any; - }, timestamp?: number): this; - - /** - * Sets the end timestamp and finalizes Span state. - * - * With the exception of calls to Span.context() (which are always allowed), - * finish() must be the last call made to any span instance, and to do - * otherwise leads to undefined behavior. - * - * @param finishTime - * Optional finish time in milliseconds as a Unix timestamp. Decimal - * values are supported for timestamps with sub-millisecond accuracy. - * If not specified, the current time (as defined by the - * implementation) will be used. - */ - finish(finishTime?: number): void; -} - -export = Span; diff --git a/types/dd-trace/src/opentracing/span_context.d.ts b/types/dd-trace/src/opentracing/span_context.d.ts index 4e3b532649..d966771c2f 100644 --- a/types/dd-trace/src/opentracing/span_context.d.ts +++ b/types/dd-trace/src/opentracing/span_context.d.ts @@ -1,38 +1,28 @@ -/** - * SpanContext represents Span state that must propagate to descendant Spans - * and across process boundaries. - * - * SpanContext is logically divided into two pieces: the user-level "Baggage" - * (see setBaggageItem and getBaggageItem) that propagates across Span - * boundaries and any Tracer-implementation-specific fields that are needed to - * identify or otherwise contextualize the associated Span instance (e.g., a - * tuple). - */ -declare class SpanContext { +import { SpanContext } from 'opentracing'; + +declare class DatadogSpanContext extends SpanContext { /** - * Use to create references to parent spans. + * Used to create references to parent spans. + * See: https://github.com/DataDog/dd-trace-js/blob/master/src/opentracing/tracer.js#L99 */ constructor(props: SpanContextLike); +} - public traceId: number; +interface SpanContextLike { + traceId: number; - public spanId: number; + spanId: number; - public parentId?: number | null; + parentId?: number | null; - public sampled?: boolean; + sampled?: boolean; - public baggageItems?: { [key: string]: string }; + baggageItems?: { [key: string]: string }; - public trace?: { + trace?: { started: number[], finished: number[] } } -interface SpanContextLike { - traceId: number; - spanId: number; -} - -export = SpanContext; +export = DatadogSpanContext; diff --git a/types/dd-trace/src/opentracing/span_options.d.ts b/types/dd-trace/src/opentracing/span_options.d.ts deleted file mode 100644 index 054d9024d1..0000000000 --- a/types/dd-trace/src/opentracing/span_options.d.ts +++ /dev/null @@ -1,37 +0,0 @@ -import Span = require('./span'); -import Reference = require('./reference'); -import SpanContext = require('./span_context'); - -interface SpanOptions { - /** - * a parent SpanContext (or Span, for convenience) that the newly-started - * span will be the child of (per REFERENCE_CHILD_OF). If specified, - * `references` must be unspecified. - */ - childOf?: Span | SpanContext; - - /** - * an array of Reference instances, each pointing to a causal parent - * SpanContext. If specified, `fields.childOf` must be unspecified. - */ - references?: Reference[]; - - /** - * set of key-value pairs which will be set as tags on the newly created - * Span. Ownership of the object is passed to the created span for - * efficiency reasons (the caller should not modify this object after - * calling startSpan). - */ - tags?: { - [key: string]: any; - }; - - /** - * a manually specified start time for the created Span object. The time - * should be specified in milliseconds as Unix timestamp. Decimal value are - * supported to represent time values with sub-millisecond accuracy. - */ - startTime?: number; -} - -export = SpanOptions; diff --git a/types/dd-trace/src/opentracing/tracer.d.ts b/types/dd-trace/src/opentracing/tracer.d.ts deleted file mode 100644 index a40559dbcd..0000000000 --- a/types/dd-trace/src/opentracing/tracer.d.ts +++ /dev/null @@ -1,91 +0,0 @@ -import SpanOptions = require('./span_options'); -import Span = require('./span'); -import SpanContext = require('./span_context'); - -/** - * Tracer is the entry-point between the instrumentation API and the tracing - * implementation. - */ -declare class Tracer { - /** - * Starts and returns a new Span representing a logical unit of work. - * - * For example: - * - * // Start a new (parentless) root Span: - * var parent = Tracer.startSpan('DoWork'); - * - * // Start a new (child) Span: - * var child = Tracer.startSpan('load-from-db', { - * childOf: parent.context(), - * }); - * - * // Start a new async (FollowsFrom) Span: - * var child = Tracer.startSpan('async-cache-write', { - * references: [ - * opentracing.followsFrom(parent.context()) - * ], - * }); - * - * @param name - the name of the operation (REQUIRED). - * @param options - options for the newly created span. - * @return A new Span object. - */ - startSpan(name: string, options?: SpanOptions): Span; - - /** - * Injects the given SpanContext instance for cross-process propagation - * within `carrier`. The expected type of `carrier` depends on the value of - * `format. - * - * OpenTracing defines a common set of `format` values (see - * FORMAT_TEXT_MAP, FORMAT_HTTP_HEADERS, and FORMAT_BINARY), and each has - * an expected carrier type. - * - * Consider this pseudocode example: - * - * var clientSpan = ...; - * ... - * // Inject clientSpan into a text carrier. - * var headersCarrier = {}; - * Tracer.inject(clientSpan.context(), Tracer.FORMAT_HTTP_HEADERS, headersCarrier); - * // Incorporate the textCarrier into the outbound HTTP request header - * // map. - * Object.assign(outboundHTTPReq.headers, headersCarrier); - * // ... send the httpReq - * - * @param spanContext - the SpanContext to inject into the - * carrier object. As a convenience, a Span instance may be passed - * in instead (in which case its .context() is used for the - * inject()). - * @param format - the format of the carrier. - * @param carrier - see the documentation for the chosen `format` - * for a description of the carrier object. - */ - inject(spanContext: SpanContext | Span, format: string, carrier: any): void; - - /** - * Returns a SpanContext instance extracted from `carrier` in the given - * `format`. - * - * OpenTracing defines a common set of `format` values (see - * FORMAT_TEXT_MAP, FORMAT_HTTP_HEADERS, and FORMAT_BINARY), and each has - * an expected carrier type. - * - * Consider this pseudocode example: - * - * // Use the inbound HTTP request's headers as a text map carrier. - * var headersCarrier = inboundHTTPReq.headers; - * var wireCtx = Tracer.extract(Tracer.FORMAT_HTTP_HEADERS, headersCarrier); - * var serverSpan = Tracer.startSpan('...', { childOf : wireCtx }); - * - * @param format - the format of the carrier. - * @param carrier - the type of the carrier object is determined by - * the format. - * @return The extracted SpanContext, or null if no such SpanContext could - * be found in `carrier` - */ - extract(format: string, carrier: any): SpanContext | null; -} - -export = Tracer; diff --git a/types/delay/delay-tests.ts b/types/delay/delay-tests.ts deleted file mode 100644 index 9714bfd86d..0000000000 --- a/types/delay/delay-tests.ts +++ /dev/null @@ -1,47 +0,0 @@ -import delay = require('delay'); - -delay(200) - .then(() => { - }); - -let str: string; -let num: number; -Promise.resolve(delay(100)) - .then(() => { - }); - -Promise.resolve("foo") - .then(delay(100)) - .then(result => { - str = result; - }); - -Promise.resolve('foo') - .then(delay(100, 10)) - .then(result => { - num = result; - }); - -Promise.resolve('foo') - .then(delay.reject(100)) - .then(x => 10) - .catch(err => { - }); - -Promise.resolve('foo') - .then(delay.reject(100, 'bar')) - .then(x => 10) - .catch(err => { - }); - -(async () => { - const delaying = delay(1000); - delaying.cancel(); - try { - await delaying; - } catch (err) { - // `err` is an instance of `delay.CancelError` - } -})(); - -throw new delay.CancelError('bar'); diff --git a/types/delay/index.d.ts b/types/delay/index.d.ts deleted file mode 100644 index 0ec894f1e1..0000000000 --- a/types/delay/index.d.ts +++ /dev/null @@ -1,30 +0,0 @@ -// Type definitions for delay 2.0 -// Project: https://github.com/sindresorhus/delay#readme -// Definitions by: BendingBender -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.3 - -export = delay; - -declare function delay(ms: number): delay.PDelayedPassThroughThunk; -declare function delay(ms: number, value: T): delay.PDelayedThunk; - -declare namespace delay { - function reject(ms: number, rejectionValue?: any): PDelayedThunk; - - class CancelError extends Error { - readonly name: 'CancelError'; - constructor(message?: string); - } - - type PDelayedThunk = ((value: any) => DelayedPromiseLike) & DelayedPromiseLike; - - type PDelayedPassThroughThunk = ((value: TValue) => DelayedPromiseLike) & DelayedPromiseLike; - - interface DelayedPromiseLike { - then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | null, - onrejected?: ((reason: any) => TResult2 | PromiseLike) | null): Promise; - catch(onrejected?: ((reason: any) => TResult | PromiseLike) | null): Promise; - cancel(): void; - } -} diff --git a/types/deluge/deluge-tests.ts b/types/deluge/deluge-tests.ts new file mode 100644 index 0000000000..2ba8088915 --- /dev/null +++ b/types/deluge/deluge-tests.ts @@ -0,0 +1,23 @@ +import deluge = require("deluge"); +import * as http from 'http'; + +const delugeInstance: deluge.Deluge = deluge("deluge-webui-api-url", "password"); + +delugeInstance.getHosts((error: string, result: deluge.Host[], response: http.ServerResponse) => { +}); + +delugeInstance.connect("id", (error: string, result: boolean, response: http.ServerResponse) => { +}); + +delugeInstance.add("magnet_link", "path", (error: string, result: boolean, response: http.ServerResponse) => { +}); + +delugeInstance.getTorrentRecord((error: string, result: deluge.TorrentRecord, response: http.ServerResponse) => { +}); + +delugeInstance.isConnected((error: string, result: boolean, response: http.ServerResponse) => { +}); + +delugeInstance.setCookies({ "http://www.some-private-tracker.com/": "my_cookie1=xxx;my_cookie2=yyy;" }, + (error: string, result: boolean, response: http.ServerResponse) => { +}); diff --git a/types/deluge/index.d.ts b/types/deluge/index.d.ts new file mode 100644 index 0000000000..8ca69daedd --- /dev/null +++ b/types/deluge/index.d.ts @@ -0,0 +1,122 @@ +// Type definitions for deluge 1.7 +// Project: https://github.com/ginman86/deluge +// Definitions by: Felix Plymouth +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// + +import * as http from "http"; + +export = deluge; + +declare function deluge(deluge_url: string, password: string): deluge.Deluge; + +declare namespace deluge { + interface Host { + id: string; + ip: string; + port: number; + status: string; + } + + interface DelugeStats { + upload_protocol_rate: number; + max_upload: number; + download_protocol_rate: number; + download_rate: number; + has_incoming_connections: boolean; + num_connections: number; + max_download: number; + upload_rate: number; + dht_nodes: number; + free_space: number; + max_num_connections: number; + } + + interface Torrent { + max_download_speed: number; + upload_payload_rate: number; + download_payload_rate: number; + num_peers: number; + ratio: number; + total_peers: number; + state: string; + max_upload_speed: number; + eta: number; + save_path: string; + progress: number; + time_added: number; + tracker_host: string; + total_uploaded: number; + total_done: number; + total_wanted: number; + total_seeds: number; + seeds_peers_ratio: number; + num_seeds: number; + name: string; + is_auto_managed: boolean; + queue: number; + distributed_copies: number; + } + + interface TorrentRecord { + stats: DelugeStats; + connected: boolean; + torrents: { + [key: string]: Torrent; + }; + filters: { + state: Array<[string, number]>; + tracker_host: Array<[string, number]>; + }; + } + + interface DownloadOptions { + file_priorities: any[]; + add_paused: boolean; + compact_allocation: boolean; + download_location: string; + max_connections: number; + max_download_speed: number; + max_upload_slots: number; + max_upload_speed: number; + prioritize_first_last_pieces: boolean; + } + + interface Deluge { + /** + * Add the torrent to Deluge + * @param magnet + * @param dlPath + * @param callback + */ + add(magnet: string, dlPath: string | DownloadOptions, callback: (error: string, result: boolean, response: http.ServerResponse) => void): void; + /** + * Connect the WebUI to the wanted daemon + * @param hostID + * @param callback + */ + connect(hostID: string, callback: (error: string, result: boolean, response: http.ServerResponse) => void): void; + /** + * Get the list of all the hosts that the WebUI can connect to + * @param callback + */ + getHosts(callback: (error: string, result: Host[], response: http.ServerResponse) => void): void; + /** + * Get the list of all torrents and changing data that represents their status in the WebUI + * @param callback + */ + getTorrentRecord(callback: (error: string, result: TorrentRecord, response: http.ServerResponse) => void): void; + /** + * Check if the WebUI is connected to a deamon. Return true or false as result of the callback. + * @param callback + */ + isConnected(callback: (error: string, result: boolean, response: http.ServerResponse) => void): void; + /** + * Set cookies in COOKIE_JAR, cookies is an object with urls as keys, example: + * {'http://example.org/': 'uid=1234;pass=xxxx;'} + * @object cookies + */ + setCookies(cookies: { [key: string]: string }, callback: (error: string, result: boolean, response: http.ServerResponse) => void): void; + } +} diff --git a/types/deluge/tsconfig.json b/types/deluge/tsconfig.json new file mode 100644 index 0000000000..05deb4bcb2 --- /dev/null +++ b/types/deluge/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", + "deluge-tests.ts" + ] +} diff --git a/types/deluge/tslint.json b/types/deluge/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/deluge/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/detect-node/detect-node-tests.ts b/types/detect-node/detect-node-tests.ts new file mode 100644 index 0000000000..01a81a356b --- /dev/null +++ b/types/detect-node/detect-node-tests.ts @@ -0,0 +1,3 @@ +import isNode = require("detect-node"); + +isNode; diff --git a/types/detect-node/index.d.ts b/types/detect-node/index.d.ts new file mode 100644 index 0000000000..38fd280f1e --- /dev/null +++ b/types/detect-node/index.d.ts @@ -0,0 +1,8 @@ +// Type definitions for detect-node 2.0 +// Project: https://github.com/iliakan/detect-node +// Definitions by: Leonid Logvinov +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.4 + +declare const isNode: boolean; +export = isNode; diff --git a/types/detect-node/tsconfig.json b/types/detect-node/tsconfig.json new file mode 100644 index 0000000000..e853bcf92c --- /dev/null +++ b/types/detect-node/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", "detect-node-tests.ts"] +} diff --git a/types/detect-node/tslint.json b/types/detect-node/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/detect-node/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/di/di-tests.ts b/types/di/di-tests.ts new file mode 100644 index 0000000000..4cfd3de5e7 --- /dev/null +++ b/types/di/di-tests.ts @@ -0,0 +1,21 @@ +import * as di from "di"; + +const emptyInjector = new di.Injector(); +const moduleSpecifications = [{}]; +const fullInjector = new di.Injector(moduleSpecifications); +const childInjector = new di.Injector(moduleSpecifications, emptyInjector); + +const dep: {} = fullInjector.get('foo'); + +const factory = (context: {}, deps: Array<{}>) => { + return {}; +}; + +const invoked: {} = fullInjector.invoke(factory, {}); + +const oldTimeyClass = {prototype: {}}; + +const instance: {} = fullInjector.instantiate(oldTimeyClass); + +const anotherChildInjector: di.Injector = + fullInjector.createChild(moduleSpecifications); diff --git a/types/di/index.d.ts b/types/di/index.d.ts new file mode 100644 index 0000000000..ea1d596017 --- /dev/null +++ b/types/di/index.d.ts @@ -0,0 +1,15 @@ +// Type definitions for di 0.0 +// Project: https://github.com/vojtajina/node-di +// Definitions by: John J Barton +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.8 + +/// + +export class Injector { + get(dep: string): {}; + invoke(fn: (context: {}, deps: Array<{}>) => {}, context: {}): {}; + instantiate({prototype: {}}): {}; + createChild(modules: Array<{}>): Injector; + constructor(modules?: Array<{}>, parent?: Injector); +} diff --git a/types/di/tsconfig.json b/types/di/tsconfig.json new file mode 100644 index 0000000000..c7e591ab5a --- /dev/null +++ b/types/di/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", + "di-tests.ts" + ] +} diff --git a/types/di/tslint.json b/types/di/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/di/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/dialogflow/dialogflow-tests.ts b/types/dialogflow/dialogflow-tests.ts new file mode 100644 index 0000000000..42d905839e --- /dev/null +++ b/types/dialogflow/dialogflow-tests.ts @@ -0,0 +1,10 @@ +import * as dialogflow from "dialogflow"; + +const agentsClient = new dialogflow.AgentsClient(); +const contextsClient = new dialogflow.ContextsClient(); +const entityTypesClient = new dialogflow.EntityTypesClient(); +const intentsClient = new dialogflow.IntentsClient(); +const sessionEntityTypesClient = new dialogflow.SessionEntityTypesClient(); +const sessionsClient = new dialogflow.SessionsClient(); + +// TODO: Add real significant tests diff --git a/types/dialogflow/index.d.ts b/types/dialogflow/index.d.ts new file mode 100644 index 0000000000..c421c47f68 --- /dev/null +++ b/types/dialogflow/index.d.ts @@ -0,0 +1,933 @@ +// Type definitions for dialogflow 0.6 +// Project: https://github.com/dialogflow/dialogflow-nodejs-client-v2#readme +// Definitions by: Daniel Dyla +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.4 + +export namespace v2 { + class AgentsClient { + constructor(options?: ClientOptions); + + servicePath: string; + port: number; + scopes: string[]; + + getProjectId(): Promise; + getProjectId(callback?: (error: Error, id: string) => string): void; + + getAgent( + request: GetAgentRequest, + options?: gax.CallOptions, + cb?: (err: Error, agent: Agent) => void + ): Promise<[Agent]>; + searchAgents( + request: SearchAgentRequest, + options?: gax.CallOptions, + cb?: ( + err: Error, + agents: Agent[], + arg3: any, + response: any + ) => void + ): Promise; + searchAgentsStream( + request: SearchAgentRequest, + options?: gax.CallOptions + ): any; + trainAgent( + request: TrainAgentRequest, + options?: gax.CallOptions, + cb?: (err: Error, operation: gax.Operation) => void + ): Promise<[gax.Operation]>; + exportAgent( + request: ExportAgentRequest, + options?: gax.CallOptions, + cb?: (err: Error, operation: gax.Operation) => void + ): Promise<[gax.Operation]>; + importAgent( + request: ImportAgentRequest, + options?: gax.CallOptions, + cb?: (err: Error, operation: gax.Operation) => void + ): Promise<[gax.Operation]>; + restoreAgent( + request: RestoreAgentRequest, + options?: gax.CallOptions, + cb?: (err: Error, operation: gax.Operation) => void + ): Promise<[gax.Operation]>; + } + + class ContextsClient { + constructor(options?: ClientOptions); + + servicePath: string; + port: number; + scopes: string[]; + + getProjectId(): Promise; + getProjectId(callback?: (error: Error, id: string) => string): void; + + listContexts( + request: ListContextsRequest, + options?: gax.CallOptions + ): Promise<[Context[]]>; + listContextsStream( + request: ListContextsRequest, + options?: gax.CallOptions + ): any; + getContext( + request: GetContextRequest, + options?: gax.CallOptions + ): Promise<[Context]>; + createContext( + request: CreateContextReqeust, + options?: gax.CallOptions + ): Promise<[Context]>; + updateContext( + request: UpdateContextRequest, + options?: gax.CallOptions + ): Promise<[Context]>; + deleteContext( + request: DeleteContextRequest, + options?: gax.CallOptions + ): Promise; + deleteAllContexts( + request: DeleteAllContextsRequest, + options?: gax.CallOptions + ): Promise; + + sessionPath(project: string, session: string): string; + contextPath(project: string, session: string, context: string): string; + + matchProjectFromContextName(name: string): string; + matchSessionFromContextName(name: string): string; + matchContextFromContextName(name: string): string; + + matchProjectFromSessionName(name: string): string; + matchSessionFromSessionName(name: string): string; + } + + class EntityTypesClient { + constructor(options?: ClientOptions); + + servicePath: string; + port: number; + scopes: string[]; + + getProjectId(): Promise; + getProjectId(callback?: (error: Error, id: string) => string): void; + + listEntityTypes( + request: ListEntityTypesRequest, + options?: gax.CallOptions + ): Promise<[EntityType[]]>; + + listEntityTypesStream( + request: ListEntityTypesRequest, + options?: gax.CallOptions + ): any; + + getEntityType( + request: GetEntityTypeRequest, + options?: gax.CallOptions + ): Promise<[EntityType]>; + createEntityType( + request: CreateEntityTypeRequest, + options?: gax.CallOptions + ): Promise<[EntityType]>; + updateEntityType( + request: UpdateEntityTypeRequest, + options?: gax.CallOptions + ): Promise<[EntityType]>; + deleteEntityType( + request: DeleteEntityTypeRequest, + options?: gax.CallOptions + ): Promise; + + // TODO: add batch style calls + // batchUpdateEntityTypes + // batchDeleteEntityTypes + // batchCreateEntities + // batchUpdateEntities + // batchDeleteEntities + + projectAgentPath(project: string): string; + entityTypePath(project: string, entityType: string): string; + matchProjectFromProjectAgentName(entityTypeName: string): string; + matchProjectFromEntityTypeName(entityTypeName: string): string; + matchEntityTypeFromEntityTypeName(entityTypeName: string): string; + } + + class IntentsClient { + constructor(options?: ClientOptions); + + servicePath: string; + port: number; + scopes: string[]; + + getProjectId(): Promise; + getProjectId(callback?: (error: Error, id: string) => string): void; + + listIntents( + request: ListIntentsRequest, + options?: gax.CallOptions + ): Promise<[Intent[]]>; + getIntent( + request: GetIntentRequest, + options?: gax.CallOptions + ): Promise<[Intent]>; + createIntent( + request: CreateIntentRequest, + options?: gax.CallOptions + ): Promise<[Intent]>; + updateIntent( + request: UpdateIntentRequest, + options?: gax.CallOptions + ): Promise<[Intent]>; + deleteIntent( + request: DeleteIntentRequest, + options?: gax.CallOptions + ): Promise; + + // TODO: add batch style calls + // batchUpdateIntents(request: BatchUpdateIntentsRequest): void; + // batchDeleteIntents(request: BatchDeleteIntentsRequest): void; + + projectAgentPath(project: string): string; + intentPath(project: string, intent: string): string; + agentPath(project: string, agent: string): string; + + matchProjectFromProjectAgentName(projectAgentName: string): string; + matchProjectFromIntentName(intentName: string): string; + matchIntentFromIntentName(intentName: string): string; + matchProjectFromAgentName(agentName: string): string; + matchAgentFromAgentName(agentName: string): string; + } + + class SessionEntityTypesClient { + constructor(options?: ClientOptions); + + servicePath: string; + port: number; + scopes: string[]; + + getProjectId(): Promise; + getProjectId(callback?: (error: Error, id: string) => string): void; + + // TODO: add Session Entity Types service methods + } + + class SessionsClient { + constructor(options?: ClientOptions); + + servicePath: string; + port: number; + scopes: string[]; + + getProjectId(): Promise; + getProjectId(callback?: (error: Error, id: string) => string): void; + + detectIntent( + request: DetectIntentRequest, + options?: gax.CallOptions + ): Promise; + streamingDetectIntent(options?: gax.CallOptions): Promise; + + sessionPath(projectId: string, sessionId: string): string; + } +} + +export namespace v2beta1 { + class AgentsClient extends v2.AgentsClient {} + class ContextsClient extends v2.ContextsClient { + environmentSessionPath( + project: string, + environment: string, + user: string, + session: string + ): string; + + environmentContextPath( + project: string, + environment: string, + user: string, + session: string, + context: string + ): string; + + matchProjectFromEnvironmentSessionName( + environmentSessionName: string + ): string; + matchEnvironmentFromEnvironmentSessionName( + environmentSessionName: string + ): string; + matchUserFromEnvironmentSessionName( + environmentSessionName: string + ): string; + matchSessionFromEnvironmentSessionName( + environmentSessionName: string + ): string; + + matchProjectFromEnvironmentContextName( + environmentContextName: string + ): string; + matchEnvironmentFromEnvironmentContextName( + environmentContextName: string + ): string; + matchUserFromEnvironmentContextName( + environmentContextName: string + ): string; + matchSessionFromEnvironmentContextName( + environmentContextName: string + ): string; + matchContextFromEnvironmentContextName( + environmentContextName: string + ): string; + } + class EntityTypesClient extends v2.EntityTypesClient {} + class IntentsClient extends v2.IntentsClient {} + class SessionEntityTypesClient extends v2.SessionEntityTypesClient {} + class SessionsClient extends v2.SessionsClient { + environmentSessionPath( + project: string, + environment: string, + user: string, + session: string + ): string; + + matchProjectFromEnvironmentSessionName( + environmentSessionName: string + ): string; + matchEnvironmentFromEnvironmentSessionName( + environmentSessionName: string + ): string; + matchUserFromEnvironmentSessionName( + environmentSessionName: string + ): string; + matchSessionFromEnvironmentSessionName( + environmentSessionName: string + ): string; + } +} + +export class AgentsClient extends v2.AgentsClient {} +export class ContextsClient extends v2.ContextsClient {} +export class EntityTypesClient extends v2.EntityTypesClient {} +export class IntentsClient extends v2.IntentsClient {} +export class SessionEntityTypesClient extends v2.SessionEntityTypesClient {} +export class SessionsClient extends v2.SessionsClient {} + +export namespace entities { + namespace DateTimeVariants { + interface DateTime { + date_time: string; + } + + interface DateTimePeriod { + startDateTime: DateTime; + endDateTime: DateTime; + } + + interface DatePeriod { + startDate: Date; + endDate: Date; + } + interface TimePeriod { + startTime: string; + endTime: string; + } + } + + type DateTime = + | string + | DateTimeVariants.DatePeriod + | DateTimeVariants.TimePeriod + | DateTimeVariants.DateTime + | DateTimeVariants.DateTimePeriod; + + interface Duration { + unit: string; + amount: number; + } + + type Date = string; + + type Time = string; +} + +export namespace gax { + interface BackoffSettings { + initialRetryDelayMillis: number; + retryDelayMultiplier: number; + maxRetryDelayMillis: number; + initialRpcTimeoutMillis: number; + maxRpcTimeoutMillis: number; + totalTimeoutMillis: number; + } + + interface RetryOptions { + retryCodes: string[]; + backoffSettings: BackoffSettings; + } + + interface CallOptions { + timeout?: number; + retry?: RetryOptions; + autoPaginate?: boolean; + pageToken?: any; + isBundling?: boolean; + longrunning?: BackoffSettings; + promise?: PromiseConstructor; + } + + interface Operation { + grpcOp: longrunning.Operation; + longrunningDescriptor: any; + backoffSettings: BackoffSettings; + callOptions?: CallOptions; + } +} + +export namespace longrunning { + type Operation = + | UnfinishedOperation + | FailedOperation + | SuccessfulOperation; + + interface BaseOperation { + name: string; + metadata: any; + done: boolean; + } + + interface UnfinishedOperation extends BaseOperation { + done: false; + } + + interface FailedOperation extends BaseOperation { + done: true; + error: Status; + } + + interface SuccessfulOperation extends BaseOperation { + done: true; + response: any; + } + + interface Status { + code: number; + message: string; + details: any[]; + } +} + +export interface GetAgentRequest { + parent: string; +} + +export interface SearchAgentRequest { + parent: string; + pageSize?: number; +} + +export interface TrainAgentRequest { + parent: string; +} + +export interface ExportAgentRequest { + parent: string; + agentUri?: string; +} + +export interface ImportAgentRequest { + parent: string; + agentUri?: string; + agentContent?: string; +} + +export interface RestoreAgentRequest { + parent: string; + agentUri?: string; + agentContent?: string; +} + +export interface ListContextsRequest { + parent: string; + pageSize?: number; +} + +export interface GetContextRequest { + name: string; +} + +export interface CreateContextReqeust { + parent: string; + context: Context; +} + +export interface UpdateContextRequest { + context: Context; + updatemask?: any; +} + +export interface DeleteContextRequest { + name: string; +} + +export interface DeleteAllContextsRequest { + parent: string; +} + +export interface ListEntityTypesRequest { + parent: string; + languageCode?: string; + pageSize?: number; +} + +export interface GetEntityTypeRequest { + name: string; + languageCode?: string; +} + +export interface CreateEntityTypeRequest { + parent: string; + entityType: EntityType; +} + +export interface UpdateEntityTypeRequest { + entityType: EntityType; + languageCode?: string; + /** @link https://github.com/google/protobuf/blob/master/src/google/protobuf/field_mask.proto */ + updateMask?: any; +} + +export interface DeleteEntityTypeRequest { + name: string; +} + +export interface ListIntentsRequest { + parent: string; + languageCode?: string; + intentView?: IntentView; + pageSize?: number; +} + +export interface GetIntentRequest { + name: string; + languageCode?: string; + intentView?: IntentView; +} + +export interface CreateIntentRequest { + parent: string; + intent: Intent; + languageCode?: string; + intentView?: IntentView; +} + +export interface UpdateIntentRequest { + intent: Intent; + languageCode?: string; + updateMask?: any; + intentView?: IntentView; +} + +export interface DeleteIntentRequest { + name: string; +} + +export interface DetectIntentRequest { + session: string; + queryInput: QueryInput; + queryParams?: QueryParams; + inputAudio?: any; +} + +export interface DetectIntentResponse { + responseId: string; + queryResult: QueryResult; + webhookStatus: Status; +} + +export interface QueryResult { + queryText: string; + languageCode: string; + speechRecognitionConfidence: number; + action: string; + parameters: any; + allRequiredParamsSent: boolean; + fulfillmentText: string; + fulfillmentMessages: Message[]; + webhookSource: string; + webhookPayload: any; + outputContexts: Context[]; + intent: Intent; + intentDetectionConfidence: number; + sentimentAnalysisResult?: { + queryTextSentiment: { + magnitude: number; + score: number; + }; + }; + diagnosticInfo: any; +} + +export interface Status { + code: StatusCode; + message: string; + details: any[]; +} + +export enum StatusCode { + // Not an error; returned on success + // + // HTTP Mapping: 200 OK + OK = 0, + + // The operation was cancelled, typically by the caller. + // + // HTTP Mapping: 499 Client Closed Request + CANCELLED = 1, + + // Unknown error. For example, this error may be returned when + // a `Status` value received from another address space belongs to + // an error space that is not known in this address space. Also + // errors raised by APIs that do not return enough error information + // may be converted to this error. + // + // HTTP Mapping: 500 Internal Server Error + UNKNOWN = 2, + + // The client specified an invalid argument. Note that this differs + // from `FAILED_PRECONDITION`. `INVALID_ARGUMENT` indicates arguments + // that are problematic regardless of the state of the system + // (e.g., a malformed file name). + // + // HTTP Mapping: 400 Bad Request + INVALID_ARGUMENT = 3, + + // The deadline expired before the operation could complete. For operations + // that change the state of the system, this error may be returned + // even if the operation has completed successfully. For example, a + // successful response from a server could have been delayed long + // enough for the deadline to expire. + // + // HTTP Mapping: 504 Gateway Timeout + DEADLINE_EXCEEDED = 4, + + // Some requested entity (e.g., file or directory) was not found. + // + // Note to server developers: if a request is denied for an entire class + // of users, such as gradual feature rollout or undocumented whitelist, + // `NOT_FOUND` may be used. If a request is denied for some users within + // a class of users, such as user-based access control, `PERMISSION_DENIED` + // must be used. + // + // HTTP Mapping: 404 Not Found + NOT_FOUND = 5, + + // The entity that a client attempted to create (e.g., file or directory) + // already exists. + // + // HTTP Mapping: 409 Conflict + ALREADY_EXISTS = 6, + + // The caller does not have permission to execute the specified + // operation. `PERMISSION_DENIED` must not be used for rejections + // caused by exhausting some resource (use `RESOURCE_EXHAUSTED` + // instead for those errors). `PERMISSION_DENIED` must not be + // used if the caller can not be identified (use `UNAUTHENTICATED` + // instead for those errors). This error code does not imply the + // request is valid or the requested entity exists or satisfies + // other pre-conditions. + // + // HTTP Mapping: 403 Forbidden + PERMISSION_DENIED = 7, + + // The request does not have valid authentication credentials for the + // operation. + // + // HTTP Mapping: 401 Unauthorized + UNAUTHENTICATED = 16, + + // Some resource has been exhausted, perhaps a per-user quota, or + // perhaps the entire file system is out of space. + // + // HTTP Mapping: 429 Too Many Requests + RESOURCE_EXHAUSTED = 8, + + // The operation was rejected because the system is not in a state + // required for the operation's execution. For example, the directory + // to be deleted is non-empty, an rmdir operation is applied to + // a non-directory, etc. + // + // Service implementors can use the following guidelines to decide + // between `FAILED_PRECONDITION`, `ABORTED`, and `UNAVAILABLE`: + // (a) Use `UNAVAILABLE` if the client can retry just the failing call. + // (b) Use `ABORTED` if the client should retry at a higher level + // (e.g., when a client-specified test-and-set fails, indicating the + // client should restart a read-modify-write sequence). + // (c) Use `FAILED_PRECONDITION` if the client should not retry until + // the system state has been explicitly fixed. E.g., if an "rmdir" + // fails because the directory is non-empty, `FAILED_PRECONDITION` + // should be returned since the client should not retry unless + // the files are deleted from the directory. + // + // HTTP Mapping: 400 Bad Request + FAILED_PRECONDITION = 9, + + // The operation was aborted, typically due to a concurrency issue such as + // a sequencer check failure or transaction abort. + // + // See the guidelines above for deciding between `FAILED_PRECONDITION`, + // `ABORTED`, and `UNAVAILABLE`. + // + // HTTP Mapping: 409 Conflict + ABORTED = 10, + + // The operation was attempted past the valid range. E.g., seeking or + // reading past end-of-file. + // + // Unlike `INVALID_ARGUMENT`, this error indicates a problem that may + // be fixed if the system state changes. For example, a 32-bit file + // system will generate `INVALID_ARGUMENT` if asked to read at an + // offset that is not in the range [0,2^32-1], but it will generate + // `OUT_OF_RANGE` if asked to read from an offset past the current + // file size. + // + // There is a fair bit of overlap between `FAILED_PRECONDITION` and + // `OUT_OF_RANGE`. We recommend using `OUT_OF_RANGE` (the more specific + // error) when it applies so that callers who are iterating through + // a space can easily look for an `OUT_OF_RANGE` error to detect when + // they are done. + // + // HTTP Mapping: 400 Bad Request + OUT_OF_RANGE = 11, + + // The operation is not implemented or is not supported/enabled in this + // service. + // + // HTTP Mapping: 501 Not Implemented + UNIMPLEMENTED = 12, + + // Internal errors. This means that some invariants expected by the + // underlying system have been broken. This error code is reserved + // for serious errors. + // + // HTTP Mapping: 500 Internal Server Error + INTERNAL = 13, + + // The service is currently unavailable. This is most likely a + // transient condition, which can be corrected by retrying with + // a backoff. + // + // See the guidelines above for deciding between `FAILED_PRECONDITION`, + // `ABORTED`, and `UNAVAILABLE`. + // + // HTTP Mapping: 503 Service Unavailable + UNAVAILABLE = 14, + + // Unrecoverable data loss or corruption. + // + // HTTP Mapping: 500 Internal Server Error + DATA_LOSS = 15 +} + +export interface Agent { + parent: string; + displayName: string; + defaultLanguageCode: string; + supportedLanguageCodes?: string[]; + timeZone: string; + description?: string; + avatarUri?: string; + enableLogging?: boolean; + matchMode?: MatchMode; + classificationThreshold?: number; +} + +export interface Context { + name: string; + lifespanCount?: number; + parameters?: any; +} + +export interface EntityType { + name: string; + entities: EntitySynonyms[]; + displayName: string; + kind: EntityKind; + autoExpansionMode: EntityAutoExpansionMode; +} + +export enum MatchMode { + MATCH_MODE_UNSPECIFIED = "MATCH_MODE_UNSPECIFIED", + MATCH_MODE_HYBRID = "MATCH_MODE_HYBRID", + MATCH_MODE_ML_ONLY = "MATCH_MODE_ML_ONLY" +} + +export interface Credentials { + client_email: string; + private_key: string; +} + +export interface ClientOptions { + credentials?: Credentials; + email?: string; + keyFilename?: string; + port?: number; + projectId?: string; + promise?: PromiseConstructor; + servicePath?: string; +} + +export interface EntitySynonyms { + synonyms: string[]; + value: string; +} + +export enum EntityKind { + KIND_MAP = "KIND_MAP", + KIND_LIST = "KIND_LIST" +} + +export enum EntityAutoExpansionMode { + AUTO_EXPANSION_MODE_DEFAULT = "AUTO_EXPANSION_MODE_DEFAULT", + AUTO_EXPANSION_MODE_UNSPECIFIED = "AUTO_EXPANSION_MODE_UNSPECIFIED" +} + +export enum IntentView { + INTENT_VIEW_UNSPECIFIED = "INTENT_VIEW_UNSPECIFIED", + INTENT_VIEW_FULL = "INTENT_VIEW_FULL" +} + +export interface Intent { + name: string; + displayName: string; + webhookState: string; + priority?: number; + isFallback?: boolean; + mlEnabled?: boolean; + inputContextNames?: string[]; + events?: string[]; + trainingPhrases?: TrainingPhrase[]; + action?: string; + outputContexts?: Context[]; + resetContexts?: boolean; + parameters?: Parameter[]; + messages?: Message[]; + defaultResponsePlatforms?: string[]; + rootFollowupIntentName: string; + parentFollowupIntentName: string; + followupIntentInfo?: FollowupIntentInfo[]; +} + +export interface TrainingPhrase { + name: string; + type: string; + parts: Part[]; + timesAddedCount?: number; +} + +export interface Part { + text: string; + entityType?: string; + alias?: string; + userDefined?: boolean; +} + +export interface Parameter { + name: string; + displayName: string; + value?: string; + defaultValue?: string; + entityTypeDisplayName?: string; + mandatory?: boolean; + prompts?: string[]; + isList?: boolean; +} + +export interface FollowupIntentInfo { + followupIntentName: string; + parentFollowupIntentName: string; +} + +export interface Message { + platform?: string; + text?: Text; + card?: Card; + payload?: any; +} + +export interface Text { + text: string[]; +} + +export interface Card { + title?: string; + subtitle?: string; + imageUri?: string; + buttons?: Button[]; +} + +export interface Button { + text?: string; + postback?: string; +} + +export interface EventInput { + name: string; + languageCode: string; + parameters?: any; +} + +export interface TextInput { + text: string; + languageCode: string; +} + +export interface QueryInput { + text?: TextInput; + event?: EventInput; +} + +export interface QueryParams { + timeZone?: string; + geoLocation?: LatLong; + contexts?: Context[]; + resetContexts?: boolean; + sessionEntityTypes?: SessionEntityType[]; + payload?: any; +} + +export interface LatLong { + latitude: number; + longitude: number; +} + +export interface SessionEntityType { + name: string; + entityOverrideMode: string; + entities: Entity[]; +} + +export interface Entity { + value: string; + synonyms: string[]; +} + +export interface WebhookRequest { + session: string; + responseId: string; + + queryResult: QueryResult; + originalDetectIntentRequest?: any; +} + +export interface WebhookResponse { + fulfillmentText?: string; + fulfillmentMessages?: Message[]; + source?: string; + payload?: any; + outputContexts?: Context[]; + followupEventInput?: EventInput; +} diff --git a/types/dialogflow/tsconfig.json b/types/dialogflow/tsconfig.json new file mode 100644 index 0000000000..366cf28866 --- /dev/null +++ b/types/dialogflow/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", + "dialogflow-tests.ts" + ] +} diff --git a/types/dialogflow/tslint.json b/types/dialogflow/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/dialogflow/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/dnssd/dnssd-tests.ts b/types/dnssd/dnssd-tests.ts index 14b637d384..0fa7498bb2 100644 --- a/types/dnssd/dnssd-tests.ts +++ b/types/dnssd/dnssd-tests.ts @@ -1,6 +1,6 @@ import * as dnssd from 'dnssd'; -const serviceType = new dnssd.ServiceType(dnssd.tcp('_mqtt'), dnssd.udp('_mqtt')); +const serviceType = dnssd.ServiceType.tcp('_mqtt', '_mqtt._udp'); const advertisement = new dnssd.Advertisement(serviceType, 1883, { name: 'broker' }); const browser: dnssd.Browser = new dnssd.Browser(serviceType); diff --git a/types/dnssd/index.d.ts b/types/dnssd/index.d.ts index 9c66a6d6a4..8ef8aa84fd 100644 --- a/types/dnssd/index.d.ts +++ b/types/dnssd/index.d.ts @@ -1,30 +1,40 @@ -// Type definitions for dnssd 0.3 +// Type definitions for dnssd 0.4 // Project: https://github.com/DeMille/dnssd.js#readme // Definitions by: Angel Merino +// Max Rumpf // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.2 /// import { EventEmitter } from 'events'; /** Declaration file generated by dts-gen */ -export class Advertisement { - constructor(type: any, port: any, ...args: any[]); +export class Advertisement extends EventEmitter { + constructor(type: string | string[] | ServiceType, port: number, ...args: any[]); - start(): any; + start(): Advertisement; - stop(forceImmediate: any, callback: any): void; + stop(forceImmediate?: boolean, callback?: () => any): void; updateTXT(txtObj: any): void; } +export class Options { + name?: string; + host?: string; + txt?: any; + subtypes?: string[]; + interface?: string; +} + /** * A service entry as returned by serviceUp */ export class Service { fullname: string; // 'InstanceName._googlecast._tcp.local.' name: string; // 'InstanceName' - type: SType; // { name: 'googlecast'; protocol: 'tcp' } + type: ServiceType; // { name: 'googlecast'; protocol: 'tcp' } domain: string; // 'local' host: string; // 'Hostname.local.' port: number; // 8009 @@ -33,47 +43,47 @@ export class Service { txtRaw: any; } -export class SType { +export class ServiceType { + constructor(...args: Array) + constructor(args: ServiceType); + name: string; protocol: string; + subtypes: string[]; + + toString(): string; + + static all(): ServiceType; + + static tcp(...args: string[]): ServiceType; + + static udp(...args: string[]): ServiceType; } export class Browser extends EventEmitter { - constructor(type: any, ...args: any[]); + constructor(type: string | string[] | ServiceType, ...args: any[]); - list(): any; + start(): Browser; - start(): any; + stop(): void; - stop(): any; + list(): any[]; } -export class ServiceType { - constructor(...args: any[]); +export function resolve(name: string, type: string, args: object): Promise; - toString(): any; +export function resolve4(name: string, type: string, args: object): Promise; - static all(): any; +export function resolve6(name: string, type: string, args: object): Promise; - static tcp(...args: any[]): any; +export function resolveSRV(name: string, args: object): Promise; - static udp(...args: any[]): any; -} +export function resolveTXT(name: string, args: object): Promise; -export const resolveA: any; +export function resolveService(name: string, args: object): Promise; -export const resolveAAAA: any; +export function tcp(...args: string[]): ServiceType; -export function all(): any; +export function udp(...args: string[]): ServiceType; -export function resolve(name: any, type: any, ...args: any[]): any; - -export function resolveSRV(name: any, opts: any): any; - -export function resolveService(name: any, ...args: any[]): any; - -export function resolveTXT(name: any, opts: any): any; - -export function tcp(...args: any[]): any; - -export function udp(...args: any[]): any; +export function all(): ServiceType; diff --git a/types/dockerode/index.d.ts b/types/dockerode/index.d.ts index 188643dc28..5c1c1bfae6 100644 --- a/types/dockerode/index.d.ts +++ b/types/dockerode/index.d.ts @@ -962,11 +962,11 @@ declare class Dockerode { pull(repoTag: string, options: {}, callback: Callback, auth?: {}): Dockerode.Image; pull(repoTag: string, options: {}, auth?: {}): Promise; - run(image: string, cmd: string[], outputStream: NodeJS.WritableStream, createOptions: {}, startOptions: {}, callback: Callback): events.EventEmitter; - run(image: string, cmd: string[], outputStream: NodeJS.WritableStream, startOptions: {}, callback: Callback): events.EventEmitter; - run(image: string, cmd: string[], outputStream: NodeJS.WritableStream, callback: Callback): events.EventEmitter; - run(image: string, cmd: string[], outputStream: NodeJS.WritableStream, createOptions: {}, callback: Callback): events.EventEmitter; - run(image: string, cmd: string[], outputStream: NodeJS.WritableStream, createOptions?: {}, startOptions?: {}): Promise; + run(image: string, cmd: string[], outputStream: NodeJS.WritableStream | NodeJS.WritableStream[], createOptions: {}, startOptions: {}, callback: Callback): events.EventEmitter; + run(image: string, cmd: string[], outputStream: NodeJS.WritableStream | NodeJS.WritableStream[], startOptions: {}, callback: Callback): events.EventEmitter; + run(image: string, cmd: string[], outputStream: NodeJS.WritableStream | NodeJS.WritableStream[], callback: Callback): events.EventEmitter; + run(image: string, cmd: string[], outputStream: NodeJS.WritableStream | NodeJS.WritableStream[], createOptions: {}, callback: Callback): events.EventEmitter; + run(image: string, cmd: string[], outputStream: NodeJS.WritableStream | NodeJS.WritableStream[], createOptions?: {}, startOptions?: {}): Promise; swarmInit(options: {}, callback: Callback): void; swarmInit(options: {}): Promise; diff --git a/types/document-ready/document-ready-tests.ts b/types/document-ready/document-ready-tests.ts new file mode 100644 index 0000000000..17c522f1a3 --- /dev/null +++ b/types/document-ready/document-ready-tests.ts @@ -0,0 +1,4 @@ +import ready = require("document-ready"); +ready(() => { + // on load +}); diff --git a/types/document-ready/index.d.ts b/types/document-ready/index.d.ts new file mode 100644 index 0000000000..6d8c6d7499 --- /dev/null +++ b/types/document-ready/index.d.ts @@ -0,0 +1,7 @@ +// Type definitions for document-ready 2.0 +// Project: https://github.com/bendrucker/document-ready#readme +// Definitions by: Jack Works +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare function ready(callback: () => void): void; +export = ready; diff --git a/types/document-ready/tsconfig.json b/types/document-ready/tsconfig.json new file mode 100644 index 0000000000..15ce7ad650 --- /dev/null +++ b/types/document-ready/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "strictFunctionTypes": true, + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "document-ready-tests.ts" + ] +} diff --git a/types/document-ready/tslint.json b/types/document-ready/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/document-ready/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/documentdb/index.d.ts b/types/documentdb/index.d.ts index e7962ba568..118881a378 100644 --- a/types/documentdb/index.d.ts +++ b/types/documentdb/index.d.ts @@ -802,7 +802,7 @@ export class DocumentClient { * @param [options] - Represents the feed options. * @returns - An instance of queryIterator to handle reading feed. */ - queryDocuments(collectionLink: string, query: DocumentQuery, options?: FeedOptions): QueryIterator; + queryDocuments(collectionLink: string, query: DocumentQuery, options?: FeedOptions): QueryIterator; /** * Query the triggers for the collection. diff --git a/types/dom-clipboard-api/dom-clipboard-api-tests.ts b/types/dom-clipboard-api/dom-clipboard-api-tests.ts new file mode 100644 index 0000000000..9b0731d8f4 --- /dev/null +++ b/types/dom-clipboard-api/dom-clipboard-api-tests.ts @@ -0,0 +1,16 @@ +const clipboard = navigator.clipboard; + +let text: string; + +clipboard.writeText('foo'); +clipboard.readText().then((val) => { + text = val; +}); + +const transfer = new DataTransfer(); +transfer.setData('text/plain', 'foo'); + +clipboard.write(transfer); +clipboard.read().then((tf) => { + text = tf.getData('text/plain'); +}); diff --git a/types/dom-clipboard-api/index.d.ts b/types/dom-clipboard-api/index.d.ts new file mode 100644 index 0000000000..1af5f2c60a --- /dev/null +++ b/types/dom-clipboard-api/index.d.ts @@ -0,0 +1,15 @@ +// Type definitions for w3c Clipboard API 1.0 +// Project: https://w3c.github.io/clipboard-apis/ +// Definitions by: James Garbutt +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +interface Clipboard extends EventTarget { + read(): Promise; + readText(): Promise; + write(data: DataTransfer): Promise; + writeText(data: string): Promise; +} + +interface Navigator { + readonly clipboard: Clipboard; +} diff --git a/types/dom-clipboard-api/tsconfig.json b/types/dom-clipboard-api/tsconfig.json new file mode 100644 index 0000000000..230c5f16f6 --- /dev/null +++ b/types/dom-clipboard-api/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "dom-clipboard-api-tests.ts" + ] +} diff --git a/types/react-dnd-html5-backend/tslint.json b/types/dom-clipboard-api/tslint.json similarity index 56% rename from types/react-dnd-html5-backend/tslint.json rename to types/dom-clipboard-api/tslint.json index bf6102640b..495d29983d 100644 --- a/types/react-dnd-html5-backend/tslint.json +++ b/types/dom-clipboard-api/tslint.json @@ -1,7 +1,5 @@ { "extends": "dtslint/dt.json", "rules": { - // TODO - "no-namespace": false } } diff --git a/types/dom4/index.d.ts b/types/dom4/index.d.ts index 90c9c29966..47a7080a0c 100644 --- a/types/dom4/index.d.ts +++ b/types/dom4/index.d.ts @@ -60,11 +60,11 @@ interface Element extends ParentNode { matches(selectors: string): boolean; } -interface Elements extends ElementTraversal, ParentNode, Array { +interface Elements extends ParentNode, Array { } -interface Document extends ElementTraversal, ParentNode { +interface Document extends ParentNode { } -interface DocumentFragment extends ElementTraversal, ParentNode { +interface DocumentFragment extends ParentNode { } diff --git a/types/domready/domready-tests.ts b/types/domready/domready-tests.ts index 01be4213f4..6c5e126bf3 100644 --- a/types/domready/domready-tests.ts +++ b/types/domready/domready-tests.ts @@ -1,5 +1,5 @@ import domready = require("domready"); -domready(function () { +domready(() => { // dom is loaded! -}) \ No newline at end of file +}); diff --git a/types/domready/index.d.ts b/types/domready/index.d.ts index 9548757894..6f9ea3a0a7 100644 --- a/types/domready/index.d.ts +++ b/types/domready/index.d.ts @@ -1,9 +1,9 @@ -// Type definitions for domready +// Type definitions for domready 1.0 // Project: https://github.com/ded/domready // Definitions by: Christian Holm Nielsen // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -declare function domready(callback: () => any) : void; +declare function domready(callback: () => void): void; export = domready; -export as namespace domready; \ No newline at end of file +export as namespace domready; diff --git a/types/domready/tsconfig.json b/types/domready/tsconfig.json index 1495d185a6..4b4263f4b1 100644 --- a/types/domready/tsconfig.json +++ b/types/domready/tsconfig.json @@ -6,7 +6,7 @@ ], "noImplicitAny": true, "noImplicitThis": true, - "strictNullChecks": false, + "strictNullChecks": true, "strictFunctionTypes": true, "baseUrl": "../", "typeRoots": [ @@ -20,4 +20,4 @@ "index.d.ts", "domready-tests.ts" ] -} \ No newline at end of file +} diff --git a/types/domready/tslint.json b/types/domready/tslint.json index a41bf5d19a..f93cf8562a 100644 --- a/types/domready/tslint.json +++ b/types/domready/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/doubleclick-gpt/doubleclick-gpt-tests.ts b/types/doubleclick-gpt/doubleclick-gpt-tests.ts index 941ad3c260..9218408268 100644 --- a/types/doubleclick-gpt/doubleclick-gpt-tests.ts +++ b/types/doubleclick-gpt/doubleclick-gpt-tests.ts @@ -69,6 +69,10 @@ googletag.pubads().definePassback("/1234567/sports", [468, 60]) .setTagForChildDirectedTreatment(1) .display(); +googletag.pubads().definePassback('/1234567/sports', [468, 60]) + .setTagForUnderAgeOfConsent(1) + .display(); + googletag.pubads().definePassback("/1234567/sports", [468, 60]). setTargeting("color", "red"). setTargeting("sport", ["rugby", "rowing"]). @@ -79,6 +83,13 @@ googletag.pubads().definePassback("/1234567/sports", [160, 600]). "interests": ["sports", "music", "movies"]}). display(); +googletag.pubads().enableLazyLoad(); +googletag.pubads().enableLazyLoad({ + fetchMarginPercent: 500, + renderMarginPercent: 200, + mobileScaling: 2.0 +}); + // The calls to construct an ad and display contents. slot1 = googletag.pubads().display("/1234567/sports", [728, 90], "div-1"); slot2 = googletag.pubads().display("/1234567/news", [160, 600], "div-2"); @@ -107,6 +118,13 @@ googletag.pubads().setTagForChildDirectedTreatment(1); // Clear child-directed setting and return to initial not-set value. googletag.pubads().clearTagForChildDirectedTreatment(); +// Mark ad requests as coming from users under the age of consent. +googletag.pubads().setTagForUnderAgeOfConsent(1); + +// Clear the tag value that configures whether to mark ad requests as +// coming from users under the age of consent. +googletag.pubads().setTagForUnderAgeOfConsent(); + googletag.pubads().setTargeting("interests", "sports"); googletag.pubads().setTargeting("colors", "blue"); googletag.pubads().setTargeting("fruits", "apple"); @@ -435,3 +453,6 @@ googletag.pubads().display("/1234567/science", [300, 250], new HTMLElement()); // A named size can be a string or an array of strings. googletag.pubads().display("/1234567/science/physics", [[300, 250], "fluid"], "div-1"); googletag.pubads().display("/1234567/science/physics", [[300, 250], ["fluid"]], "div-1"); + +// Request non-personalized ads +googletag.pubads().setRequestNonPersonalizedAds(1); diff --git a/types/doubleclick-gpt/index.d.ts b/types/doubleclick-gpt/index.d.ts index 10e20cccd1..ab71cdc99a 100644 --- a/types/doubleclick-gpt/index.d.ts +++ b/types/doubleclick-gpt/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for Google Publisher Tag v172 +// Type definitions for Google Publisher Tag v238 // Project: https://developers.google.com/doubleclick-gpt/reference // Definitions by: John Wright // Steven Joyce @@ -40,6 +40,12 @@ declare namespace googletag { setContent(slot: Slot, content: String): void; } + export interface LazyLoadOptionsConfig { + fetchMarginPercent?: number, + renderMarginPercent?: number, + mobileScaling?: number + } + export interface ResponseInformation { advertiserId: string; campaignId: string; @@ -101,6 +107,7 @@ declare namespace googletag { setClickUrl(url: string): PassbackSlot; setForceSafeFrame(forceSafeFrame: boolean): PassbackSlot; setTagForChildDirectedTreatment(value: number): PassbackSlot; + setTagForUnderAgeOfConsent(value: number): PassbackSlot; setTargeting(key: string, value: string | string[]): PassbackSlot; updateTargetingFromMap(map: Object): PassbackSlot; } @@ -116,6 +123,7 @@ declare namespace googletag { disableInitialLoad(): void; display(adUnitPath: string, size: GeneralSize, opt_div?: string | Element, opt_clickUrl?: string): Slot; enableAsyncRendering(): boolean; + enableLazyLoad(opt_config?: LazyLoadOptionsConfig): void; enableSingleRequest(): boolean; enableSyncRendering(): boolean; enableVideoAds(): void; @@ -131,8 +139,10 @@ declare namespace googletag { setForceSafeFrame(forceSafeFrame: boolean): PubAdsService; setLocation(latitudeOrAddress: string | number, opt_longitude?: number, opt_radius?: number): PubAdsService; setPublisherProvidedId(ppid: string): PubAdsService; + setRequestNonPersonalizedAds(nonPersonalizedAds: 0 | 1): PubAdsService; setSafeFrameConfig(config: SafeFrameConfig): PubAdsService; setTagForChildDirectedTreatment(value: number): PubAdsService; + setTagForUnderAgeOfConsent(opt_value?: number): PubAdsService; setTargeting(key: string, value: string | string[]): PubAdsService; setVideoContent(videoContentId: string, videoCmsId: string): void; updateCorrelator(): PubAdsService; diff --git a/types/downloadjs/downloadjs-tests.ts b/types/downloadjs/downloadjs-tests.ts index 00bb5395ef..da110af46d 100644 --- a/types/downloadjs/downloadjs-tests.ts +++ b/types/downloadjs/downloadjs-tests.ts @@ -7,6 +7,6 @@ download(new Blob(['hello world']), 'dlTextBlob.txt', 'text/plain'); download('/robots.txt'); -download(document.documentElement.outerHTML, 'dlHTML.html', 'text/html'); +download(document.documentElement!.outerHTML, 'dlHTML.html', 'text/html'); download(new Blob(['hello world'.bold()]), 'dlHtmlBlob.html', 'text/html'); download('/diff6.png'); diff --git a/types/draft-js/draft-js-tests.tsx b/types/draft-js/draft-js-tests.tsx index 857671d13d..c0c64256fd 100644 --- a/types/draft-js/draft-js-tests.tsx +++ b/types/draft-js/draft-js-tests.tsx @@ -1,6 +1,5 @@ import * as React from "react"; import * as ReactDOM from "react-dom"; -import { Map } from "immutable"; import { ContentBlock, @@ -48,154 +47,141 @@ class HandleSpan extends React.Component { } class RichEditorExample extends React.Component<{}, { editorState: EditorState }> { - constructor() { - super({}); + static initState() { + const sampleMarkup = + 'Bold text, Italic text

' + + 'Example link

' + + ''; + const blocksFromHTML = convertFromHTML(sampleMarkup); + const state = ContentState.createFromBlockArray(blocksFromHTML.contentBlocks, blocksFromHTML.entityMap); + const decorator = new CompositeDecorator([ + { + strategy: ( + block: ContentBlock, + callback: (start: number, end: number) => void, + contentState: ContentState + ) => { + const text = block.getText(); + let matchArr, start; + while ((matchArr = HANDLE_REGEX.exec(text)) !== null) { + start = matchArr.index; + callback(start, start + matchArr[0].length); + } + }, + component: HandleSpan + } + ]); + return { editorState: EditorState.createWithContent(state, decorator) }; + } + state = RichEditorExample.initState() - const sampleMarkup = - 'Bold text, Italic text

' + - 'Example link

' + - ''; - const blocksFromHTML = convertFromHTML(sampleMarkup); - const state = ContentState.createFromBlockArray( - blocksFromHTML.contentBlocks, - blocksFromHTML.entityMap, - ); - const decorator = new CompositeDecorator([{ - strategy: ( - block: ContentBlock, - callback: (start: number, end: number) => void, - contentState: ContentState - ) => { - const text = block.getText(); - let matchArr, start; - while ((matchArr = HANDLE_REGEX.exec(text)) !== null) { - start = matchArr.index; - callback(start, start + matchArr[0].length); + onChange: (editorState: EditorState) => void = (editorState: EditorState) => this.setState({ editorState }); + + keyBindingFn(e: SyntheticKeyboardEvent): string { + if (e.keyCode === KEYCODES.ENTER) { + const { editorState } = this.state; + const contentState = editorState.getCurrentContent(); + const selectionState = editorState.getSelection(); + + // only split headers into header and unstyled if we press 'Enter' + // at the end of a header (without text selected) + if (selectionState.isCollapsed()) { + const endKey = selectionState.getEndKey(); + const endOffset = selectionState.getEndOffset(); + const endBlock = contentState.getBlockForKey(endKey); + if (isHeaderBlock(endBlock) && endOffset === endBlock.getText().length) { + return SPLIT_HEADER_BLOCK; + } + } } - }, - component: HandleSpan, - }]); - this.state = { editorState: EditorState.createWithContent(state, decorator) }; - } - onChange: (editorState: EditorState) => void = (editorState: EditorState) => this.setState({ editorState }); + return getDefaultKeyBinding(e); + } - keyBindingFn(e: SyntheticKeyboardEvent): string { - if (e.keyCode === KEYCODES.ENTER) { - const { editorState } = this.state; - const contentState = editorState.getCurrentContent(); - const selectionState = editorState.getSelection(); - - // only split headers into header and unstyled if we press 'Enter' - // at the end of a header (without text selected) - if (selectionState.isCollapsed()) { - const endKey = selectionState.getEndKey(); - const endOffset = selectionState.getEndOffset(); - const endBlock = contentState.getBlockForKey(endKey); - if (isHeaderBlock(endBlock) && endOffset === endBlock.getText().length) { - return SPLIT_HEADER_BLOCK; + handleKeyCommand = (command: string, editorState: EditorState) => { + if (command === SPLIT_HEADER_BLOCK) { + this.onChange(this.splitHeaderToNewBlock()); + return 'handled'; } - } + + const newState = RichUtils.handleKeyCommand(editorState, command); + + if (newState) { + this.onChange(newState); + return 'handled'; + } + + return 'not-handled'; + }; + + toggleBlockType: (blockType: string) => void = (blockType: string) => { + this.onChange(RichUtils.toggleBlockType(this.state.editorState, blockType)); + }; + + toggleInlineStyle: (inlineStyle: string) => void = (inlineStyle: string) => { + this.onChange(RichUtils.toggleInlineStyle(this.state.editorState, inlineStyle)); + }; + + splitHeaderToNewBlock(): EditorState { + const { editorState } = this.state; + const selection = editorState.getSelection(); + + // Add a new block after the cursor + const contentWithBlock = Modifier.splitBlock(editorState.getCurrentContent(), selection); + + // Change the new block type to be normal 'unstyled' text, + const newBlock = contentWithBlock.getBlockAfter(selection.getEndKey()); + const contentWithUnstyledBlock = Modifier.setBlockType( + contentWithBlock, + SelectionState.createEmpty(newBlock.getKey()), + 'unstyled' + ); + + // push the new state with 'insert-characters' to preserve the undo/redo stack + const stateWithNewline = EditorState.push(editorState, contentWithUnstyledBlock, 'insert-characters'); + + // manually move the cursor to the next line (as expected) + const nextState = EditorState.forceSelection(stateWithNewline, SelectionState.createEmpty(newBlock.getKey())); + + return nextState; } - return getDefaultKeyBinding(e); - } + render(): React.ReactElement<{}> { + // If the user changes block type before entering any text, we can + // either style the placeholder or hide it. Let's just hide it now. + let className = 'RichEditor-editor'; + var contentState = this.state.editorState.getCurrentContent(); + if (!contentState.hasText()) { + if ( + contentState + .getBlockMap() + .first() + .getType() !== 'unstyled' + ) { + className += ' RichEditor-hidePlaceholder'; + } + } - handleKeyCommand = (command: string, editorState: EditorState) => { - if (command === SPLIT_HEADER_BLOCK) { - this.onChange(this.splitHeaderToNewBlock()); - return 'handled'; - } - - const newState = RichUtils.handleKeyCommand(editorState, command); - - if (newState) { - this.onChange(newState); - return "handled"; - } - - return "not-handled"; - } - - toggleBlockType: (blockType: string) => void = (blockType: string) => { - this.onChange(RichUtils.toggleBlockType(this.state.editorState, blockType)); - } - - toggleInlineStyle: (inlineStyle: string) => void = (inlineStyle: string) => { - this.onChange(RichUtils.toggleInlineStyle(this.state.editorState, inlineStyle)); - } - - splitHeaderToNewBlock(): EditorState { - const { editorState } = this.state; - const selection = editorState.getSelection(); - - // Add a new block after the cursor - const contentWithBlock = Modifier.splitBlock( - editorState.getCurrentContent(), - selection, - ); - - // Change the new block type to be normal 'unstyled' text, - const newBlock = contentWithBlock.getBlockAfter(selection.getEndKey()); - const contentWithUnstyledBlock = Modifier.setBlockType( - contentWithBlock, - SelectionState.createEmpty(newBlock.getKey()), - 'unstyled', - ); - - // push the new state with 'insert-characters' to preserve the undo/redo stack - const stateWithNewline = EditorState.push( - editorState, - contentWithUnstyledBlock, - 'insert-characters' - ); - - // manually move the cursor to the next line (as expected) - const nextState = EditorState.forceSelection( - stateWithNewline, - SelectionState.createEmpty(newBlock.getKey()), - ); - - return nextState; - } - - render(): React.ReactElement<{}> { - // If the user changes block type before entering any text, we can - // either style the placeholder or hide it. Let's just hide it now. - let className = 'RichEditor-editor'; - var contentState = this.state.editorState.getCurrentContent(); - if (!contentState.hasText()) { - if (contentState.getBlockMap().first().getType() !== 'unstyled') { - className += ' RichEditor-hidePlaceholder'; - } - } - - return ( -
- - -
- -
+ return ( +
+ + +
+
- ); - } +
+ ); + } } // Custom overrides for "code" style. diff --git a/types/draft-js/index.d.ts b/types/draft-js/index.d.ts index 4064c9b8a0..06cb8f55f2 100644 --- a/types/draft-js/index.d.ts +++ b/types/draft-js/index.d.ts @@ -9,7 +9,7 @@ // Santiago Vilar // Ulf Schwekendiek // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from 'react'; import * as Immutable from 'immutable'; diff --git a/types/dts-generator/index.d.ts b/types/dts-generator/index.d.ts index 5ef99eb2b0..d4d730850c 100644 --- a/types/dts-generator/index.d.ts +++ b/types/dts-generator/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/SitePen/dts-generator#readme // Definitions by: Matt Traynham // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.3 +// TypeScript Version: 2.8 import ts = require('typescript'); import Bluebird = require('bluebird'); diff --git a/types/duplicate-package-checker-webpack-plugin/duplicate-package-checker-webpack-plugin-tests.ts b/types/duplicate-package-checker-webpack-plugin/duplicate-package-checker-webpack-plugin-tests.ts index 0552f0e7c4..27eb651287 100644 --- a/types/duplicate-package-checker-webpack-plugin/duplicate-package-checker-webpack-plugin-tests.ts +++ b/types/duplicate-package-checker-webpack-plugin/duplicate-package-checker-webpack-plugin-tests.ts @@ -18,7 +18,12 @@ const c: webpack.Configuration = { plugins: [ new DuplicatePackageCheckerWebpackPlugin({ verbose: true, - emitError: true + emitError: true, + showHelp: false, + strict: false, + exclude(instance) { + return instance.name === "fbjs"; + } }) ] }; diff --git a/types/duplicate-package-checker-webpack-plugin/index.d.ts b/types/duplicate-package-checker-webpack-plugin/index.d.ts index 1eff56e9d5..cadb922c1a 100644 --- a/types/duplicate-package-checker-webpack-plugin/index.d.ts +++ b/types/duplicate-package-checker-webpack-plugin/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for duplicate-package-checker-webpack-plugin 1.2 +// Type definitions for duplicate-package-checker-webpack-plugin 2.1 // Project: https://github.com/darrenscerri/duplicate-package-checker-webpack-plugin#readme // Definitions by: Matt Traynham // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -13,10 +13,36 @@ declare class DuplicatePackageCheckerWebpackPlugin extends Plugin { } declare namespace DuplicatePackageCheckerWebpackPlugin { + /** The properties of the instance of a package */ + interface PackageInstanceProperties { + /** The name of the package */ + name: string; + /** The version of the package */ + version: string; + /** Absolute path to the package */ + path: string; + /** Absolute path to the module that requested the package */ + issuer?: string; + } + + /** The configurable options for the plugin */ interface Options { - // Also show module that is requiring each duplicate package + /** Also show module that is requiring each duplicate package (default: false) */ verbose?: boolean; - // Emit errors instead of warnings + /** Emit errors instead of warnings (default: false) */ emitError?: boolean; + /** Show help message if duplicate packages are found (default: true) */ + showHelp?: boolean; + /** Warn also if major versions differ (default: true) */ + strict?: boolean; + + /** + * Exclude instances of packages from the results. + * If all instances of a package are excluded, or all instances except one, + * then the package is no longer considered duplicated and won't be emitted as a warning/error. + * @param instance The instance of a package being evaluated for exclusion. + * @returns true to exclude the instance, false otherwise + */ + exclude?: (instance: PackageInstanceProperties) => boolean; } } diff --git a/types/dygraphs/index.d.ts b/types/dygraphs/index.d.ts index 4a4a9f0492..1e075d7ba9 100644 --- a/types/dygraphs/index.d.ts +++ b/types/dygraphs/index.d.ts @@ -21,6 +21,11 @@ declare namespace dygraphs { * A per-series color definition. Used in conjunction with, and overrides, the colors option. */ color?: string; + + /** + * A function which plot data for this series on the chart. + */ + plotter?: any; /** * Draw a small dot at each point, in addition to a line going through the point. This makes diff --git a/types/eases/backIn.d.ts b/types/eases/backIn.d.ts new file mode 100644 index 0000000000..8681c8ae58 --- /dev/null +++ b/types/eases/backIn.d.ts @@ -0,0 +1,2 @@ +import { backIn } from "./index"; +export = backIn; diff --git a/types/eases/backInOut.d.ts b/types/eases/backInOut.d.ts new file mode 100644 index 0000000000..e6957de807 --- /dev/null +++ b/types/eases/backInOut.d.ts @@ -0,0 +1,2 @@ +import { backInOut } from "./index"; +export = backInOut; diff --git a/types/eases/backOut.d.ts b/types/eases/backOut.d.ts new file mode 100644 index 0000000000..b8b6ab6f4c --- /dev/null +++ b/types/eases/backOut.d.ts @@ -0,0 +1,2 @@ +import { backOut } from "./index"; +export = backOut; diff --git a/types/eases/bounceIn.d.ts b/types/eases/bounceIn.d.ts new file mode 100644 index 0000000000..a1499f174a --- /dev/null +++ b/types/eases/bounceIn.d.ts @@ -0,0 +1,2 @@ +import { bounceIn } from "./index"; +export = bounceIn; diff --git a/types/eases/bounceInOut.d.ts b/types/eases/bounceInOut.d.ts new file mode 100644 index 0000000000..0aade79df0 --- /dev/null +++ b/types/eases/bounceInOut.d.ts @@ -0,0 +1,2 @@ +import { bounceInOut } from "./index"; +export = bounceInOut; diff --git a/types/eases/bounceOut.d.ts b/types/eases/bounceOut.d.ts new file mode 100644 index 0000000000..c32227373c --- /dev/null +++ b/types/eases/bounceOut.d.ts @@ -0,0 +1,2 @@ +import { bounceOut } from "./index"; +export = bounceOut; diff --git a/types/eases/circIn.d.ts b/types/eases/circIn.d.ts new file mode 100644 index 0000000000..6cc5fee6ed --- /dev/null +++ b/types/eases/circIn.d.ts @@ -0,0 +1,2 @@ +import { circIn } from "./index"; +export = circIn; diff --git a/types/eases/circInOut.d.ts b/types/eases/circInOut.d.ts new file mode 100644 index 0000000000..29f480688a --- /dev/null +++ b/types/eases/circInOut.d.ts @@ -0,0 +1,2 @@ +import { circInOut } from "./index"; +export = circInOut; diff --git a/types/eases/circOut.d.ts b/types/eases/circOut.d.ts new file mode 100644 index 0000000000..39be74ff36 --- /dev/null +++ b/types/eases/circOut.d.ts @@ -0,0 +1,2 @@ +import { circOut } from "./index"; +export = circOut; diff --git a/types/eases/cubicIn.d.ts b/types/eases/cubicIn.d.ts new file mode 100644 index 0000000000..92455161df --- /dev/null +++ b/types/eases/cubicIn.d.ts @@ -0,0 +1,2 @@ +import { cubicIn } from "./index"; +export = cubicIn; diff --git a/types/eases/cubicInOut.d.ts b/types/eases/cubicInOut.d.ts new file mode 100644 index 0000000000..1e83ef573f --- /dev/null +++ b/types/eases/cubicInOut.d.ts @@ -0,0 +1,2 @@ +import { cubicInOut } from "./index"; +export = cubicInOut; diff --git a/types/eases/cubicOut.d.ts b/types/eases/cubicOut.d.ts new file mode 100644 index 0000000000..aa309e22a6 --- /dev/null +++ b/types/eases/cubicOut.d.ts @@ -0,0 +1,2 @@ +import { cubicOut } from "./index"; +export = cubicOut; diff --git a/types/eases/eases-tests.ts b/types/eases/eases-tests.ts new file mode 100644 index 0000000000..7dcb0dcc98 --- /dev/null +++ b/types/eases/eases-tests.ts @@ -0,0 +1,100 @@ +import eases = require("eases"); +import backInOut = require("eases/backInOut"); +import backIn = require("eases/backIn"); +import backOut = require("eases/backOut"); +import bounceInOut = require("eases/bounceInOut"); +import bounceIn = require("eases/bounceIn"); +import bounceOut = require("eases/bounceOut"); +import circInOut = require("eases/circInOut"); +import circIn = require("eases/circIn"); +import circOut = require("eases/circOut"); +import cubicInOut = require("eases/cubicInOut"); +import cubicIn = require("eases/cubicIn"); +import cubicOut = require("eases/cubicOut"); +import elasticInOut = require("eases/elasticInOut"); +import elasticIn = require("eases/elasticIn"); +import elasticOut = require("eases/elasticOut"); +import expoInOut = require("eases/expoInOut"); +import expoIn = require("eases/expoIn"); +import expoOut = require("eases/expoOut"); +import linear = require("eases/linear"); +import quadInOut = require("eases/quadInOut"); +import quadIn = require("eases/quadIn"); +import quadOut = require("eases/quadOut"); +import quartInOut = require("eases/quartInOut"); +import quartIn = require("eases/quartIn"); +import quartOut = require("eases/quartOut"); +import quintInOut = require("eases/quintInOut"); +import quintIn = require("eases/quintIn"); +import quintOut = require("eases/quintOut"); +import sineInOut = require("eases/sineInOut"); +import sineIn = require("eases/sineIn"); +import sineOut = require("eases/sineOut"); + +{ + eases.backInOut(0.5); // $ExpectType number + eases.backIn(0.5); // $ExpectType number + eases.backOut(0.5); // $ExpectType number + eases.bounceInOut(0.5); // $ExpectType number + eases.bounceIn(0.5); // $ExpectType number + eases.bounceOut(0.5); // $ExpectType number + eases.circInOut(0.5); // $ExpectType number + eases.circIn(0.5); // $ExpectType number + eases.circOut(0.5); // $ExpectType number + eases.cubicInOut(0.5); // $ExpectType number + eases.cubicIn(0.5); // $ExpectType number + eases.cubicOut(0.5); // $ExpectType number + eases.elasticInOut(0.5); // $ExpectType number + eases.elasticIn(0.5); // $ExpectType number + eases.elasticOut(0.5); // $ExpectType number + eases.expoInOut(0.5); // $ExpectType number + eases.expoIn(0.5); // $ExpectType number + eases.expoOut(0.5); // $ExpectType number + eases.linear(0.5); // $ExpectType number + eases.quadInOut(0.5); // $ExpectType number + eases.quadIn(0.5); // $ExpectType number + eases.quadOut(0.5); // $ExpectType number + eases.quartInOut(0.5); // $ExpectType number + eases.quartIn(0.5); // $ExpectType number + eases.quartOut(0.5); // $ExpectType number + eases.quintInOut(0.5); // $ExpectType number + eases.quintIn(0.5); // $ExpectType number + eases.quintOut(0.5); // $ExpectType number + eases.sineInOut(0.5); // $ExpectType number + eases.sineIn(0.5); // $ExpectType number + eases.sineOut(0.5); // $ExpectType number +} + +{ + backInOut(0.5); // $ExpectType number + backIn(0.5); // $ExpectType number + backOut(0.5); // $ExpectType number + bounceInOut(0.5); // $ExpectType number + bounceIn(0.5); // $ExpectType number + bounceOut(0.5); // $ExpectType number + circInOut(0.5); // $ExpectType number + circIn(0.5); // $ExpectType number + circOut(0.5); // $ExpectType number + cubicInOut(0.5); // $ExpectType number + cubicIn(0.5); // $ExpectType number + cubicOut(0.5); // $ExpectType number + elasticInOut(0.5); // $ExpectType number + elasticIn(0.5); // $ExpectType number + elasticOut(0.5); // $ExpectType number + expoInOut(0.5); // $ExpectType number + expoIn(0.5); // $ExpectType number + expoOut(0.5); // $ExpectType number + linear(0.5); // $ExpectType number + quadInOut(0.5); // $ExpectType number + quadIn(0.5); // $ExpectType number + quadOut(0.5); // $ExpectType number + quartInOut(0.5); // $ExpectType number + quartIn(0.5); // $ExpectType number + quartOut(0.5); // $ExpectType number + quintInOut(0.5); // $ExpectType number + quintIn(0.5); // $ExpectType number + quintOut(0.5); // $ExpectType number + sineInOut(0.5); // $ExpectType number + sineIn(0.5); // $ExpectType number + sineOut(0.5); // $ExpectType number +} diff --git a/types/eases/elasticIn.d.ts b/types/eases/elasticIn.d.ts new file mode 100644 index 0000000000..6dd90cb2da --- /dev/null +++ b/types/eases/elasticIn.d.ts @@ -0,0 +1,2 @@ +import { elasticIn } from "./index"; +export = elasticIn; diff --git a/types/eases/elasticInOut.d.ts b/types/eases/elasticInOut.d.ts new file mode 100644 index 0000000000..ec9fa9a307 --- /dev/null +++ b/types/eases/elasticInOut.d.ts @@ -0,0 +1,2 @@ +import { elasticInOut } from "./index"; +export = elasticInOut; diff --git a/types/eases/elasticOut.d.ts b/types/eases/elasticOut.d.ts new file mode 100644 index 0000000000..de7aedafe7 --- /dev/null +++ b/types/eases/elasticOut.d.ts @@ -0,0 +1,2 @@ +import { elasticOut } from "./index"; +export = elasticOut; diff --git a/types/eases/expoIn.d.ts b/types/eases/expoIn.d.ts new file mode 100644 index 0000000000..fc88cdeda3 --- /dev/null +++ b/types/eases/expoIn.d.ts @@ -0,0 +1,2 @@ +import { expoIn } from "./index"; +export = expoIn; diff --git a/types/eases/expoInOut.d.ts b/types/eases/expoInOut.d.ts new file mode 100644 index 0000000000..06235ba84b --- /dev/null +++ b/types/eases/expoInOut.d.ts @@ -0,0 +1,2 @@ +import { expoInOut } from "./index"; +export = expoInOut; diff --git a/types/eases/expoOut.d.ts b/types/eases/expoOut.d.ts new file mode 100644 index 0000000000..62bda4ab8e --- /dev/null +++ b/types/eases/expoOut.d.ts @@ -0,0 +1,2 @@ +import { expoOut } from "./index"; +export = expoOut; diff --git a/types/eases/index.d.ts b/types/eases/index.d.ts new file mode 100644 index 0000000000..ac46def324 --- /dev/null +++ b/types/eases/index.d.ts @@ -0,0 +1,43 @@ +// Type definitions for eases 1.0 +// Project: https://github.com/mattdesl/eases +// Definitions by: Mathias Paumgarten +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +interface Eases { + backInOut(t: number): number; + backIn(t: number): number; + backOut(t: number): number; + bounceInOut(t: number): number; + bounceIn(t: number): number; + bounceOut(t: number): number; + circInOut(t: number): number; + circIn(t: number): number; + circOut(t: number): number; + cubicInOut(t: number): number; + cubicIn(t: number): number; + cubicOut(t: number): number; + elasticInOut(t: number): number; + elasticIn(t: number): number; + elasticOut(t: number): number; + expoInOut(t: number): number; + expoIn(t: number): number; + expoOut(t: number): number; + linear(t: number): number; + quadInOut(t: number): number; + quadIn(t: number): number; + quadOut(t: number): number; + quartInOut(t: number): number; + quartIn(t: number): number; + quartOut(t: number): number; + quintInOut(t: number): number; + quintIn(t: number): number; + quintOut(t: number): number; + sineInOut(t: number): number; + sineIn(t: number): number; + sineOut(t: number): number; +} + +declare const eases: Eases; + +export = eases; +export as namespace eases; diff --git a/types/eases/linear.d.ts b/types/eases/linear.d.ts new file mode 100644 index 0000000000..a0f39246a9 --- /dev/null +++ b/types/eases/linear.d.ts @@ -0,0 +1,2 @@ +import { linear } from "./index"; +export = linear; diff --git a/types/eases/quadIn.d.ts b/types/eases/quadIn.d.ts new file mode 100644 index 0000000000..b91d594fc6 --- /dev/null +++ b/types/eases/quadIn.d.ts @@ -0,0 +1,2 @@ +import { quadIn } from "./index"; +export = quadIn; diff --git a/types/eases/quadInOut.d.ts b/types/eases/quadInOut.d.ts new file mode 100644 index 0000000000..b41eedae8e --- /dev/null +++ b/types/eases/quadInOut.d.ts @@ -0,0 +1,2 @@ +import { quadInOut } from "./index"; +export = quadInOut; diff --git a/types/eases/quadOut.d.ts b/types/eases/quadOut.d.ts new file mode 100644 index 0000000000..2f490d1d7c --- /dev/null +++ b/types/eases/quadOut.d.ts @@ -0,0 +1,2 @@ +import { quadOut } from "./index"; +export = quadOut; diff --git a/types/eases/quartIn.d.ts b/types/eases/quartIn.d.ts new file mode 100644 index 0000000000..ae5542ed3b --- /dev/null +++ b/types/eases/quartIn.d.ts @@ -0,0 +1,2 @@ +import { quartIn } from "./index"; +export = quartIn; diff --git a/types/eases/quartInOut.d.ts b/types/eases/quartInOut.d.ts new file mode 100644 index 0000000000..8c9eda5461 --- /dev/null +++ b/types/eases/quartInOut.d.ts @@ -0,0 +1,2 @@ +import { quartInOut } from "./index"; +export = quartInOut; diff --git a/types/eases/quartOut.d.ts b/types/eases/quartOut.d.ts new file mode 100644 index 0000000000..5d164804c5 --- /dev/null +++ b/types/eases/quartOut.d.ts @@ -0,0 +1,2 @@ +import { quartOut } from "./index"; +export = quartOut; diff --git a/types/eases/quintIn.d.ts b/types/eases/quintIn.d.ts new file mode 100644 index 0000000000..bf2e56cb2f --- /dev/null +++ b/types/eases/quintIn.d.ts @@ -0,0 +1,2 @@ +import { quintIn } from "./index"; +export = quintIn; diff --git a/types/eases/quintInOut.d.ts b/types/eases/quintInOut.d.ts new file mode 100644 index 0000000000..eeab23e7e7 --- /dev/null +++ b/types/eases/quintInOut.d.ts @@ -0,0 +1,2 @@ +import { quintInOut } from "./index"; +export = quintInOut; diff --git a/types/eases/quintOut.d.ts b/types/eases/quintOut.d.ts new file mode 100644 index 0000000000..1a8eed0c0c --- /dev/null +++ b/types/eases/quintOut.d.ts @@ -0,0 +1,2 @@ +import { quintOut } from "./index"; +export = quintOut; diff --git a/types/eases/sineIn.d.ts b/types/eases/sineIn.d.ts new file mode 100644 index 0000000000..77a609b4c5 --- /dev/null +++ b/types/eases/sineIn.d.ts @@ -0,0 +1,2 @@ +import { sineIn } from "./index"; +export = sineIn; diff --git a/types/eases/sineInOut.d.ts b/types/eases/sineInOut.d.ts new file mode 100644 index 0000000000..9328e02617 --- /dev/null +++ b/types/eases/sineInOut.d.ts @@ -0,0 +1,2 @@ +import { sineInOut } from "./index"; +export = sineInOut; diff --git a/types/eases/sineOut.d.ts b/types/eases/sineOut.d.ts new file mode 100644 index 0000000000..082ef825d7 --- /dev/null +++ b/types/eases/sineOut.d.ts @@ -0,0 +1,2 @@ +import { sineOut } from "./index"; +export = sineOut; diff --git a/types/eases/tsconfig.json b/types/eases/tsconfig.json new file mode 100644 index 0000000000..1ed08e1b05 --- /dev/null +++ b/types/eases/tsconfig.json @@ -0,0 +1,54 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "eases-tests.ts", + "backInOut.d.ts", + "backIn.d.ts", + "backOut.d.ts", + "bounceInOut.d.ts", + "bounceIn.d.ts", + "bounceOut.d.ts", + "circInOut.d.ts", + "circIn.d.ts", + "circOut.d.ts", + "cubicInOut.d.ts", + "cubicIn.d.ts", + "cubicOut.d.ts", + "elasticInOut.d.ts", + "elasticIn.d.ts", + "elasticOut.d.ts", + "expoInOut.d.ts", + "expoIn.d.ts", + "expoOut.d.ts", + "linear.d.ts", + "quadInOut.d.ts", + "quadIn.d.ts", + "quadOut.d.ts", + "quartInOut.d.ts", + "quartIn.d.ts", + "quartOut.d.ts", + "quintInOut.d.ts", + "quintIn.d.ts", + "quintOut.d.ts", + "sineInOut.d.ts", + "sineIn.d.ts", + "sineOut.d.ts" + ] +} diff --git a/types/eases/tslint.json b/types/eases/tslint.json new file mode 100644 index 0000000000..f93cf8562a --- /dev/null +++ b/types/eases/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": "dtslint/dt.json" +} diff --git a/types/echarts/index.d.ts b/types/echarts/index.d.ts index 15892864e5..dc525231e6 100644 --- a/types/echarts/index.d.ts +++ b/types/echarts/index.d.ts @@ -1,122 +1,414 @@ -// Type definitions for echarts +// Type definitions for echarts 4.1.0 // Project: http://echarts.baidu.com/ // Definitions by: Xie Jingyang // AntiMoron // Liveangela +// Ovilia // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 declare namespace echarts { - function init(dom: HTMLDivElement | HTMLCanvasElement, theme?: object | string, opts?: { - devicePixelRatio?: number - renderer?: string - width?: number | string - height?: number | string - }): ECharts; + /** + * Creates an ECharts instance, and returns an echartsInstance. You shall + * not initialize multiple ECharts instances on a single container. + * + * @param {HTMLDivElement | HTMLCanvasElement} dom Instance container, + * usually is a `div` element with height and width defined. + * @param {object | string} [theme] Theme to be applied. + * This can be a configuring object of a theme, or a theme name + * registered through [echarts.registerTheme](https://echarts.apache.org/api.html#echarts.registerTheme). + * @param {object} [opts] Chart configurations. + * @param {number} [opts.devicePixelRatio] Ratio of one physical pixel to + * the size of one device independent pixels. Browser's + * `window.devicePixelRatio` is used by default. + * @param {string} [opts.renderer] Supports `'canvas'` or `'svg'`. + * See [Render by Canvas or SVG](https://echarts.apache.org/tutorial.html#Render%20by%20Canvas%20or%20SVG). + * @param {number} [opts.width] Specify width explicitly, in pixel. + * If setting to `null`/`undefined`/`'auto'`, width of `dom` + * (instance container) will be used. + * @param {number} [opts.height] Specify height explicitly, in pixel. + * If setting to `null`/`undefined`/`'auto'`, height of `dom` + * (instance container) will be used. + */ + function init( + dom: HTMLDivElement | HTMLCanvasElement, + theme?: object | string, + opts?: { + devicePixelRatio?: number + renderer?: string + width?: number | string + height?: number | string + } + ): ECharts - const graphic: Graphic; + /** + * Connects interaction of multiple chart series. For example: + * + ```js + // set group id of each instance respectively. + chart1.group = 'group1'; + chart2.group = 'group1'; + echarts.connect('group1'); + // or incoming instance array that need to be linked. + echarts.connect([chart1, chart2]); + ``` + * + * @param group Group id in string, or array of chart instance. + */ + function connect(group: string | ECharts[]): void - interface Graphic { - clipPointsByRect(points: number[][], rect: ERectangle): number[][]; - clipRectByRect(targetRect: ERectangle, rect: ERectangle): ERectangle; - LinearGradient: { new(x: number, y: number, x2: number, y2: number, colorStops: object[], globalCoord?: boolean): LinearGradient } - } + /** + * Disconnects interaction of multiple chart series. To have one single + * instance to be removed, you can set `group` of chart instance to be null. + * + * @param {string} group Group id in string. + */ + function disConnect(group: string): void - function connect(group: string | string[]): void; + /** + * Destroys chart instance, after which the instance cannot be used any + * more. + * + * @param target Chart instance or container. + */ + function dispose(target: ECharts | HTMLDivElement | HTMLCanvasElement) + : void - function disConnect(group: string): void; + /** + * Returns chart instance of dom container. + * + * @param target Chart container. + */ + function getInstanceByDom(target: HTMLDivElement | HTMLCanvasElement) + : ECharts - function dispose(target: ECharts | HTMLDivElement | HTMLCanvasElement): void; + /** + * Registers available maps. This can only be used after including + * [geo](https://echarts.apache.org/option.html#geo) + * component or chart series of + * [map](https://echarts.apache.org/option.html#series-map). + * + * @param {string} mapName Map name, referring to `map` value set in + * [geo](https://echarts.apache.org/option.html#geo) + * component or + * [map](https://echarts.apache.org/option.html#series-map). + * @param {object} geoJson Data in GeoJson format. See + * [http://geojson.org/](http://geojson.org/) for more format information. + * @param {object} [specialAreas] Zoomed part of a specific area in the map + * for better visual effect. + * See [USA Population Estimates example](https://ecomfe.github.io/echarts-examples/public/editor.html?c=map-usa). + */ + function registerMap( + mapName: string, + geoJson: object, + specialAreas?: object + ): void - function getInstanceByDom(target: HTMLDivElement | HTMLCanvasElement): ECharts; - - function registerMap(mapName: string, geoJson: object, specialAreas?: object): void; - - function registerTheme(themeName: string, theme: object): void; + /** + * Registers a theme, should be specified when + * [initialize the chart instance](https://echarts.apache.org/api.html#echarts.init). + * + * @param {string} themeName Theme name. + * @param {object} theme Theme configurations. + */ + function registerTheme(themeName: string, theme: object): void interface MapObj { - /** geoJson data for map */ + /** + * geoJson data for map + */ geoJson: object, - /** special areas fro map */ + /** + * special areas fro map + */ specialAreas: object } - function getMap(mapName: string): MapObj; + /** + * Get a registed map. + * + * @param {string} mapName Map name. + * @return {MapObj} Map data. + */ + function getMap(mapName: string): MapObj - interface LinearGradient { - colorStops: object[]; - global: boolean; - type: string; - x: number - x2: number - y: number - y2: number + /** + * Util methods about graphics. + */ + const graphic: Graphic; + + interface Graphic { + /** + * Clip the given points by the given rectangular. + * + * @param {number[][]} points The points to be clipped, + * like [[23, 44], [12, 15], ...]. + * @param {ERectangle} rect The rectangular that is used to clip points. + */ + clipPointsByRect(points: number[][], rect: ERectangle): number[][]; + + /** + * Clip the first input rectangular by the second input rectangular. + * + * @param {ERectangle} targetRect The rectangular to be clipped. + * @param {ERectangle} rect The rectangular that is used to clip + * targetRect. + */ + clipRectByRect(targetRect: ERectangle, rect: ERectangle): ERectangle; } interface ECharts { + /** + * Group name to be used in chart connection + */ group: string - setOption(option: EChartOption, notMerge?: boolean, notRefreshImmediately?: boolean): void + /** + * Configuration item, data, universal interface, all parameters and + * data can all be modified through `setOption`. ECharts will merge + * new parameters and data, and then refresh chart. + * + * @param {EChartOption} option Configuration item and data. Please + * refer to [configuration item manual](https://echarts.apache.org/option.html) + * for more information. + * @param {boolean} [notMerge=false] Whether not to merge with previous + * `option` + * @param {boolean} [lazyUpdate=false] Whether not to update chart + * immediately + */ + setOption( + option: EChartOption, + notMerge?: boolean, + lazyUpdate?: boolean + ) : void + /** + * Configuration item, data, universal interface, all parameters and + * data can all be modified through `setOption`. ECharts will merge + * new parameters and data, and then refresh chart. + * + * @param {EChartOption} option Configuration item and data. Please + * refer to [configuration item manual](https://echarts.apache.org/option.html) + * for more information. + * @param {EChartsOptionConfig} [opts] Options about how to setOption + */ + setOption(option: EChartOption, opts?: EChartsOptionConfig): void + + /** + * Gets width of ECharts instance container. + * + * @return {number} Width. + */ getWidth(): number + /** + * Gets height of ECharts instance container. + * + * @return {number} Height. + */ getHeight(): number + /** + * Gets DOM element of ECharts instance container. + * + * @return {HTMLCanvasElement|HTMLDivElement} DOM container. + */ getDom(): HTMLCanvasElement | HTMLDivElement - getOption(): object + /** + * Gets `option` object maintained in current instance, which contains + * configuration item and data merged from previous `setOption` + * operations by users, along with user interaction states. + * For example, switching of legend, zooming area of data zoom, + * and so on. Therefore, a new instance that is exactly the same + * can be recovered from this option. + */ + getOption(): EChartOption - resize(): void + /** + * Resizes chart, which should be called manually when container size + * changes. When `opts` is not provided, DOM size is used. + * + * @param {EChartsResizeOption} opts Specify parameters explicitly. + */ + resize(opts?: EChartsResizeOption): void + /** + * Triggers chart action, like chart switch `legendToggleSelect`, + * zoom data area `dataZoom`, show tooltip `showTip` and so on. + * See [action](https://echarts.apache.org/api.html#action) and + * [events](https://echarts.apache.org/api.html#events) + * for more information. + * + * @param payload Trigger multiple actions through `batch` attribute. + */ dispatchAction(payload: object): void + /** + * Binds event-handling function. + * There are two kinds of events in ECharts, one of which is mouse + * events, which will be triggered when the mouse clicks certain + * element in the chart, the other kind will be triggered after + * `dispatchAction` is called. Every action has a corresponding + * event. + * If event is triggered externally by `dispatchAction`, and there + * is batch attribute in action to trigger batch action, then the + * corresponding response event parameters be in batch. + * + * @param {string} eventName Event names are all in lower-cases, + * for example, `'click'`, `'mousemove'`, `'legendselected'` + * @param {Function} handler Event-handling function, whose format + * is as following: + ```js + (event: object) + ``` + * @param {object} [context] context of callback function, what + * `this` refers to. + */ on(eventName: string, handler: Function, context?: object): void + /** + * Unbind event-handler function. + * + * @param {string} eventName Event names are all in lower-cases, + * for example, `'click'`, `'mousemove'`, `'legendselected'` + * @param {Function} [handler] The function to be unbound could be + * passed. Otherwise, all event functions of this type will be + * unbound. + */ off(eventName: string, handler?: Function): void - showLoading(type?: string, opts?: object): void + /** + * Convert a point from logical coordinate (e.g., in geo, cartesian, + * graph, ...) to pixel coordinate. + * + * @param {EChartsConvertFinder} finder Indicate in which coordinate + * system conversion is performed. + * Generally, index or id or name can be used to specify + * coordinate system. + * @param {string | any[]} value The value to be converted. + */ + convertToPixel(finder: EChartsConvertFinder, value: string | any[]) + : string | any[] + /** + * Convert a point from pixel coordinate to logical coordinate + * (e.g., in geo, cartesian, graph, ...). + * + * @param {EChartsConvertFinder} finder Indicate in which coordinate + * system conversion is performed. + * Generally, index or id or name can be used to specify + * coordinate system. + * @param {string | any[]} value The value to be converted. + */ + convertFromPixel(finder: EChartsConvertFinder, value: any[] | string) + : any[] | string + + /** + * Determine whether the given point is in the given coordinate systems or series. + * + * @param {EChartsConvertFinder} finder Indicate in which coordinate + * system conversion is performed. + * Generally, index or id or name can be used to specify + * coordinate system. + * @param {string | any[]} value The value to be judged, in pixel + * coordinate system. + */ + containPixel(finder: EChartsConvertFinder, value: any[]): boolean + + /** + * Shows loading animation. You can call this interface manually before + * data is loaded, and call `hideLoading` to hide loading animation + * after data is loaded. + * + * @param {string} [type='default'] + * @param {EChartsLoadingOption} [opts] + */ + showLoading(type?: string, opts?: EChartsLoadingOption): void + + /** + * Hides animation loading effect. + */ hideLoading(): void + /** + * Exports chart image; returns a base64 URL; can be set to `src` of + * `Image`. + * + * @param opts Options. + */ getDataURL(opts: { - /** 导出的格式,可选 png, jpeg */ + // Exporting format, can be either png, or jpeg type?: string, - /** 导出的图片分辨率比例,默认为 1。*/ + // Resolution ratio of exporting image, 1 by default. pixelRatio?: number, - /** 导出的图片背景色,默认使用 option 里的 backgroundColor */ - backgroundColor?: string + // Background color of exporting image, use backgroundColor in + // option by default. + backgroundColor?: string, + // Excluded components list. e.g. ['toolbox'] + excludeComponents?: string[] }): string + /** + * Exports connected chart image; returns a base64 url; can be set to + * `src` of `Image`. Position of charts in exported image are + * related to that of the container. + * + * @param opts Options. + */ getConnectedDataURL(opts: { - /** 导出的格式,可选 png, jpeg */ + // Exporting format, can be either png, or jpeg type: string, - /** 导出的图片分辨率比例,默认为 1。 */ + // Resolution ratio of exporting image, 1 by default. pixelRatio: number, - /** 导出的图片背景色,默认使用 option 里的 backgroundColor */ - backgroundColor: string + // Background color of exporting image, use backgroundColor in + // option by default. + backgroundColor: string, + // Excluded components list. e.g. ['toolbox'] + excludeComponents?: string[] }): string + /** + * The method is used in rendering millions of data + * (e.g. rendering geo data). In these scenario, the entire size of + * data is probably up to 10 or 100 MB, even using binary format. + * So chunked load data and rendering is required. When using + * `appendData`, the graphic elements that have been rendered will + * not be cleared, but keep rendering new graphic elements. + * + * @param opts Data options. + */ + appendData(opts: { + // Specify which series the data will be appended to. + seriesIndex?: string, + // The data to be appended. + data?: any[]|TypedArray, + }): void + + /** + * Clears current instance; removes all components and charts in + * current instance. + */ clear(): void + /** + * Returns whether current instance has been disposed. + * + * @return {boolean} Whether has been disposed. + */ isDisposed(): boolean + /** + * Disposes instance. Once disposed, the instance can not be used again. + */ dispose(): void - - /** 转换逻辑点到像素 */ - convertToPixel(finder: ConvertFinder | string, value: string | any[]): string | any[] - - convertFromPixel(finder: ConvertFinder | string, value: any[] | string): any[] | string - - containPixel(finder: ConvertFinder | string, - /** 要被判断的点,为像素坐标值,以 echarts 实例的 dom 节点的左上角为坐标 [0, 0] 点。*/ - value: any[]): boolean - - getModel(): { - getComponent(finder: string): any; - } } - interface ConvertFinder { + type TypedArray = Int8Array | Uint8Array | Int16Array | Uint16Array + | Int32Array | Uint32Array | Uint8ClampedArray | Float32Array + | Float64Array; + + interface EChartsConvertFinder { seriesIndex?: number, seriesId?: string, seriesName?: string, @@ -193,6 +485,29 @@ declare namespace echarts { zAxis3D?: object } + interface EChartsOptionConfig { + notMerge?: boolean, + lazyUpdate?: boolean, + silent?: boolean + } + + interface EChartsResizeOption { + /** + * Chart width. + */ + width?: number | string, + + /** + * Chart height. + */ + height?: number | string, + + /** + * Specify whether or not to prevent triggering events. + */ + silent?: boolean + } + interface EChartTitleOption { show?: boolean; text?: string; @@ -219,6 +534,38 @@ declare namespace echarts { shadowOffsetX?: number, shadowOffsetY?: number, } + + interface EChartsLoadingOption { + /** + * Loading text. + * @default 'loading' + */ + text?: string, + + /** + * Loading circle color. + * @default '#c23531' + */ + color?: string, + + /** + * Loading text color. + * @default '#000' + */ + textColor?: string, + + /** + * Mask background color. + * @default 'rgba(255, 255, 255, 0.8)' + */ + maskColor?: string, + + /** + * Zlevel of loading. If not 0, it creates a new canvas for loading. + * @default 0 + */ + zlevel?: 0 + } } declare module 'echarts' { diff --git a/types/ecma-proposal-math-extensions/ecma-proposal-math-extensions-tests.ts b/types/ecma-proposal-math-extensions/ecma-proposal-math-extensions-tests.ts new file mode 100644 index 0000000000..3dc5a9d61a --- /dev/null +++ b/types/ecma-proposal-math-extensions/ecma-proposal-math-extensions-tests.ts @@ -0,0 +1,7 @@ +import "ecma-proposal-math-extensions"; + +Math.scale(42, 21, 64, 0, 100); +Math.fscale(0.42, 0.21, 0.64, 0.0, 1.0); +Math.clamp(42, 0, 100); +Math.radians(180) === 180 * Math.DEG_PER_RAD; +Math.degrees(Math.PI) === Math.PI * Math.RAD_PER_DEG; diff --git a/types/ecma-proposal-math-extensions/index.d.ts b/types/ecma-proposal-math-extensions/index.d.ts new file mode 100644 index 0000000000..6412e63dd6 --- /dev/null +++ b/types/ecma-proposal-math-extensions/index.d.ts @@ -0,0 +1,52 @@ +// Type definitions for ecma-proposal-math-extensions 0.0 +// Project: https://github.com/rwaldron/proposal-math-extensions#readme +// Definitions by: Konstantin Simon Maria Möllers +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.0 + +interface Math { + /** This is the number of how many degrees are one radian. */ + readonly DEG_PER_RAD: number; + /** This is the number of how many radians are one degree. */ + readonly RAD_PER_DEG: number; + /** + * Scales a value between `inLow` and `inHigh` to the range of `outLow` to `outHigh`. + * @param x The numeric value in the input range to scale. + * @param inLow The lower bound of the input range. + * @param inHigh The upper bound of the input range. + * @param outLow The lower bound of the output range. + * @param outHigh The upper bound of the output range. + * @return The input value scaled to the output range. + */ + scale(x: number, inLow: number, inHigh: number, outLow: number, outHigh: number): number; + /** + * Scales a floating point value between `inLow` and `inHigh` to the range of `outLow` to `outHigh`. + * @param x The numeric value in the input range to scale. + * @param inLow The lower bound of the input range. + * @param inHigh The upper bound of the input range. + * @param outLow The lower bound of the output range. + * @param outHigh The upper bound of the output range. + * @return The input value scaled to the output range. + */ + fscale(x: number, inLow: number, inHigh: number, outLow: number, outHigh: number): number; + /** + * Clamps an incoming value `x` to a range between `lower` and `upper`. + * @param x The value to clamp. + * @param lower The lower bound of the range to clamp `x` to. + * @param upper The upper bound of the range to clamp `x` to. + * @return The input value clamped to the given range. + */ + clamp(x: number, lower: number, upper: number): number; + /** + * Converts an angle given in degrees to an angle given in radians. + * @param degrees The input angle in degrees. + * @return The output angle in radians. + */ + radians(degrees: number): number; + /** + * Converts an angle given in radians to an angle given in degrees. + * @param radians The input angle in radians. + * @return The output angle in degrees. + */ + degrees(radians: number): number; +} diff --git a/types/ecma-proposal-math-extensions/tsconfig.json b/types/ecma-proposal-math-extensions/tsconfig.json new file mode 100644 index 0000000000..52115765eb --- /dev/null +++ b/types/ecma-proposal-math-extensions/tsconfig.json @@ -0,0 +1,25 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "target": "es2017", + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "ecma-proposal-math-extensions-tests.ts" + ] +} diff --git a/types/ecma-proposal-math-extensions/tslint.json b/types/ecma-proposal-math-extensions/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/ecma-proposal-math-extensions/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/ej.web.all/ej.web.all-tests.ts b/types/ej.web.all/ej.web.all-tests.ts index 83ed128742..58faf8c7f4 100644 --- a/types/ej.web.all/ej.web.all-tests.ts +++ b/types/ej.web.all/ej.web.all-tests.ts @@ -1,3461 +1,3418 @@ -module AccordionComponent { - $(function () { - var sample = new ej.Accordion($("#basicAccordion"), { - width: "100%", - allowKeyboardNavigation: true, - collapseSpeed: 500, - collapsible: true, - enableAnimation: true, - enableMultipleOpen: true, - events: "click", - expandSpeed: 500, - headerSize: "40px", - htmlAttributes: { title: "Demo" }, - selectedItemIndex: 1, - showCloseButton: true, - showRoundedCorner: true - }); - }); -} - - - -module AutocompleteComponent { - var carList = [ - "Audi S6", "Austin-Healey", "Alfa Romeo", "Aston Martin", - "BMW 7", "Bentley Mulsanne", "Bugatti Veyron", - "Chevrolet Camaro", "Cadillac", - "Duesenberg J", "Dodge Sprinter", - "Elantra", "Excavator", - "Ford Boss 302", "Ferrari 360", "Ford Thunderbird", - "GAZ Siber", - "Honda S2000", "Hyundai Santro", - "Isuzu Swift", "Infiniti Skyline", - "Jaguar XJS", - "Kia Sedona EX", "Koenigsegg Agera", - "Lotus Esprit", "Lamborghini Diablo", - "Mercedes-Benz", "Mercury Coupe", "Maruti Alto 800", - "Nissan Qashqai", - "Oldsmobile S98", "Opel Superboss", - "Porsche 356", "Pontiac Sunbird", - "Scion SRS/SC/SD", "Saab Sportcombi", "Subaru Sambar", "Suzuki Swift", - "Triumph Spitfire", "Toyota 2000GT", - "Volvo P1800", "Volkswagen Shirako" - ]; - $(function () { - var autocompleteInstance = new ej.Autocomplete($("#selectCar"), { - width: "100%", - watermarkText: "Select a car", - dataSource: carList, - enableAutoFill: true, - showPopupButton: true, - multiSelectMode: "delimiter" - }); - }); -} - - - - - -module Barcodecomponent { - $(function () { - var barcodesample = new ej.datavisualization.Barcode($("#Barcode"), { - text:"http://www.syncfusion.com" - }); - }); -} - - - - - -module Bulletgraphcomponent { - $(function () { - var bulletsample = new ej.datavisualization.BulletGraph($("#BulletGraph"), { - isResponsive: true, - load: function () { - var sender = $("#BulletGraph").data("ejBulletGraph"); - var bulletTheme = (window).themeStyle + (window).themeColor + (window).themeVarient; - if (bulletTheme) { - switch (bulletTheme) { - case "flatdark": - case "flatazuredark": - case "flatlimedark": - case "flatsaffrondark": - case "gradientdark": - case "gradientazuredark": - case "gradientlimedark": - case "gradientsaffrondark": - case "flathigh-contrast-01dark": - case "flathigh-contrast-02dark": - bulletTheme = "flatdark"; - break; - case "flatoffice-365light": - case "flatmateriallight": - bulletTheme = "material"; - break; - default: - bulletTheme = "flatlight"; - break; - } - sender.model.theme = bulletTheme; - } - - }, - tooltipSettings: { visible: true }, - quantitativeScaleSettings: { - featureMeasures: [{ - value: 8, comparativeMeasureValue:6.7 - }] - }, - qualitativeRanges: [{ - rangeEnd: 4.3, rangeStroke:"#ebebeb", - }, - { - rangeEnd: 7.3, rangeStroke:"#d8d8d8" - }, - { - rangeEnd: 10, rangeStroke: "#7f7f7f" - } - ], - captionSettings: { - textPosition: 'right', text: 'Revenue YTD', - subTitle: { - text: "$ in Thousands", textPosition:"right" - } - } - }); - }); -} - - - - - -module ButtonComponent { - $(function () { - var basicButton = new ej.Button($("#buttonnormal"), { - size: "large", - showRoundedCorner: true, - contentType: "textandimage", - prefixIcon: "e-icon e-save", - text: "Save" - }); - var toggleButton = new ej.ToggleButton($("#TextOnly"), { - showRoundedCorner: true, - size: "large", - contentType: "textandimage", - defaultPrefixIcon: "e-icon e-save", - activePrefixIcon: "e-icon e-delete", - defaultText: "Save", - activeText: "Delete" - }); - var splitbuttonnormal = new ej.SplitButton($("#splitbuttonnormal"), { - showRoundedCorner: true, - size: "large", - prefixIcon: "e-icon e-file-empty", - targetID: "menu1", - contentType: "textandimage", - text: "File" - }); - var groupButton = new ej.GroupButton($("#groupButton"), { - showRoundedCorner: true, - size: "large" - }); - var check1 = new ej.CheckBox($("#check1"), { - size: "medium", enableTriState: true - }); - var check2 = new ej.CheckBox($("#check2"), { - size: "medium", enableTriState: true - }); - var radio1 = new ej.RadioButton($("#radio1"), { - size: "medium" - }); - var radio2 = new ej.RadioButton($("#radio2"), { - size: "medium", checked: true - }); - }); -} - - - - -module ChartComponent { - $(function () { - var chartsample = new ej.datavisualization.Chart($("#Chart"), { - primaryXAxis: { - range: { min: 2005, max: 2011, interval: 1 }, - title: { text: "Year" }, - valueType: "category" - }, - primaryYAxis: { - range: { min: 25, max: 50, interval: 5 }, - labelFormat: "{value}%", - title: { text: "Efficiency" }, - - }, - commonSeriesOptions: - { - type: 'line', enableAnimation: true, - tooltip: { visible: true, template: 'Tooltip' }, - marker: - { - shape: 'circle', - size: - { - height: 10, width: 10 - }, - visible: true - }, - border: { width: 2 } - }, - series: - [ - { - points: [{ x: 2005, y: 28 }, { x: 2006, y: 25 }, { x: 2007, y: 26 }, { x: 2008, y: 27 }, - { x: 2009, y: 32 }, { x: 2010, y: 35 }, { x: 2011, y: 30 }], - name: 'India' - }, - { - points: [{ x: 2005, y: 31 }, { x: 2006, y: 28 }, { x: 2007, y: 30 }, { x: 2008, y: 36 }, - { x: 2009, y: 36 }, { x: 2010, y: 39 }, { x: 2011, y: 37 }], - name: 'Germany' - }, - { - points: [{ x: 2005, y: 36 }, { x: 2006, y: 32 }, { x: 2007, y: 34 }, { x: 2008, y: 41 }, - { x: 2009, y: 42 }, { x: 2010, y: 42 }, { x: 2011, y: 43 }], - name: 'England' - }, - { - points: [{ x: 2005, y: 39 }, { x: 2006, y: 36 }, { x: 2007, y: 40 }, { x: 2008, y: 44 }, - { x: 2009, y: 45 }, { x: 2010, y: 48 }, { x: 2011, y: 46 }], - name: 'France' - } - ], - isResponsive: true, - load: function () { - var sender = $("#Chart").data("ejChart"); - if (!!window.orientation && sender) { //to modify chart properties for mobile view - var model = sender.model, - seriesLength = model.series.length; - model.legend.visible = false; - model.size.height = null; - model.size.width = null; - for (var i = 0; i < seriesLength; i++) { - if (!model.series[i].marker) - model.series[i].marker = {}; - if (!model.series[i].marker.size) - model.series[i].marker.size = {}; - model.series[i].marker.size.width = 6; - model.series[i].marker.size.height = 6; - } - model.primaryXAxis.labelIntersectAction = "rotate45"; - if (model.primaryXAxis.title) - model.primaryXAxis.title.text = ""; - if (model.primaryYAxis.title) - model.primaryYAxis.title.text = ""; - model.primaryXAxis.edgeLabelPlacement = "hide"; - model.primaryYAxis.labelIntersectAction = "rotate45"; - model.primaryYAxis.edgeLabelPlacement = "hide"; - } - var theme = (window).themeStyle + (window).themeColor + (window).themeVarient; - if (theme) { - switch (theme) { - case "flatdark": - case "flatazuredark": - case "flatlimedark": - case "flatsaffrondark": - theme = "flatdark"; - break; - case "gradientlight": - case "gradientazurelight": - case "gradientlimelight": - case "gradientsaffronlight": - theme = "gradientlight"; - break; - case "gradientdark": - case "gradientazuredark": - case "gradientlimedark": - case "gradientsaffrondark": - theme = "gradientdark"; - break; - case "flatbootstraplight": - theme = "bootstrap"; - break; - case "flathigh-contrast-01dark": - case "flathigh-contrast-02dark": - theme = "high-contrast-01"; - break; - case "flatmateriallight": - case "flatoffice-365light": - theme = "material"; - break; - - default: - theme = "flatlight"; - break; - } - sender.model.theme = theme; - } - }, - title: { text: 'Efficiency of oil-fired power production' }, - size: { height: "600" }, - legend: { visible: true }, - }); - // chartsample.model.load="loadTheme"; - }); -} - - - - - -module circulargaugecomponent { - $(function () { - var circularsample = new ej.datavisualization.CircularGauge($("#CircularGauge"), { - enableAnimation: false, - isResponsive: true, - backgroundColor: "transparent", width: 500, - scales: [{ - showRanges: true, - startAngle: 122, sweepAngle: 296, radius: 130, showScaleBar: true, size: 1, maximum: 120, majorIntervalValue: 20, minorIntervalValue: 10, - border: { - width: 0.5, - }, - pointers: [{ - value: 60, - showBackNeedle: true, - backNeedleLength: 20, - length: 95, - width: 7 - }], - ticks: [{ - type: "major", - distanceFromScale: 2, - height: 16, - width: 1, color: "#8c8c8c" - }, { type: "minor", height: 8, width: 1, distanceFromScale: 2, color: "#8c8c8c" }], - labels: [{ - color: "#8c8c8c" - }], - ranges: [{ - distanceFromScale: -30, - startValue: 0, - endValue: 70 - }, { - distanceFromScale: -30, - startValue: 70, - endValue: 110, - backgroundColor: "#fc0606", - border: { color: "#fc0606" } - }, - { - distanceFromScale: -30, - startValue: 110, - endValue: 120, - backgroundColor: "#f5b43f", - border: { color: "#f5b43f" } - }] - }] - }); - }); -} - - - - -module ColorPickerComponent { - $(function () { - var colorSample = new ej.ColorPicker($("#colorpick"), { - value: "#278787" - }); - }); -} - - - - -module ComboBoxComponent { - var BikeList = [ - { empid: "bk1", text: "Apache RTR" }, { empid: "bk2", text: "CBR 150-R" }, { empid: "bk3", text: "CBZ Xtreme" }, - { empid: "bk4", text: "Discover" }, { empid: "bk5", text: "Dazzler" }, { empid: "bk6", text: "Flame" }, - { empid: "bk7", text: "Fazzer" }, { empid: "bk8", text: "FZ-S" }, { empid: "bk9", text: "Pulsar" }, - { empid: "bk10", text: "Shine" }, { empid: "bk11", text: "R15" }, { empid: "bk12", text: "Unicorn" } - ]; - $(function () { - var comboboxInstance = new ej.ComboBox($("#selectCar"), { - width: "100%", - placeholder: "Select a Bike", - fields: { text: "text", value: "empid" }, - dataSource: BikeList, - autofill: true - }); - }); -} - - - - - -module DatePickerComponent { - $(function () { - var dateSample = new ej.DatePicker($("#datepick"), { - width: "100%" - }); - }); -} - - - - -module DateTimePickerComponent { - $(function () { - var datetimeSample = new ej.DateRangePicker($("#daterangepick"), { - width: "100%" - }); - }); -} - - - -module DateTimePickerComponent { - $(function () { - var datetimeSample = new ej.DateTimePicker($("#datetimepick"), { - width: "100%" - }); - }); -} - - - -$(function () { - var diagram = new ej.datavisualization.Diagram($("#diagram"), { - width: "1000px", - height: "600px", - pageSettings: { - //Sets page size - pageHeight: 500, - pageWidth: 500, - //Customizes the appearance of page - pageBorderWidth: 4, - pageBackgroundColor: "white", - pageBorderColor: "lightgray", - pageMargin: 25, - showPageBreak: true, - multiplePage: true, - pageOrientation: ej.datavisualization.Diagram.PageOrientations.Portrait - }, - scrollSettings: { - horizontalOffset: 0, - verticalOffset: 0 - }, - snapSettings: { - snapConstraints: ej.datavisualization.Diagram.SnapConstraints.ShowLines - }, - nodes: [ - createNode({ name: "NewIdea", width: 150, height: 60, offsetX: 300, offsetY: 60, labels: [createLabel({ "text": "New idea identified" })], type: "flow", shape: ej.datavisualization.Diagram.FlowShapes.Terminator }), - createNode({ name: "Meeting", width: 150, height: 60, offsetX: 300, offsetY: 155, labels: [createLabel({ "text": "Meeting with board" })], type: "flow", shape: ej.datavisualization.Diagram.FlowShapes.Process }), - createNode({ - name: "BoardDecision", width: 150, height: 110, offsetX: 300, offsetY: 280, labels: [createLabel({ text: "Board decides \nwhether \nto proceed", wrapText: "true", "margin": { left: 20, top: 0, right: 20, bottom: 0 } })], - type: "flow", shape: ej.datavisualization.Diagram.FlowShapes.Decision - }), - createNode({ name: "Project", width: 150, height: 100, offsetX: 300, offsetY: 430, labels: [createLabel({ "text": "Find Project \nmanager" })], type: "flow", shape: ej.datavisualization.Diagram.FlowShapes.Decision }), - createNode({ - name: "End", width: 150, height: 60, offsetX: 300, offsetY: 555, labels: [createLabel({ "text": "Implement and Deliver" })], type: "flow", shape: ej.datavisualization.Diagram.FlowShapes.Process - }), - createNode({ name: "Decision", width: 250, height: 60, offsetX: 550, offsetY: 60, labels: [createLabel({ "text": "Decision Process for new software ideas" })], type: "flow", shape: ej.datavisualization.Diagram.FlowShapes.Card, fillColor: "#858585", borderColor: "#858585" }), - createNode({ name: "Reject", width: 150, height: 60, offsetX: 550, offsetY: 285, labels: [createLabel({ "text": "Reject and write report" })], type: "flow", shape: ej.datavisualization.Diagram.FlowShapes.Process }), - createNode({ name: "Resources", width: 150, height: 60, offsetX: 550, offsetY: 430, labels: [createLabel({ "text": "Hire new resources" })], type: "flow", shape: ej.datavisualization.Diagram.FlowShapes.Process }) - ], - connectors: [ - createConnector({ name: "connector1", sourceNode: "NewIdea", targetNode: "Meeting" }), - createConnector({ name: "connector2", sourceNode: "Meeting", targetNode: "BoardDecision" }), - createConnector({ name: "connector3", sourceNode: "BoardDecision", targetNode: "Project", labels: [createLabel({ "text": "Yes" })] }), - createConnector({ name: "connector4", sourceNode: "Project", targetNode: "End", labels: [createLabel({ "text": "Yes" })] }), - createConnector({ name: "connector5", sourceNode: "BoardDecision", targetNode: "Reject", labels: [createLabel({ "text": "No" })] }), - createConnector({ name: "connector6", sourceNode: "Project", targetNode: "Resources", labels: [createLabel({ "text": "No" })] }) - ] - }); - -}); - -function createNode(option: ej.datavisualization.Diagram.Node) { - if (!option.fillColor) { - option.borderColor = "#1BA0E2"; - option.fillColor = "#1BA0E2"; - } - option.labels[0].fontColor = "white"; - return option; -} - -function createConnector(option: ej.datavisualization.Diagram.Connector) { - option.targetDecorator = { shape: ej.datavisualization.Diagram.DecoratorShapes.Arrow, borderColor: "#606060", width: 10, height: 10 }; - option.lineColor = "#606060"; - if (option.labels && option.labels.length > 0) { - option.labels[0].fillColor = "white"; - } - return option; -} - -function createLabel(options: any) { - return options; -} - - - -module DialogComponent { - $(function () { - var dialogInstance = new ej.Dialog($("#basicDialog"), { - width: 550, - minWidth: 310, - minHeight: 215, - target: ".control", - close: () => { - $("#btnOpen").show(); - } - }); - var btnInstance = new ej.Button($("#btnOpen"), { - size: "medium", - click: () => { - $("#btnOpen").hide(); - $("#basicDialog").ejDialog("open"); - }, - type: "button", - height: 30, - width: 150 - }); - }); -} - - - - -module digitalgaugecomponent { - $(function () { - var digitalgaugesample = new ej.datavisualization.DigitalGauge($("#DigitalGauge"), { - width: 525, - height: 305, - isResponsive: true, - items: [{ - segmentSettings: { - width: 1, - spacing: 0, - color: "#8c8c8c" - }, - characterSettings: { - opacity: 0.8, - }, - value: "Syncfusion", - position: { x: 52, y: 52 } - }] - }); - }); -} - - - - - - -module DropDownListComponent { - var BikeList = [ - { empid: "bk1", text: "Apache RTR" }, { empid: "bk2", text: "CBR 150-R" }, { empid: "bk3", text: "CBZ Xtreme" }, - { empid: "bk4", text: "Discover" }, { empid: "bk5", text: "Dazzler" }, { empid: "bk6", text: "Flame" }, - { empid: "bk7", text: "Fazzer" }, { empid: "bk8", text: "FZ-S" }, { empid: "bk9", text: "Pulsar" }, - { empid: "bk10", text: "Shine" }, { empid: "bk11", text: "R15" }, { empid: "bk12", text: "Unicorn" } - ]; - $(function () { - var sample = new ej.DropDownList($("#bikeList"), { - dataSource: BikeList, - width: "100%", - watermarkText: "Select a bike", - fields: { id: "empid", text: "text", value: "text" }, - enableFilterSearch: true, - caseSensitiveSearch: true, - enableIncrementalSearch: true, - enablePopupResize: true, - delimiterChar: ";", - multiSelectMode: ej.MultiSelectMode.Delimiter, - maxPopupHeight: "300px", - minPopupHeight: "150px", - maxPopupWidth: "500px", - minPopupWidth: "350px", - showCheckbox: true, - showRoundedCorner: true - }); - }); - -} - - - - - - -module ExplorerComponent { - $(function () { - var file = new ej.FileExplorer($("#fileExplorer"), { - path: (window).baseurl + "Content/FileBrowser/", - width: "100%", - minWidth: "150px", - layout: "tile", - isResponsive: true, - ajaxAction: (window).baseurl + "api/FileExplorer/FileOperations" - }); - }); -} - - - - -module GanttComponent { - $(function () { - var ganttInstance = new ej.Gantt($("#GanttContainer"), { - dataSource: (window).projectData, - allowColumnResize: true, - allowSorting: true, - allowSelection: true, - enableContextMenu: true, - taskIdMapping: "taskID", - allowDragAndDrop: true, - taskNameMapping: "taskName", - startDateMapping: "startDate", - showColumnChooser: true, - showColumnOptions: true, - progressMapping: "progress", - durationMapping: "duration", - endDateMapping: "endDate", - childMapping: "subtasks", - scheduleStartDate: "02/01/2017", - scheduleEndDate: "04/09/2017", - //Resources mapping - resourceInfoMapping: "resourceId", - resourceNameMapping: "resourceName", - resourceIdMapping: "resourceId", - resources: (window).projectResources, - predecessorMapping: "predecessor", - showResourceNames: true, - toolbarSettings: { - showToolbar: true, - toolbarItems: ["add", "edit", "delete", "update", "cancel", "indent", "outdent", "expandAll", "collapseAll", "search"] - }, - editSettings: { - allowEditing: true, - allowAdding: true, - allowDeleting: true, - allowIndent: true, - editMode: "cellEditing" - }, - sizeSettings: { - width: "100%", - height: "100%" - }, - dragTooltip: { showTooltip: true }, - showGridCellTooltip: true, - treeColumnIndex: 1, - isResponsive: true, - }); - }); -} - - - -module GridComponent { - $(function () { - var gridInstance = new ej.Grid($("#Grid"), { - dataSource: (window).gridData, - allowGrouping: true, - allowSorting: true, - allowMultiSorting: true, - enableAltRow: true, - allowPaging: true, - allowReordering: true, - allowResizing: true, - allowFiltering: true, - allowScrolling: true, - enableRowHover: true, - selectionType: "multiple", - selectionSettings: { enableToggle: true, selectionMode: ["row", "cell", "column"] }, - allowKeyboardNavigation: true, - editSettings: { allowEditing: true, allowAdding: true, allowDeleting: true, allowEditOnDblClick: true, showDeleteConfirmDialog: true }, - toolbarSettings: { showToolbar: true, toolbarItems: ["add", "edit", "delete", "update", "cancel", "search"] }, - columns: [ - { field: "OrderID", headerText: "Order ID", isPrimaryKey: true, width: 75, textAlign: ej.TextAlign.Right }, - { field: "CustomerID", headerText: "Customer ID", editType: ej.Grid.EditingType.String, width: 80 }, - { field: "EmployeeID", headerText: "Employee ID", width: 75, editType: ej.Grid.EditingType.Dropdown, textAlign: ej.TextAlign.Right, priority: 4 }, - { field: "Freight", width: 75, format: "{0:C}", editType: ej.Grid.EditingType.Numeric, textAlign: ej.TextAlign.Right, priority: 3 }, - { field: "OrderDate", headerText: "Order Date", width: 80, format: "{0:MM/dd/yyyy}", textAlign: ej.TextAlign.Right, priority: 2 }, - { field: "ShipCity", headerText: "Ship City", editType: ej.Grid.EditingType.Dropdown, width: 110, priority: 2 } - ], - isResponsive: true, - minWidth: 700, - showSummary: true, - summaryRows: [{ title: "Sum", summaryColumns: [{ summaryType: ej.Grid.SummaryType.Sum, displayColumn: "Freight", dataMember: "Freight", format: "{0:C2}" }] }] - }); - }); -} - - - -var columns = ["Vegie-spread", "Tofuaa", "Alice Mutton", "Konbu", "Fløtemysost"] -var itemSource: any[] = []; -for (var i = 0; i < columns.length; i++) { - for (var j = 0; j < 6; j++) { - var value = Math.floor((Math.random() * 100) + 1); - itemSource.push({ ProductName: columns[i], Year: "Y" + (2011 + j), Value: value }) - } -} - -$(function () { - var heatmap = new ej.datavisualization.HeatMap($("#heatmap"), { - colorMappingCollection: [ - { value: 0, color: "#8ec8f8", label: { text: "0" } }, - { value: 100, color: "#0d47a1", label: { text: "100" } } - ], - isResponsive: true, - itemsSource: itemSource, - width: "100%", - itemsMapping: { - column: { propertyName: "ProductName", displayName: "Product Name" }, - row: { propertyName: "Year", displayName: "Year" }, - value: { propertyName: "Value" }, - columnMapping: [ - { "propertyName": columns[0], "displayName": columns[0] }, - { "propertyName": columns[1], "displayName": columns[1] }, - { "propertyName": columns[2], "displayName": columns[2] }, - { "propertyName": columns[3], "displayName": columns[3] }, - { "propertyName": columns[4], "displayName": columns[4] }, - { "propertyName": columns[5], "displayName": columns[5] } - ], - headerMapping: { propertyName: "Year", displayName: "Year", columnStyle: { width: 105, textAlign: "right" } }, - }, - legendCollection: ["heatmap_legend"] - }); - var heatmaplegend = new ej.datavisualization.HeatMapLegend($("#heatmap_legend"), { - colorMappingCollection: [ - { value: 0, color: "#8ec8f8", label: { text: "0" } }, - { value: 100, color: "#0d47a1", label: { text: "100" } } - ], - height: "50px", - width: "75%", - isResponsive: true - }); -}); - - - - -module KanbanComponent { - $(function () { - var sample = new ej.Kanban($("#Kanban"), { - dataSource: new ej.DataManager((window).kanbanData).executeLocal(new ej.Query().take(20)), - columns: [ - { headerText: "Backlog", key: "Open" }, - { headerText: "In Progress", key: "InProgress" }, - { headerText: "Testing", key: "Testing" }, - { headerText: "Done", key: "Close" } - ], - keyField: "Status", - allowTitle: true, - fields: { - content: "Summary", - primaryKey: "Id", - imageUrl: "ImgUrl" - }, - allowSelection: false - }); - }); -} - - - - -module lineargaugecomponent { - $(function () { - var linearsample = new ej.datavisualization.LinearGauge($("#LinearGauge"), { - labelColor: "#8c8c8c", width: 500, - isResponsive: true, enableAnimation: false, - scales: [{ - width: 4, border: { color: "transparent", width: 0 }, showBarPointers: false, showRanges: true, length: 310, - position: { x: 52, y: 50 }, markerPointers: [{ - value: 50, length: 10, width: 10, backgroundColor: "#4D4D4D", border: { color: "#4D4D4D" } - }], - labels: [{ font: { size: "11px", fontFamily: "Segoe UI", fontStyle: "bold" }, distanceFromScale: { x: -13 } }], - ticks: [{ type: "majorinterval", width: 1, color: "#8c8c8c" }], - ranges: [{ - endValue: 60, - startValue: 0, - backgroundColor: "#F6B53F", - border: { color: "#F6B53F" }, startWidth: 4, endWidth: 4 - }, { - endValue: 100, - startValue: 60, - backgroundColor: "#E94649", - border: { color: "#E94649" }, startWidth: 4, endWidth: 4 - }] - }] - }); - }); -} - - - - - -module ListBoxComponent { - $(function () { - var listboxInstance = new ej.ListBox($("#selectcar"), { - showCheckbox: true - }); - }); -} - - - -module ListviewComponent { - $(function () { - var listviewInstance = new ej.ListView($("#defaultlistview"), { - enableCheckMark: true, - width: 400 - }); - }); -} - - -var world_map= - { - "type": "FeatureCollection", - "crs": { "type": "name", "properties": { "name": "urn:ogc:def:crs:OGC:1.3:CRS84" } }, - "features": [ - { "type": "Feature", "properties": { "admin": "Afghanistan", "name": "Afghanistan", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[61.21081709172573, 35.650072333309218], [62.230651483005879, 35.270663967422287], [62.984662306576588, 35.404040839167614], [63.193538445900337, 35.857165635718907], [63.982895949158696, 36.007957465146596], [64.546479119733888, 36.31207326918426], [64.746105177677393, 37.111817735333297], [65.588947788357828, 37.305216783185628], [65.745630731066811, 37.661164048812061], [66.217384881459324, 37.393790188133913], [66.518606805288655, 37.362784328758785], [67.075782098259609, 37.35614390720928], [67.829999627559502, 37.144994004864678], [68.135562371701369, 37.023115139304302], [68.859445835245921, 37.344335842430588], [69.196272820924364, 37.15114350030742], [69.518785434857946, 37.608996690413413], [70.116578403610319, 37.588222764632086], [70.270574171840124, 37.73516469985401], [70.376304152309274, 38.138395901027515], [70.806820509732873, 38.486281643216408], [71.348131137990251, 38.258905341132156], [71.239403924448155, 37.953265082341879], [71.541917759084768, 37.905774441065631], [71.448693475230229, 37.065644843080513], [71.84463829945058, 36.738171291646914], [72.193040805962383, 36.94828766534566], [72.636889682917271, 37.047558091778349], [73.260055779924983, 37.495256862938994], [73.948695916646486, 37.421566270490786], [74.980002475895404, 37.419990139305888], [75.158027785140902, 37.13303091078911], [74.575892775372964, 37.02084137628345], [74.067551710917812, 36.836175645488446], [72.920024855444453, 36.720007025696312], [71.846291945283909, 36.509942328429851], [71.262348260385735, 36.074387518857797], [71.498767938121077, 35.650563259415996], [71.613076206350698, 35.153203436822857], [71.115018751921625, 34.733125718722228], [71.156773309213449, 34.348911444632144], [70.881803012988385, 33.988855902638512], [69.93054324735958, 34.020120144175102], [70.323594191371583, 33.358532619758385], [69.687147251264847, 33.105498969041228], [69.262522007122541, 32.501944078088293], [69.317764113242546, 31.901412258424436], [68.926676873657655, 31.620189113892064], [68.556932000609308, 31.713310044882011], [67.792689243444769, 31.582930406209623], [67.683393589147457, 31.303154201781414], [66.938891229118454, 31.304911200479346], [66.38145755398601, 30.738899237586448], [66.346472609324408, 29.88794342703617], [65.046862013616092, 29.472180691031902], [64.350418735618504, 29.560030625928089], [64.148002150331237, 29.340819200145965], [63.550260858011164, 29.468330796826162], [62.549856805272775, 29.318572496044304], [60.874248488208778, 29.829238999952604], [61.78122155136343, 30.735850328081231], [61.699314406180811, 31.379506130492661], [60.941944614511115, 31.548074652628745], [60.863654819588952, 32.182919623334421], [60.536077915290761, 32.981268825811561], [60.963700392505991, 33.528832302376252], [60.528429803311575, 33.676446031217999], [60.80319339380744, 34.404101874319856], [61.21081709172573, 35.650072333309218]]] } }, - { "type": "Feature", "properties": { "admin": "Angola", "name": "Angola", "continent": "Africa" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[16.326528354567042, -5.877470391466217], [16.573179965896141, -6.622644545115092], [16.860190870845226, -7.222297865429978], [17.089995965247166, -7.545688978712474], [17.472970004962288, -8.068551120641656], [18.134221632569048, -7.987677504104865], [18.464175652752683, -7.847014255406475], [19.016751743249664, -7.988245944860138], [19.166613396896079, -7.738183688999724], [19.417502475673214, -7.155428562044277], [20.037723016040214, -7.116361179231658], [20.091621534920616, -6.943090101756949], [20.60182295093832, -6.939317722199688], [20.514748162526526, -7.299605808138663], [21.728110792739752, -7.290872491081315], [21.74645592620336, -7.920084730667113], [21.949130893652033, -8.305900974158304], [21.80180138518795, -8.908706556842985], [21.875181919042397, -9.523707777548564], [22.208753289486417, -9.894796237836529], [22.155268182064326, -11.084801120653777], [22.402798292742428, -10.99307545333569], [22.837345411884762, -11.017621758674334], [23.456790805767461, -10.867863457892481], [23.912215203555743, -10.926826267137541], [24.017893507592614, -11.237298272347115], [23.904153680118235, -11.722281589406332], [24.079905226342895, -12.191296888887305], [23.930922072045373, -12.565847670138821], [24.0161365088947, -12.91104623784855], [21.933886346125941, -12.898437188369353], [21.887842644953871, -16.080310153876891], [22.562478468524283, -16.898451429921831], [23.215048455506086, -17.523116143465952], [21.377176141045592, -17.930636488519706], [18.956186964603628, -17.789094740472233], [18.263309360434217, -17.309950860262003], [14.209706658595049, -17.353100681225708], [14.058501417709035, -17.423380629142653], [13.462362094789963, -16.971211846588741], [12.814081251688405, -16.941342868724075], [12.21546146001938, -17.111668389558059], [11.734198846085146, -17.301889336824498], [11.640096062881609, -16.673142185129205], [11.778537224991563, -15.793816013250687], [12.123580763404444, -14.878316338767927], [12.175618930722264, -14.449143568583889], [12.500095249083014, -13.547699883684398], [12.738478631245439, -13.137905775609934], [13.312913852601834, -12.483630466362511], [13.633721144269824, -12.038644707897189], [13.738727654686924, -11.297863050993142], [13.686379428775293, -10.73107594161584], [13.38732791510216, -10.373578383020726], [13.120987583069873, -9.766897067914112], [12.875369500386567, -9.166933689005488], [12.929061313537797, -8.959091078327573], [13.23643273280987, -8.56262948978434], [12.933040398824314, -7.596538588087752], [12.728298374083916, -6.927122084178803], [12.227347039446441, -6.294447523629372], [12.322431674863562, -6.100092461779651], [12.735171339578695, -5.965682061388476], [13.024869419006988, -5.984388929878106], [13.375597364971892, -5.864241224799555], [16.326528354567042, -5.877470391466217]]], [[[12.436688266660919, -5.684303887559223], [12.182336866920277, -5.789930515163801], [11.914963006242115, -5.037986748884733], [12.318607618873923, -4.606230157086158], [12.620759718484548, -4.438023369976121], [12.995517205465202, -4.781103203961918], [12.631611769265842, -4.991271254092935], [12.468004184629759, -5.248361504744991], [12.436688266660919, -5.684303887559223]]]] } }, - { "type": "Feature", "properties": { "admin": "Albania", "name": "Albania", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[20.590247430104906, 41.855404161133592], [20.463175083099195, 41.515089016275333], [20.605181919037356, 41.086226304685219], [21.020040317476397, 40.842726955725873], [20.99998986174722, 40.580003973953964], [20.67499677906363, 40.43499990494302], [20.61500044117275, 40.110006822259365], [20.150015903410516, 39.624997666983965], [19.980000441170144, 39.694993394523401], [19.9600016618732, 39.915005805006039], [19.40608198413673, 40.250773423822459], [19.319058872157139, 40.727230129553554], [19.403549838954287, 41.409565741535445], [19.540027296637099, 41.71998607031275], [19.371768833094958, 41.87754751237064], [19.304486118250786, 42.195745144207812], [19.738051385179627, 42.688247382165564], [19.801613396898681, 42.500093492190835], [20.0707, 42.58863], [20.28375451018189, 42.320259507815074], [20.52295, 42.21787], [20.590247430104906, 41.855404161133592]]] } }, - { "type": "Feature", "properties": { "admin": "United Arab Emirates", "name": "United Arab Emirates", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[51.579518670463258, 24.245497137951102], [51.757440626844172, 24.294072984305462], [51.794389275932865, 24.019826158132499], [52.577080519425593, 24.177439276622703], [53.404006788960139, 24.151316840099167], [54.008000929587574, 24.121757920828212], [54.693023716048614, 24.797892360935084], [55.439024692614126, 25.439145209244934], [56.070820753814544, 26.055464178973978], [56.261041701080948, 25.714606431576762], [56.396847365143991, 24.924732163995483], [55.886232537667993, 24.92083059335744], [55.804118686756212, 24.269604193615258], [55.981213820220454, 24.130542914317822], [55.528631626208231, 23.933604030853498], [55.525841098864461, 23.524869289640929], [55.234489373602869, 23.110992743415316], [55.208341098863187, 22.708329982997039], [55.006803012924898, 22.496947536707129], [52.000733270074321, 23.001154486578937], [51.617707553926969, 24.014219265228824], [51.579518670463258, 24.245497137951102]]] } }, - { "type": "Feature", "properties": { "admin": "Argentina", "name": "Argentina", "continent": "South America" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[-65.5, -55.2], [-66.45, -55.25], [-66.95992, -54.89681], [-67.56244, -54.87001], [-68.63335, -54.8695], [-68.634010227583147, -52.636370458874453], [-68.25, -53.1], [-67.75, -53.85], [-66.45, -54.45], [-65.05, -54.7], [-65.5, -55.2]]], [[[-64.964892137294569, -22.075861504812348], [-64.377021043542257, -22.79809132252354], [-63.986838141522462, -21.993644301035953], [-62.84646847192154, -22.034985446869452], [-62.685057135657885, -22.249029229422401], [-60.846564704009928, -23.880712579038299], [-60.028966030503973, -24.032796319273238], [-58.807128465394939, -24.771459242453268], [-57.777217169817952, -25.162339776309032], [-57.633660040911124, -25.603656508081666], [-58.618173590719707, -27.123718763947117], [-57.609759690976134, -27.395898532828419], [-56.486701626192989, -27.548499037386243], [-55.695845506398186, -27.387837009390815], [-54.788794928595038, -26.621785577096087], [-54.625290696823541, -25.739255466415479], [-54.130049607954412, -25.547639255477243], [-53.628348965048716, -26.12486500417743], [-53.648735317587885, -26.923472588816104], [-54.490725267135517, -27.474756768505767], [-55.162286342984586, -27.881915378533414], [-56.290899624239088, -28.852760512000849], [-57.62513342958291, -30.21629485445424], [-57.874937303281897, -31.016556084926158], [-58.14244035504074, -32.044503676076182], [-58.132647671121404, -33.040566908502008], [-58.349611172098818, -33.263188978815428], [-58.427074144104367, -33.909454441057541], [-58.495442064026541, -34.4314897600701], [-57.225829637263629, -35.288026625307886], [-57.362358771378737, -35.977390232081497], [-56.737487352105447, -36.413125909166574], [-56.788285285048339, -36.901571547189327], [-57.749156867083421, -38.183870538079901], [-59.231857062401865, -38.720220228837199], [-61.2374452378656, -38.92842457454114], [-62.335956997310134, -38.827707208004362], [-62.125763108962914, -39.424104913084868], [-62.33053097191943, -40.172586358400316], [-62.145994432205228, -40.676896661136723], [-62.74580278181697, -41.028761488612083], [-63.770494757732514, -41.166789239263657], [-64.732089809819698, -40.802677097335128], [-65.118035244391578, -41.064314874028874], [-64.97856055363583, -42.058000990569312], [-64.303407965742466, -42.359016208669495], [-63.755947842042339, -42.043686618824495], [-63.458059048095883, -42.563138116222355], [-64.378803880456289, -42.873558444999638], [-65.181803961839691, -43.495380954767782], [-65.328823411710133, -44.501366062193689], [-65.565268927661592, -45.03678557716978], [-66.509965786389344, -45.039627780945843], [-67.293793911392427, -45.551896254255183], [-67.580546434180079, -46.301772963242527], [-66.597066413017259, -47.033924655953804], [-65.641026577401433, -47.23613453551188], [-65.98508826360073, -48.133289076531128], [-67.166178961847649, -48.697337334996931], [-67.816087612566449, -49.869668877970412], [-68.728745083273154, -50.26421843851886], [-69.138539191347789, -50.732510267947788], [-68.815561489523517, -51.771104011594097], [-68.149994879820397, -52.349983406127699], [-68.571545376241332, -52.299443855346247], [-69.498362189396076, -52.142760912637236], [-71.914803839796321, -52.009022305865912], [-72.329403856074023, -51.425956312872394], [-72.309973517532342, -50.677009779666342], [-72.975746832964617, -50.741450290734299], [-73.328050910114456, -50.378785088909865], [-73.415435757120022, -49.318436374712952], [-72.648247443314929, -48.878618259476774], [-72.331160854771937, -48.244238376661819], [-72.44735531278026, -47.738532810253517], [-71.917258470330196, -46.884838148791786], [-71.552009446891233, -45.560732924177117], [-71.659315558545316, -44.973688653341434], [-71.222778896759721, -44.784242852559409], [-71.329800788036195, -44.407521661151677], [-71.793622606071935, -44.207172133156099], [-71.464056159130493, -43.787611179378324], [-71.915423956983901, -43.408564548517404], [-72.148898078078517, -42.254888197601375], [-71.746803758415453, -42.051386407235988], [-71.915734015577542, -40.832339369470716], [-71.680761277946445, -39.808164157878061], [-71.413516608349042, -38.916022230791107], [-70.814664272734703, -38.552995293940732], [-71.118625047475419, -37.576827487947192], [-71.121880662709771, -36.65812387466233], [-70.364769253201658, -36.005088799789931], [-70.388049485949082, -35.169687595359441], [-69.817309129501453, -34.193571465798279], [-69.814776984319209, -33.273886000299839], [-70.074399380153622, -33.09120981214803], [-70.535068935819439, -31.365010267870279], [-69.919008348251921, -30.336339206668306], [-70.013550381129861, -29.367922865518544], [-69.656130337183143, -28.459141127233686], [-69.001234910748266, -27.521213881136127], [-68.295541551370391, -26.899339694935787], [-68.594799770772667, -26.50690886811126], [-68.386001146097342, -26.185016371365229], [-68.417652960876111, -24.518554782816874], [-67.328442959244128, -24.025303236590908], [-66.985233934177629, -22.986348565362825], [-67.106673550063604, -22.735924574476392], [-66.273339402924833, -21.832310479420677], [-64.964892137294569, -22.075861504812348]]]] } }, - { "type": "Feature", "properties": { "admin": "Armenia", "name": "Armenia", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[43.582745802592726, 41.09214325618256], [44.972480096218071, 41.248128567055588], [45.179495883979335, 40.985353908851401], [45.560351189970433, 40.812289537105919], [45.359174839058156, 40.561503811193447], [45.891907179555076, 40.218475653639992], [45.610012241402913, 39.899993801425175], [46.034534132680662, 39.628020738273058], [46.483498976432443, 39.464154771475528], [46.505719842317966, 38.770605373686287], [46.143623081248812, 38.74120148371221], [45.735379266143006, 39.319719143219736], [45.739978468616975, 39.473999131827114], [45.298144972521456, 39.471751207022422], [45.00198733905674, 39.740003567049548], [44.793989699081934, 39.713002631177041], [44.400008579288695, 40.005000311842267], [43.656436395040934, 40.253563951166178], [43.752657911968399, 40.740200914058754], [43.582745802592726, 41.09214325618256]]] } }, - { "type": "Feature", "properties": { "admin": "French Southern and Antarctic Lands", "name": "Fr. S. Antarctic Lands", "continent": "Seven seas (open ocean)" }, "geometry": { "type": "Polygon", "coordinates": [[[68.935, -48.625], [69.58, -48.94], [70.525, -49.065], [70.56, -49.255], [70.28, -49.71], [68.745, -49.775], [68.72, -49.2425], [68.8675, -48.83], [68.935, -48.625]]] } }, - { "type": "Feature", "properties": { "admin": "Australia", "name": "Australia", "continent": "Oceania" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[145.397978143494782, -40.792548516605883], [146.364120721623692, -41.137695407883335], [146.908583612250823, -41.000546156580668], [147.689259474884125, -40.808258152022681], [148.289067824495987, -40.875437514002122], [148.359864536735785, -42.062445163746439], [148.017301467073082, -42.40702361426861], [147.914051955353784, -43.211522312188485], [147.564564243763982, -42.937688897473855], [146.87034305235494, -43.634597263362082], [146.663327264593647, -43.580853773778543], [146.048377720320389, -43.54974456153888], [145.431929559510536, -42.693776137056268], [145.295090366801674, -42.03360971452755], [144.7180713238306, -41.162551771815707], [144.743754510679622, -40.703975111657705], [145.397978143494782, -40.792548516605883]]], [[[143.561811151299935, -13.763655694232209], [143.922099237238882, -14.548310642152], [144.563713820574804, -14.171176039285879], [144.894908075133515, -14.594457696188622], [145.374723748963419, -14.984976495018284], [145.271991001567244, -15.428205254785691], [145.48525963763575, -16.285672295804769], [145.637033319276952, -16.784918308176611], [145.888904250267672, -16.906926364817647], [146.160308872664473, -17.76165455492524], [146.063673944278662, -18.280072523677315], [146.387478469019584, -18.958274021075905], [147.471081577747896, -19.480722751546676], [148.177601760042478, -19.955939222902767], [148.848413527623222, -20.391209812097252], [148.717465448195583, -20.633468926681513], [149.289420200802056, -21.260510756111096], [149.678337030230637, -22.342511895438388], [150.07738244038859, -22.122783705333315], [150.482939081015161, -22.556142266533012], [150.727265252891158, -22.402404880464655], [150.899554478152254, -23.462236830338679], [151.609175246384211, -24.076256198830755], [152.07353966695905, -24.45788665130619], [152.855197381805908, -25.267501316023008], [153.136162144176751, -26.071173191026187], [153.161948683890358, -26.641319268502439], [153.09290897034856, -27.260299574494503], [153.569469028944184, -28.110066827102099], [153.512108189100218, -28.995077406532751], [153.339095493787056, -29.458201592732443], [153.069241164358857, -30.350240166954809], [153.089601678681788, -30.923641859665445], [152.891577590139377, -31.640445651985949], [152.450002476205327, -32.550002536755237], [151.709117466436766, -33.041342054986337], [151.343971795862387, -33.816023451473846], [151.010555454715103, -34.310360202777879], [150.714139439089024, -35.173459974916803], [150.328219842733233, -35.671879164371923], [150.075212030232251, -36.420205580390508], [149.946124302367139, -37.109052422841224], [149.997283970336127, -37.425260512035123], [149.423882277625523, -37.772681166333463], [148.304622430615893, -37.809061374666875], [147.38173302631526, -38.219217217767543], [146.922122837511324, -38.606532077795116], [146.317921991154776, -39.035756524411433], [145.489652134380549, -38.593767999019043], [144.876976353128157, -38.41744801203911], [145.032212355732952, -37.896187839510972], [144.485682407814011, -38.085323581699257], [143.609973586196077, -38.809465427405321], [142.745426873952965, -38.538267510737519], [142.17832970598198, -38.380034275059835], [141.606581659104677, -38.308514092767872], [140.638578729413211, -38.019332777662541], [139.992158237874321, -37.402936293285094], [139.806588169514043, -36.643602797188272], [139.574147577065219, -36.138362318670666], [139.082808058834075, -35.732754001611774], [138.120747918856296, -35.612296237939397], [138.449461704664998, -35.127261244447887], [138.207564325106659, -34.384722588845925], [137.719170363516128, -35.07682504653102], [136.829405552314711, -35.260534763328614], [137.352371047108477, -34.707338555644093], [137.503886346588331, -34.130267836240769], [137.890116001537649, -33.640478610978327], [137.810327590079112, -32.900007012668105], [136.996837192940347, -33.752771498348629], [136.372069126531642, -34.094766127256186], [135.98904341038434, -34.89011809666048], [135.208212518454104, -34.478670342752601], [135.239218377829161, -33.947953383114971], [134.613416782774607, -33.222778008763136], [134.085903761939107, -32.848072198214759], [134.273902622617015, -32.617233575166949], [132.990776808809812, -32.011224053680188], [132.288080682504869, -31.982646986622761], [131.326330601120901, -31.495803318001041], [129.535793898639668, -31.590422865527476], [128.240937534702198, -31.948488864877849], [127.102867466338282, -32.282266941051041], [126.148713820501129, -32.2159660784206], [125.088623488465586, -32.728751316052829], [124.22164798390493, -32.959486586236061], [124.028946567888511, -33.483847344701708], [123.65966678273071, -33.890179131812722], [122.811036411633609, -33.914467054989835], [122.18306440642283, -34.003402194964217], [121.299190708502579, -33.821036065406126], [120.580268182458113, -33.930176690406618], [119.893695103028222, -33.976065362281808], [119.298899367348781, -34.50936614353396], [119.007340936357977, -34.464149265278529], [118.505717808100769, -34.746819349915093], [118.024971958489516, -35.064732761374707], [117.295507440257438, -35.025458672832862], [116.62510908413492, -35.025096937806829], [115.564346958479689, -34.386427911111547], [115.026808709779516, -34.196517022438918], [115.048616164206763, -33.623425388322026], [115.545123325667078, -33.487257989232951], [115.714673700016661, -33.259571628554944], [115.679378696761376, -32.900368747694124], [115.801645135563959, -32.205062351207026], [115.689610630355105, -31.612437025683782], [115.160909051576937, -30.601594333622455], [114.99704308477942, -30.030724786094162], [115.040037876446249, -29.461095472940794], [114.64197431850198, -28.810230808224706], [114.61649783738217, -28.516398614213042], [114.173579136208446, -28.118076674107321], [114.048883905088132, -27.33476531342712], [113.477497593236876, -26.543134047147898], [113.338953078262477, -26.116545098578477], [113.77835778204026, -26.549025160429174], [113.440962355606587, -25.621278171493152], [113.936901076311642, -25.911234633082877], [114.232852004047288, -26.298446140245868], [114.216160516417006, -25.786281019801105], [113.721255324357685, -24.998938897402123], [113.625343866024025, -24.683971042583146], [113.393523390762667, -24.384764499613262], [113.502043898575607, -23.80635019297025], [113.706992629045146, -23.56021534596406], [113.843418410295669, -23.059987481378734], [113.736551548316072, -22.475475355725372], [114.149756300921865, -21.755881036061009], [114.225307244932651, -22.51748829517863], [114.64776207891866, -21.829519952076904], [115.460167270979298, -21.495173435148541], [115.94737267462699, -21.068687839443708], [116.711615431791529, -20.701681817306817], [117.166316359527684, -20.623598728113802], [117.441545037914238, -20.746898695562162], [118.229558953932951, -20.374208265873232], [118.836085239742701, -20.263310642174822], [118.987807244951753, -20.044202569257319], [119.252493931150624, -19.952941989829835], [119.805225050944543, -19.976506442954978], [120.856220330896633, -19.683707777589188], [121.399856398607199, -19.239755547769729], [121.655137974129062, -18.70531788500713], [122.241665480641757, -18.197648614171765], [122.286623976735655, -17.798603204013911], [122.312772251475408, -17.254967136303446], [123.012574497571904, -16.405199883695854], [123.433789097183009, -17.268558037996225], [123.859344517106592, -17.069035332917249], [123.503242222183232, -16.596506036040363], [123.817073195491915, -16.11131601325199], [124.258286574399847, -16.32794361741956], [124.379726190285794, -15.567059828353973], [124.926152785340022, -15.07510019293532], [125.167275018413875, -14.680395603090004], [125.670086704613823, -14.510070082256018], [125.685796340030493, -14.230655612853834], [126.125149367376096, -14.347340996968949], [126.142822707219864, -14.095986830301211], [126.582589146023736, -13.95279143642041], [127.065867140817332, -13.817967624570922], [127.804633416861932, -14.276906019755042], [128.359689976108939, -14.869169610252253], [128.985543247595899, -14.875990899314738], [129.621473423379598, -14.969783623924553], [129.409600050982988, -14.420669854391031], [129.888640578328591, -13.618703301653481], [130.339465773642928, -13.357375583553473], [130.183506300985982, -13.107520033422301], [130.617795037966971, -12.536392103732464], [131.223494500859999, -12.183648776908113], [131.73509118054946, -12.302452894747159], [132.575298293183096, -12.114040622611013], [132.557211541881031, -11.603012383676683], [131.824698114143644, -11.273781833545097], [132.357223748911395, -11.128519382372641], [133.019560581596409, -11.376411228076844], [133.550845981989028, -11.786515394745134], [134.393068475481982, -12.042365411022173], [134.678632440327021, -11.9411829565947], [135.298491245667975, -12.248606052299051], [135.882693312727611, -11.962266940969796], [136.258380975489445, -12.049341729381606], [136.492475213771627, -11.857208754120389], [136.951620314684988, -12.351958916882735], [136.685124953355739, -12.887223402562054], [136.305406528875096, -13.291229750219895], [135.961758254134111, -13.324509372615889], [136.077616815332533, -13.72427825282578], [135.783836297753226, -14.223989353088211], [135.4286641786112, -14.715432224183896], [135.500184360903177, -14.997740573794427], [136.295174595281367, -15.550264987859121], [137.065360142159477, -15.870762220933353], [137.580470819244795, -16.215082289294084], [138.303217401278971, -16.807604261952658], [138.58516401586337, -16.806622409739173], [139.108542922115475, -17.062679131745366], [139.260574985918197, -17.371600843986183], [140.215245396078274, -17.710804945550063], [140.875463495039241, -17.36906869880394], [141.071110467696258, -16.832047214426719], [141.274095493738798, -16.388870131091604], [141.398222284103781, -15.840531508042584], [141.702183058844611, -15.044921156476928], [141.563380161708665, -14.561333103089506], [141.635520461188094, -14.270394789286284], [141.519868605718955, -13.698078301653805], [141.650920038011009, -12.944687595270562], [141.842691278246207, -12.741547539931187], [141.68699018775078, -12.407614434461134], [141.928629185147543, -11.877465915578778], [142.118488397387978, -11.328042087451619], [142.14370649634634, -11.04273650476814], [142.51526004452495, -10.668185723516642], [142.797310011974048, -11.157354831591515], [142.866763136974271, -11.784706719614929], [143.11594689348567, -11.90562957117791], [143.158631626558758, -12.325655612846187], [143.522123651299864, -12.834358412327429], [143.597157830987669, -13.400422051652594], [143.561811151299935, -13.763655694232209]]]] } }, - { "type": "Feature", "properties": { "admin": "Austria", "name": "Austria", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[16.979666782304033, 48.123497015976298], [16.903754103267257, 47.714865627628321], [16.340584344150411, 47.712901923201215], [16.534267612380372, 47.496170966169103], [16.202298211337361, 46.852385972676949], [16.011663852612653, 46.683610744811688], [15.137091912504982, 46.658702704447016], [14.632471551174827, 46.431817328469535], [13.806475457421524, 46.509306138691201], [12.376485223040813, 46.767559109069843], [12.153088006243051, 47.115393174826437], [11.164827915093268, 46.941579494812721], [11.048555942436533, 46.751358547546324], [10.442701450246627, 46.893546250997424], [9.932448357796657, 46.920728054382948], [9.479969516649019, 47.102809963563367], [9.632931756232974, 47.347601223329974], [9.594226108446346, 47.525058091820256], [9.896068149463188, 47.58019684507569], [10.402083774465209, 47.302487697939156], [10.544504021861625, 47.566399237653762], [11.426414015354736, 47.523766181012967], [12.141357456112784, 47.703083401065761], [12.620759718484491, 47.672387600284395], [12.932626987365945, 47.467645575543983], [13.025851271220487, 47.637583523135824], [12.884102817443901, 48.289145819687903], [13.243357374736998, 48.41611481382904], [13.595945672264433, 48.877171942737135], [14.33889773932472, 48.555305284207193], [14.901447381254055, 48.964401760445817], [15.253415561593979, 49.039074205107575], [16.029647251050218, 48.733899034207916], [16.49928266771877, 48.785808010445095], [16.960288120194573, 48.596982326850593], [16.879982944412998, 48.470013332709463], [16.979666782304033, 48.123497015976298]]] } }, - { "type": "Feature", "properties": { "admin": "Azerbaijan", "name": "Azerbaijan", "continent": "Asia" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[45.001987339056789, 39.740003567049591], [45.298144972521435, 39.471751207022422], [45.739978468616997, 39.473999131827149], [45.735379266143092, 39.319719143219785], [46.143623081248812, 38.74120148371221], [45.457721795438729, 38.874139105783108], [44.952688022650264, 39.33576467544642], [44.79398969908199, 39.713002631177027], [45.001987339056789, 39.740003567049591]]], [[[47.373315464066216, 41.219732367511249], [47.81566572448471, 41.151416124021338], [47.987283156126033, 41.405819200194223], [48.584352654826283, 41.808869533854669], [49.110263706260653, 41.282286688800518], [49.618914829309588, 40.572924302729966], [50.084829542853093, 40.526157131505776], [50.392821079312704, 40.256561184239096], [49.569202101444795, 40.176100979160701], [49.395259230350419, 39.39948171646224], [49.2232283872507, 39.04921885838791], [48.856532423707584, 38.815486355131775], [48.883249139202533, 38.320245266262638], [48.634375441284831, 38.270377509100925], [48.010744256386502, 38.794014797514528], [48.355529412637928, 39.288764960276886], [48.060095249225256, 39.582235419262439], [47.685079380083117, 39.508363959301185], [46.505719842317966, 38.770605373686251], [46.483498976432443, 39.464154771475528], [46.034534132680697, 39.628020738273044], [45.610012241402913, 39.899993801425175], [45.891907179555133, 40.21847565363997], [45.359174839058156, 40.561503811193482], [45.560351189970469, 40.812289537105947], [45.179495883979392, 40.98535390885143], [44.972480096218156, 41.248128567055623], [45.217426385281634, 41.411451931314041], [45.962600538930438, 41.123872585609789], [46.501637404166978, 41.064444688474104], [46.637908156120567, 41.181672675128219], [46.145431756378983, 41.72280243587263], [46.404950799348818, 41.860675157227341], [46.686070591016652, 41.827137152669899], [47.373315464066216, 41.219732367511249]]]] } }, - { "type": "Feature", "properties": { "admin": "Burundi", "name": "Burundi", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[29.339997592900342, -4.499983412294092], [29.276383904749046, -3.293907159034063], [29.02492638521678, -2.839257907730157], [29.632176141078585, -2.917857761246096], [29.938359002407935, -2.348486830254238], [30.469696079232978, -2.413857517103458], [30.527677036264457, -2.807631931167534], [30.743012729624692, -3.034284763199686], [30.752262811004943, -3.359329522315569], [30.505559523243559, -3.568567396665364], [30.116332635221166, -4.090137627787242], [29.753512404099919, -4.45238941815328], [29.339997592900342, -4.499983412294092]]] } }, - { "type": "Feature", "properties": { "admin": "Belgium", "name": "Belgium", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[3.314971144228536, 51.345780951536071], [4.047071160507527, 51.267258612668556], [4.973991326526913, 51.475023708698124], [5.60697594567, 51.037298488969768], [6.156658155958779, 50.803721015010574], [6.043073357781109, 50.128051662794221], [5.782417433300905, 50.090327867221205], [5.674051954784828, 49.52948354755749], [4.799221632515809, 49.985373033236371], [4.286022983425084, 49.90749664977254], [3.588184441755685, 50.378992418003563], [3.123251580425801, 50.780363267614561], [2.658422071960274, 50.796848049515731], [2.513573032246142, 51.148506171261815], [3.314971144228536, 51.345780951536071]]] } }, - { "type": "Feature", "properties": { "admin": "Benin", "name": "Benin", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[2.691701694356254, 6.258817246928628], [1.865240512712318, 6.14215770102973], [1.618950636409238, 6.832038072126236], [1.664477573258381, 9.128590399609378], [1.46304284018467, 9.334624335157086], [1.425060662450136, 9.825395412632998], [1.077795037448737, 10.175606594275022], [0.772335646171484, 10.470808213742357], [0.899563022474069, 10.997339382364258], [1.243469679376488, 11.11051076908346], [1.447178175471066, 11.547719224488857], [1.93598554851988, 11.641150214072551], [2.154473504249921, 11.940150051313337], [2.49016360841793, 12.233052069543671], [2.84864301922667, 12.235635891158266], [3.611180454125558, 11.660167141155966], [3.572216424177469, 11.327939357951516], [3.797112257511713, 10.734745591673104], [3.600070021182801, 10.332186184119406], [3.705438266625918, 10.063210354040207], [3.220351596702101, 9.4441525333997], [2.912308383810255, 9.13760793704432], [2.723792758809509, 8.506845404489708], [2.74906253420022, 7.870734361192886], [2.691701694356254, 6.258817246928628]]] } }, - { "type": "Feature", "properties": { "admin": "Burkina Faso", "name": "Burkina Faso", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[-2.827496303712706, 9.642460842319775], [-3.511898972986272, 9.900326239456216], [-3.980449184576684, 9.862344061721698], [-4.330246954760383, 9.610834865757139], [-4.779883592131966, 9.821984768101741], [-4.954653286143098, 10.152713934769732], [-5.404341599946973, 10.370736802609144], [-5.470564947929004, 10.951269842976044], [-5.197842576508648, 11.375145778850136], [-5.220941941743119, 11.713858954307224], [-4.427166103523802, 12.542645575404292], [-4.280405035814879, 13.228443508349738], [-4.006390753587225, 13.472485459848112], [-3.52280270019986, 13.337661647998612], [-3.103706834312759, 13.54126679122859], [-2.967694464520576, 13.798150336151506], [-2.191824510090384, 14.246417548067352], [-2.001035122068771, 14.559008287000887], [-1.066363491205663, 14.973815009007764], [-0.515854458000348, 15.116157741755725], [-0.26625729003058, 14.924308986872147], [0.374892205414682, 14.928908189346128], [0.295646396495101, 14.444234930880651], [0.429927605805517, 13.988733018443922], [0.993045688490071, 13.335749620003821], [1.024103224297477, 12.851825669806573], [2.177107781593775, 12.625017808477532], [2.154473504249921, 11.940150051313337], [1.93598554851988, 11.641150214072551], [1.447178175471066, 11.547719224488857], [1.243469679376488, 11.11051076908346], [0.899563022474069, 10.997339382364258], [0.023802524423701, 11.018681748900802], [-0.438701544588582, 11.09834096927872], [-0.761575893548183, 10.936929633015053], [-1.203357713211431, 11.009819240762736], [-2.94040930827046, 10.962690334512557], [-2.963896246747111, 10.395334784380081], [-2.827496303712706, 9.642460842319775]]] } }, - { "type": "Feature", "properties": { "admin": "Bangladesh", "name": "Bangladesh", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[92.672720981825549, 22.041238918541247], [92.652257114637976, 21.324047552978481], [92.30323449093865, 21.475485337809815], [92.368553501355606, 20.670883287025344], [92.082886183646124, 21.192195135985767], [92.025215285208361, 21.701569729086764], [91.834890985077408, 22.182935695885561], [91.417087029997646, 22.765019029221218], [90.496006300827247, 22.805016587815125], [90.586956821660948, 22.392793687422863], [90.272970819055544, 21.836367702720107], [89.847467075564268, 22.039146023033421], [89.70204959509492, 21.857115790285299], [89.41886274613546, 21.966178900637296], [89.031961297566198, 22.055708319582973], [88.876311883503064, 22.879146429937826], [88.529769728553759, 23.631141872649163], [88.699940220090895, 24.233714911388557], [88.084422235062405, 24.501657212821918], [88.30637251175601, 24.866079413344199], [88.931553989623069, 25.238692328384769], [88.209789259802477, 25.768065700782707], [88.56304935094974, 26.446525580342716], [89.355094028687276, 26.014407253518065], [89.832480910199592, 25.965082098895476], [89.920692580121838, 25.269749864192171], [90.872210727912105, 25.13260061288954], [91.799595981822065, 25.14743174895731], [92.376201613334786, 24.976692816664961], [91.915092807994398, 24.130413723237108], [91.467729933643668, 24.072639471934789], [91.158963250699713, 23.503526923104381], [91.706475050832083, 22.985263983649183], [91.869927606171302, 23.62434642180278], [92.146034783906799, 23.62749868417259], [92.672720981825549, 22.041238918541247]]] } }, - { "type": "Feature", "properties": { "admin": "Bulgaria", "name": "Bulgaria", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[22.657149692482985, 44.234923000661276], [22.94483239105184, 43.823785305347123], [23.332302280376322, 43.897010809904707], [24.100679152124169, 43.741051337247846], [25.569271681426923, 43.688444729174712], [26.065158725699739, 43.943493760751259], [27.242399529740904, 44.175986029632398], [27.970107049275068, 43.812468166675202], [28.55808149589199, 43.707461656258118], [28.039095086384712, 43.293171698574177], [27.673897739378042, 42.577892361006214], [27.996720411905383, 42.007358710287775], [27.135739373490473, 42.141484890301335], [26.117041863720793, 41.826904608724554], [26.106138136507205, 41.328898830727766], [25.197201368925441, 41.234485988930523], [24.492644891058031, 41.583896185872028], [23.692073601992345, 41.309080918943842], [22.952377150166445, 41.337993882811141], [22.881373732197424, 41.999297186850242], [22.380525750424585, 42.320259507815081], [22.545011834409614, 42.461362006188025], [22.436594679461273, 42.580321153323929], [22.604801466571324, 42.898518785161137], [22.986018507588479, 43.211161200526959], [22.500156691180276, 43.642814439460977], [22.410446404721593, 44.008063462899948], [22.657149692482985, 44.234923000661276]]] } }, - { "type": "Feature", "properties": { "admin": "The Bahamas", "name": "Bahamas", "continent": "North America" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[-77.53466, 23.75975], [-77.78, 23.71], [-78.03405, 24.28615], [-78.40848, 24.57564], [-78.19087, 25.2103], [-77.89, 25.17], [-77.54, 24.34], [-77.53466, 23.75975]]], [[[-77.82, 26.58], [-78.91, 26.42], [-78.98, 26.79], [-78.51, 26.87], [-77.85, 26.84], [-77.82, 26.58]]], [[[-77.0, 26.59], [-77.17255, 25.87918], [-77.35641, 26.00735], [-77.34, 26.53], [-77.78802, 26.92516], [-77.79, 27.04], [-77.0, 26.59]]]] } }, - { "type": "Feature", "properties": { "admin": "Bosnia and Herzegovina", "name": "Bosnia and Herz.", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[19.005486281010118, 44.860233669609144], [19.36803, 44.863], [19.11761, 44.42307], [19.59976, 44.03847], [19.454, 43.568100000000115], [19.21852, 43.52384], [19.03165, 43.43253], [18.70648, 43.20011], [18.56, 42.65], [17.674921502358981, 43.028562527023603], [17.297373488034449, 43.446340643887353], [16.916156447017325, 43.667722479825663], [16.456442905348862, 44.041239732431265], [16.239660271884528, 44.351143296885695], [15.750026075918978, 44.81871165626255], [15.959367303133373, 45.233776760430935], [16.318156772535868, 45.004126695325901], [16.534939406000202, 45.211607570977705], [17.00214603035101, 45.233776760430935], [17.861783481526398, 45.067740383477137], [18.553214145591646, 45.08158966733145], [19.005486281010118, 44.860233669609144]]] } }, - { "type": "Feature", "properties": { "admin": "Belarus", "name": "Belarus", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[23.484127638449841, 53.912497667041123], [24.45068362803703, 53.905702216194747], [25.536353794056989, 54.282423407602515], [25.768432651479792, 54.846962592175082], [26.588279249790386, 55.167175604871659], [26.494331495883749, 55.61510691997762], [27.102459751094525, 55.783313707087672], [28.17670942557799, 56.169129950578807], [29.2295133806603, 55.918344224666356], [29.371571893030669, 55.67009064393617], [29.896294386522353, 55.789463202530406], [30.87390913262, 55.550976467503396], [30.971835971813132, 55.081547756564028], [30.75753380709871, 54.811770941784303], [31.384472283663733, 54.157056382862422], [31.791424187962232, 53.974638576872117], [31.731272820774503, 53.794029446012011], [32.405598585751157, 53.618045355842028], [32.693643019346034, 53.351420803432106], [32.304519484188226, 53.132726141972903], [31.497643670382924, 53.167426866256889], [31.30520063652801, 53.073995876673195], [31.540018344862254, 52.742052313846344], [31.78599816257158, 52.10167796488544], [30.927549269338975, 52.042353420614383], [30.619454380014837, 51.822806098022362], [30.55511722181145, 51.319503485715643], [30.157363722460889, 51.416138414101454], [29.254938185347921, 51.368234361366881], [28.992835320763522, 51.602044379271462], [28.617612745892242, 51.427713934934836], [28.241615024536564, 51.572227077839059], [27.454066196408426, 51.59230337178446], [26.337958611768549, 51.832288723347915], [25.327787713327005, 51.910656032918538], [24.553106316839511, 51.888461005249177], [24.005077752384206, 51.617443956094448], [23.52707075368437, 51.578454087930233], [23.508002150168689, 52.023646552124717], [23.19949384938618, 52.486977444053664], [23.799198846133375, 52.691099351606553], [23.804934930117774, 53.08973135030606], [23.527535841574995, 53.47012156840654], [23.484127638449841, 53.912497667041123]]] } }, - { "type": "Feature", "properties": { "admin": "Belize", "name": "Belize", "continent": "North America" }, "geometry": { "type": "Polygon", "coordinates": [[[-89.143080410503302, 17.808318996649316], [-89.150909389995519, 17.955467637600414], [-89.029857347351808, 18.001511338772485], [-88.848343878926585, 17.883198147040229], [-88.490122850279334, 18.486830552641603], [-88.300031094093669, 18.499982204659897], [-88.296336229184803, 18.353272813383263], [-88.106812913754368, 18.348673610909284], [-88.123478563168476, 18.076674709541003], [-88.285354987322776, 17.644142971258031], [-88.197866787452625, 17.489475409408453], [-88.302640753924422, 17.13169363043566], [-88.239517991879893, 17.036066392479551], [-88.355428229510551, 16.530774237529624], [-88.551824510435821, 16.265467434143144], [-88.732433641295927, 16.233634751851351], [-88.930612759135244, 15.887273464415072], [-89.229121670269265, 15.886937567605166], [-89.15080603713092, 17.015576687075832], [-89.143080410503302, 17.808318996649316]]] } }, - { "type": "Feature", "properties": { "admin": "Bolivia", "name": "Bolivia", "continent": "South America" }, "geometry": { "type": "Polygon", "coordinates": [[[-62.84646847192154, -22.034985446869442], [-63.986838141522462, -21.993644301035946], [-64.377021043542243, -22.798091322523533], [-64.964892137294598, -22.07586150481232], [-66.273339402924833, -21.832310479420713], [-67.10667355006359, -22.735924574476414], [-67.82817989772272, -22.872918796482171], [-68.219913092711266, -21.494346612231858], [-68.757167121033731, -20.372657972904459], [-68.442225104430904, -19.405068454671426], [-68.966818406841853, -18.9816834449041], [-69.100246955019472, -18.260125420812674], [-69.590423753524036, -17.580011895419329], [-68.959635382753291, -16.500697930571267], [-69.389764166934697, -15.66012908291165], [-69.160346645774936, -15.323973890853015], [-69.339534674747, -14.953195489158828], [-68.94888668483658, -14.45363941819328], [-68.929223802349526, -13.602683607643007], [-68.880079515239956, -12.89972909917665], [-68.665079718689611, -12.561300144097171], [-69.52967810736493, -10.951734307502193], [-68.786157599549469, -11.036380303596276], [-68.27125362819325, -11.014521172736817], [-68.048192308205373, -10.712059014532484], [-67.173801235610725, -10.30681243249961], [-66.646908331962791, -9.931331475466861], [-65.33843522811641, -9.76198780684639], [-65.444837002205375, -10.51145110437543], [-65.321898769783004, -10.895872084194675], [-65.402281460213018, -11.566270440317151], [-64.31635291203159, -12.461978041232191], [-63.196498786050562, -12.627032565972433], [-62.803060268796372, -13.000653171442682], [-62.127080857986371, -13.19878061284972], [-61.713204311760769, -13.489202162330049], [-61.084121263255646, -13.479383640194595], [-60.503304002511122, -13.775954685117656], [-60.459198167550014, -14.354007256734551], [-60.264326341377355, -14.645979099183638], [-60.251148851142922, -15.077218926659318], [-60.542965664295131, -15.093910414289592], [-60.158389655179022, -16.258283786690082], [-58.241219855366673, -16.299573256091289], [-58.388058437724027, -16.877109063385273], [-58.280804002502244, -17.271710300366014], [-57.734558274960989, -17.552468357007765], [-57.498371141170971, -18.174187513911289], [-57.676008877174297, -18.961839694904025], [-57.949997321185819, -19.400004164306814], [-57.853801642474494, -19.969995212486186], [-58.166392381408038, -20.176700941653674], [-58.183471442280492, -19.868399346600359], [-59.11504248720609, -19.356906019775398], [-60.043564622626477, -19.342746677327419], [-61.786326463453761, -19.633736667562957], [-62.265961269770784, -20.513734633061272], [-62.291179368729203, -21.051634616787389], [-62.685057135657871, -22.24902922942238], [-62.84646847192154, -22.034985446869442]]] } }, - { "type": "Feature", "properties": { "admin": "Brazil", "name": "Brazil", "continent": "South America" }, "geometry": { "type": "Polygon", "coordinates": [[[-57.625133429582945, -30.216294854454258], [-56.290899624239067, -28.852760512000884], [-55.162286342984558, -27.881915378533456], [-54.49072526713551, -27.474756768505785], [-53.648735317587885, -26.923472588816086], [-53.628348965048737, -26.124865004177465], [-54.130049607954376, -25.547639255477247], [-54.625290696823562, -25.739255466415507], [-54.428946092330577, -25.162184747012162], [-54.293476325077435, -24.570799655863958], [-54.292959560754511, -24.021014092710722], [-54.652834235235119, -23.839578138933955], [-55.027901780809543, -24.001273695575225], [-55.400747239795407, -23.956935316668797], [-55.517639329639621, -23.57199757252663], [-55.61068274598113, -22.655619398694839], [-55.797958136606894, -22.356929620047815], [-56.473317430229379, -22.086300144135279], [-56.881509568902885, -22.282153822521476], [-57.937155727761287, -22.090175876557169], [-57.870673997617786, -20.732687676681948], [-58.166392381408038, -20.176700941653674], [-57.853801642474494, -19.969995212486186], [-57.949997321185819, -19.400004164306814], [-57.676008877174297, -18.961839694904025], [-57.498371141170971, -18.174187513911289], [-57.734558274960989, -17.552468357007765], [-58.280804002502244, -17.271710300366014], [-58.388058437724027, -16.877109063385273], [-58.241219855366673, -16.299573256091289], [-60.158389655179022, -16.258283786690082], [-60.542965664295131, -15.093910414289592], [-60.251148851142922, -15.077218926659318], [-60.264326341377355, -14.645979099183638], [-60.459198167550014, -14.354007256734551], [-60.503304002511122, -13.775954685117656], [-61.084121263255646, -13.479383640194595], [-61.713204311760769, -13.489202162330049], [-62.127080857986371, -13.19878061284972], [-62.803060268796372, -13.000653171442682], [-63.196498786050562, -12.627032565972433], [-64.31635291203159, -12.461978041232191], [-65.402281460213018, -11.566270440317151], [-65.321898769783004, -10.895872084194675], [-65.444837002205375, -10.51145110437543], [-65.33843522811641, -9.76198780684639], [-66.646908331962791, -9.931331475466861], [-67.173801235610725, -10.30681243249961], [-68.048192308205373, -10.712059014532484], [-68.27125362819325, -11.014521172736817], [-68.786157599549469, -11.036380303596276], [-69.52967810736493, -10.951734307502193], [-70.093752204046879, -11.123971856331011], [-70.548685675728393, -11.009146823778462], [-70.481893886991159, -9.490118096558842], [-71.302412278921523, -10.079436130415372], [-72.184890713169821, -10.05359791426943], [-72.563033006465631, -9.520193780152715], [-73.226713426390148, -9.462212823121233], [-73.015382656532537, -9.03283334720806], [-73.571059332967053, -8.424446709835832], [-73.987235480429646, -7.523829847853063], [-73.723401455363486, -7.340998630404412], [-73.724486660441627, -6.918595472850638], [-73.120027431923575, -6.629930922068238], [-73.219711269814596, -6.089188734566076], [-72.964507208941185, -5.741251315944892], [-72.891927659787243, -5.274561455916979], [-71.748405727816532, -4.59398284263301], [-70.928843349883564, -4.401591485210367], [-70.79476884630229, -4.251264743673302], [-69.893635219996611, -4.298186944194326], [-69.444101935489599, -1.556287123219817], [-69.420485805932216, -1.122618503426409], [-69.577065395776586, -0.549991957200163], [-70.02065589057004, -0.185156345219539], [-70.015565761989293, 0.541414292804205], [-69.452396002872447, 0.706158758950693], [-69.252434048119042, 0.602650865070075], [-69.218637661400166, 0.985676581217433], [-69.804596727157701, 1.089081122233466], [-69.816973232691609, 1.714805202639624], [-67.868565029558823, 1.692455145673392], [-67.537810024674684, 2.037162787276329], [-67.25999752467358, 1.719998684084956], [-67.065048183852483, 1.130112209473225], [-66.876325853122566, 1.253360500489336], [-66.325765143484944, 0.724452215982012], [-65.548267381437554, 0.78925446207603], [-65.354713304288353, 1.0952822941085], [-64.611011928959854, 1.328730576987041], [-64.199305792890499, 1.49285492594602], [-64.083085496666072, 1.91636912679408], [-63.368788011311644, 2.200899562993129], [-63.422867397705105, 2.411067613124174], [-64.269999152265783, 2.497005520025566], [-64.408827887617903, 3.126786200366623], [-64.368494432214092, 3.797210394705246], [-64.816064012294007, 4.056445217297422], [-64.628659430587533, 4.14848094320925], [-63.888342861574145, 4.020530096854571], [-63.093197597899092, 3.770571193858784], [-62.804533047116692, 4.006965033377951], [-62.085429653559125, 4.162123521334308], [-60.966893276601517, 4.536467596856638], [-60.601179165271922, 4.918098049332129], [-60.733574184803707, 5.2002772078619], [-60.213683437731319, 5.2444863956876], [-59.980958624904865, 5.014061184098138], [-60.111002366767373, 4.574966538914082], [-59.767405768458701, 4.423502915866606], [-59.538039923731219, 3.958802598481937], [-59.815413174057852, 3.606498521332085], [-59.974524909084543, 2.755232652188055], [-59.718545701726732, 2.249630438644359], [-59.646043667221242, 1.786893825686789], [-59.030861579002639, 1.317697658692722], [-58.540012986878288, 1.26808828369252], [-58.429477098205957, 1.46394196207872], [-58.113449876525003, 1.507195135907025], [-57.660971035377358, 1.682584947105638], [-57.33582292339689, 1.948537705895759], [-56.782704230360814, 1.863710842288653], [-56.53938574891454, 1.89952260986692], [-55.995698004771739, 1.817667141116601], [-55.905600145070871, 2.021995754398659], [-56.073341844290283, 2.220794989425499], [-55.973322109589361, 2.510363877773016], [-55.569755011605984, 2.42150625244713], [-55.097587449755125, 2.523748073736612], [-54.524754197799709, 2.311848863123785], [-54.088062506717243, 2.105556545414629], [-53.778520677288903, 2.376702785650081], [-53.554839240113537, 2.33489655192595], [-53.4184651352953, 2.05338918701598], [-52.939657151894949, 2.124857692875636], [-52.556424730018414, 2.504705308437053], [-52.249337531123942, 3.241094468596244], [-51.657797410678882, 4.156232408053028], [-51.317146369010842, 4.203490505383953], [-51.069771287629649, 3.65039765056403], [-50.508875291533641, 1.901563828942456], [-49.974075893745045, 1.736483465986069], [-49.947100796088705, 1.046189683431223], [-50.699251268096901, 0.222984117021681], [-50.388210822132123, -0.078444512536819], [-48.620566779156313, -0.235489190271821], [-48.584496629416577, -1.237805271005001], [-47.824956427590621, -0.5816179337628], [-46.566583624851219, -0.941027520352776], [-44.9057030909904, -1.551739597178134], [-44.417619187993658, -2.137750339367975], [-44.581588507655773, -2.691308282078523], [-43.418791266440188, -2.383110039889793], [-41.47265682632824, -2.912018324397116], [-39.97866533055403, -2.87305429444904], [-38.50038347019656, -3.700652357603394], [-37.223252122535193, -4.820945733258915], [-36.45293738457638, -5.109403578312153], [-35.597795783010454, -5.149504489770648], [-35.235388963347553, -5.464937432480245], [-34.896029832486825, -6.738193047719709], [-34.729993455533027, -7.343220716992965], [-35.128212042774216, -8.996401462442284], [-35.636966518687707, -9.649281508017811], [-37.046518724096991, -11.040721123908799], [-37.683611619607355, -12.17119475672582], [-38.423876512188436, -13.038118584854285], [-38.673887091616507, -13.057652276260615], [-38.953275722802537, -13.79336964280002], [-38.882298143049645, -15.667053724838764], [-39.161092495264306, -17.208406670808468], [-39.267339240056394, -17.867746270420479], [-39.583521491034219, -18.262295830968934], [-39.76082333022763, -19.599113457927402], [-40.774740770010332, -20.90451181405242], [-40.944756232250597, -21.937316989837807], [-41.75416419123821, -22.370675551037454], [-41.988284267736546, -22.970070489190888], [-43.074703742024738, -22.967693373305462], [-44.647811855637798, -23.351959323827838], [-45.35213578955991, -23.796841729428579], [-46.472093268405523, -24.088968601174539], [-47.648972337420645, -24.885199069927715], [-48.495458136577689, -25.877024834905647], [-48.641004808127725, -26.623697605090928], [-48.474735887228647, -27.175911960561887], [-48.661520351747612, -28.186134535435713], [-48.888457404157393, -28.674115085567877], [-49.587329474472668, -29.224469089476333], [-50.696874152211478, -30.984465020472953], [-51.576226162306149, -31.777698256153204], [-52.256081305538032, -32.245369968394662], [-52.71209998229768, -33.196578057591175], [-53.373661668498229, -33.768377780900757], [-53.650543992718084, -33.202004082981823], [-53.209588995971529, -32.727666110974717], [-53.787951626182185, -32.047242526987617], [-54.572451544805105, -31.494511407193745], [-55.601510179249331, -30.853878676071385], [-55.97324459494093, -30.883075860316296], [-56.976025763564721, -30.109686374636119], [-57.625133429582945, -30.216294854454258]]] } }, - { "type": "Feature", "properties": { "admin": "Brunei", "name": "Brunei", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[114.204016554828343, 4.525873928236805], [114.599961379048707, 4.900011298029965], [115.450710483869798, 5.447729803891532], [115.405700311343566, 4.955227565933837], [115.347460972150643, 4.316636053887009], [114.869557326315373, 4.348313706881924], [114.659595981913498, 4.007636826997753], [114.204016554828343, 4.525873928236805]]] } }, - { "type": "Feature", "properties": { "admin": "Bhutan", "name": "Bhutan", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[91.69665652869665, 27.771741848251661], [92.10371178585973, 27.4526140406332], [92.033483514375078, 26.838310451763554], [91.217512648486405, 26.808648179628019], [90.37327477413406, 26.875724188742872], [89.744527622438838, 26.71940298105995], [88.835642531289366, 27.098966376243755], [88.814248488320544, 27.299315904239361], [89.475810174521101, 28.04275889740639], [90.015828891971154, 28.296438503527209], [90.730513950567769, 28.064953925075748], [91.258853794319904, 28.040614325466287], [91.69665652869665, 27.771741848251661]]] } }, - { "type": "Feature", "properties": { "admin": "Botswana", "name": "Botswana", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[25.649163445750155, -18.536025892818987], [25.850391473094724, -18.714412937090533], [26.164790887158478, -19.293085625894935], [27.296504754350501, -20.391519870690995], [27.724747348753247, -20.499058526290387], [27.727227817503252, -20.851801853114711], [28.02137007010861, -21.485975030200578], [28.794656202924209, -21.639454034107445], [29.432188348109033, -22.091312758067584], [28.017235955525244, -22.827753594659072], [27.119409620886238, -23.574323011979772], [26.78640669119741, -24.240690606383478], [26.485753208123292, -24.616326592713097], [25.941652052522151, -24.696373386333214], [25.765848829865206, -25.174845472923671], [25.664666375437712, -25.486816094669706], [25.025170525825782, -25.719670098576891], [24.211266717228792, -25.670215752873567], [23.733569777122703, -25.39012948985161], [23.312096795350179, -25.268689873965712], [22.824271274514896, -25.500458672794768], [22.579531691180584, -25.979447523708142], [22.105968865657864, -26.28025603607913], [21.60589603036939, -26.726533705351748], [20.889609002371731, -26.828542982695907], [20.666470167735437, -26.477453301704916], [20.758609246511831, -25.868136488551446], [20.165725538827186, -24.917961928000768], [19.895767856534427, -24.767790215760588], [19.895457797940672, -21.849156996347865], [20.881134067475866, -21.814327080983144], [20.910641310314531, -18.252218926672018], [21.655040317478971, -18.219146010005222], [23.196858351339298, -17.869038181227783], [23.579005568137713, -18.281261081620055], [24.217364536239209, -17.889347019118485], [24.520705193792534, -17.887124932529932], [25.084443393664564, -17.661815687737366], [25.264225701608005, -17.736539808831413], [25.649163445750155, -18.536025892818987]]] } }, - { "type": "Feature", "properties": { "admin": "Central African Republic", "name": "Central African Rep.", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[15.279460483469107, 7.421924546737968], [16.106231723706767, 7.497087917506504], [16.290561557691884, 7.754307359239304], [16.456184523187343, 7.734773667832966], [16.705988396886251, 7.508327541529978], [17.964929640380884, 7.890914008002865], [18.389554884523218, 8.281303615751822], [18.911021762780504, 8.630894680206351], [18.81200971850927, 8.982914536978596], [19.094008009526018, 9.074846910025837], [20.059685499764267, 9.01270600019485], [21.00086836109616, 9.475985215691507], [21.723821648859452, 10.567055568885973], [22.231129184668784, 10.971888739460507], [22.864165480244218, 11.142395127807543], [22.977543572692603, 10.714462591998538], [23.554304233502187, 10.089255275915306], [23.557249790142826, 9.681218166538683], [23.394779087017181, 9.26506785729222], [23.459012892355979, 8.954285793488891], [23.805813429466745, 8.666318874542425], [24.567369012152078, 8.229187933785466], [25.114932488716786, 7.825104071479172], [25.12413089366472, 7.500085150579436], [25.796647983511171, 6.979315904158069], [26.21341840994511, 6.546603298362071], [26.465909458123232, 5.94671743410187], [27.213409051225163, 5.550953477394557], [27.374226108517483, 5.233944403500059], [27.044065382604703, 5.127852688004835], [26.402760857862535, 5.150874538590869], [25.650455356557465, 5.256087754737123], [25.278798455514302, 5.170408229997191], [25.128833449003274, 4.927244777847789], [24.805028924262409, 4.897246608902349], [24.41053104014625, 5.108784084489129], [23.297213982850135, 4.609693101414221], [22.841479526468103, 4.710126247573483], [22.704123569436284, 4.633050848810156], [22.405123732195531, 4.02916006104732], [21.659122755630019, 4.224341945813719], [20.927591180106273, 4.322785549329736], [20.290679152108932, 4.691677761245287], [19.467783644293146, 5.031527818212779], [18.932312452884755, 4.709506130385973], [18.542982211997778, 4.201785183118317], [18.453065219809925, 3.504385891123348], [17.809900343505259, 3.560196437998569], [17.133042433346297, 3.728196519379451], [16.537058139724135, 3.198254706226278], [16.01285241055535, 2.267639675298084], [15.907380812247649, 2.557389431158612], [15.862732374747479, 3.013537298998982], [15.405395948964379, 3.335300604664339], [15.036219516671249, 3.851367295747123], [14.950953403389658, 4.21038930909492], [14.478372430080466, 4.732605495620446], [14.558935988023501, 5.03059764243153], [14.459407179429345, 5.451760565610299], [14.536560092841111, 6.22695872642069], [14.776545444404572, 6.408498033062044], [15.279460483469107, 7.421924546737968]]] } }, - { "type": "Feature", "properties": { "admin": "Canada", "name": "Canada", "continent": "North America" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[-63.6645, 46.55001], [-62.9393, 46.41587], [-62.01208, 46.44314], [-62.50391, 46.03339], [-62.87433, 45.96818], [-64.1428, 46.39265], [-64.39261, 46.72747], [-64.01486, 47.03601], [-63.6645, 46.55001]]], [[[-61.806305, 49.10506], [-62.29318, 49.08717], [-63.58926, 49.40069], [-64.51912, 49.87304], [-64.17322, 49.95718], [-62.85829, 49.70641], [-61.835585, 49.28855], [-61.806305, 49.10506]]], [[[-123.510001587551116, 48.51001089130343], [-124.012890788399474, 48.370846259141402], [-125.655012777338342, 48.825004584338494], [-125.954994466792726, 49.179995835967638], [-126.850004435871853, 49.530000311880421], [-127.029993449544392, 49.814995835970073], [-128.059336304366212, 49.994959011426594], [-128.444584107102145, 50.53913768167611], [-128.358413656255408, 50.770648098343678], [-127.308581096029883, 50.552573554071948], [-126.695000977212302, 50.40090322529538], [-125.755006673823161, 50.295018215529367], [-125.415001587558791, 49.950000515332604], [-124.920768189119315, 49.47527497008339], [-123.92250870832099, 49.062483628935794], [-123.510001587551116, 48.51001089130343]]], [[[-56.134035814017111, 50.687009792679298], [-56.795881720595261, 49.812308661490945], [-56.143105027884289, 50.15011749938283], [-55.471492275602934, 49.935815334668447], [-55.822401089080913, 49.587128607779093], [-54.93514258484565, 49.313010972686833], [-54.473775397343772, 49.556691189159167], [-53.47654944519131, 49.24913890237405], [-53.786013759971233, 48.516780503933617], [-53.086133999226249, 48.687803656603528], [-52.95864824076223, 48.157164211614472], [-52.648098720904173, 47.53554840757549], [-53.069158291218336, 46.655498765644936], [-53.521456264853029, 46.618291734394823], [-54.178935512902527, 46.807065741556997], [-53.961868659060471, 47.625207017601909], [-54.240482143762122, 47.752279364607617], [-55.400773078011483, 46.88499380145312], [-55.997480841685835, 46.919720363953289], [-55.291219041552765, 47.389562486350982], [-56.250798712780508, 47.632545070987383], [-57.325229254777085, 47.572807115257987], [-59.26601518414676, 47.603347886742498], [-59.41949418805369, 47.89945384377485], [-58.796586473207398, 48.251525376979473], [-59.23162451845652, 48.523188381537793], [-58.391804979065213, 49.125580552764163], [-57.358689744686025, 50.718274034215845], [-56.738650071831998, 51.287438259478527], [-55.87097693543528, 51.632094224649187], [-55.406974249886602, 51.588272610065722], [-55.600218268442077, 51.317074693397913], [-56.134035814017111, 50.687009792679298]]], [[[-133.180004041711669, 54.169975490935308], [-132.710007884431292, 54.040009315423518], [-131.749989584003259, 54.120004380909208], [-132.049480347350965, 52.984621487024519], [-131.179042521826574, 52.18043284769827], [-131.577829549822894, 52.182370713909236], [-132.180428426778519, 52.639707139692391], [-132.549992432313843, 53.100014960332132], [-133.054611178755493, 53.411468817755363], [-133.239664482792676, 53.851080227262386], [-133.180004041711669, 54.169975490935308]]], [[[-79.26582, 62.158675], [-79.65752, 61.63308], [-80.09956, 61.7181], [-80.36215, 62.01649], [-80.315395, 62.085565], [-79.92939, 62.3856], [-79.52002, 62.36371], [-79.26582, 62.158675]]], [[[-81.89825, 62.7108], [-83.06857, 62.15922], [-83.77462, 62.18231], [-83.99367, 62.4528], [-83.25048, 62.91409], [-81.87699, 62.90458], [-81.89825, 62.7108]]], [[[-85.161307949549851, 65.657284654392797], [-84.975763719405933, 65.217518215588981], [-84.464012010419495, 65.371772365980163], [-83.88262630891974, 65.109617824963536], [-82.78757687043877, 64.766693020274673], [-81.642013719392509, 64.455135809986942], [-81.553440314444245, 63.979609280037131], [-80.817361212878851, 64.057485663500998], [-80.103451300766594, 63.725981350348597], [-80.991019863595653, 63.41124603947496], [-82.547178107416997, 63.651722317145229], [-83.108797573565042, 64.101875718839707], [-84.100416632813847, 63.569711819098004], [-85.523404710618991, 63.052379055424076], [-85.866768764982339, 63.637252916103542], [-87.221983201836721, 63.541238104905212], [-86.352759772471259, 64.035833238370699], [-86.224886440765133, 64.822916978608262], [-85.883847825854858, 65.738778388117041], [-85.161307949549851, 65.657284654392797]]], [[[-75.86588, 67.14886], [-76.98687, 67.09873], [-77.2364, 67.58809], [-76.81166, 68.14856], [-75.89521, 68.28721], [-75.1145, 68.01036], [-75.10333, 67.58202], [-75.21597, 67.44425], [-75.86588, 67.14886]]], [[[-95.647681203800488, 69.107690358321761], [-96.269521203800579, 68.757040358321731], [-97.61740120380054, 69.060030358321782], [-98.431801203800504, 68.950700358321768], [-99.797401203800504, 69.400030358321786], [-98.917401203800523, 69.710030358321788], [-98.218261203800466, 70.143540358321744], [-97.157401203800532, 69.860030358321794], [-96.557401203800524, 69.680030358321758], [-96.257401203800498, 69.490030358321761], [-95.647681203800488, 69.107690358321761]]], [[[-90.5471, 69.49766], [-90.55151, 68.47499], [-89.21515, 69.25873], [-88.01966, 68.61508], [-88.31749, 67.87338], [-87.35017, 67.19872], [-86.30607, 67.92146], [-85.57664, 68.78456], [-85.52197, 69.88211], [-84.10081, 69.80539], [-82.62258, 69.65826], [-81.28043, 69.16202], [-81.2202, 68.66567], [-81.96436, 68.13253], [-81.25928, 67.59716], [-81.38653, 67.11078], [-83.34456, 66.41154], [-84.73542, 66.2573], [-85.76943, 66.55833], [-86.0676, 66.05625], [-87.03143, 65.21297], [-87.32324, 64.77563], [-88.48296, 64.09897], [-89.91444, 64.03273], [-90.70398, 63.61017], [-90.77004, 62.96021], [-91.93342, 62.83508], [-93.15698, 62.02469], [-94.24153, 60.89865], [-94.62931, 60.11021], [-94.6846, 58.94882], [-93.21502, 58.78212], [-92.76462, 57.84571], [-92.297029999999893, 57.08709], [-90.89769, 57.28468], [-89.03953, 56.85172], [-88.03978, 56.47162], [-87.32421, 55.99914], [-86.07121, 55.72383], [-85.01181, 55.3026], [-83.36055, 55.24489], [-82.27285, 55.14832], [-82.4362, 54.28227], [-82.12502, 53.27703], [-81.40075, 52.15788], [-79.91289, 51.20842], [-79.14301, 51.53393], [-78.60191, 52.56208], [-79.12421, 54.14145], [-79.82958, 54.66772], [-78.22874, 55.13645], [-77.0956, 55.83741], [-76.54137, 56.53423], [-76.62319, 57.20263], [-77.30226, 58.05209], [-78.51688, 58.80458], [-77.33676, 59.85261], [-77.77272, 60.75788], [-78.10687, 62.31964], [-77.41067, 62.55053], [-75.69621, 62.2784], [-74.6682, 62.18111], [-73.83988, 62.4438], [-72.90853, 62.10507], [-71.67708, 61.52535], [-71.37369, 61.13717], [-69.59042, 61.06141], [-69.62033, 60.22125], [-69.2879, 58.95736], [-68.37455, 58.80106], [-67.64976, 58.21206], [-66.20178, 58.76731], [-65.24517, 59.87071], [-64.58352, 60.33558], [-63.80475, 59.4426], [-62.50236, 58.16708], [-61.39655, 56.96745], [-61.79866, 56.33945], [-60.46853, 55.77548], [-59.56962, 55.20407], [-57.97508, 54.94549], [-57.3332, 54.6265], [-56.93689, 53.78032], [-56.15811, 53.64749], [-55.75632, 53.27036], [-55.68338, 52.14664], [-56.40916, 51.7707], [-57.12691, 51.41972], [-58.77482, 51.0643], [-60.03309, 50.24277], [-61.72366, 50.08046], [-63.86251, 50.29099], [-65.36331, 50.2982], [-66.39905, 50.22897], [-67.23631, 49.51156], [-68.51114, 49.06836], [-69.95362, 47.74488], [-71.10458, 46.82171], [-70.25522, 46.98606], [-68.65, 48.3], [-66.55243, 49.1331], [-65.05626, 49.23278], [-64.17099, 48.74248], [-65.11545, 48.07085], [-64.79854, 46.99297], [-64.47219, 46.23849], [-63.17329, 45.73902], [-61.52072, 45.88377], [-60.51815, 47.00793], [-60.4486, 46.28264], [-59.80287, 45.9204], [-61.03988, 45.26525], [-63.25471, 44.67014], [-64.24656, 44.26553], [-65.36406, 43.54523], [-66.1234, 43.61867], [-66.16173, 44.46512], [-64.42549, 45.29204], [-66.02605, 45.25931], [-67.13741, 45.13753], [-67.79134, 45.70281], [-67.79046, 47.06636], [-68.23444, 47.35486], [-68.905, 47.185], [-69.237216, 47.447781], [-69.99997, 46.69307], [-70.305, 45.915], [-70.66, 45.46], [-71.08482, 45.30524], [-71.405, 45.255], [-71.50506, 45.0082], [-73.34783, 45.00738], [-74.867, 45.00048], [-75.31821, 44.81645], [-76.375, 44.09631], [-76.5, 44.018458893758712], [-76.820034145805565, 43.628784288093748], [-77.737885097957687, 43.62905558936329], [-78.720279914042365, 43.625089423184868], [-79.171673550111862, 43.466339423184216], [-79.01, 43.27], [-78.92, 42.965], [-78.939362148743683, 42.863611355148031], [-80.247447679347928, 42.366199856122584], [-81.277746548167144, 42.209025987306845], [-82.439277716791608, 41.675105088867149], [-82.690089280920162, 41.675105088867149], [-83.029810146806909, 41.832795722005834], [-83.141999681312555, 41.975681057292825], [-83.12, 42.08], [-82.9, 42.43], [-82.43, 42.98], [-82.137642381503881, 43.571087551439909], [-82.337763125431053, 44.44], [-82.550924648758169, 45.347516587905368], [-83.592850714843067, 45.816893622412373], [-83.469550747394621, 45.994686387712584], [-83.616130947590563, 46.116926988299056], [-83.890765347005726, 46.116926988299056], [-84.091851264161463, 46.27541860613816], [-84.14211951367335, 46.512225857115723], [-84.3367, 46.40877], [-84.6049, 46.4396], [-84.543748745445853, 46.538684190449132], [-84.779238247399888, 46.637101955749038], [-84.876079881514855, 46.900083319682366], [-85.652363247403414, 47.220218817730498], [-86.461990831228249, 47.553338019392037], [-87.439792623300207, 47.94], [-88.378114183286698, 48.302917588893727], [-89.272917446636654, 48.019808254582657], [-89.6, 48.01], [-90.83, 48.27], [-91.64, 48.14], [-92.61, 48.45], [-93.63087, 48.60926], [-94.32914, 48.67074], [-94.64, 48.84], [-94.81758, 49.38905], [-95.15609, 49.38425], [-95.159069509172014, 49.0], [-97.228720000004799, 49.0007], [-100.65, 49.0], [-104.04826, 48.99986], [-107.05, 49.0], [-110.05, 49.0], [-113.0, 49.0], [-116.04818, 49.0], [-117.03121, 49.0], [-120.0, 49.0], [-122.84, 49.0], [-122.97421, 49.002537777777789], [-124.91024, 49.98456], [-125.62461, 50.41656], [-127.43561, 50.83061], [-127.99276, 51.71583], [-127.85032, 52.32961], [-129.12979, 52.75538], [-129.30523, 53.56159], [-130.51497, 54.28757], [-130.53611, 54.80278], [-129.98, 55.285], [-130.00778, 55.91583], [-131.70781, 56.55212], [-132.73042, 57.69289], [-133.35556, 58.41028], [-134.27111, 58.86111], [-134.945, 59.27056], [-135.47583, 59.78778], [-136.47972, 59.46389], [-137.4525, 58.905], [-138.34089, 59.56211], [-139.039, 60.0], [-140.013, 60.27682], [-140.99778, 60.30639], [-140.9925, 66.00003], [-140.986, 69.712], [-139.12052, 69.47102], [-137.54636, 68.99002], [-136.50358, 68.89804], [-135.62576, 69.31512], [-134.41464, 69.62743], [-132.92925, 69.50534], [-131.43136, 69.94451], [-129.79471, 70.19369], [-129.10773, 69.77927], [-128.36156, 70.01286], [-128.13817, 70.48384], [-127.44712, 70.37721], [-125.75632, 69.48058], [-124.42483, 70.1584], [-124.28968, 69.39969], [-123.06108, 69.56372], [-122.6835, 69.85553], [-121.47226, 69.79778], [-119.94288, 69.37786], [-117.60268, 69.01128], [-116.22643, 68.84151], [-115.2469, 68.90591], [-113.89794, 68.3989], [-115.30489, 67.90261], [-113.49727, 67.68815], [-110.798, 67.80612], [-109.94619, 67.98104], [-108.8802, 67.38144], [-107.79239, 67.88736], [-108.81299, 68.31164], [-108.16721, 68.65392], [-106.95, 68.7], [-106.15, 68.8], [-105.34282, 68.56122], [-104.33791, 68.018], [-103.22115, 68.09775], [-101.45433, 67.64689], [-99.90195, 67.80566], [-98.4432, 67.78165], [-98.5586, 68.40394], [-97.66948, 68.57864], [-96.11991, 68.23939], [-96.12588, 67.29338], [-95.48943, 68.0907], [-94.685, 68.06383], [-94.23282, 69.06903], [-95.30408, 69.68571], [-96.47131, 70.08976], [-96.39115, 71.19482], [-95.2088, 71.92053], [-93.88997, 71.76015], [-92.87818, 71.31869], [-91.51964, 70.19129], [-92.40692, 69.69997], [-90.5471, 69.49766]]], [[[-114.167169999999871, 73.12145], [-114.66634, 72.65277], [-112.441019999999867, 72.9554], [-111.05039, 72.4504], [-109.920349999999857, 72.96113], [-109.00654, 72.63335], [-108.188349999999886, 71.65089], [-107.68599, 72.06548], [-108.39639, 73.08953], [-107.51645, 73.23598], [-106.522589999999866, 73.07601], [-105.402459999999877, 72.67259], [-104.77484, 71.6984], [-104.464759999999814, 70.99297], [-102.78537, 70.49776], [-100.980779999999868, 70.02432], [-101.089289999999892, 69.58447000000011], [-102.731159999999875, 69.50402], [-102.09329, 69.11962], [-102.43024, 68.75282], [-104.24, 68.91], [-105.96, 69.180000000000135], [-107.12254, 69.11922], [-108.999999999999872, 68.78], [-111.534148875200117, 68.630059156817921], [-113.3132, 68.53554], [-113.854959999999807, 69.007440000000102], [-115.22, 69.28], [-116.10794, 69.16821], [-117.34, 69.960000000000107], [-116.674729999999869, 70.06655], [-115.13112, 70.2373], [-113.72141, 70.19237], [-112.4161, 70.36638], [-114.35, 70.6], [-116.48684, 70.52045], [-117.9048, 70.540560000000127], [-118.43238, 70.9092], [-116.11311, 71.30918], [-117.65568, 71.2952], [-119.40199, 71.55859], [-118.56267, 72.30785], [-117.866419999999877, 72.70594], [-115.18909, 73.314590000000109], [-114.167169999999871, 73.12145]]], [[[-104.5, 73.42], [-105.38, 72.76], [-106.94, 73.46], [-106.6, 73.6], [-105.26, 73.64], [-104.5, 73.42]]], [[[-76.34, 73.102684989953005], [-76.251403808593736, 72.826385498046861], [-77.314437866210895, 72.85554504394527], [-78.391670227050795, 72.876655578613253], [-79.486251831054645, 72.742202758789062], [-79.775833129882827, 72.80290222167973], [-80.876098632812514, 73.333183288574205], [-80.833885192871051, 73.693183898925767], [-80.353057861328111, 73.75971984863277], [-78.064437866210923, 73.651931762695327], [-76.34, 73.102684989953005]]], [[[-86.562178514334107, 73.157447007938444], [-85.774371304044521, 72.534125881633798], [-84.850112474288224, 73.34027822538711], [-82.315590176100969, 73.750950832810574], [-80.600087653307611, 72.716543687624181], [-80.748941616524391, 72.061906643350753], [-78.770638597310764, 72.352173163534147], [-77.824623989559569, 72.749616604291035], [-75.605844692675717, 72.243678493937381], [-74.228616095664975, 71.767144273557889], [-74.099140794557698, 71.330840155717638], [-72.242225714797641, 71.556924546994495], [-71.200015428335192, 70.920012518997211], [-68.78605424668487, 70.525023708774242], [-67.914970465756923, 70.121947536897594], [-66.969033372654152, 69.18608734809186], [-68.805122850200533, 68.720198472764409], [-66.449866095633851, 68.067163397892003], [-64.862314419195215, 67.847538560651614], [-63.424934454996745, 66.928473212340649], [-61.851981370680569, 66.862120673277829], [-62.163176845942296, 66.160251369889593], [-63.91844438338417, 64.998668524832837], [-65.148860236253611, 65.426032619886669], [-66.72121904159853, 66.388041083432185], [-68.015016038673949, 66.262725735124391], [-68.141287400979152, 65.689789130304362], [-67.089646165623392, 65.108455105236985], [-65.732080451099748, 64.64840566675862], [-65.320167609301265, 64.382737128346051], [-64.669406297449669, 63.392926744227474], [-65.013803880458894, 62.674185085695974], [-66.275044725190455, 62.945098781986069], [-68.783186204692711, 63.745670071051805], [-67.369680752213029, 62.883965562584869], [-66.328297288667201, 62.28007477482204], [-66.165568203380147, 61.930897121825879], [-68.877366502544632, 62.330149237712803], [-71.023437059193824, 62.910708116295829], [-72.23537858751898, 63.397836005295154], [-71.886278449171286, 63.679989325608837], [-73.37830624051837, 64.193963121183813], [-74.834418911422588, 64.679075629323776], [-74.818502570276706, 64.389093329517962], [-77.709979824520019, 64.229542344816778], [-78.55594885935416, 64.572906399180127], [-77.897281053361908, 65.309192206474776], [-76.018274298797181, 65.326968899183143], [-73.95979529488271, 65.454764716240888], [-74.293883429649625, 65.81177134872938], [-73.94491248238262, 66.310578111426722], [-72.65116716173938, 67.284575507263853], [-72.926059943316076, 67.726925767682374], [-73.311617804645721, 68.069437160912898], [-74.8433072577768, 68.554627183701271], [-76.869100918266739, 68.894735622830254], [-76.228649054657339, 69.147769273547411], [-77.28736996123709, 69.769540106883269], [-78.168633999326588, 69.826487535268896], [-78.95724219431672, 70.166880194775402], [-79.492455003563649, 69.871807766388898], [-81.305470954091732, 69.743185126414332], [-84.944706183598456, 69.966634019644388], [-87.060003424817864, 70.260001125765356], [-88.681713223001495, 70.410741278760796], [-89.513419562523012, 70.762037665480975], [-88.467721116880753, 71.218185533321318], [-89.888151211287465, 71.222552191849942], [-90.205160285181989, 72.235074367960792], [-89.43657670770493, 73.129464219852352], [-88.408241543312784, 73.537888902471209], [-85.826151089200906, 73.803815823045213], [-86.562178514334107, 73.157447007938444]]], [[[-100.35642, 73.84389], [-99.16387, 73.63339], [-97.38, 73.76], [-97.12, 73.47], [-98.05359, 72.99052], [-96.54, 72.56], [-96.72, 71.66], [-98.35966, 71.27285], [-99.32286, 71.35639], [-100.01482, 71.73827], [-102.5, 72.51], [-102.48, 72.83], [-100.43836, 72.70588], [-101.54, 73.36], [-100.35642, 73.84389]]], [[[-93.196295539100205, 72.771992499473342], [-94.26904659704725, 72.024596259235949], [-95.409855516322637, 72.061880805134578], [-96.033745083382428, 72.940276801231789], [-96.01826799191096, 73.437429918095788], [-95.495793423224001, 73.862416897264154], [-94.503657599652328, 74.134906724739196], [-92.420012173211745, 74.100025132942179], [-90.509792853542578, 73.85673248971203], [-92.003965216829869, 72.966244208458477], [-93.196295539100205, 72.771992499473342]]], [[[-120.46, 71.383601793087578], [-123.09219, 70.90164], [-123.62, 71.34], [-125.92894873747332, 71.868688463011395], [-125.499999999999872, 72.292260811795003], [-124.80729, 73.02256], [-123.94, 73.680000000000135], [-124.917749999999899, 74.292750000000112], [-121.53788, 74.44893], [-120.10978, 74.24135], [-117.55564, 74.18577], [-116.58442, 73.89607], [-115.51081, 73.47519], [-116.767939999999882, 73.22292], [-119.22, 72.52], [-120.46, 71.82], [-120.46, 71.383601793087578]]], [[[-93.612755906940464, 74.979997260224437], [-94.156908738973812, 74.59234650338685], [-95.60868058956558, 74.666863918751758], [-96.820932176484561, 74.927623196096576], [-96.288587409229791, 75.377828274223333], [-94.850819871789113, 75.647217515760886], [-93.977746548217908, 75.296489569795952], [-93.612755906940464, 74.979997260224437]]], [[[-98.5, 76.72], [-97.735585, 76.25656], [-97.704415, 75.74344], [-98.16, 75.0], [-99.80874, 74.89744], [-100.88366, 75.05736], [-100.86292, 75.64075], [-102.50209, 75.5638], [-102.56552, 76.3366], [-101.48973, 76.30537], [-99.98349, 76.64634], [-98.57699, 76.58859], [-98.5, 76.72]]], [[[-108.21141, 76.20168], [-107.81943, 75.84552], [-106.92893, 76.01282], [-105.881, 75.9694], [-105.70498, 75.47951], [-106.31347, 75.00527], [-109.7, 74.85], [-112.22307, 74.41696], [-113.74381, 74.39427], [-113.87135, 74.72029], [-111.79421, 75.1625], [-116.31221, 75.04343], [-117.7104, 75.2222], [-116.34602, 76.19903], [-115.40487, 76.47887], [-112.59056, 76.14134], [-110.81422, 75.54919], [-109.0671, 75.47321], [-110.49726, 76.42982], [-109.5811, 76.79417], [-108.54859, 76.67832], [-108.21141, 76.20168]]], [[[-94.684085862999439, 77.097878323058367], [-93.573921068073105, 76.776295884906062], [-91.605023159536586, 76.778517971494594], [-90.741845872749209, 76.449597479956807], [-90.969661424507976, 76.074013170059445], [-89.822237921899244, 75.847773749485626], [-89.187082892599776, 75.610165513807615], [-87.838276333349611, 75.566188869927217], [-86.379192267588664, 75.482421373182163], [-84.789625210290595, 75.699204006646497], [-82.753444586910049, 75.784315090631225], [-81.12853084992436, 75.713983466282016], [-80.05751095245914, 75.336848863415867], [-79.833932868148324, 74.923127346487192], [-80.457770758775823, 74.657303778777774], [-81.948842536125511, 74.442459011524321], [-83.2288936022114, 74.564027818490928], [-86.097452358733292, 74.410032050261137], [-88.150350307960196, 74.392307033984977], [-89.764722052758358, 74.515555325001117], [-92.422440965529418, 74.837757880340973], [-92.768285488642789, 75.38681997344213], [-92.889905972041717, 75.882655341282629], [-93.893824022175977, 76.319243679500516], [-95.962457445035795, 76.44138092722244], [-97.121378953829463, 76.751077785947587], [-96.745122850312342, 77.161388658345132], [-94.684085862999439, 77.097878323058367]]], [[[-116.198586595507322, 77.645286770326194], [-116.335813361458349, 76.876961575010554], [-117.106050584768766, 76.530031846819114], [-118.040412157038119, 76.481171780087081], [-119.899317586885687, 76.053213406061971], [-121.499995077126471, 75.900018622532784], [-122.85492448615895, 76.116542873835684], [-122.854925293603188, 76.116542873835684], [-121.157535360328239, 76.864507554828336], [-119.103938971821023, 77.512219957174608], [-117.570130784965954, 77.498318996888102], [-116.198586595507322, 77.645286770326194]]], [[[-93.840003017943971, 77.51999726023449], [-94.295608283245244, 77.491342678528682], [-96.169654100310055, 77.55511139597688], [-96.436304490936109, 77.83462921824362], [-94.422577277386353, 77.820004787904978], [-93.720656297565867, 77.634331366680314], [-93.840003017943971, 77.51999726023449]]], [[[-110.186938035912945, 77.697014879050286], [-112.051191169058455, 77.409228827616843], [-113.534278937619035, 77.732206529441143], [-112.724586758253835, 78.051050116681935], [-111.264443325630822, 78.152956041161545], [-109.854451870547067, 77.996324774884812], [-110.186938035912945, 77.697014879050286]]], [[[-109.663145718202557, 78.601972561345676], [-110.88131425661885, 78.406919867659994], [-112.542091437615142, 78.407901719873493], [-112.525890876091566, 78.550554511215225], [-111.500010342233367, 78.849993598130538], [-110.96366065147599, 78.804440823065207], [-109.663145718202557, 78.601972561345676]]], [[[-95.830294969449312, 78.056941229963243], [-97.309842902397975, 77.85059723582178], [-98.124289313533964, 78.082856960757567], [-98.55286780474664, 78.458105373845086], [-98.631984422585504, 78.871930243638374], [-97.337231411512604, 78.831984361476756], [-96.754398769908761, 78.765812689926989], [-95.559277920294562, 78.41831452098026], [-95.830294969449312, 78.056941229963243]]], [[[-100.060191820052111, 78.324754340315891], [-99.670939093813601, 77.907544664207393], [-101.303940192452984, 78.018984890444798], [-102.949808722733025, 78.343228664860206], [-105.176132778731514, 78.38033234324574], [-104.210429450277147, 78.677420152491777], [-105.419580451258511, 78.918335679836431], [-105.492289191493128, 79.301593939929177], [-103.529282396237917, 79.16534902619162], [-100.8251580472688, 78.80046173777869], [-100.060191820052111, 78.324754340315891]]], [[[-87.02, 79.66], [-85.81435, 79.3369], [-87.18756, 79.0393], [-89.03535, 78.28723], [-90.80436, 78.21533], [-92.87669, 78.34333], [-93.95116, 78.75099], [-93.93574, 79.11373], [-93.14524, 79.3801], [-94.974, 79.37248], [-96.07614, 79.70502], [-96.70972, 80.15777], [-96.01644, 80.60233], [-95.32345, 80.90729], [-94.29843, 80.97727], [-94.73542, 81.20646], [-92.40984, 81.25739], [-91.13289, 80.72345], [-89.45, 80.509322033898258], [-87.81, 80.32], [-87.02, 79.66]]], [[[-68.5, 83.106321516765732], [-65.82735, 83.02801], [-63.68, 82.9], [-61.85, 82.6286], [-61.89388, 82.36165], [-64.334, 81.92775], [-66.75342, 81.72527], [-67.65755, 81.50141], [-65.48031, 81.50657], [-67.84, 80.9], [-69.4697, 80.61683], [-71.18, 79.8], [-73.2428, 79.63415], [-73.88, 79.430162204802073], [-76.90773, 79.32309], [-75.52924, 79.19766], [-76.22046, 79.01907], [-75.39345, 78.52581], [-76.34354, 78.18296], [-77.88851, 77.89991], [-78.36269, 77.50859], [-79.75951, 77.20968], [-79.61965, 76.98336], [-77.91089, 77.022045], [-77.88911, 76.777955], [-80.56125, 76.17812], [-83.17439, 76.45403], [-86.11184, 76.29901], [-87.6, 76.42], [-89.49068, 76.47239], [-89.6161, 76.95213], [-87.76739, 77.17833], [-88.26, 77.9], [-87.65, 77.970222222222205], [-84.97634, 77.53873], [-86.34, 78.18], [-87.96192, 78.37181], [-87.15198, 78.75867], [-85.37868, 78.9969], [-85.09495, 79.34543], [-86.50734, 79.73624], [-86.93179, 80.25145], [-84.19844, 80.20836], [-83.408695652173819, 80.1], [-81.84823, 80.46442], [-84.1, 80.58], [-87.59895, 80.51627], [-89.36663, 80.85569], [-90.2, 81.26], [-91.36786, 81.5531], [-91.58702, 81.89429], [-90.1, 82.085], [-88.93227, 82.11751], [-86.97024, 82.27961], [-85.5, 82.652273458057024], [-84.260005, 82.6], [-83.18, 82.32], [-82.42, 82.86], [-81.1, 83.02], [-79.30664, 83.13056], [-76.25, 83.172058823529369], [-75.71878, 83.06404], [-72.83153, 83.23324], [-70.665765, 83.169780758382828], [-68.5, 83.106321516765732]]]] } }, - { "type": "Feature", "properties": { "admin": "Switzerland", "name": "Switzerland", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[9.594226108446346, 47.525058091820256], [9.632931756232974, 47.347601223329974], [9.479969516649019, 47.102809963563367], [9.932448357796657, 46.920728054382948], [10.442701450246627, 46.893546250997424], [10.36337812667861, 46.483571275409851], [9.922836541390378, 46.314899400409182], [9.182881707403054, 46.440214748716976], [8.966305779667804, 46.036931871111186], [8.489952426801322, 46.005150865251672], [8.316629672894377, 46.163642483090847], [7.755992058959832, 45.824490057959302], [7.273850945676655, 45.776947740250769], [6.843592970414504, 45.991146552100595], [6.500099724970424, 46.429672756529428], [6.022609490593537, 46.272989813820466], [6.037388950229, 46.725778713561859], [6.768713820023605, 47.287708238303686], [6.736571079138058, 47.541801255882838], [7.192202182655505, 47.449765529971003], [7.466759067422228, 47.620581976911794], [8.31730146651415, 47.613579820336255], [8.522611932009765, 47.830827541691285], [9.594226108446346, 47.525058091820256]]] } }, - { "type": "Feature", "properties": { "admin": "Chile", "name": "Chile", "continent": "South America" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[-68.634010227583147, -52.636370458874353], [-68.633349999999879, -54.8695], [-67.56244, -54.87001], [-66.95992, -54.89681], [-67.291029999999878, -55.30124], [-68.148629999999841, -55.61183], [-68.639990810811796, -55.580017999086877], [-69.2321, -55.49906], [-69.95809, -55.19843], [-71.00568, -55.05383], [-72.2639, -54.49514], [-73.2852, -53.957519999999874], [-74.66253, -52.83749], [-73.8381, -53.04743], [-72.43418, -53.7154], [-71.10773, -54.07433], [-70.591779999999787, -53.61583], [-70.26748, -52.93123], [-69.345649999999878, -52.5183], [-68.634010227583147, -52.636370458874353]]], [[[-68.219913092711224, -21.49434661223183], [-67.828179897722634, -22.872918796482178], [-67.106673550063604, -22.735924574476392], [-66.985233934177629, -22.986348565362825], [-67.328442959244128, -24.025303236590908], [-68.417652960876111, -24.518554782816874], [-68.386001146097342, -26.185016371365229], [-68.594799770772667, -26.50690886811126], [-68.295541551370391, -26.899339694935787], [-69.001234910748266, -27.521213881136127], [-69.656130337183143, -28.459141127233686], [-70.013550381129861, -29.367922865518544], [-69.919008348251921, -30.336339206668306], [-70.535068935819439, -31.365010267870279], [-70.074399380153622, -33.09120981214803], [-69.814776984319209, -33.273886000299839], [-69.817309129501453, -34.193571465798279], [-70.388049485949082, -35.169687595359441], [-70.364769253201658, -36.005088799789931], [-71.121880662709771, -36.65812387466233], [-71.118625047475419, -37.576827487947192], [-70.814664272734703, -38.552995293940732], [-71.413516608349042, -38.916022230791107], [-71.680761277946445, -39.808164157878061], [-71.915734015577542, -40.832339369470716], [-71.746803758415453, -42.051386407235988], [-72.148898078078517, -42.254888197601375], [-71.915423956983901, -43.408564548517404], [-71.464056159130493, -43.787611179378324], [-71.793622606071935, -44.207172133156099], [-71.329800788036195, -44.407521661151677], [-71.222778896759721, -44.784242852559409], [-71.659315558545316, -44.973688653341434], [-71.552009446891233, -45.560732924177117], [-71.917258470330196, -46.884838148791786], [-72.44735531278026, -47.738532810253517], [-72.331160854771937, -48.244238376661819], [-72.648247443314929, -48.878618259476774], [-73.415435757120022, -49.318436374712952], [-73.328050910114456, -50.378785088909865], [-72.975746832964617, -50.741450290734299], [-72.309973517532342, -50.677009779666342], [-72.329403856074023, -51.425956312872394], [-71.914803839796321, -52.009022305865912], [-69.498362189396076, -52.142760912637236], [-68.571545376241332, -52.299443855346247], [-69.461284349226617, -52.291950772663924], [-69.94277950710611, -52.537930590373243], [-70.8451016913545, -52.899200528525711], [-71.006332160105217, -53.833252042201345], [-71.429794684520928, -53.856454760300373], [-72.557942877884855, -53.531410001184447], [-73.702756720662862, -52.835069268607249], [-73.702756720662862, -52.835070076051487], [-74.946763475225154, -52.262753588419017], [-75.260026007778507, -51.62935475037321], [-74.976632453089806, -51.043395684615675], [-75.47975419788348, -50.378371677451547], [-75.608015102831942, -48.673772881871784], [-75.182769741502128, -47.711919447623153], [-74.126580980104677, -46.939253431995084], [-75.644395311165439, -46.647643324572016], [-74.69215369332305, -45.76397633238097], [-74.351709357384252, -44.10304412208788], [-73.240356004515192, -44.454960625995611], [-72.717803921179765, -42.383355808278985], [-73.388899909138232, -42.117532240569567], [-73.701335618774834, -43.365776462579738], [-74.33194312203257, -43.224958184584395], [-74.017957119427152, -41.794812920906828], [-73.677099372029943, -39.942212823243111], [-73.217592536090663, -39.258688653318508], [-73.505559455037044, -38.282882582351064], [-73.588060879191076, -37.156284681956016], [-73.166717088499283, -37.123780206044351], [-72.553136969681717, -35.508840020491022], [-71.861732143832555, -33.909092706031522], [-71.438450486929895, -32.418899428030819], [-71.668720669222424, -30.920644626592516], [-71.370082567007714, -30.095682061484997], [-71.48989437527645, -28.861442152625909], [-70.905123867461569, -27.640379734001193], [-70.724953986275963, -25.705924167587209], [-70.403965827095035, -23.628996677344542], [-70.091245897080668, -21.393319187101223], [-70.164419725205974, -19.756468194256183], [-70.372572394477714, -18.347975355708879], [-69.858443569605797, -18.092693780187027], [-69.590423753523979, -17.580011895419286], [-69.100246955019401, -18.260125420812653], [-68.966818406841824, -18.981683444904089], [-68.442225104430918, -19.405068454671419], [-68.757167121033703, -20.37265797290447], [-68.219913092711224, -21.49434661223183]]]] } }, - { "type": "Feature", "properties": { "admin": "China", "name": "China", "continent": "Asia" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[110.339187860151526, 18.678395087147603], [109.475209588663702, 18.19770091396861], [108.655207961056135, 18.507681993071397], [108.626217482540426, 19.367887885001974], [109.119055617308007, 19.821038519769385], [110.211598748822837, 20.101253973872073], [110.786550734502228, 20.077534491450077], [111.01005130416462, 19.695929877190732], [110.570646600386794, 19.255879218009305], [110.339187860151526, 18.678395087147603]]], [[[127.657407261262378, 49.760270494172929], [129.397817824420429, 49.440600084015429], [130.58229332898236, 48.729687404976112], [130.987281528853828, 47.790132351261391], [132.506671991099495, 47.788969631534876], [133.373595819228001, 48.183441677434914], [135.026311476786702, 48.478229885443902], [134.500813836810607, 47.578439846377833], [134.112362095272601, 47.212467352886719], [133.76964399631288, 46.116926988299056], [133.097126906466428, 45.14406647397216], [131.883454217659562, 45.32116160743643], [131.025212030156069, 44.967953192721573], [131.288555129115537, 44.111519680348252], [131.144687941614848, 42.929989732426932], [130.633866408409801, 42.903014634770543], [130.640015903852429, 42.39500946712527], [129.994267205933227, 42.985386867843793], [129.596668735879462, 42.424981797854592], [128.05221520397231, 41.994284572917984], [128.208433058790717, 41.466771552082534], [127.343782993683021, 41.503151760415953], [126.869083286649854, 41.816569322266155], [126.18204511932943, 41.107336127276362], [125.079941847840587, 40.569823716792449], [124.265624627785314, 39.928493353834135], [122.86757042856101, 39.637787583976255], [122.131387974130917, 39.170451768544623], [121.054554478032856, 38.89747101496291], [121.585994907722466, 39.360853583324136], [121.376757033372641, 39.750261338859524], [122.168595005381007, 40.422442531896046], [121.640358514493528, 40.946389878903304], [120.768628778161954, 40.593388169917596], [119.639602085449056, 39.898055935214209], [119.023463983233015, 39.252333075511096], [118.042748651197897, 39.204273993479674], [117.532702264477052, 38.73763580988409], [118.05969852098967, 38.061475531561051], [118.878149855628351, 37.897325344385898], [118.911636183753501, 37.448463853498723], [119.702802362142037, 37.156388658185072], [120.823457472823648, 37.870427761377968], [121.711258579597938, 37.481123358707165], [122.357937453298462, 37.454484157860684], [122.519994744965814, 36.930614325501828], [121.104163853033029, 36.651329047180432], [120.63700890511457, 36.111439520811125], [119.66456180224607, 35.609790554337728], [119.151208123858567, 34.909859117160458], [120.227524855633717, 34.360331936168613], [120.620369093916565, 33.37672272392512], [121.229014113450219, 32.460318711877186], [121.908145786630044, 31.692174384074683], [121.891919386890336, 30.949351508095098], [121.264257440273298, 30.676267401648712], [121.503519321784722, 30.14291494396425], [122.092113885589086, 29.832520453403156], [121.93842817595305, 29.018022365834803], [121.684438511238469, 28.225512600206677], [121.125661248866436, 28.135673122667178], [120.395473260582307, 27.053206895449385], [119.585496860839555, 25.740780544532605], [118.656871372554519, 24.547390855400234], [117.281606479970833, 23.624501451099714], [115.890735304835118, 22.782873236578094], [114.763827345846209, 22.668074042241663], [114.152546828265656, 22.223760077396204], [113.806779819800752, 22.548339748621423], [113.241077915501592, 22.051367499270462], [111.843592157032447, 21.550493679281512], [110.78546552942413, 21.39714386645533], [110.444039341271662, 20.34103261970639], [109.88986128137357, 20.282457383703441], [109.627655063924635, 21.008227037026725], [109.864488153118316, 21.395050970947516], [108.522812941524421, 21.715212307211821], [108.050180291782979, 21.552379869060101], [107.043420037872636, 21.8118989120299], [106.567273390735352, 22.21820486092474], [106.725403273548466, 22.794267889898375], [105.811247186305209, 22.976892401617899], [105.329209425886631, 23.352063300056976], [104.476858351664475, 22.819150092046918], [103.504514601660503, 22.703756618739217], [102.706992222100155, 22.708795070887696], [102.170435825613552, 22.464753119389336], [101.652017856861576, 22.318198757409554], [101.803119744882906, 21.174366766845051], [101.27002566936001, 21.201651923095167], [101.180005324307558, 21.436572984294052], [101.150032993578236, 21.849984442629015], [100.416537713627349, 21.558839423096654], [99.983489211021549, 21.742936713136451], [99.240898878987196, 22.118314317304559], [99.53199222208741, 22.949038804612591], [98.898749220782804, 23.142722072842581], [98.66026248575578, 24.063286037690002], [97.604719679762027, 23.897404690033049], [97.724609002679131, 25.083637193293036], [98.671838006589212, 25.91870250091349], [98.712093947344556, 26.743535874940243], [98.682690057370507, 27.508812160750658], [98.246230910233351, 27.747221381129172], [97.91198774616943, 28.335945136014367], [97.327113885490007, 28.261582749946339], [96.248833449287829, 28.411030992134467], [96.586590610747521, 28.830979519154361], [96.117678664131006, 29.452802028922513], [95.404802280664626, 29.031716620392157], [94.565990431702929, 29.27743805593996], [93.413347609432662, 28.640629380807233], [92.503118931043616, 27.896876329046442], [91.696656528696693, 27.771741848251615], [91.258853794319876, 28.040614325466343], [90.730513950567797, 28.064953925075738], [90.015828891971182, 28.296438503527177], [89.475810174521158, 28.042758897406365], [88.814248488320573, 27.299315904239389], [88.730325962278528, 28.086864732367552], [88.120440708369941, 27.876541652939572], [86.954517043000635, 27.974261786403524], [85.823319940131526, 28.203575954698742], [85.011638218123053, 28.642773952747369], [84.23457970575015, 28.839893703724691], [83.89899295444674, 29.320226141877633], [83.337115106137176, 29.463731594352193], [82.327512648450877, 30.115268052688204], [81.525804477874786, 30.422716986608659], [81.111256138029276, 30.183480943313402], [79.721366815107118, 30.882714748654728], [78.738894484374001, 31.515906073527045], [78.458446486326025, 32.61816437431272], [79.176128777995544, 32.483779812137747], [79.208891636068543, 32.994394639613738], [78.811086460285722, 33.506198025032397], [78.912268914713209, 34.321936346975768], [77.83745079947461, 35.494009507787794], [76.192848341785705, 35.89840342868785], [75.896897414050173, 36.666806138651872], [75.158027785140987, 37.133030910789152], [74.980002475895404, 37.419990139305888], [74.829985792952144, 37.990007025701445], [74.864815708316783, 38.378846340481587], [74.25751427602269, 38.606506862943476], [73.928852166646394, 38.505815334622717], [73.675379266254836, 39.431236884105566], [73.960013055318427, 39.660008449861714], [73.822243686828315, 39.893973497063136], [74.776862420556043, 40.366425279291619], [75.467827996730719, 40.56207225194867], [76.526368035797432, 40.427946071935132], [76.90448449087711, 41.066485907549648], [78.187196893226044, 41.185315863604799], [78.543660923175253, 41.582242540038713], [80.119430373051401, 42.12394074153822], [80.259990268885318, 42.34999929459908], [80.180150180994374, 42.920067857426844], [80.866206496101213, 43.180362046881008], [79.966106398441426, 44.917516994804622], [81.947070753918084, 45.317027492853143], [82.458925815769035, 45.539649563166499], [83.180483839860543, 47.330031236350735], [85.164290399113213, 47.000955715516099], [85.720483839870667, 47.452969468773077], [85.76823286330837, 48.455750637396896], [86.59877648310335, 48.549181626980605], [87.359970330762692, 49.214980780629148], [87.751264276076668, 49.297197984405464], [88.013832228551678, 48.599462795600594], [88.854297723346747, 48.069081732773007], [90.280825636763893, 47.693549099307901], [90.970809360724957, 46.88814606382293], [90.585768263718307, 45.719716091487491], [90.945539585334316, 45.286073309910243], [92.133890822318222, 45.115075995456429], [93.480733677141316, 44.97547211362], [94.688928664125356, 44.352331854828456], [95.306875441471504, 44.241330878265458], [95.762454868556688, 43.319449164394619], [96.349395786527808, 42.725635280928643], [97.451757440177971, 42.74888967546007], [99.515817498779995, 42.524691473961688], [100.845865513108279, 42.663804429691417], [101.833040399179936, 42.51487295182627], [103.312278273534787, 41.907468166667613], [104.522281935649005, 41.90834666601662], [104.964993931093431, 41.597409572916334], [106.129315627061658, 42.134327704428891], [107.744772576937976, 42.481515814781908], [109.243595819131428, 42.519446316084149], [110.412103306115299, 42.871233628911014], [111.129682244920218, 43.406834011400171], [111.82958784388137, 43.743118394539486], [111.667737257943202, 44.073175767587706], [111.348376906379428, 44.457441718110047], [111.87330610560025, 45.102079372735112], [112.436062453258842, 45.01164561622425], [113.463906691544196, 44.808893134127111], [114.46033165899604, 45.339816799493875], [115.985096470200133, 45.727235012386004], [116.717868280098855, 46.38820241961524], [117.421701287914246, 46.67273285581421], [118.874325799638711, 46.805412095723646], [119.663269891438745, 46.692679958678944], [119.772823927897562, 47.048058783550132], [118.866574334794947, 47.747060044946195], [118.064142694166719, 48.06673045510373], [117.295507440257438, 47.697709052107385], [116.308952671373234, 47.853410142602812], [115.742837355615734, 47.726544501326273], [115.485282017073018, 48.135382595403442], [116.191802199367601, 49.134598090199056], [116.67880089728618, 49.888531399121398], [117.879244419426371, 49.510983384796944], [119.288460728025839, 50.142882798862033], [119.279365675942358, 50.582907619827282], [120.182049595216924, 51.64356639261802], [120.738191359541972, 51.964115302124547], [120.725789015791975, 52.516226304730814], [120.177088657716865, 52.753886216841195], [121.003084751470226, 53.251401068731226], [122.245747918792858, 53.431725979213681], [123.571506789240843, 53.458804429734627], [125.068211297710434, 53.161044826868832], [125.946348911646169, 52.792798570356936], [126.564399041856959, 51.784255479532689], [126.939156528837657, 51.353894151405896], [127.287455682484904, 50.739797268265434], [127.657407261262378, 49.760270494172929]]]] } }, - { "type": "Feature", "properties": { "admin": "Ivory Coast", "name": "Côte d'Ivoire", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[-2.856125047202397, 4.994475816259508], [-3.311084357100071, 4.984295559098014], [-4.008819545904941, 5.179813340674314], [-4.64991736491791, 5.168263658057084], [-5.834496222344525, 4.993700669775135], [-6.528769090185845, 4.705087795425015], [-7.518941209330434, 4.338288479017307], [-7.712159389669749, 4.364565944837721], [-7.63536821128403, 5.188159084489455], [-7.53971513511176, 5.313345241716517], [-7.570152553731686, 5.707352199725903], [-7.993692592795879, 6.126189683451541], [-8.311347622094017, 6.193033148621081], [-8.602880214868618, 6.467564195171659], [-8.385451626000572, 6.911800645368742], [-8.485445522485348, 7.395207831243068], [-8.439298468448696, 7.686042792181736], [-8.280703497744936, 7.687179673692156], [-8.221792364932197, 8.123328762235571], [-8.299048631208562, 8.316443589710302], [-8.203498907900878, 8.455453192575446], [-7.832100389019186, 8.575704250518625], [-8.079113735374348, 9.376223863152033], [-8.309616461612249, 9.789531968622439], [-8.22933712404682, 10.129020290563897], [-8.029943610048617, 10.206534939001711], [-7.89958980959237, 10.297382106970824], [-7.622759161804808, 10.147236232946792], [-6.850506557635057, 10.138993841996237], [-6.666460944027547, 10.430810655148447], [-6.493965013037267, 10.411302801958268], [-6.205222947606429, 10.524060777219132], [-6.050452032892266, 10.096360785355442], [-5.816926235365286, 10.222554633012191], [-5.404341599946973, 10.370736802609144], [-4.954653286143098, 10.152713934769732], [-4.779883592131966, 9.821984768101741], [-4.330246954760383, 9.610834865757139], [-3.980449184576684, 9.862344061721698], [-3.511898972986272, 9.900326239456216], [-2.827496303712706, 9.642460842319775], [-2.56218950032624, 8.219627793811481], [-2.983584967450326, 7.379704901555511], [-3.244370083011261, 6.2504715031135], [-2.810701463217839, 5.389051215024109], [-2.856125047202397, 4.994475816259508]]] } }, - { "type": "Feature", "properties": { "admin": "Cameroon", "name": "Cameroon", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[13.07582238124675, 2.267097072759014], [12.951333855855605, 2.321615708826939], [12.359380323952218, 2.19281220133945], [11.751665480199787, 2.326757513839993], [11.276449008843711, 2.261050930180871], [9.649158155972627, 2.283866075037735], [9.795195753629455, 3.073404445809117], [9.404366896205998, 3.734526882335202], [8.948115675501068, 3.904128933117135], [8.744923943729416, 4.352215277519959], [8.488815545290889, 4.495617377129917], [8.500287713259693, 4.771982937026847], [8.757532993208626, 5.47966583904791], [9.233162876023043, 6.444490668153334], [9.522705926154398, 6.453482367372116], [10.118276808318255, 7.038769639509879], [10.497375115611417, 7.055357774275562], [11.058787876030349, 6.644426784690593], [11.745774366918509, 6.981382961449753], [11.839308709366801, 7.397042344589434], [12.063946160539556, 7.799808457872301], [12.218872104550597, 8.305824082874322], [12.753671502339214, 8.717762762888993], [12.955467970438971, 9.417771714714702], [13.1675997249971, 9.64062632897341], [13.308676385153914, 10.160362046748926], [13.572949659894558, 10.798565985553564], [14.415378859116682, 11.572368882692071], [14.468192172918974, 11.90475169519341], [14.57717776862253, 12.085360826053501], [14.181336297266792, 12.483656927943112], [14.213530714584634, 12.802035427293344], [14.495787387762842, 12.859396267137326], [14.893385857816522, 12.219047756392582], [14.960151808337598, 11.555574042197222], [14.923564894274955, 10.891325181517471], [15.467872755605269, 9.982336737503429], [14.909353875394713, 9.99212942142273], [14.627200555081057, 9.920919297724536], [14.171466098699025, 10.021378282099928], [13.954218377344002, 9.549494940626685], [14.544466586981766, 8.965861314322266], [14.979995558337688, 8.796104234243471], [15.120865512765331, 8.382150173369423], [15.436091749745765, 7.692812404811971], [15.279460483469107, 7.421924546737968], [14.776545444404572, 6.408498033062044], [14.536560092841111, 6.22695872642069], [14.459407179429345, 5.451760565610299], [14.558935988023501, 5.03059764243153], [14.478372430080466, 4.732605495620446], [14.950953403389658, 4.21038930909492], [15.036219516671249, 3.851367295747123], [15.405395948964379, 3.335300604664339], [15.862732374747479, 3.013537298998982], [15.907380812247649, 2.557389431158612], [16.01285241055535, 2.267639675298084], [15.940918816805061, 1.727672634280295], [15.14634199388524, 1.964014797367184], [14.337812534246577, 2.22787466064949], [13.07582238124675, 2.267097072759014]]] } }, - { "type": "Feature", "properties": { "admin": "Democratic Republic of the Congo", "name": "Dem. Rep. Congo", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[30.833859897593801, 3.50916596111034], [30.773346795380036, 2.339883327642127], [31.174149204235807, 2.204465236821263], [30.852670118948048, 1.849396470543809], [30.468507521290292, 1.58380544677972], [30.086153598762703, 1.062312730306288], [29.875778842902488, 0.597379868976304], [29.819503208136634, -0.205310153813372], [29.587837762172164, -0.58740569417948], [29.579466180140876, -1.341313164885626], [29.29188683443661, -1.620055840667987], [29.254834832483336, -2.215109958508911], [29.117478875451546, -2.292211195488384], [29.02492638521678, -2.839257907730157], [29.276383904749046, -3.293907159034063], [29.339997592900342, -4.499983412294092], [29.519986606572925, -5.419978936386313], [29.41999271008816, -5.939998874539432], [29.620032179490003, -6.520015150583424], [30.199996779101692, -7.079980970898161], [30.740015496551781, -8.340007419470913], [30.34608605319081, -8.238256524288216], [29.002912225060467, -8.40703175215347], [28.734866570762495, -8.526559340044576], [28.449871046672818, -9.164918308146083], [28.673681674928922, -9.605924981324931], [28.496069777141763, -10.789883721564044], [28.372253045370421, -11.793646742401389], [28.642417433392346, -11.971568698782312], [29.341547885869087, -12.36074391037241], [29.616001417771223, -12.178894545137307], [29.699613885219485, -13.257226657771827], [28.934285922976834, -13.248958428605132], [28.52356163912102, -12.698604424696679], [28.15510867687998, -12.272480564017894], [27.38879886242378, -12.132747491100663], [27.164419793412456, -11.608748467661071], [26.55308759939961, -11.924439792532125], [25.752309604604726, -11.784965101776356], [25.418118116973197, -11.330935967659958], [24.783169793402948, -11.238693536018962], [24.314516228947948, -11.262826429899269], [24.257155389103982, -10.951992689663655], [23.912215203555714, -10.926826267137512], [23.456790805767433, -10.867863457892481], [22.837345411884733, -11.017621758674329], [22.402798292742371, -10.99307545333569], [22.155268182064304, -11.084801120653768], [22.208753289486388, -9.894796237836507], [21.87518191904234, -9.523707777548564], [21.801801385187897, -8.908706556842978], [21.949130893652036, -8.305900974158275], [21.746455926203303, -7.920084730667147], [21.728110792739695, -7.2908724910813], [20.514748162526498, -7.299605808138629], [20.601822950938292, -6.93931772219968], [20.091621534920645, -6.943090101756993], [20.037723016040214, -7.116361179231644], [19.417502475673157, -7.155428562044297], [19.166613396896107, -7.738183688999753], [19.016751743249664, -7.988245944860132], [18.464175652752683, -7.847014255406442], [18.134221632569048, -7.98767750410492], [17.472970004962232, -8.068551120641699], [17.089995965247166, -7.545688978712525], [16.860190870845198, -7.222297865429984], [16.573179965896141, -6.622644545115087], [16.326528354567042, -5.877470391466267], [13.375597364971892, -5.864241224799548], [13.02486941900696, -5.984388929878157], [12.735171339578695, -5.965682061388497], [12.322431674863507, -6.100092461779658], [12.182336866920249, -5.789930515163837], [12.436688266660866, -5.684303887559245], [12.468004184629734, -5.248361504745003], [12.631611769265788, -4.991271254092935], [12.995517205465173, -4.781103203961883], [13.258240187237044, -4.882957452009165], [13.600234816144676, -4.500138441590969], [14.144956088933295, -4.510008640158715], [14.209034864975219, -4.793092136253597], [14.582603794013179, -4.970238946150139], [15.170991652088441, -4.3435071753143], [15.753540073314749, -3.855164890156096], [16.006289503654298, -3.535132744972528], [15.972803175529149, -2.712392266453612], [16.407091912510051, -1.740927015798682], [16.86530683764212, -1.225816338713287], [17.523716261472853, -0.743830254726987], [17.638644646889983, -0.424831638189246], [17.663552687254676, -0.058083998213817], [17.826540154703245, 0.288923244626105], [17.774191928791563, 0.855658677571085], [17.89883548347958, 1.741831976728278], [18.09427575040743, 2.365721543788055], [18.39379235197114, 2.90044342692822], [18.453065219809925, 3.504385891123348], [18.542982211997778, 4.201785183118317], [18.932312452884755, 4.709506130385973], [19.467783644293146, 5.031527818212779], [20.290679152108932, 4.691677761245287], [20.927591180106273, 4.322785549329736], [21.659122755630019, 4.224341945813719], [22.405123732195531, 4.02916006104732], [22.704123569436284, 4.633050848810156], [22.841479526468103, 4.710126247573483], [23.297213982850135, 4.609693101414221], [24.41053104014625, 5.108784084489129], [24.805028924262409, 4.897246608902349], [25.128833449003274, 4.927244777847789], [25.278798455514302, 5.170408229997191], [25.650455356557465, 5.256087754737123], [26.402760857862535, 5.150874538590869], [27.044065382604703, 5.127852688004835], [27.374226108517483, 5.233944403500059], [27.979977247842807, 4.408413397637373], [28.428993768026906, 4.287154649264493], [28.696677687298795, 4.455077215996936], [29.159078403446497, 4.38926727947323], [29.715995314256013, 4.600804755060024], [29.953500197069467, 4.173699042167683], [30.833859897593801, 3.50916596111034]]] } }, - { "type": "Feature", "properties": { "admin": "Republic of Congo", "name": "Congo", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[12.995517205465173, -4.781103203961883], [12.620759718484491, -4.438023369976135], [12.318607618873923, -4.606230157086187], [11.914963006242086, -5.037986748884789], [11.093772820691923, -3.978826592630546], [11.855121697648114, -3.42687061932105], [11.478038771214299, -2.765618991714241], [11.820963575903189, -2.514161472181982], [12.495702752338159, -2.391688327650242], [12.575284458067639, -1.948511244315134], [13.109618767965626, -2.428740329603513], [13.992407260807706, -2.470804945489099], [14.299210239324564, -1.998275648612213], [14.425455763413593, -1.333406670744971], [14.316418491277741, -0.552627455247048], [13.843320753645653, 0.038757635901149], [14.276265903386953, 1.196929836426619], [14.026668735417214, 1.395677395021153], [13.282631463278816, 1.31418366129688], [13.003113641012074, 1.830896307783319], [13.07582238124675, 2.267097072759014], [14.337812534246577, 2.22787466064949], [15.14634199388524, 1.964014797367184], [15.940918816805061, 1.727672634280295], [16.01285241055535, 2.267639675298084], [16.537058139724135, 3.198254706226278], [17.133042433346297, 3.728196519379451], [17.809900343505259, 3.560196437998569], [18.453065219809925, 3.504385891123348], [18.39379235197114, 2.90044342692822], [18.09427575040743, 2.365721543788055], [17.89883548347958, 1.741831976728278], [17.774191928791563, 0.855658677571085], [17.826540154703245, 0.288923244626105], [17.663552687254676, -0.058083998213817], [17.638644646889983, -0.424831638189246], [17.523716261472853, -0.743830254726987], [16.86530683764212, -1.225816338713287], [16.407091912510051, -1.740927015798682], [15.972803175529149, -2.712392266453612], [16.006289503654298, -3.535132744972528], [15.753540073314749, -3.855164890156096], [15.170991652088441, -4.3435071753143], [14.582603794013179, -4.970238946150139], [14.209034864975219, -4.793092136253597], [14.144956088933295, -4.510008640158715], [13.600234816144676, -4.500138441590969], [13.258240187237044, -4.882957452009165], [12.995517205465173, -4.781103203961883]]] } }, - { "type": "Feature", "properties": { "admin": "Colombia", "name": "Colombia", "continent": "South America" }, "geometry": { "type": "Polygon", "coordinates": [[[-75.373223232713841, -0.15203175212045], [-75.801465827116587, 0.084801337073202], [-76.292314419240938, 0.416047268064119], [-76.576379767549383, 0.256935533037435], [-77.424984300430367, 0.395686753741117], [-77.668612840470416, 0.825893052570961], [-77.855061408179509, 0.809925034992773], [-78.855258755188686, 1.380923773601822], [-78.990935228171026, 1.691369940595251], [-78.617831387023699, 1.766404120283056], [-78.662118089497838, 2.267355454920476], [-78.427610439757302, 2.629555568854215], [-77.931542527971473, 2.696605739752925], [-77.510431281224996, 3.325016994638246], [-77.127689785455246, 3.849636135265356], [-77.496271938776999, 4.087606105969427], [-77.307601284479375, 4.667984117039452], [-77.533220587865713, 5.582811997902496], [-77.318815070286718, 5.845354112161359], [-77.476660732722266, 6.691116441266301], [-77.881571417945239, 7.223771267114783], [-77.75341386586139, 7.709839789252141], [-77.431107957656977, 7.638061224798733], [-77.242566494440069, 7.935278225125442], [-77.474722866511314, 8.524286200388216], [-77.353360765273848, 8.670504665558068], [-76.836673957003541, 8.638749497914715], [-76.086383836557843, 9.336820583529486], [-75.674600185840035, 9.443248195834597], [-75.664704149056149, 9.774003200718736], [-75.480425991503338, 10.618990383339305], [-74.906895107711975, 11.08304474532032], [-74.276752692344871, 11.102035834187586], [-74.197222663047683, 11.310472723836865], [-73.414763963500278, 11.227015285685479], [-72.62783525255962, 11.731971543825519], [-72.238194953078903, 11.955549628136325], [-71.754090135368628, 12.437303168177305], [-71.399822353791691, 12.376040757695289], [-71.137461107045866, 12.112981879113503], [-71.331583624950284, 11.776284084515805], [-71.973921678338272, 11.608671576377116], [-72.227575446242923, 11.108702093953237], [-72.614657762325194, 10.821975409381777], [-72.905286017534692, 10.45034434655477], [-73.027604132769554, 9.736770331252441], [-73.304951544880026, 9.151999823437604], [-72.788729824500379, 9.085027167187331], [-72.660494757768092, 8.62528778730268], [-72.439862230097944, 8.405275376820027], [-72.360900641555958, 8.002638454617893], [-72.479678921178831, 7.632506008327352], [-72.444487270788059, 7.42378489830048], [-72.19835242378187, 7.340430813013682], [-71.960175747348629, 6.991614895043538], [-70.674233567981503, 7.087784735538717], [-70.093312954372408, 6.960376491723109], [-69.389479946557103, 6.099860541198835], [-68.985318569602327, 6.206804917826856], [-68.265052456318216, 6.153268133972473], [-67.695087246355001, 6.267318020040645], [-67.34143958196556, 6.095468044454021], [-67.521531948502741, 5.556870428891968], [-67.744696621355203, 5.221128648291667], [-67.823012254493534, 4.503937282728898], [-67.621835903581271, 3.839481716319994], [-67.33756384954367, 3.542342230641721], [-67.303173183853417, 3.31845408773718], [-67.809938117123693, 2.820655015469569], [-67.447092047786299, 2.600280869960869], [-67.181294318293041, 2.250638129074062], [-66.876325853122566, 1.253360500489336], [-67.065048183852483, 1.130112209473225], [-67.25999752467358, 1.719998684084956], [-67.537810024674684, 2.037162787276329], [-67.868565029558823, 1.692455145673392], [-69.816973232691609, 1.714805202639624], [-69.804596727157701, 1.089081122233466], [-69.218637661400166, 0.985676581217433], [-69.252434048119042, 0.602650865070075], [-69.452396002872447, 0.706158758950693], [-70.015565761989293, 0.541414292804205], [-70.02065589057004, -0.185156345219539], [-69.577065395776586, -0.549991957200163], [-69.420485805932216, -1.122618503426409], [-69.444101935489599, -1.556287123219817], [-69.893635219996611, -4.298186944194326], [-70.394043952094975, -3.766591485207825], [-70.692682054309699, -3.742872002785858], [-70.047708502874841, -2.725156345229699], [-70.813475714791949, -2.256864515800742], [-71.413645799429773, -2.342802422702128], [-71.774760708285385, -2.169789727388937], [-72.325786505813639, -2.434218031426453], [-73.070392218707212, -2.308954359550952], [-73.659503546834586, -1.260491224781134], [-74.122395189089048, -1.002832533373848], [-74.441600511355958, -0.530820000819887], [-75.106624518520064, -0.05720549886486], [-75.373223232713841, -0.15203175212045]]] } }, - { "type": "Feature", "properties": { "admin": "Costa Rica", "name": "Costa Rica", "continent": "North America" }, "geometry": { "type": "Polygon", "coordinates": [[[-82.965783047197348, 8.225027980985983], [-83.508437262694287, 8.446926581247281], [-83.711473965169063, 8.656836249216864], [-83.596313035806631, 8.830443223501417], [-83.632641567707822, 9.051385809765319], [-83.909885626953724, 9.290802720573579], [-84.303401658856345, 9.487354030795712], [-84.64764421256865, 9.615537421095707], [-84.713350796227743, 9.908051866083849], [-84.975660366541319, 10.086723130733004], [-84.911374884770211, 9.795991522658921], [-85.110923428065291, 9.557039699741308], [-85.339488288092255, 9.834542141148658], [-85.660786505866966, 9.93334747969072], [-85.797444831062819, 10.134885565629032], [-85.791708747078417, 10.439337266476612], [-85.65931372754666, 10.754330959511718], [-85.941725430021748, 10.895278428587799], [-85.712540452807289, 11.088444932494822], [-85.561851976244171, 11.217119248901593], [-84.903003302738924, 10.952303371621895], [-84.673069017256239, 11.082657172078139], [-84.355930752281026, 10.999225572142901], [-84.190178595704822, 10.793450018756671], [-83.895054490885926, 10.726839097532444], [-83.655611741861563, 10.938764146361418], [-83.402319708982944, 10.39543813724465], [-83.015676642575158, 9.992982082555553], [-82.546196255203469, 9.566134751824674], [-82.932890998043561, 9.476812038608172], [-82.927154914059145, 9.074330145702914], [-82.719183112300513, 8.925708726431493], [-82.868657192704759, 8.807266343618521], [-82.829770677405151, 8.626295477732368], [-82.9131764391242, 8.423517157419068], [-82.965783047197348, 8.225027980985983]]] } }, - { "type": "Feature", "properties": { "admin": "Cuba", "name": "Cuba", "continent": "North America" }, "geometry": { "type": "Polygon", "coordinates": [[[-82.268151211257035, 23.188610744717703], [-81.404457160146819, 23.117271429938775], [-80.61876868358118, 23.105980129482994], [-79.679523688460222, 22.765303249598823], [-79.281485968732071, 22.399201565027049], [-78.347434455056472, 22.512166246017085], [-77.993295864560253, 22.277193508385928], [-77.146422492161037, 21.657851467367831], [-76.523824835908528, 21.20681956632437], [-76.194620123993175, 21.220565497314006], [-75.598222418912655, 21.01662445727413], [-75.671060350228032, 20.735091254147999], [-74.933896043584483, 20.693905137611381], [-74.178024868451246, 20.284627793859737], [-74.296648118777242, 20.050378526280678], [-74.961594611292924, 19.923435370355687], [-75.634680141894577, 19.873774318923193], [-76.323656175425981, 19.952890936762056], [-77.755480923153044, 19.855480861891873], [-77.085108405246729, 20.413353786698789], [-77.492654588516601, 20.673105373613886], [-78.137292243141573, 20.739948838783427], [-78.482826707661161, 21.028613389565848], [-78.719866502583997, 21.598113511638431], [-79.284999966127913, 21.559175319906497], [-80.217475348618635, 21.827324327069032], [-80.517534552721401, 22.037078965741756], [-81.820943366203167, 22.192056586185068], [-82.169991828118611, 22.387109279870746], [-81.79500179719264, 22.636964830001951], [-82.775897996740838, 22.688150336187057], [-83.494458787759328, 22.168517971276124], [-83.908800421875611, 22.154565334557329], [-84.052150845053248, 21.910575059491251], [-84.547030198896351, 21.801227728761639], [-84.974911058273079, 21.896028143801082], [-84.44706214062775, 22.204949856041903], [-84.23035702181177, 22.56575470630376], [-83.778239915690165, 22.78811839445569], [-83.267547573565736, 22.983041897060641], [-82.510436164057495, 23.078746649665181], [-82.268151211257035, 23.188610744717703]]] } }, - { "type": "Feature", "properties": { "admin": "Northern Cyprus", "name": "N. Cyprus", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[32.731780226377445, 35.14002594658843], [32.802473585752743, 35.145503648411363], [32.946960890440799, 35.38670339613369], [33.667227003724939, 35.373215847305509], [34.576473829900458, 35.671595567358786], [33.900804477684197, 35.245755927057608], [33.973616570783456, 35.058506374647997], [33.866439650210104, 35.093594672174177], [33.675391880027057, 35.017862860650446], [33.525685255677494, 35.038688462864066], [33.475817498515845, 35.000344550103499], [33.45592207208346, 35.101423651666401], [33.383833449036295, 35.162711900364563], [33.190977003723042, 35.173124701471373], [32.919572381326127, 35.087832749973636], [32.731780226377445, 35.14002594658843]]] } }, - { "type": "Feature", "properties": { "admin": "Cyprus", "name": "Cyprus", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[33.973616570783456, 35.058506374647997], [34.004880812320032, 34.978097846001852], [32.97982710137844, 34.571869411755436], [32.490296258277532, 34.701654771456468], [32.256667107885953, 35.103232326796622], [32.731780226377445, 35.14002594658843], [32.919572381326127, 35.087832749973636], [33.190977003723042, 35.173124701471373], [33.383833449036295, 35.162711900364563], [33.45592207208346, 35.101423651666401], [33.475817498515845, 35.000344550103499], [33.525685255677494, 35.038688462864066], [33.675391880027057, 35.017862860650446], [33.866439650210104, 35.093594672174177], [33.973616570783456, 35.058506374647997]]] } }, - { "type": "Feature", "properties": { "admin": "Czech Republic", "name": "Czech Rep.", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[16.960288120194573, 48.596982326850593], [16.49928266771877, 48.785808010445095], [16.029647251050218, 48.733899034207916], [15.253415561593979, 49.039074205107575], [14.901447381254055, 48.964401760445817], [14.33889773932472, 48.555305284207193], [13.595945672264433, 48.877171942737135], [13.031328973043427, 49.307068182973232], [12.52102420416119, 49.54741526956272], [12.415190870827441, 49.96912079528056], [12.240111118222556, 50.266337795607271], [12.96683678554319, 50.484076443069071], [13.338131951560282, 50.733234361364346], [14.05622765468817, 50.926917629594286], [14.307013380600633, 51.117267767941399], [14.570718214586062, 51.002339382524262], [15.016995883858666, 51.106674099321566], [15.490972120839725, 50.7847299261432], [16.238626743238566, 50.697732652379827], [16.176253289462263, 50.4226073268579], [16.719475945714429, 50.215746568393527], [16.868769158605655, 50.473973700556016], [17.554567091551117, 50.36214590107641], [17.649445021238986, 50.049038397819942], [18.392913852622168, 49.988628648470737], [18.85314415861361, 49.496229763377634], [18.554971144289478, 49.495015367218777], [18.399993523846174, 49.315000515330034], [18.170498488037961, 49.271514797556421], [18.104972771891848, 49.043983466175298], [17.913511590250462, 48.996492824899072], [17.886484816161808, 48.903475246773695], [17.545006951577101, 48.800019029325362], [17.101984897538895, 48.8169688991171], [16.960288120194573, 48.596982326850593]]] } }, - { "type": "Feature", "properties": { "admin": "Germany", "name": "Germany", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[9.92190636560923, 54.983104153048025], [9.939579705452898, 54.596641954153242], [10.950112338920517, 54.363607082733147], [10.939466993868447, 54.008693345752583], [11.95625247564328, 54.196485500701144], [12.518440382546711, 54.470370591847988], [13.647467075259495, 54.075510972705885], [14.119686313542555, 53.757029120491026], [14.353315463934164, 53.248171291713092], [14.074521111719431, 52.981262518925334], [14.437599725002197, 52.62485016540829], [14.685026482815713, 52.089947414755208], [14.607098422919645, 51.745188096719964], [15.016995883858781, 51.106674099321701], [14.570718214586119, 51.002339382524369], [14.307013380600662, 51.117267767941364], [14.05622765468831, 50.92691762959435], [13.338131951560397, 50.733234361364268], [12.966836785543249, 50.484076443069164], [12.240111118222668, 50.266337795607214], [12.41519087082747, 49.969120795280602], [12.521024204161332, 49.547415269562741], [13.031328973043513, 49.307068182973232], [13.595945672264575, 48.877171942737156], [13.243357374737112, 48.416114813829026], [12.884102817443873, 48.289145819687846], [13.025851271220514, 47.637583523135945], [12.93262698736606, 47.467645575543983], [12.620759718484519, 47.672387600284409], [12.141357456112869, 47.703083401065768], [11.426414015354847, 47.523766181013045], [10.544504021861597, 47.566399237653783], [10.402083774465321, 47.302487697939164], [9.896068149463188, 47.58019684507569], [9.594226108446376, 47.525058091820185], [8.522611932009793, 47.830827541691342], [8.317301466514092, 47.613579820336263], [7.466759067422286, 47.620581976911907], [7.59367638513106, 48.333019110703724], [8.099278598674855, 49.017783515003423], [6.658229607783709, 49.201958319691627], [6.186320428094176, 49.4638028021145], [6.242751092156992, 49.90222565367872], [6.043073357781109, 50.128051662794221], [6.156658155958779, 50.803721015010574], [5.988658074577812, 51.85161570902504], [6.589396599970825, 51.85202912048338], [6.842869500362381, 52.228440253297542], [7.092053256873895, 53.14404328064488], [6.905139601274128, 53.482162177130633], [7.100424838905268, 53.693932196662658], [7.936239454793961, 53.748295803433777], [8.121706170289483, 53.527792466844275], [8.800734490604667, 54.02078563090889], [8.572117954145368, 54.395646470754045], [8.526229282270206, 54.962743638725144], [9.282048780971136, 54.830865383516297], [9.92190636560923, 54.983104153048025]]] } }, - { "type": "Feature", "properties": { "admin": "Djibouti", "name": "Djibouti", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[43.081226027200152, 12.699638576707112], [43.317852410664663, 12.390148423711022], [43.286381463398911, 11.974928290245883], [42.715873650896519, 11.735640570518338], [43.145304803242126, 11.462039699748853], [42.776851841000948, 10.926878566934416], [42.55493000000012, 11.105110000000193], [42.314140000000116, 11.0342], [41.755570000000191, 11.05091], [41.739590000000177, 11.355110000000137], [41.661760000000122, 11.6312], [42.000000000000107, 12.100000000000133], [42.351560000000106, 12.54223000000013], [42.779642368344739, 12.455415757695672], [43.081226027200152, 12.699638576707112]]] } }, - { "type": "Feature", "properties": { "admin": "Denmark", "name": "Denmark", "continent": "Europe" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[12.690006137755629, 55.60999095318077], [12.089991082414738, 54.800014553437919], [11.043543328504226, 55.36486379660424], [10.90391360845163, 55.779954738988735], [12.370904168353288, 56.111407375708822], [12.690006137755629, 55.60999095318077]]], [[[10.912181837618359, 56.4586213242779], [10.667803989309986, 56.081383368547208], [10.369992710011983, 56.190007229224719], [9.649984978889306, 55.469999498102041], [9.921906365609173, 54.983104153048046], [9.282048780971136, 54.830865383516155], [8.526229282270235, 54.962743638724973], [8.120310906617588, 55.517722683323612], [8.089976840862247, 56.540011705137587], [8.256581658571262, 56.809969387430286], [8.543437534223385, 57.110002753316891], [9.424469028367609, 57.172066148499468], [9.775558709358561, 57.447940782289649], [10.580005730846151, 57.730016587954843], [10.54610599126269, 57.21573273378614], [10.250000034230222, 56.890016181050456], [10.369992710011983, 56.60998159446082], [10.912181837618359, 56.4586213242779]]]] } }, - { "type": "Feature", "properties": { "admin": "Dominican Republic", "name": "Dominican Rep.", "continent": "North America" }, "geometry": { "type": "Polygon", "coordinates": [[[-71.71236141629295, 19.714455878167353], [-71.587304450146604, 19.884910590082093], [-70.806706102161726, 19.880285549391981], [-70.214364997016119, 19.622885240146157], [-69.950815192327568, 19.647999986240002], [-69.769250047470067, 19.293267116772437], [-69.222125820579862, 19.313214219637096], [-69.254346076113819, 19.015196234609871], [-68.809411994080818, 18.979074408437846], [-68.317943284768958, 18.612197577381689], [-68.689315965434503, 18.205142320218609], [-69.164945848248905, 18.422648423735108], [-69.623987596297624, 18.380712998930246], [-69.952933926051529, 18.428306993071057], [-70.133232998317879, 18.245915025296892], [-70.517137213814195, 18.184290879788829], [-70.669298468697619, 18.42688589118303], [-70.999950120717173, 18.283328762276206], [-71.400209927033885, 17.598564357976596], [-71.657661912712001, 17.757572740138695], [-71.708304816358037, 18.044997056546091], [-71.687737596305865, 18.316660061104468], [-71.945112067335543, 18.616900132720257], [-71.701302659782485, 18.785416978424049], [-71.624873216422813, 19.169837958243303], [-71.71236141629295, 19.714455878167353]]] } }, - { "type": "Feature", "properties": { "admin": "Algeria", "name": "Algeria", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[11.99950564947161, 23.471668402596443], [8.572893100629782, 21.565660712159136], [5.677565952180684, 19.601206976799713], [4.267419467800038, 19.155265204336995], [3.158133172222704, 19.057364203360034], [3.146661004253899, 19.693578599521441], [2.683588494486428, 19.856230170160114], [2.060990838233919, 20.142233384679482], [1.823227573259032, 20.61080943448604], [-1.550054897457613, 22.792665920497377], [-4.92333736817423, 24.974574082940993], [-8.684399786809051, 27.395744126895998], [-8.66512447756419, 27.58947907155822], [-8.665589565454805, 27.656425889592349], [-8.674116176782972, 28.841288967396572], [-7.059227667661928, 29.579228420524522], [-6.060632290053772, 29.731699734001687], [-5.242129278982786, 30.000443020135581], [-4.859646165374469, 30.501187649043839], [-3.690441046554695, 30.896951605751152], [-3.647497931320145, 31.637294012980668], [-3.068980271812647, 31.724497992473207], [-2.616604783529567, 32.094346218386143], [-1.30789913573787, 32.262888902306095], [-1.124551153966308, 32.651521511357124], [-1.388049282222567, 32.864015000941301], [-1.733454555661467, 33.91971283623198], [-1.792985805661686, 34.527918606091198], [-2.169913702798624, 35.168396307916673], [-1.208602871089056, 35.71484874118709], [-0.127454392894606, 35.888662421200799], [0.503876580415209, 36.301272894835272], [1.466918572606545, 36.605647081034398], [3.161698846050824, 36.783904934225205], [4.815758090849129, 36.865036932923452], [5.320120070017792, 36.716518866516616], [6.261819695672611, 37.110655015606731], [7.330384962603969, 37.118380642234364], [7.737078484741003, 36.885707505840209], [8.420964389691674, 36.946427313783154], [8.217824334352313, 36.433176988260271], [8.376367628623766, 35.479876003555937], [8.140981479534302, 34.655145982393783], [7.524481642292242, 34.097376410451453], [7.612641635782181, 33.344114895148955], [8.430472853233367, 32.748337307255944], [8.439102817426116, 32.506284898400814], [9.055602654668148, 32.102691962201284], [9.482139926805273, 30.307556057246181], [9.805634392952411, 29.424638373323383], [9.859997999723443, 28.959989732371007], [9.683884718472765, 28.144173895779193], [9.756128370816779, 27.688258571884141], [9.629056023811073, 27.140953477480913], [9.716285841519747, 26.512206325785691], [9.319410841518161, 26.094324856057447], [9.910692579801774, 25.365454616796733], [9.948261346077969, 24.93695364023251], [10.30384687667836, 24.37931325937091], [10.771363559622925, 24.562532050061744], [11.560669386449002, 24.097909247325511], [11.99950564947161, 23.471668402596443]]] } }, - { "type": "Feature", "properties": { "admin": "Ecuador", "name": "Ecuador", "continent": "South America" }, "geometry": { "type": "Polygon", "coordinates": [[[-80.302560594387188, -3.404856459164712], [-79.770293341780913, -2.65751189535964], [-79.986559210922394, -2.220794366061014], [-80.368783942369234, -2.685158786635788], [-80.967765469064332, -2.246942640800703], [-80.764806281238023, -1.965047702648532], [-80.933659023751702, -1.057454522306358], [-80.583370327461239, -0.906662692878683], [-80.39932471385373, -0.283703301600141], [-80.020898200180355, 0.360340074053468], [-80.090609707342097, 0.768428859862396], [-79.542762010399784, 0.982937730305963], [-78.855258755188686, 1.380923773601822], [-77.855061408179509, 0.809925034992773], [-77.668612840470416, 0.825893052570961], [-77.424984300430367, 0.395686753741117], [-76.576379767549383, 0.256935533037435], [-76.292314419240938, 0.416047268064119], [-75.801465827116587, 0.084801337073202], [-75.373223232713841, -0.15203175212045], [-75.233722703741932, -0.911416924649529], [-75.544995693652027, -1.56160979574588], [-76.635394253226707, -2.608677666843817], [-77.83790483265858, -3.003020521663103], [-78.450683966775628, -3.873096612161375], [-78.639897223612323, -4.547784112164072], [-79.205289069317715, -4.959128513207388], [-79.62497921417615, -4.454198093283494], [-80.028908047185581, -4.346090996928893], [-80.442241990872134, -4.425724379090673], [-80.46929460317692, -4.059286797708999], [-80.184014858709645, -3.821161797708043], [-80.302560594387188, -3.404856459164712]]] } }, - { "type": "Feature", "properties": { "admin": "Egypt", "name": "Egypt", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[34.9226, 29.50133], [34.64174, 29.09942], [34.42655, 28.34399], [34.15451, 27.8233], [33.92136, 27.6487], [33.58811, 27.97136], [33.13676, 28.41765], [32.42323, 29.85108], [32.32046, 29.76043], [32.73482, 28.70523], [33.34876, 27.69989], [34.10455, 26.14227], [34.47387, 25.59856], [34.79507, 25.03375], [35.69241, 23.92671], [35.49372, 23.75237], [35.52598, 23.10244], [36.69069, 22.20485], [36.86623, 22.0], [32.9, 22.0], [29.02, 22.0], [25.0, 22.0], [25.0, 25.682499996360992], [25.0, 29.238654529533452], [24.70007, 30.04419], [24.95762, 30.6616], [24.80287, 31.08929], [25.16482, 31.56915], [26.49533, 31.58568], [27.45762, 31.32126], [28.45048, 31.02577], [28.91353, 30.87005], [29.68342, 31.18686], [30.09503, 31.4734], [30.97693, 31.55586], [31.68796, 31.4296], [31.96041, 30.9336], [32.19247, 31.26034], [32.99392, 31.02407], [33.7734, 30.96746], [34.26544, 31.21936], [34.9226, 29.50133]]] } }, - { "type": "Feature", "properties": { "admin": "Eritrea", "name": "Eritrea", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[42.351560000000106, 12.54223000000013], [42.00975, 12.86582], [41.59856, 13.452090000000108], [41.15519371924983, 13.773319810435224], [40.8966, 14.118640000000138], [40.026218702969167, 14.519579169162281], [39.34061, 14.53155], [39.0994, 14.74064], [38.51295, 14.50547], [37.90607, 14.959430000000165], [37.59377, 14.2131], [36.42951, 14.42211], [36.323188917798113, 14.822480577041057], [36.753860304518575, 16.291874091044289], [36.852530000000108, 16.95655], [37.16747, 17.263140000000128], [37.904000000000103, 17.42754], [38.410089959473218, 17.998307399970312], [38.990622999839999, 16.84062612555169], [39.266110060388016, 15.922723496967246], [39.814293654140208, 15.435647284400314], [41.179274936697645, 14.491079616753209], [41.734951613132345, 13.921036892141554], [42.276830682144848, 13.34399201095442], [42.589576450375255, 13.000421250861901], [43.081226027200152, 12.699638576707112], [42.779642368344739, 12.455415757695672], [42.351560000000106, 12.54223000000013]]] } }, - { "type": "Feature", "properties": { "admin": "Spain", "name": "Spain", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[-9.034817674180244, 41.880570583659669], [-8.98443315269567, 42.592775173506261], [-9.392883673530644, 43.026624660812686], [-7.978189663108308, 43.748337714200979], [-6.754491746436754, 43.567909450853918], [-5.411886359061596, 43.574239813809669], [-4.347842779955783, 43.403449205085025], [-3.51753170410609, 43.455900783861296], [-1.901351284177764, 43.422802028978332], [-1.502770961910528, 43.034014390630425], [0.338046909190581, 42.579546006839543], [0.701590610363894, 42.795734361332599], [1.826793247087153, 42.343384711265678], [2.985998976258457, 42.473015041669854], [3.039484083680548, 41.892120266276891], [2.091841668312184, 41.226088568683082], [0.810524529635188, 41.014731960609332], [0.721331007499401, 40.678318386389229], [0.106691521819869, 40.123933620762003], [-0.278711310212941, 39.309978135732713], [0.111290724293838, 38.738514309233032], [-0.467123582349103, 38.292365831041138], [-0.683389451490598, 37.642353827457811], [-1.438382127274849, 37.443063666324214], [-2.146452602538119, 36.674144192037282], [-3.415780808923386, 36.658899644511173], [-4.368900926114718, 36.677839056946141], [-4.995219285492211, 36.32470815687963], [-5.377159796561457, 35.946850083961458], [-5.866432257500902, 36.02981659600605], [-6.236693894872174, 36.367677110330327], [-6.520190802425402, 36.942913316387312], [-7.45372555177809, 37.097787583966053], [-7.537105475281022, 37.428904323876232], [-7.166507941099863, 37.803894354802217], [-7.029281175148794, 38.075764065089757], [-7.374092169616317, 38.373058580064914], [-7.098036668313126, 39.03007274022378], [-7.498632371439724, 39.629571031241802], [-7.066591559263527, 39.711891587882768], [-7.026413133156593, 40.184524237624238], [-6.864019944679383, 40.330871893874821], [-6.851126674822551, 41.111082668617513], [-6.389087693700914, 41.381815497394641], [-6.668605515967655, 41.883386949219577], [-7.251308966490822, 41.91834605566504], [-7.422512986673794, 41.792074693359822], [-8.01317460776991, 41.790886135417118], [-8.26385698081779, 42.280468654950326], [-8.671945766626719, 42.134689439454952], [-9.034817674180244, 41.880570583659669]]] } }, - { "type": "Feature", "properties": { "admin": "Estonia", "name": "Estonia", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[24.312862583114615, 57.793423570376966], [24.428927850042154, 58.383413397853275], [24.061198357853179, 58.257374579493394], [23.426560092876681, 58.612753404364618], [23.339795363058641, 59.187240302153363], [24.604214308376182, 59.465853786855007], [25.864189080516631, 59.611090399811324], [26.949135776484518, 59.445803331125767], [27.981114129353237, 59.47538808861286], [28.131699253051742, 59.300825100330904], [27.420166456824941, 58.724581203844224], [27.716685825315714, 57.791899115624354], [27.288184848751509, 57.474528306703817], [26.46353234223778, 57.476388658266316], [25.602809685984365, 57.847528794986559], [25.164593540149262, 57.970156968815175], [24.312862583114615, 57.793423570376966]]] } }, - { "type": "Feature", "properties": { "admin": "Ethiopia", "name": "Ethiopia", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[37.90607, 14.959430000000165], [38.51295, 14.50547], [39.0994, 14.74064], [39.34061, 14.53155], [40.026250000000111, 14.51959], [40.8966, 14.118640000000138], [41.1552, 13.77333], [41.59856, 13.452090000000108], [42.00975, 12.86582], [42.351560000000106, 12.54223000000013], [42.000000000000107, 12.100000000000133], [41.661760000000122, 11.6312], [41.739590000000177, 11.355110000000137], [41.755570000000191, 11.05091], [42.314140000000116, 11.0342], [42.55493000000012, 11.105110000000193], [42.776851841000948, 10.926878566934416], [42.55876, 10.572580000000126], [42.92812, 10.021940000000139], [43.29699, 9.540480000000169], [43.67875, 9.183580000000116], [46.94834, 7.99688], [47.78942, 8.003], [44.9636, 5.001620000000115], [43.66087, 4.95755], [42.769670000000119, 4.252590000000223], [42.12861, 4.234130000000163], [41.855083092644108, 3.918911920483764], [41.171800000000125, 3.91909], [40.768480000000118, 4.257020000000124], [39.854940000000106, 3.83879000000013], [39.559384258765917, 3.422060000000215], [38.89251, 3.50074], [38.67114, 3.61607], [38.436970000000137, 3.58851], [38.120915000000132, 3.598605], [36.85509323800823, 4.447864127672857], [36.159078632855646, 4.447864127672857], [35.817447662353622, 4.776965663462021], [35.817447662353622, 5.338232082790852], [35.298007118233095, 5.506], [34.70702, 6.59422000000012], [34.25032, 6.82607], [34.075100000000184, 7.22595], [33.56829, 7.71334], [32.954180000000228, 7.7849700000001], [33.294800000000116, 8.35458], [33.82550000000014, 8.37916], [33.97498, 8.684560000000145], [33.96162, 9.58358], [34.25745, 10.63009], [34.73115000000012, 10.910170000000106], [34.831630000000125, 11.318960000000116], [35.26049, 12.08286], [35.863630000000164, 12.57828], [36.27022, 13.563330000000118], [36.42951, 14.42211], [37.59377, 14.2131], [37.90607, 14.959430000000165]]] } }, - { "type": "Feature", "properties": { "admin": "Finland", "name": "Finland", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[28.591929559043187, 69.064776923286644], [28.445943637818651, 68.36461294216403], [29.9774263852206, 67.698297024192641], [29.054588657352319, 66.944286200621917], [30.21765, 65.80598], [29.544429559046982, 64.948671576590471], [30.444684686003704, 64.204453436939076], [30.035872430142714, 63.552813625738544], [31.516092156711117, 62.867687486412869], [31.139991082490891, 62.357692776124395], [30.211107212044443, 61.780027777749673], [28.06999759289527, 60.503516547275829], [26.25517296723697, 60.423960679762487], [24.496623976344516, 60.057316392651636], [22.869694858499454, 59.846373196036211], [22.290763787533589, 60.391921291741525], [21.322244093519313, 60.720169989659503], [21.544866163832687, 61.705329494871783], [21.059211053153682, 62.607393296958726], [21.536029493910799, 63.189735012455863], [22.442744174903986, 63.817810370531276], [24.730511508897528, 64.902343655040823], [25.398067661243939, 65.111426500093728], [25.2940430030404, 65.53434642197044], [23.903378533633795, 66.006927395279604], [23.565879754335576, 66.396050930437411], [23.539473097434435, 67.936008612735236], [21.978534783626113, 68.616845608180682], [20.645592889089521, 69.106247260200846], [21.244936150810666, 69.370443020293067], [22.356237827247405, 68.841741441514898], [23.662049594830751, 68.891247463650529], [24.735679152126721, 68.649556789821446], [25.689212680776361, 69.092113755969024], [26.179622023226241, 69.825298977326113], [27.732292107867856, 70.164193020296239], [29.015572950971968, 69.766491197377974], [28.591929559043187, 69.064776923286644]]] } }, - { "type": "Feature", "properties": { "admin": "Fiji", "name": "Fiji", "continent": "Oceania" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[178.3736, -17.33992], [178.71806, -17.62846], [178.55271, -18.15059], [177.93266, -18.28799], [177.38146, -18.16432], [177.28504, -17.72465], [177.67087, -17.38114], [178.12557, -17.50481], [178.3736, -17.33992]]], [[[179.364142661964223, -16.801354076946847], [178.725059362997058, -17.012041674368017], [178.596838595117021, -16.63915], [179.096609362997128, -16.43398427754742], [179.413509362997075, -16.379054277547393], [180.000000000000114, -16.067132663642436], [180.000000000000114, -16.555216566639157], [179.364142661964223, -16.801354076946847]]], [[[-179.917369384765237, -16.501783135649358], [-180.0, -16.555216566639157], [-180.0, -16.067132663642436], [-179.793320109048551, -16.020882256741228], [-179.917369384765237, -16.501783135649358]]]] } }, - { "type": "Feature", "properties": { "admin": "Falkland Islands", "name": "Falkland Is.", "continent": "South America" }, "geometry": { "type": "Polygon", "coordinates": [[[-61.2, -51.85], [-60.0, -51.25], [-59.15, -51.5], [-58.55, -51.1], [-57.75, -51.55], [-58.05, -51.9], [-59.4, -52.2], [-59.85, -51.85], [-60.7, -52.3], [-61.2, -51.85]]] } }, - { "type": "Feature", "properties": { "admin": "France", "name": "France", "continent": "Europe" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[-52.556424730018378, 2.504705308437053], [-52.939657151894963, 2.124857692875622], [-53.41846513529525, 2.053389187016037], [-53.554839240113481, 2.334896551925964], [-53.778520677288881, 2.376702785650053], [-54.088062506717264, 2.105556545414629], [-54.524754197799737, 2.311848863123785], [-54.271229620975781, 2.738747870286942], [-54.184284023644743, 3.194172268075234], [-54.011503872276812, 3.622569891774857], [-54.3995422023565, 4.212611395683481], [-54.478632981979203, 4.896755682795642], [-53.958044603070917, 5.756548163267808], [-53.618452928264837, 5.646529038918401], [-52.882141282754063, 5.409850979021598], [-51.823342861525916, 4.565768133966144], [-51.657797410678874, 4.156232408053028], [-52.249337531123977, 3.241094468596287], [-52.556424730018378, 2.504705308437053]]], [[[9.560016310269132, 42.152491970379558], [9.229752231491771, 41.380006822264441], [8.77572309737536, 41.583611965494427], [8.544212680707828, 42.256516628583078], [8.746009148807586, 42.628121853193946], [9.390000848028901, 43.009984849614725], [9.560016310269132, 42.152491970379558]]], [[[3.588184441755714, 50.378992418003563], [4.28602298342514, 49.90749664977254], [4.799221632515752, 49.985373033236314], [5.674051954784885, 49.529483547557433], [5.897759230176375, 49.442667141307155], [6.186320428094204, 49.463802802114444], [6.658229607783538, 49.201958319691549], [8.09927859867477, 49.017783515003366], [7.59367638513106, 48.333019110703724], [7.466759067422228, 47.620581976911851], [7.192202182655533, 47.449765529970982], [6.736571079138086, 47.541801255882874], [6.768713820023634, 47.287708238303672], [6.037388950228971, 46.725778713561894], [6.022609490593566, 46.272989813820502], [6.500099724970453, 46.429672756529428], [6.84359297041456, 45.991146552100659], [6.80235517744566, 45.708579820328673], [7.096652459347835, 45.333098863295859], [6.749955275101711, 45.028517971367584], [7.007562290076661, 44.254766750661382], [7.549596388386161, 44.127901109384808], [7.435184767291841, 43.693844916349164], [6.529245232783068, 43.12889232031835], [4.556962517931395, 43.399650987311581], [3.100410597352719, 43.075200507167118], [2.985998976258486, 42.473015041669882], [1.826793247087181, 42.343384711265649], [0.701590610363922, 42.795734361332642], [0.338046909190581, 42.57954600683955], [-1.502770961910471, 43.034014390630482], [-1.901351284177735, 43.422802028978332], [-1.384225226232956, 44.022610378590166], [-1.193797573237361, 46.014917710954862], [-2.225724249673788, 47.064362697938201], [-2.963276129559573, 47.570326646507958], [-4.491554938159481, 47.95495433205641], [-4.592349819344746, 48.68416046812694], [-3.295813971357745, 48.901692409859628], [-1.616510789384932, 48.644421291694577], [-1.933494025063254, 49.776341864615759], [-0.98946895995536, 49.347375800160869], [1.338761020522753, 50.127173163445256], [1.6390010921385, 50.9466063502975], [2.51357303224617, 51.14850617126185], [2.65842207196033, 50.796848049515646], [3.123251580425716, 50.780363267614504], [3.588184441755714, 50.378992418003563]]]] } }, - { "type": "Feature", "properties": { "admin": "Gabon", "name": "Gabon", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[11.093772820691923, -3.978826592630546], [10.066135288135738, -2.969482517105681], [9.405245395554969, -2.144313246269042], [8.797995639693168, -1.111301364754496], [8.830086704146423, -0.779073581550037], [9.048419630579586, -0.459351494960217], [9.291350538783687, 0.268666083167687], [9.492888624721981, 1.010119533691494], [9.83028405115564, 1.067893784993799], [11.285078973036461, 1.057661851400013], [11.276449008843711, 2.261050930180871], [11.751665480199787, 2.326757513839993], [12.359380323952218, 2.19281220133945], [12.951333855855605, 2.321615708826939], [13.07582238124675, 2.267097072759014], [13.003113641012074, 1.830896307783319], [13.282631463278816, 1.31418366129688], [14.026668735417214, 1.395677395021153], [14.276265903386953, 1.196929836426619], [13.843320753645653, 0.038757635901149], [14.316418491277741, -0.552627455247048], [14.425455763413593, -1.333406670744971], [14.299210239324564, -1.998275648612213], [13.992407260807706, -2.470804945489099], [13.109618767965626, -2.428740329603513], [12.575284458067639, -1.948511244315134], [12.495702752338159, -2.391688327650242], [11.820963575903189, -2.514161472181982], [11.478038771214299, -2.765618991714241], [11.855121697648114, -3.42687061932105], [11.093772820691923, -3.978826592630546]]] } }, - { "type": "Feature", "properties": { "admin": "United Kingdom", "name": "United Kingdom", "continent": "Europe" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[-5.661948614921896, 54.554603176483838], [-6.197884894220976, 53.867565009163329], [-6.953730231137994, 54.073702297575622], [-7.572167934591078, 54.059956366585979], [-7.366030646178785, 54.595840969452688], [-7.572167934591078, 55.131622219454883], [-6.733847011736144, 55.172860012423783], [-5.661948614921896, 54.554603176483838]]], [[[-3.00500484863528, 58.635000108466322], [-4.073828497728015, 57.55302480735525], [-3.055001796877661, 57.690019029360933], [-1.959280564776918, 57.684799709699512], [-2.219988165689301, 56.870017401753515], [-3.119003058271118, 55.97379303651546], [-2.085009324543023, 55.909998480851264], [-2.005675679673856, 55.804902850350217], [-1.11499101399221, 54.624986477265388], [-0.4304849918542, 54.464376125702145], [0.184981316742039, 53.325014146531018], [0.469976840831777, 52.929999498091959], [1.681530795914739, 52.739520168663987], [1.559987827164377, 52.099998480836], [1.050561557630914, 51.806760565795678], [1.4498653499503, 51.289427802121949], [0.550333693045502, 50.765738837275862], [-0.787517462558639, 50.774988918656206], [-2.489997524414377, 50.500018622431227], [-2.956273972984035, 50.696879991247002], [-3.617448085942327, 50.228355617872708], [-4.542507900399243, 50.341837063185658], [-5.245023159191134, 49.959999904981082], [-5.776566941745299, 50.159677639356815], [-4.309989793301837, 51.210001125689146], [-3.414850633142122, 51.426008612669236], [-3.422719467108322, 51.426848167406078], [-4.984367234710873, 51.593466091510962], [-5.267295701508885, 51.991400458374571], [-4.222346564134852, 52.30135569926135], [-4.770013393564112, 52.840004991255611], [-4.579999152026914, 53.495003770555165], [-3.093830673788658, 53.404547400669671], [-3.092079637047106, 53.404440822963544], [-2.945008510744343, 53.98499970154667], [-3.614700825433033, 54.60093677329256], [-3.63000545898933, 54.615012925833], [-4.844169073903003, 54.790971177786837], [-5.082526617849224, 55.061600653699358], [-4.719112107756643, 55.508472601943467], [-5.047980922862108, 55.783985500707516], [-5.586397670911139, 55.311146145236805], [-5.64499874513018, 56.275014960344791], [-6.149980841486352, 56.785009670633528], [-5.78682471355529, 57.818848375064633], [-5.009998745127574, 58.630013332750039], [-4.211494513353555, 58.550845038479153], [-3.00500484863528, 58.635000108466322]]]] } }, - { "type": "Feature", "properties": { "admin": "Georgia", "name": "Georgia", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[41.55408410011065, 41.535656236327561], [41.703170607272703, 41.962942816732912], [41.453470086438379, 42.645123399417926], [40.875469191253785, 43.013628038091277], [40.321394484220313, 43.128633938156831], [39.955008579270917, 43.434997666999216], [40.07696495947976, 43.553104153002309], [40.922184686045618, 43.38215851498078], [42.394394565608806, 43.220307929042619], [43.756016880067378, 42.74082815202248], [43.931199985536828, 42.554973863284758], [44.537622918481979, 42.71199270280362], [45.470279168485703, 42.502780666669963], [45.776410353382758, 42.09244395605635], [46.404950799348818, 41.860675157227298], [46.145431756379004, 41.722802435872573], [46.637908156120574, 41.181672675128219], [46.501637404166921, 41.064444688474104], [45.962600538930381, 41.123872585609767], [45.217426385281577, 41.411451931314041], [44.972480096218071, 41.248128567055588], [43.582745802592726, 41.09214325618256], [42.619548781104484, 41.583172715819934], [41.55408410011065, 41.535656236327561]]] } }, - { "type": "Feature", "properties": { "admin": "Ghana", "name": "Ghana", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[1.060121697604927, 5.928837388528875], [-0.507637905265938, 5.343472601742675], [-1.063624640294193, 5.000547797053811], [-1.964706590167594, 4.71046214438337], [-2.856125047202397, 4.994475816259508], [-2.810701463217839, 5.389051215024109], [-3.244370083011261, 6.2504715031135], [-2.983584967450326, 7.379704901555511], [-2.56218950032624, 8.219627793811481], [-2.827496303712706, 9.642460842319775], [-2.963896246747111, 10.395334784380081], [-2.94040930827046, 10.962690334512557], [-1.203357713211431, 11.009819240762736], [-0.761575893548183, 10.936929633015053], [-0.438701544588582, 11.09834096927872], [0.023802524423701, 11.018681748900802], [-0.049784715159944, 10.706917832883928], [0.367579990245389, 10.191212876827176], [0.365900506195885, 9.46500397382948], [0.461191847342121, 8.677222601756013], [0.712029249686878, 8.312464504423827], [0.490957472342245, 7.411744289576474], [0.570384148774849, 6.914358628767188], [0.836931186536333, 6.279978745952147], [1.060121697604927, 5.928837388528875]]] } }, - { "type": "Feature", "properties": { "admin": "Guinea", "name": "Guinea", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[-8.439298468448696, 7.686042792181736], [-8.722123582382123, 7.711674302598509], [-8.926064622422002, 7.309037380396375], [-9.208786383490844, 7.313920803247952], [-9.403348151069748, 7.526905218938906], [-9.33727983238458, 7.928534450711351], [-9.755342169625832, 8.541055202666923], [-10.016566534861253, 8.42850393313523], [-10.230093553091276, 8.406205552601291], [-10.505477260774667, 8.348896389189603], [-10.494315151399629, 8.715540676300433], [-10.65477047366589, 8.977178452994194], [-10.622395188835037, 9.267910061068276], [-10.839151984083299, 9.688246161330367], [-11.117481248407328, 10.045872911006283], [-11.917277390988655, 10.046983954300556], [-12.150338100625003, 9.858571682164378], [-12.425928514037562, 9.835834051955953], [-12.596719122762206, 9.620188300001969], [-12.711957566773076, 9.342711696810765], [-13.246550258832512, 8.903048610871506], [-13.685153977909788, 9.494743760613458], [-14.074044969122278, 9.886166897008248], [-14.330075852912367, 10.015719712763966], [-14.579698859098254, 10.214467271358513], [-14.693231980843501, 10.65630076745404], [-14.83955379887794, 10.876571560098139], [-15.130311245168167, 11.040411688679525], [-14.685687221728896, 11.527823798056485], [-14.382191534878727, 11.509271958863691], [-14.121406419317776, 11.677117010947693], [-13.900799729863772, 11.678718980348744], [-13.743160773157411, 11.811269029177408], [-13.828271857142122, 12.142644151249041], [-13.718743658899511, 12.247185573775507], [-13.700476040084322, 12.586182969610192], [-13.217818162478235, 12.575873521367964], [-12.499050665730561, 12.332089952031053], [-12.278599005573438, 12.354440008997285], [-12.20356482588563, 12.465647691289401], [-11.658300950557928, 12.386582749882834], [-11.513942836950587, 12.442987575729415], [-11.456168585648269, 12.076834214725336], [-11.297573614944508, 12.077971096235768], [-11.036555955438256, 12.211244615116513], [-10.870829637078211, 12.177887478072106], [-10.593223842806278, 11.923975328005977], [-10.165213792348835, 11.844083563682743], [-9.890992804392011, 12.060478623904968], [-9.567911749703212, 12.194243068892472], [-9.327616339546008, 12.334286200403451], [-9.127473517279581, 12.308060411015331], [-8.905264858424529, 12.088358059126433], [-8.786099005559462, 11.812560939984705], [-8.376304897484911, 11.393645941610627], [-8.581305304386772, 11.136245632364801], [-8.620321010767126, 10.810890814655181], [-8.407310756860026, 10.90925690352276], [-8.282357143578279, 10.792597357623842], [-8.335377163109738, 10.494811916541932], [-8.029943610048617, 10.206534939001711], [-8.22933712404682, 10.129020290563897], [-8.309616461612249, 9.789531968622439], [-8.079113735374348, 9.376223863152033], [-7.832100389019186, 8.575704250518625], [-8.203498907900878, 8.455453192575446], [-8.299048631208562, 8.316443589710302], [-8.221792364932197, 8.123328762235571], [-8.280703497744936, 7.687179673692156], [-8.439298468448696, 7.686042792181736]]] } }, - { "type": "Feature", "properties": { "admin": "Gambia", "name": "Gambia", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[-16.84152462408127, 13.151393947802557], [-16.713728807023468, 13.594958604379853], [-15.624596320039936, 13.623587347869556], [-15.398770310924457, 13.860368760630916], [-15.081735398813816, 13.876491807505982], [-14.687030808968483, 13.63035696049978], [-14.376713833055785, 13.625680243377371], [-14.046992356817478, 13.794067898000446], [-13.844963344772404, 13.505041612191999], [-14.277701788784553, 13.28058502853224], [-14.712197231494626, 13.298206691943774], [-15.141163295949463, 13.509511623585235], [-15.511812506562931, 13.278569647672864], [-15.691000535534991, 13.270353094938455], [-15.931295945692208, 13.130284125211331], [-16.84152462408127, 13.151393947802557]]] } }, - { "type": "Feature", "properties": { "admin": "Guinea Bissau", "name": "Guinea-Bissau", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[-15.130311245168167, 11.040411688679525], [-15.664180467175523, 11.458474025920792], [-16.085214199273562, 11.524594021038236], [-16.314786749730199, 11.806514797406548], [-16.308947312881227, 11.958701890506116], [-16.613838263403277, 12.170911159712698], [-16.67745195155457, 12.38485158940105], [-16.147716844130581, 12.547761542201185], [-15.816574266004251, 12.515567124883345], [-15.548476935274005, 12.628170070847343], [-13.700476040084322, 12.586182969610192], [-13.718743658899511, 12.247185573775507], [-13.828271857142122, 12.142644151249041], [-13.743160773157411, 11.811269029177408], [-13.900799729863772, 11.678718980348744], [-14.121406419317776, 11.677117010947693], [-14.382191534878727, 11.509271958863691], [-14.685687221728896, 11.527823798056485], [-15.130311245168167, 11.040411688679525]]] } }, - { "type": "Feature", "properties": { "admin": "Equatorial Guinea", "name": "Eq. Guinea", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[9.492888624721981, 1.010119533691494], [9.305613234096255, 1.160911363119183], [9.649158155972627, 2.283866075037735], [11.276449008843711, 2.261050930180871], [11.285078973036461, 1.057661851400013], [9.83028405115564, 1.067893784993799], [9.492888624721981, 1.010119533691494]]] } }, - { "type": "Feature", "properties": { "admin": "Greece", "name": "Greece", "continent": "Europe" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[23.699980096133, 35.705004380835526], [24.246665073348673, 35.368022365860149], [25.025015496528873, 35.424995632461979], [25.769207797964182, 35.354018052709073], [25.745023227651579, 35.179997666966209], [26.290002882601719, 35.299990342747911], [26.164997592887651, 35.004995429009789], [24.724982130642299, 34.919987697889603], [24.735007358506941, 35.084990546197581], [23.514978468528106, 35.27999156345097], [23.699980096133, 35.705004380835526]]], [[[26.604195590936282, 41.562114569661098], [26.294602085075777, 40.936261298174244], [26.056942172965499, 40.824123440100827], [25.44767703624418, 40.852545477861455], [24.925848422960932, 40.947061672523226], [23.714811232200809, 40.687129218095116], [24.407998894964063, 40.124992987624083], [23.89996788910258, 39.962005520175573], [23.342999301860797, 39.960997829745786], [22.813987664488959, 40.476005153966547], [22.626298862404777, 40.256561184239175], [22.849747755634805, 39.659310818025759], [23.350027296652595, 39.190011298167256], [22.97309939951554, 38.97090322524965], [23.53001631032495, 38.51000112563846], [24.025024855248937, 38.219992987616443], [24.040011020613601, 37.655014553369419], [23.115002882589145, 37.920011298162215], [23.409971958111065, 37.409990749657389], [22.77497195810863, 37.305010077456551], [23.154225294698612, 36.422505804992042], [22.4900281104511, 36.410000108377446], [21.670026482843692, 36.84498647719419], [21.295010613701574, 37.644989325504689], [21.120034213961329, 38.31032339126272], [20.730032179454579, 38.769985256498778], [20.217712029712853, 39.340234686839629], [20.150015903410516, 39.624997666984022], [20.615000441172779, 40.110006822259422], [20.67499677906363, 40.434999904943048], [20.999989861747274, 40.580003973953964], [21.020040317476422, 40.842726955725873], [21.674160597426969, 40.931274522457976], [22.055377638444266, 41.149865831052686], [22.597308383889008, 41.130487168943198], [22.76177, 41.3048], [22.952377150166562, 41.337993882811212], [23.692073601992455, 41.309080918943849], [24.492644891058031, 41.583896185872035], [25.19720136892553, 41.234485988930651], [26.106138136507177, 41.328898830727823], [26.11704186372091, 41.826904608724725], [26.604195590936282, 41.562114569661098]]]] } }, - { "type": "Feature", "properties": { "admin": "Greenland", "name": "Greenland", "continent": "North America" }, "geometry": { "type": "Polygon", "coordinates": [[[-46.76379, 82.62796], [-43.40644, 83.22516], [-39.89753, 83.18018], [-38.62214, 83.54905], [-35.08787, 83.64513], [-27.10046, 83.51966], [-20.84539, 82.72669], [-22.69182, 82.34165], [-26.51753, 82.29765], [-31.9, 82.2], [-31.39646, 82.02154], [-27.85666, 82.13178], [-24.84448, 81.78697], [-22.90328, 82.09317], [-22.07175, 81.73449], [-23.16961, 81.15271], [-20.62363, 81.52462], [-15.76818, 81.91245], [-12.77018, 81.71885], [-12.20855, 81.29154], [-16.28533, 80.58004], [-16.85, 80.35], [-20.04624, 80.17708], [-17.73035, 80.12912], [-18.9, 79.4], [-19.70499, 78.75128], [-19.67353, 77.63859], [-18.47285, 76.98565], [-20.03503, 76.94434], [-21.67944, 76.62795], [-19.83407, 76.09808], [-19.59896, 75.24838], [-20.66818, 75.15585], [-19.37281, 74.29561], [-21.59422, 74.22382], [-20.43454, 73.81713], [-20.76234, 73.46436], [-22.17221, 73.30955], [-23.56593, 73.30663], [-22.31311, 72.62928], [-22.29954, 72.18409], [-24.27834, 72.59788], [-24.79296, 72.3302], [-23.44296, 72.08016], [-22.13281, 71.46898], [-21.75356, 70.66369], [-23.53603, 70.471], [-24.30702, 70.85649], [-25.54341, 71.43094], [-25.20135, 70.75226], [-26.36276, 70.22646], [-23.72742, 70.18401], [-22.34902, 70.12946], [-25.02927, 69.2588], [-27.74737, 68.47046], [-30.67371, 68.12503], [-31.77665, 68.12078], [-32.81105, 67.73547], [-34.20196, 66.67974], [-36.35284, 65.9789], [-37.04378, 65.93768], [-38.37505, 65.69213], [-39.81222, 65.45848], [-40.66899, 64.83997], [-40.68281, 64.13902], [-41.1887, 63.48246], [-42.81938, 62.68233], [-42.41666, 61.90093], [-42.86619, 61.07404], [-43.3784, 60.09772], [-44.7875, 60.03676], [-46.26364, 60.85328], [-48.26294, 60.85843], [-49.23308, 61.40681], [-49.90039, 62.38336], [-51.63325, 63.62691], [-52.14014, 64.27842], [-52.27659, 65.1767], [-53.66166, 66.09957], [-53.30161, 66.8365], [-53.96911, 67.18899], [-52.9804, 68.35759], [-51.47536, 68.72958], [-51.08041, 69.14781], [-50.87122, 69.9291], [-52.013585, 69.574925], [-52.55792, 69.42616], [-53.45629, 69.283625], [-54.68336, 69.61003], [-54.75001, 70.28932], [-54.35884, 70.821315], [-53.431315, 70.835755], [-51.39014, 70.56978], [-53.10937, 71.20485], [-54.00422, 71.54719], [-55.0, 71.406536967272558], [-55.83468, 71.65444], [-54.71819, 72.58625], [-55.32634, 72.95861], [-56.12003, 73.64977], [-57.32363, 74.71026], [-58.59679, 75.09861], [-58.58516, 75.51727], [-61.26861, 76.10238], [-63.39165, 76.1752], [-66.06427, 76.13486], [-68.50438, 76.06141], [-69.66485, 76.37975], [-71.40257, 77.00857], [-68.77671, 77.32312], [-66.76397, 77.37595], [-71.04293, 77.63595], [-73.297, 78.04419], [-73.15938, 78.43271], [-69.37345, 78.91388], [-65.7107, 79.39436], [-65.3239, 79.75814], [-68.02298, 80.11721], [-67.15129, 80.51582], [-63.68925, 81.21396], [-62.23444, 81.3211], [-62.65116, 81.77042], [-60.28249, 82.03363], [-57.20744, 82.19074], [-54.13442, 82.19962], [-53.04328, 81.88833], [-50.39061, 82.43883], [-48.00386, 82.06481], [-46.59984, 81.985945], [-44.523, 81.6607], [-46.9007, 82.19979], [-46.76379, 82.62796]]] } }, - { "type": "Feature", "properties": { "admin": "Guatemala", "name": "Guatemala", "continent": "North America" }, "geometry": { "type": "Polygon", "coordinates": [[[-90.095554572290951, 13.73533763270073], [-90.608624030300817, 13.909771429901948], [-91.232410244496037, 13.927832342987953], [-91.689746670279106, 14.126218166556452], [-92.227750006869812, 14.538828640190925], [-92.203229539747298, 14.830102850804066], [-92.087215949252041, 15.064584662328436], [-92.229248623406249, 15.251446641495857], [-91.747960171255912, 16.066564846251719], [-90.464472622422647, 16.069562079324651], [-90.438866950222021, 16.410109768128091], [-90.600846727240906, 16.470777899638758], [-90.711821865587694, 16.687483018454724], [-91.081670091500641, 16.918476670799404], [-91.453921271515128, 17.252177232324168], [-91.002269253284197, 17.254657701074176], [-91.001519945015943, 17.817594916245707], [-90.067933519230948, 17.819326076727474], [-89.143080410503302, 17.808318996649316], [-89.15080603713092, 17.015576687075832], [-89.229121670269265, 15.886937567605166], [-88.930612759135244, 15.887273464415072], [-88.604586147805833, 15.706380113177358], [-88.518364020526846, 15.855389105690971], [-88.22502275262201, 15.727722479713901], [-88.680679694355618, 15.346247056535301], [-89.15481096063354, 15.066419175674806], [-89.225220099631244, 14.874286200413618], [-89.145535041037149, 14.67801911056908], [-89.353325975282772, 14.424132798719112], [-89.587342698916544, 14.362586167859485], [-89.5342193265205, 14.244815578666302], [-89.7219339668207, 14.134228013561694], [-90.064677903996568, 13.881969509328924], [-90.095554572290951, 13.73533763270073]]] } }, - { "type": "Feature", "properties": { "admin": "Guyana", "name": "Guyana", "continent": "South America" }, "geometry": { "type": "Polygon", "coordinates": [[[-59.758284878159181, 8.367034816924045], [-59.10168412945864, 7.99920197187049], [-58.482962205628041, 7.347691351750696], [-58.454876064677414, 6.832787380394463], [-58.078103196837361, 6.809093736188641], [-57.542218593970631, 6.321268215353355], [-57.147436489476874, 5.973149929219161], [-57.307245856339492, 5.073566595882225], [-57.914288906472123, 4.812626451024413], [-57.860209520078691, 4.576801052260449], [-58.044694383360664, 4.060863552258382], [-57.601568976457848, 3.334654649260684], [-57.281433478409703, 3.333491929534119], [-57.150097825739898, 2.768926906745406], [-56.53938574891454, 1.89952260986692], [-56.782704230360814, 1.863710842288653], [-57.33582292339689, 1.948537705895759], [-57.660971035377358, 1.682584947105638], [-58.113449876525003, 1.507195135907025], [-58.429477098205957, 1.46394196207872], [-58.540012986878288, 1.26808828369252], [-59.030861579002639, 1.317697658692722], [-59.646043667221242, 1.786893825686789], [-59.718545701726732, 2.249630438644359], [-59.974524909084543, 2.755232652188055], [-59.815413174057852, 3.606498521332085], [-59.538039923731219, 3.958802598481937], [-59.767405768458701, 4.423502915866606], [-60.111002366767373, 4.574966538914082], [-59.980958624904865, 5.014061184098138], [-60.213683437731319, 5.2444863956876], [-60.733574184803707, 5.2002772078619], [-61.410302903881941, 5.959068101419616], [-61.139415045807937, 6.234296779806142], [-61.159336310456467, 6.696077378766317], [-60.543999192940966, 6.856584377464881], [-60.295668097562377, 7.043911444522918], [-60.637972785063752, 7.414999904810853], [-60.550587938058186, 7.779602972846178], [-59.758284878159181, 8.367034816924045]]] } }, - { "type": "Feature", "properties": { "admin": "Honduras", "name": "Honduras", "continent": "North America" }, "geometry": { "type": "Polygon", "coordinates": [[[-87.316654425795463, 12.984685777229], [-87.48940873894712, 13.29753489832393], [-87.793111131526501, 13.384480495655165], [-87.723502977229288, 13.785050360565602], [-87.859515347021599, 13.893312486217097], [-88.065342576840109, 13.964625962779788], [-88.503997972349609, 13.845485948130939], [-88.541230841815931, 13.98015473068352], [-88.843072882832743, 14.140506700085208], [-89.058511929057644, 14.340029405164213], [-89.353325975282786, 14.424132798719084], [-89.145535041037164, 14.678019110569149], [-89.22522009963123, 14.874286200413675], [-89.154810960633526, 15.066419175674863], [-88.680679694355575, 15.346247056535386], [-88.225022752621925, 15.727722479714027], [-88.121153123715359, 15.688655096901355], [-87.901812506852394, 15.864458319558194], [-87.615680101252309, 15.878798529519198], [-87.522920905288444, 15.797278957578779], [-87.367762417332116, 15.846940009011286], [-86.903191291028165, 15.756712958229565], [-86.440945604177372, 15.782835394753189], [-86.119233974944322, 15.893448798073958], [-86.00195431185783, 16.005405788634388], [-85.68331743034625, 15.953651841693949], [-85.444003872402547, 15.885749009662444], [-85.182443610357183, 15.909158433490628], [-84.98372188997881, 15.995923163308698], [-84.526979743167118, 15.857223619037423], [-84.36825558138257, 15.835157782448729], [-84.063054572266807, 15.648244126849132], [-83.773976610026111, 15.42407176356687], [-83.410381232420363, 15.27090281825377], [-83.147219000974104, 14.995829169164207], [-83.489988776366005, 15.01626719813566], [-83.628584967772866, 14.880073960830368], [-83.975721401693576, 14.749435939996483], [-84.228341640952394, 14.748764146376626], [-84.449335903648588, 14.62161428472251], [-84.64958207877963, 14.666805324761865], [-84.820036790694289, 14.819586696832628], [-84.924500698572302, 14.790492865452332], [-85.052787441736868, 14.551541042534719], [-85.148750576502877, 14.560196844943615], [-85.165364549484806, 14.354369615125048], [-85.514413011400265, 14.079011745657905], [-85.698665330736944, 13.960078436737998], [-85.801294725268505, 13.8360549992376], [-86.096263800790595, 14.03818736414723], [-86.312142096689826, 13.771356106008223], [-86.520708177419891, 13.778487453664464], [-86.755086636079596, 13.754845485890936], [-86.733821784191463, 13.263092556201398], [-86.880557013684353, 13.254204209847213], [-87.005769009127434, 13.025794379117254], [-87.316654425795463, 12.984685777229]]] } }, - { "type": "Feature", "properties": { "admin": "Croatia", "name": "Croatia", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[18.829838087650039, 45.908877671891837], [19.072768995854172, 45.521511135432078], [19.390475701584588, 45.236515611342369], [19.005486281010118, 44.860233669609144], [18.553214145591646, 45.08158966733145], [17.861783481526398, 45.067740383477137], [17.00214603035101, 45.233776760430935], [16.534939406000202, 45.211607570977705], [16.318156772535868, 45.004126695325901], [15.959367303133373, 45.233776760430935], [15.750026075918978, 44.81871165626255], [16.239660271884528, 44.351143296885695], [16.456442905348862, 44.041239732431265], [16.916156447017325, 43.667722479825663], [17.297373488034449, 43.446340643887353], [17.674921502358981, 43.028562527023603], [18.56, 42.65], [18.450016310304814, 42.47999136002931], [17.509970330483323, 42.84999461523914], [16.930005730871638, 43.209998480800373], [16.015384555737679, 43.507215481127204], [15.174453973052094, 44.243191229827907], [15.376250441151793, 44.317915350922064], [14.920309279040504, 44.73848399512945], [14.901602410550874, 45.076060289076104], [14.258747592839992, 45.233776760430935], [13.952254672917032, 44.802123521496853], [13.65697553880119, 45.136935126315947], [13.679403110415816, 45.484149074884996], [13.715059848697248, 45.500323798192419], [14.411968214585496, 45.466165676447403], [14.595109490627916, 45.63494090431282], [14.935243767972961, 45.471695054702757], [15.327674594797424, 45.452316392593325], [15.323953891672428, 45.731782538427687], [15.671529575267638, 45.8341535507979], [15.768732944408608, 46.23810822202352], [16.564808383864939, 46.503750922219794], [16.882515089595412, 46.380631822284428], [17.630066359129554, 45.951769110694087], [18.456062452882858, 45.759481106136143], [18.829838087650039, 45.908877671891837]]] } }, - { "type": "Feature", "properties": { "admin": "Haiti", "name": "Haiti", "continent": "North America" }, "geometry": { "type": "Polygon", "coordinates": [[[-73.189790615517595, 19.915683905511909], [-72.579672817663607, 19.871500555902351], [-71.71236141629295, 19.714455878167353], [-71.624873216422813, 19.169837958243303], [-71.701302659782485, 18.785416978424049], [-71.945112067335543, 18.616900132720257], [-71.687737596305865, 18.316660061104468], [-71.708304816358037, 18.044997056546091], [-72.372476162389333, 18.214960842354053], [-72.844411180294856, 18.145611070218362], [-73.454554816365018, 18.217906398994696], [-73.922433234335642, 18.030992743395], [-74.458033616824764, 18.342549953682703], [-74.369925299767118, 18.664907538319408], [-73.449542202432696, 18.526052964751141], [-72.694937099890623, 18.445799465401858], [-72.334881557896992, 18.66842153571525], [-72.791649542924873, 19.101625067618027], [-72.784104783810264, 19.483591416903405], [-73.41502234566174, 19.639550889560276], [-73.189790615517595, 19.915683905511909]]] } }, - { "type": "Feature", "properties": { "admin": "Hungary", "name": "Hungary", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[16.202298211337361, 46.852385972676949], [16.534267612380372, 47.496170966169103], [16.340584344150411, 47.712901923201215], [16.903754103267257, 47.714865627628321], [16.979666782304033, 48.123497015976298], [17.488472934649813, 47.867466132186209], [17.857132602620023, 47.758428860050365], [18.696512892336923, 47.88095368101439], [18.777024773847668, 48.081768296900627], [19.174364861739885, 48.111378892603859], [19.66136355965849, 48.266614895208647], [19.769470656013109, 48.2026911484636], [20.239054396249344, 48.327567247096916], [20.473562045989862, 48.562850043321809], [20.801293979584919, 48.62385407164237], [21.872236362401729, 48.319970811550007], [22.085608351334848, 48.422264309271782], [22.640819939878746, 48.150239569687351], [22.710531447040488, 47.882193915389394], [22.09976769378283, 47.672439276716695], [21.626514926853869, 46.994237779318148], [21.021952345471245, 46.316087958351886], [20.220192498462833, 46.127468980486547], [19.596044549241579, 46.171729844744533], [18.829838087649957, 45.908877671891915], [18.456062452882858, 45.759481106136121], [17.630066359129554, 45.95176911069418], [16.882515089595298, 46.380631822284428], [16.564808383864854, 46.503750922219822], [16.370504998447412, 46.841327216166498], [16.202298211337361, 46.852385972676949]]] } }, - { "type": "Feature", "properties": { "admin": "Indonesia", "name": "Indonesia", "continent": "Asia" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[120.715608758630438, -10.239581394087862], [120.295014276206871, -10.258649997603525], [118.967808465654684, -9.55796925215803], [119.900309686361609, -9.361340427287514], [120.425755649905398, -9.665921319215796], [120.775501743656719, -9.969675388227456], [120.715608758630438, -10.239581394087862]]], [[[124.435950148619384, -10.14000090906144], [123.579981724136701, -10.359987481327961], [123.459989048354998, -10.239994805546171], [123.55000939340745, -9.900015557497978], [123.980008986508096, -9.290026950724693], [124.96868248911619, -8.892790215697046], [125.070019972840612, -9.089987481322835], [125.088520135601073, -9.393173109579321], [124.435950148619384, -10.14000090906144]]], [[[117.900018345207741, -8.095681247594923], [118.260616489740471, -8.362383314653327], [118.87845991422212, -8.280682875199828], [119.126506789223086, -8.705824883665072], [117.97040164598927, -8.906639499551257], [117.277730747549015, -9.040894870645557], [116.74014082241662, -9.032936700072637], [117.083737420725313, -8.457157891476539], [117.632024367342126, -8.44930307376819], [117.900018345207741, -8.095681247594923]]], [[[122.903537225436082, -8.094234307490735], [122.756982863456287, -8.649807631060638], [121.2544905945701, -8.933666273639941], [119.924390903809567, -8.810417982623873], [119.920928582846102, -8.44485890059107], [120.715091994307542, -8.236964613480863], [121.341668735846554, -8.53673959720602], [122.007364536630405, -8.46062021244016], [122.903537225436082, -8.094234307490735]]], [[[108.623478631628927, -6.777673841990675], [110.539227329553285, -6.877357679881682], [110.759575636845909, -6.465186455921751], [112.614811232556349, -6.946035658397589], [112.978768345188087, -7.594213148634578], [114.478935174621142, -7.776527601760277], [115.705526971501058, -8.370806573116864], [114.564511346496488, -8.75181690840483], [113.464733514460875, -8.348947442257424], [112.559672479301028, -8.376180922075163], [111.522061395312448, -8.302128594600957], [110.586149530074294, -8.122604668819021], [109.427667270955183, -7.740664157749761], [108.693655226681301, -7.641600437046219], [108.277763299596302, -7.766657403192579], [106.454102004016136, -7.354899590690947], [106.280624220812285, -6.924899997590201], [105.365486281355516, -6.851416110871169], [106.051645949327053, -5.895918877794499], [107.265008579540165, -5.954985039904058], [108.072091099074683, -6.345762220895237], [108.486846144649235, -6.421984958525768], [108.623478631628927, -6.777673841990675]]], [[[134.724624465066654, -6.214400730009286], [134.210133905168902, -6.895237725454704], [134.112775506730998, -6.142467136259014], [134.290335728085779, -5.783057549669038], [134.499625278867882, -5.445042006047898], [134.727001580952106, -5.737582289252158], [134.724624465066654, -6.214400730009286]]], [[[127.249215122588893, -3.459065036638889], [126.874922723498855, -3.790982761249579], [126.183802118027302, -3.607376397316556], [125.989033644719257, -3.177273451351325], [127.00065148326496, -3.12931772218441], [127.249215122588893, -3.459065036638889]]], [[[130.471344028851775, -3.09376433676762], [130.834836053592767, -3.858472181822761], [129.990546502808115, -3.446300957862817], [129.155248651242403, -3.362636813982248], [128.590683628453633, -3.428679294451256], [127.898891229362334, -3.393435967628192], [128.135879347852779, -2.843650404474914], [129.370997756060888, -2.802154229344551], [130.471344028851775, -3.09376433676762]]], [[[134.143367954647772, -1.151867364103594], [134.422627394753022, -2.769184665542383], [135.457602980694674, -3.367752780779113], [136.293314243718754, -2.30704233155609], [137.4407377463275, -1.703513278819372], [138.329727411044757, -1.70268645590265], [139.18492068904294, -2.051295668143637], [139.926684198160387, -2.409051608900284], [141.000210402591847, -2.600151055515624], [141.017056919519007, -5.85902190513802], [141.033851760013874, -9.117892754760417], [140.143415155192542, -8.297167657100955], [139.127766554928087, -8.096042982620942], [138.881476678624949, -8.380935153846094], [137.614473911692812, -8.41168263105976], [138.039099155835174, -7.597882175327354], [138.668621454014783, -7.320224704623072], [138.407913853102343, -6.232849216337483], [137.927839797110835, -5.393365573755998], [135.989250116113453, -4.546543877789047], [135.164597609599667, -4.462931410340771], [133.662880487197867, -3.538853448097526], [133.367704705946778, -4.024818617370314], [132.983955519747326, -4.112978610860281], [132.75694095268895, -3.746282647317129], [132.753788690319197, -3.311787204607071], [131.989804315316178, -2.820551039240455], [133.066844517143466, -2.460417982598443], [133.780030959203486, -2.479848321140209], [133.69621178602614, -2.214541517753687], [132.232373488494204, -2.212526136894325], [131.836221958544684, -1.617161960459597], [130.942839797082797, -1.432522067880796], [130.519558140180038, -0.937720228686075], [131.867537876513609, -0.695461114101818], [132.380116408416768, -0.369537855636977], [133.985548130428384, -0.780210463060442], [134.143367954647772, -1.151867364103594]]], [[[125.240500522971573, 1.419836127117605], [124.43703535369734, 0.427881171058971], [123.685504998876695, 0.235593166500877], [122.723083123872854, 0.431136786293337], [121.056724888189081, 0.381217352699451], [120.18308312386273, 0.23724681233422], [120.040869582195455, -0.519657891444851], [120.935905389490699, -1.408905938323372], [121.475820754076167, -0.955962009285116], [123.34056481332847, -0.615672702643081], [123.258399285984481, -1.076213067228337], [122.822715285331597, -0.930950616055881], [122.388529901215364, -1.516858005381124], [121.508273553555455, -1.904482924002422], [122.454572381684272, -3.186058444840881], [122.271896193532541, -3.529500013852696], [123.170962762546537, -4.683693129091707], [123.162332798353759, -5.34060393638596], [122.628515252778683, -5.634591159694494], [122.236394484548057, -5.282933037948281], [122.71956912647704, -4.46417164471579], [121.738233677254357, -4.851331475446499], [121.48946333220124, -4.574552504091215], [121.619171177253861, -4.188477878438674], [120.898181593917684, -3.602105401222828], [120.972388950688767, -2.627642917494909], [120.305452915529884, -2.931603692235725], [120.39004723519173, -4.097579034037223], [120.430716587405371, -5.528241062037778], [119.796543410319487, -5.67340016034565], [119.36690555224493, -5.379878024927804], [119.653606398600104, -4.459417412944958], [119.498835483885969, -3.49441171632651], [119.078344354326987, -3.487021986508764], [118.767768996252869, -2.801999200047688], [119.180973748858662, -2.147103773612798], [119.323393996255049, -1.35314706788047], [119.825998976725828, 0.154254462073496], [120.035701938966341, 0.566477362465804], [120.885779250167687, 1.309222723796835], [121.666816847826965, 1.013943589681076], [122.927566766451818, 0.875192368977465], [124.077522414242836, 0.917101955566139], [125.065989211121803, 1.643259182131558], [125.240500522971573, 1.419836127117605]]], [[[128.688248732620707, 1.132385972494106], [128.635952183141342, 0.258485826006179], [128.120169712436166, 0.356412665199286], [127.968034295768845, -0.252077325037533], [128.379998813999691, -0.780003757331286], [128.100015903842291, -0.899996433112974], [127.69647464407501, -0.266598402511505], [127.399490187693743, 1.011721503092573], [127.600511509309044, 1.81069082275718], [127.932377557487484, 2.174596258956555], [128.004156121940809, 1.628531398928331], [128.594559360875451, 1.540810655112864], [128.688248732620707, 1.132385972494106]]], [[[117.875627069166001, 1.827640692548911], [118.996747267738158, 0.902219143066048], [117.811858351717788, 0.784241848143722], [117.478338657706047, 0.102474676917026], [117.521643507966587, -0.803723239753211], [116.560048455879496, -1.487660821136231], [116.533796828275158, -2.483517347832901], [116.148083937648607, -4.012726332214014], [116.000857782049067, -3.657037448749008], [114.864803094544513, -4.106984144714416], [114.468651564595064, -3.49570362713382], [113.755671828264099, -3.439169610206519], [113.256994256647545, -3.118775729996854], [112.068126255340644, -3.478392022316071], [111.703290643359992, -2.994442233902631], [111.04824018762821, -3.049425957861188], [110.223846063275971, -2.934032484553483], [110.070935500124335, -1.592874037282414], [109.571947869914041, -1.314906507984489], [109.091873813922518, -0.459506524257051], [108.952657505328162, 0.415375474444346], [109.069136183714036, 1.341933905437642], [109.663260125773718, 2.006466986494984], [109.830226678508836, 1.338135687664191], [110.514060907027101, 0.773131415200993], [111.159137811326559, 0.976478176269509], [111.797548455860408, 0.904441229654651], [112.380251906383648, 1.410120957846757], [112.859809198052176, 1.497790025229946], [113.805849644019531, 1.217548732911041], [114.621355422017473, 1.430688177898886], [115.134037306785231, 2.821481838386219], [115.51907840379198, 3.169238389494395], [115.86551720587677, 4.306559149590156], [117.01521447150634, 4.306094061699468], [117.882034946770162, 4.137551377779487], [117.313232456533513, 3.234428208830578], [118.048329705885351, 2.287690131027361], [117.875627069166001, 1.827640692548911]]], [[[105.817655063909356, -5.852355645372411], [104.710384149191498, -5.873284600450644], [103.868213332130736, -5.037314955264974], [102.584260695406897, -4.220258884298203], [102.156173130300999, -3.614146009946765], [101.399113397225051, -2.799777113459171], [100.902502882900137, -2.05026213949786], [100.141980828860596, -0.650347588710957], [99.26373986206022, 0.183141587724663], [98.970011020913319, 1.042882391764536], [98.601351352943084, 1.823506577965616], [97.699597609449881, 2.453183905442116], [97.17694217324987, 3.30879059489861], [96.424016554757316, 3.86885976807791], [95.380876092513475, 4.970782172053673], [95.293026157617305, 5.479820868344816], [95.936862827541745, 5.439513251157108], [97.484882033277088, 5.24632090903401], [98.369169142655679, 4.268370266126366], [99.142558628335792, 3.590349636240915], [99.693997837322399, 3.174328518075156], [100.641433546961665, 2.099381211755798], [101.658012323007313, 2.083697414555189], [102.498271112073212, 1.398700466310217], [103.076840448013002, 0.561361395668854], [103.838396030698348, 0.104541734208666], [103.437645298274973, -0.711945896002845], [104.010788608824001, -1.059211521004229], [104.369991489684878, -1.084843031421016], [104.539490187602155, -1.782371514496716], [104.887892694113987, -2.340425306816655], [105.622111444116982, -2.42884368246807], [106.10859337771268, -3.06177662517895], [105.857445916774111, -4.305524997579723], [105.817655063909356, -5.852355645372411]]]] } }, - { "type": "Feature", "properties": { "admin": "India", "name": "India", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[77.837450799474553, 35.494009507787759], [78.912268914713209, 34.321936346975782], [78.811086460285722, 33.506198025032404], [79.208891636068572, 32.994394639613709], [79.176128777995501, 32.483779812137705], [78.458446486325997, 32.61816437431272], [78.738894484374001, 31.515906073527056], [79.721366815107089, 30.882714748654724], [81.11125613802929, 30.183480943313398], [80.476721225917373, 29.729865220655334], [80.088424513676259, 28.794470119740136], [81.057202589851997, 28.416095282499036], [81.999987420584958, 27.925479234319987], [83.304248895199535, 27.364505723575554], [84.675017938173767, 27.234901231387528], [85.25177859898335, 26.726198431906337], [86.024392938179147, 26.630984605408567], [87.22747195836628, 26.39789805755607], [88.060237664749806, 26.414615383402484], [88.174804315140904, 26.810405178325944], [88.043132765661198, 27.445818589786818], [88.120440708369841, 27.876541652939586], [88.730325962278528, 28.086864732367509], [88.814248488320544, 27.299315904239361], [88.835642531289366, 27.098966376243755], [89.744527622438838, 26.71940298105995], [90.37327477413406, 26.875724188742872], [91.217512648486405, 26.808648179628019], [92.033483514375078, 26.838310451763554], [92.10371178585973, 27.4526140406332], [91.69665652869665, 27.771741848251661], [92.503118931043616, 27.896876329046442], [93.413347609432662, 28.640629380807219], [94.565990431702929, 29.277438055939978], [95.404802280664612, 29.031716620392125], [96.117678664131006, 29.452802028922459], [96.586590610747479, 28.830979519154337], [96.248833449287758, 28.411030992134435], [97.327113885490007, 28.261582749946331], [97.402561476636123, 27.88253611908544], [97.051988559968066, 27.699058946233144], [97.133999058015277, 27.08377350514996], [96.419365675850941, 27.264589341739221], [95.124767694074933, 26.573572089132295], [95.155153436262566, 26.001307277932078], [94.603249139385355, 25.162495428970399], [94.552657912171611, 24.675238348890328], [94.106741977925054, 23.850740871673477], [93.325187615942767, 24.078556423432197], [93.286326938859247, 23.043658352138998], [93.060294224014598, 22.703110663335565], [93.166127557348361, 22.278459580977099], [92.672720981825549, 22.041238918541247], [92.146034783906799, 23.62749868417259], [91.869927606171302, 23.62434642180278], [91.706475050832083, 22.985263983649183], [91.158963250699713, 23.503526923104381], [91.467729933643668, 24.072639471934789], [91.915092807994398, 24.130413723237108], [92.376201613334786, 24.976692816664961], [91.799595981822065, 25.14743174895731], [90.872210727912105, 25.13260061288954], [89.920692580121838, 25.269749864192171], [89.832480910199592, 25.965082098895476], [89.355094028687276, 26.014407253518065], [88.56304935094974, 26.446525580342716], [88.209789259802477, 25.768065700782707], [88.931553989623069, 25.238692328384769], [88.30637251175601, 24.866079413344199], [88.084422235062405, 24.501657212821918], [88.699940220090895, 24.233714911388557], [88.529769728553759, 23.631141872649163], [88.876311883503064, 22.879146429937826], [89.031961297566198, 22.055708319582973], [88.888765903685396, 21.690588487224741], [88.208497348995209, 21.703171698487804], [86.975704380240259, 21.495561631755201], [87.033168572948853, 20.743307806882406], [86.499351027373777, 20.151638495356604], [85.060265740909671, 19.478578802971096], [83.941005893899998, 18.302009792549722], [83.189217156917834, 17.671221421778977], [82.192792189465905, 17.016636053937813], [82.191241896497175, 16.556664130107844], [81.692719354177456, 16.3102192245079], [80.791999139330116, 15.951972357644488], [80.324895867843864, 15.899184882058346], [80.025069207686428, 15.136414903214144], [80.23327355339039, 13.835770778859978], [80.286293572921849, 13.006260687710832], [79.862546828128487, 12.056215318240886], [79.85799930208681, 10.357275091997108], [79.340511509115984, 10.308854274939618], [78.885345493489169, 9.54613597252772], [79.189719679688281, 9.216543687370146], [78.27794070833049, 8.933046779816932], [77.94116539908434, 8.25295909263974], [77.539897902337927, 7.965534776232331], [76.592978957021657, 8.899276231314188], [76.130061476551063, 10.299630031775518], [75.746467319648488, 11.308250637248303], [75.396101108709573, 11.781245022015822], [74.864815708316812, 12.741935736537895], [74.616717156883524, 13.992582912649677], [74.443859490867197, 14.617221787977693], [73.534199253233368, 15.990652167214957], [73.119909295549419, 17.928570054592495], [72.820909458308634, 19.208233547436162], [72.824475132136783, 20.41950328214153], [72.630533481745388, 21.356009426351001], [71.175273471973938, 20.757441311114228], [70.470458611945091, 20.877330634031381], [69.164130080038817, 22.089298000572697], [69.644927606082391, 22.450774644454334], [69.349596795534325, 22.843179633062686], [68.176645135373377, 23.691965033456704], [68.842599318318761, 24.359133612560932], [71.0432401874682, 24.356523952730193], [70.844699334602822, 25.215102037043511], [70.282873162725579, 25.722228705339823], [70.168926629522005, 26.491871649678835], [69.514392938113119, 26.940965684511365], [70.61649620960192, 27.989196275335861], [71.777665643200308, 27.913180243434521], [72.823751662084689, 28.961591701772047], [73.450638462217412, 29.976413479119863], [74.421380242820263, 30.97981476493117], [74.405928989564998, 31.692639471965272], [75.258641798813187, 32.271105455040491], [74.451559279278698, 32.764899603805489], [74.104293654277328, 33.441473293586846], [73.749948358051952, 34.317698879527846], [74.240202671204955, 34.748887030571247], [75.757060988268321, 34.504922593721311], [76.871721632804011, 34.653544012992732], [77.837450799474553, 35.494009507787759]]] } }, - { "type": "Feature", "properties": { "admin": "Ireland", "name": "Ireland", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[-6.197884894220989, 53.86756500916335], [-6.032985398777609, 53.153164170944336], [-6.788856573910847, 52.260117906292322], [-8.561616583683557, 51.669301255899349], [-9.977085740590267, 51.820454820353071], [-9.16628251793078, 52.864628811242667], [-9.688524542672452, 53.881362616585285], [-8.327987433292007, 54.664518947968624], [-7.572167934591064, 55.131622219454854], [-7.366030646178785, 54.595840969452709], [-7.572167934591064, 54.059956366585986], [-6.953730231138065, 54.073702297575622], [-6.197884894220989, 53.86756500916335]]] } }, - { "type": "Feature", "properties": { "admin": "Iran", "name": "Iran", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[53.921597934795543, 37.198918361961255], [54.800303989486558, 37.392420762678178], [55.511578403551894, 37.964117133123153], [56.180374790273319, 37.935126654607423], [56.619366082592805, 38.121394354803478], [57.330433790928964, 38.029229437810933], [58.436154412678192, 37.522309475243794], [59.234761997316795, 37.412987982730336], [60.377637973883864, 36.52738312432836], [61.123070509694131, 36.491597194966239], [61.21081709172573, 35.650072333309218], [60.80319339380744, 34.404101874319856], [60.528429803311575, 33.676446031217999], [60.963700392505991, 33.528832302376252], [60.536077915290761, 32.981268825811561], [60.863654819588952, 32.182919623334421], [60.941944614511115, 31.548074652628745], [61.699314406180811, 31.379506130492661], [61.78122155136343, 30.735850328081231], [60.874248488208778, 29.829238999952604], [61.369308709564926, 29.303276272085917], [61.771868117118615, 28.699333807890792], [62.727830438085974, 28.259644883735383], [62.755425652929851, 27.378923448184985], [63.23389773952028, 27.217047024030702], [63.316631707619578, 26.756532497661659], [61.874187453056535, 26.239974880472097], [61.497362908784183, 25.078237006118492], [59.616134067630831, 25.380156561783775], [58.525761346272297, 25.609961656185725], [57.39725141788238, 25.739902045183634], [56.97076582217754, 26.966106268821356], [56.492138706290199, 27.14330475515019], [55.723710158110059, 26.964633490501036], [54.715089552637252, 26.480657863871507], [53.493096958231334, 26.812368882753042], [52.483597853409599, 27.580849107365488], [51.520762566947404, 27.865689602158291], [50.852948032439528, 28.814520575469377], [50.115008579311571, 30.14777252859971], [49.576850213423988, 29.9857152369324], [48.941333449098536, 30.31709035900403], [48.567971225789748, 29.926778265903515], [48.014568312376085, 30.452456773392594], [48.00469811380831, 30.985137437457237], [47.685286085812258, 30.984853217079621], [47.849203729042095, 31.709175930298663], [47.334661492711895, 32.469155381799105], [46.109361606639304, 33.017287299118998], [45.416690708199035, 33.967797756479577], [45.648459507028079, 34.748137722303007], [46.15178795755093, 35.093258775364284], [46.076340366404786, 35.67738332777548], [45.420618117053202, 35.977545884742817], [44.77267, 37.17045], [44.225755649600522, 37.971584377589345], [44.421402622257538, 38.281281236314534], [44.109225294782334, 39.428136298168091], [44.793989699081934, 39.713002631177041], [44.9526880226503, 39.335764675446363], [45.457721795438765, 38.874139105783051], [46.143623081248812, 38.74120148371221], [46.505719842317966, 38.770605373686287], [47.685079380083081, 39.508363959301207], [48.060095249225235, 39.582235419262453], [48.355529412637871, 39.2887649602769], [48.010744256386474, 38.794014797514514], [48.634375441284803, 38.27037750910096], [48.883249139202483, 38.32024526626261], [49.199612257693332, 37.582874253889877], [50.147771437384606, 37.37456655532133], [50.842354363819695, 36.872814235983384], [52.26402469260141, 36.700421657857696], [53.825789829326411, 36.965030829408228], [53.921597934795543, 37.198918361961255]]] } }, - { "type": "Feature", "properties": { "admin": "Iraq", "name": "Iraq", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[45.420618117053202, 35.977545884742817], [46.076340366404786, 35.67738332777548], [46.15178795755093, 35.093258775364284], [45.648459507028079, 34.748137722303007], [45.416690708199035, 33.967797756479577], [46.109361606639304, 33.017287299118998], [47.334661492711895, 32.469155381799105], [47.849203729042095, 31.709175930298663], [47.685286085812258, 30.984853217079621], [48.00469811380831, 30.985137437457237], [48.014568312376085, 30.452456773392594], [48.567971225789748, 29.926778265903515], [47.974519077349889, 29.975819200148493], [47.302622104690947, 30.059069932570711], [46.568713413281742, 29.099025173452283], [44.709498732284736, 29.178891099559376], [41.889980910007829, 31.190008653278362], [40.399994337736238, 31.889991766887931], [39.195468377444961, 32.16100881604266], [38.792340529136077, 33.378686428352218], [41.00615888851992, 34.419372260062111], [41.383965285005807, 35.628316555314349], [41.289707472505448, 36.358814602192261], [41.837064243340954, 36.605853786763568], [42.349591098811764, 37.22987254490409], [42.779125604021822, 37.385263576805741], [43.942258742047287, 37.256227525372942], [44.293451775902852, 37.001514390606289], [44.772699008977689, 37.170444647768427], [45.420618117053202, 35.977545884742817]]] } }, - { "type": "Feature", "properties": { "admin": "Iceland", "name": "Iceland", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[-14.508695441129232, 66.455892239031414], [-14.739637417041605, 65.808748277440287], [-13.609732224979807, 65.126671047619851], [-14.9098337467949, 64.36408193628867], [-17.794438035543418, 63.67874909123384], [-18.656245896874989, 63.496382961675806], [-19.972754685942757, 63.643634955491514], [-22.762971971110154, 63.960178941495371], [-21.778484259517676, 64.402115790455497], [-23.955043911219104, 64.891129869233481], [-22.184402635170354, 65.084968166760291], [-22.227423265053329, 65.378593655042721], [-24.326184047939332, 65.611189276788451], [-23.650514695723082, 66.262519029395207], [-22.134922451250883, 66.410468655046856], [-20.576283738679543, 65.732112128351417], [-19.056841600001587, 66.276600857194751], [-17.798623826559048, 65.993853257909763], [-16.167818976292121, 66.526792304135853], [-14.508695441129232, 66.455892239031414]]] } }, - { "type": "Feature", "properties": { "admin": "Israel", "name": "Israel", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[35.719918247222743, 32.709192409794859], [35.545665317534535, 32.393992011030569], [35.183930291491428, 32.532510687788935], [34.974640740709319, 31.866582343059715], [35.225891554512422, 31.754341132121759], [34.970506626125989, 31.616778469360803], [34.927408481594554, 31.35343537040141], [35.397560662586038, 31.489086005167572], [35.420918409981958, 31.100065822874349], [34.922602573391423, 29.501326198844517], [34.26543338393568, 31.219360866820146], [34.556371697738903, 31.548823960896989], [34.48810713068135, 31.605538845337314], [34.752587111151165, 32.07292633720116], [34.955417107896771, 32.827376410446369], [35.098457472480668, 33.080539252244257], [35.126052687324538, 33.090900376918775], [35.460709262846699, 33.089040025356276], [35.552796665190805, 33.264274807258012], [35.821100701650231, 33.277426459276292], [35.836396925608618, 32.868123277308506], [35.700797967274745, 32.716013698857374], [35.719918247222743, 32.709192409794859]]] } }, - { "type": "Feature", "properties": { "admin": "Italy", "name": "Italy", "continent": "Europe" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[15.52037601081383, 38.231155096991465], [15.160242954171732, 37.444045518537813], [15.309897902089002, 37.134219468731793], [15.099988234119445, 36.61998729099539], [14.335228712632013, 36.996630967754747], [13.826732618879927, 37.104531358380186], [12.431003859108809, 37.612949937483812], [12.570943637755132, 38.126381130519682], [13.741156447004581, 38.03496552179535], [14.761249220446157, 38.143873602850498], [15.52037601081383, 38.231155096991465]]], [[[9.210011834356264, 41.209991360024212], [9.809975213264973, 40.500008856766094], [9.669518670295671, 39.177376410471787], [9.214817742559486, 39.240473334300127], [8.806935662479729, 38.906617743478471], [8.428302443077113, 39.171847032216611], [8.388253208050939, 40.378310858718798], [8.159998406617659, 40.950007229163774], [8.709990675500107, 40.899984442705225], [9.210011834356264, 41.209991360024212]]], [[[12.376485223040842, 46.767559109069872], [13.806475457421552, 46.50930613869118], [13.698109978905475, 46.016778062517368], [13.937630242578335, 45.59101593686465], [13.141606479554294, 45.736691799495411], [12.328581170306304, 45.38177806251484], [12.383874952858601, 44.885374253919075], [12.261453484759157, 44.600482082694008], [12.589237094786482, 44.091365871754462], [13.526905958722491, 43.587727362637899], [14.029820997787024, 42.761007798832473], [15.142569614327952, 41.955139675456891], [15.926191033601892, 41.961315009115729], [16.169897088290409, 41.740294908203417], [15.889345737377793, 41.541082261718195], [16.785001661860573, 41.179605617836579], [17.519168735431204, 40.877143459632229], [18.376687452882575, 40.355624904942651], [18.4802470231954, 40.168866278639818], [18.293385044028096, 39.810774441073235], [17.738380161213279, 40.277671006830289], [16.869595981522334, 40.442234605463838], [16.448743116937319, 39.795400702466473], [17.171489698971495, 39.424699815420716], [17.052840610429339, 38.902871202137291], [16.635088331781841, 38.843572496082395], [16.100960727613053, 37.985898749334176], [15.684086948314498, 37.908849188787023], [15.687962680736318, 38.214592800441849], [15.891981235424705, 38.750942491199218], [16.109332309644312, 38.964547024077682], [15.718813510814638, 39.544072374014938], [15.413612501698818, 40.048356838535163], [14.998495721098234, 40.172948716790913], [14.703268263414767, 40.604550279292617], [14.06067182786526, 40.786347968095434], [13.627985060285393, 41.188287258461649], [12.888081902730418, 41.253089504555604], [12.106682570044907, 41.7045348170574], [11.191906365614184, 42.355425319989671], [10.511947869517794, 42.93146251074721], [10.200028924204046, 43.920006822274608], [9.702488234097812, 44.036278794931313], [8.888946160526869, 44.366336167979533], [8.428560825238575, 44.23122813575241], [7.8507666357832, 43.767147935555236], [7.435184767291841, 43.693844916349164], [7.549596388386161, 44.127901109384808], [7.007562290076661, 44.254766750661382], [6.749955275101711, 45.028517971367584], [7.096652459347835, 45.333098863295859], [6.80235517744566, 45.708579820328673], [6.84359297041456, 45.991146552100659], [7.273850945676683, 45.776947740250748], [7.755992058959832, 45.824490057959267], [8.316629672894377, 46.16364248309084], [8.489952426801294, 46.005150865251736], [8.966305779667833, 46.03693187111115], [9.18288170740311, 46.440214748716976], [9.92283654139035, 46.314899400409182], [10.363378126678665, 46.48357127540983], [10.4427014502466, 46.893546250997431], [11.048555942436504, 46.751358547546396], [11.164827915093325, 46.941579494812729], [12.153088006243079, 47.115393174826423], [12.376485223040842, 46.767559109069872]]]] } }, - { "type": "Feature", "properties": { "admin": "Jamaica", "name": "Jamaica", "continent": "North America" }, "geometry": { "type": "Polygon", "coordinates": [[[-77.569600796199197, 18.490525417550483], [-76.896618618462114, 18.400866807524078], [-76.365359056285527, 18.16070058844759], [-76.19965857614163, 17.886867173732963], [-76.902561408175671, 17.868237819891743], [-77.206341315403449, 17.701116237859818], [-77.766022915340599, 17.861597398342237], [-78.337719285785596, 18.225967922432226], [-78.217726610003865, 18.454532782459193], [-77.797364671525614, 18.524218451404774], [-77.569600796199197, 18.490525417550483]]] } }, - { "type": "Feature", "properties": { "admin": "Jordan", "name": "Jordan", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[35.545665317534535, 32.393992011030569], [35.719918247222743, 32.709192409794859], [36.834062127435537, 32.312937526980768], [38.792340529136077, 33.378686428352218], [39.195468377444961, 32.16100881604266], [39.004885695152545, 32.010216986614971], [37.002165561681004, 31.508412990844736], [37.998848911294367, 30.508499864213128], [37.668119744626374, 30.338665269485894], [37.503581984209028, 30.003776150018396], [36.740527784987243, 29.865283311476183], [36.501214227043583, 29.505253607698702], [36.068940870922049, 29.19749461518445], [34.956037225084252, 29.356554673778835], [34.922602573391423, 29.501326198844517], [35.420918409981958, 31.100065822874349], [35.397560662586038, 31.489086005167572], [35.545251906076196, 31.782504787720832], [35.545665317534535, 32.393992011030569]]] } }, - { "type": "Feature", "properties": { "admin": "Japan", "name": "Japan", "continent": "Asia" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[134.638428176003856, 34.149233710256418], [134.766379022358478, 33.806334743783673], [134.20341596897083, 33.201177883429622], [133.792950067276479, 33.521985175097583], [133.280268182508848, 33.289570420864941], [133.014858026257855, 32.704567369104772], [132.363114862192674, 32.989382025681373], [132.371176385630179, 33.463642483040068], [132.924372593314786, 34.060298570282036], [133.492968377822194, 33.944620876596694], [133.904106073136347, 34.364931138642611], [134.638428176003856, 34.149233710256418]]], [[[140.976387567305267, 37.142074286440156], [140.599769728762084, 36.343983466124534], [140.774074334882641, 35.842877102190229], [140.253279250245072, 35.138113918593653], [138.975527785396196, 34.667600002576101], [137.217598911691198, 34.606285915661843], [135.792983026268871, 33.46480520276662], [135.120982700745401, 33.849071153289053], [135.07943484918269, 34.596544908174813], [133.340316196831964, 34.375938218720755], [132.156770868051296, 33.904933376596503], [130.986144647343451, 33.885761420216276], [132.000036248910021, 33.149992377244608], [131.33279015515734, 31.450354519164836], [130.68631798718593, 31.029579169228235], [130.202419875204953, 31.418237616495411], [130.447676222862128, 32.319474595665717], [129.81469160371887, 32.610309556604385], [129.408463169472554, 33.296055813117583], [130.353935174684636, 33.604150702441693], [130.878450962447118, 34.232742824840031], [131.884229364143891, 34.749713853487911], [132.617672967662486, 35.433393052709413], [134.608300815977771, 35.731617743465812], [135.677537876528902, 35.527134100886819], [136.723830601142424, 37.304984239240376], [137.390611607004473, 36.827390651998819], [138.857602166906247, 37.827484646143454], [139.426404657142882, 38.215962225897634], [140.054790073812057, 39.438807481436378], [139.883379347899847, 40.563312486323682], [140.305782505453664, 41.195005194659551], [141.368973423426667, 41.378559882160282], [141.914263136970476, 39.991616115878678], [141.884600864834965, 39.18086456965149], [140.959489373945729, 38.174000962876583], [140.976387567305267, 37.142074286440156]]], [[[143.910161981379474, 44.174099839853724], [144.613426548439634, 43.960882880217511], [145.320825230083074, 44.384732977875437], [145.543137241802754, 43.262088324550596], [144.059661899999867, 42.988358262700551], [143.183849725517291, 41.995214748699183], [141.611490920172457, 42.678790595056071], [141.067286411706618, 41.58459381770799], [139.95510623592105, 41.56955597591103], [139.817543573159924, 42.563758856774392], [140.312087030193169, 43.333272610032644], [141.380548944259999, 43.388824774746489], [141.671952345953912, 44.772125352551477], [141.967644891527982, 45.551483466161343], [143.142870314709796, 44.510358384776957], [143.910161981379474, 44.174099839853724]]]] } }, - { "type": "Feature", "properties": { "admin": "Kazakhstan", "name": "Kazakhstan", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[70.962314894499272, 42.26615428320553], [70.388964878220776, 42.081307684897517], [69.070027296835221, 41.384244289712335], [68.632482944620037, 40.668680731766855], [68.259895867795635, 40.662324530594894], [67.985855747351806, 41.135990708982199], [66.714047072216587, 41.168443508461557], [66.510648634715707, 41.987644151368549], [66.023391554635609, 41.994646307944031], [66.098012322865188, 42.997660020513074], [64.90082441595932, 43.728080552742647], [63.18578698105658, 43.650074978197999], [62.013300408786264, 43.504476630215649], [61.05831994003249, 44.405816962250576], [60.239971958258472, 44.784036770194739], [58.689989048095796, 45.500013739598721], [58.503127068928428, 45.58680430763296], [55.928917270741167, 44.995858466159163], [55.968191359283011, 41.30864166926937], [55.455251092353805, 41.259859117185826], [54.755345493392653, 42.04397146256661], [54.079417759014959, 42.324109402020831], [52.944293247291725, 42.116034247397572], [52.502459751196277, 41.783315538086462], [52.446339145727208, 42.027150783855561], [52.692112257707251, 42.443895372073364], [52.501426222550315, 42.792297878585188], [51.342427199108201, 43.132974758469338], [50.891291945200223, 44.031033637053774], [50.339129266161358, 44.284015611338468], [50.305642938036257, 44.609835516938908], [51.278503452363211, 44.514854234386448], [51.316899041556034, 45.245998236667894], [52.167389764215713, 45.408391425145098], [53.040876499245194, 45.259046535821753], [53.220865512917712, 46.23464590105992], [53.042736850807771, 46.853006089864486], [52.042022739475598, 46.804636949239232], [51.191945428274252, 47.048704738953909], [50.034083286342465, 46.608989976582208], [49.10116, 46.39933000000012], [48.593241001180495, 46.561034247415471], [48.694733514201729, 47.075628160177921], [48.057253045449258, 47.743752753279516], [47.315231154170242, 47.715847479841948], [46.466445753776256, 48.394152330104923], [47.043671502476506, 49.1520388860976], [46.751596307162728, 49.35600576435376], [47.549480421749301, 50.454698391311119], [48.577841424357523, 49.874759629915658], [48.702381626181008, 50.605128485712825], [50.766648390512145, 51.692762356159889], [52.328723585830957, 51.71865224873811], [54.53287845237621, 51.026239732459302], [55.716940545479801, 50.62171662047853], [56.777961053296551, 51.043551337277037], [58.363290643146733, 51.063653469438563], [59.642282342370599, 50.545442206415707], [59.932807244715484, 50.842194118851857], [61.337424350840919, 50.799070136104248], [61.588003371024158, 51.2726587998432], [59.967533807215531, 51.960420437215696], [60.927268507740258, 52.447548326215028], [60.739993117114572, 52.719986477257734], [61.699986199800584, 52.979996446334255], [60.978066440683151, 53.664993394579128], [61.436591424409052, 54.006264553434775], [65.178533563095911, 54.354227810272093], [65.66687584825398, 54.601266994843449], [68.169100376258811, 54.970391750704309], [69.068166945272864, 55.385250149143516], [70.865266554655122, 55.169733588270091], [71.180131056609397, 54.133285224008247], [72.224150018202167, 54.376655381886728], [73.508516066384388, 54.035616766976588], [73.425678745420427, 53.489810289109741], [74.384845005190044, 53.546861070360066], [76.891100294913414, 54.490524400441913], [76.525179477854735, 54.177003485727127], [77.800915561844221, 53.404414984747561], [80.035559523441663, 50.864750881547238], [80.568446893235475, 51.388336493528456], [81.945985548839914, 50.812195949906354], [83.383003778012366, 51.069182847693909], [83.935114780618832, 50.889245510453563], [84.416377394553052, 50.311399644565817], [85.115559523462011, 50.117302964877631], [85.541269972682457, 49.69285858824815], [86.829356723989619, 49.826674709668154], [87.359970330762664, 49.214980780629148], [86.598776483103379, 48.549181626980605], [85.768232863308285, 48.455750637396974], [85.72048383987071, 47.452969468773112], [85.164290399113355, 47.000955715516099], [83.180483839860443, 47.330031236350848], [82.458925815769106, 45.539649563166499], [81.947070753918112, 45.317027492853235], [79.966106398441397, 44.917516994804643], [80.866206496101356, 43.180362046881037], [80.180150180994289, 42.920067857426936], [80.259990268885332, 42.349999294599101], [79.643645460940135, 42.496682847659649], [79.142177361979776, 42.856092434249589], [77.658391961583206, 42.960685533208327], [76.000353631498555, 42.988022365890622], [75.636964959622091, 42.877899888676765], [74.212865838522575, 43.298339341803505], [73.645303582660901, 43.091271877609863], [73.489757521462337, 42.500894476891276], [71.844638299450637, 42.845395412765178], [71.186280552052253, 42.704292914392219], [70.962314894499272, 42.26615428320553]]] } }, - { "type": "Feature", "properties": { "admin": "Kenya", "name": "Kenya", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[40.993, -0.85829], [41.58513, -1.68325], [40.88477, -2.08255], [40.63785, -2.49979], [40.26304, -2.57309], [40.12119, -3.27768], [39.80006, -3.68116], [39.60489, -4.34653], [39.20222, -4.67677], [37.7669, -3.67712], [37.69869, -3.09699], [34.07262, -1.05982], [33.903711197104521, -0.95], [33.893568969666937, 0.109813537861896], [34.18, 0.515], [34.6721, 1.17694], [35.03599, 1.90584], [34.59607, 3.05374], [34.47913, 3.5556], [34.005, 4.249884947362047], [34.620196267853871, 4.847122742081987], [35.298007118232974, 5.506], [35.817447662353501, 5.338232082790795], [35.817447662353501, 4.776965663461889], [36.159078632855639, 4.447864127672768], [36.855093238008116, 4.447864127672768], [38.120915, 3.598605], [38.43697, 3.58851], [38.67114, 3.61607], [38.89251, 3.50074], [39.559384258765846, 3.42206], [39.85494, 3.83879], [40.76848, 4.25702], [41.1718, 3.91909], [41.855083092643966, 3.918911920483726], [40.98105, 2.78452], [40.993, -0.85829]]] } }, - { "type": "Feature", "properties": { "admin": "Kyrgyzstan", "name": "Kyrgyzstan", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[70.96231489449913, 42.266154283205481], [71.186280552052111, 42.704292914392127], [71.84463829945058, 42.845395412765093], [73.489757521462337, 42.500894476891311], [73.645303582660901, 43.09127187760982], [74.212865838522546, 43.298339341803363], [75.636964959622006, 42.877899888676673], [76.000353631498442, 42.988022365890664], [77.658391961583206, 42.960685533208256], [79.142177361979762, 42.856092434249511], [79.643645460940107, 42.496682847659514], [80.259990268885289, 42.349999294599044], [80.119430373051358, 42.123940741538235], [78.543660923175295, 41.582242540038685], [78.187196893225959, 41.185315863604792], [76.904484490877067, 41.066485907549634], [76.526368035797432, 40.427946071935111], [75.467827996730691, 40.562072251948663], [74.776862420556043, 40.366425279291619], [73.822243686828287, 39.893973497063179], [73.960013055318413, 39.660008449861721], [73.67537926625478, 39.431236884105594], [71.784693637991992, 39.279463202464363], [70.549161818325601, 39.604197902986492], [69.464886915977516, 39.526683254548693], [69.559609816368507, 40.103211371412968], [70.648018833299957, 39.935753892571157], [71.014198032520156, 40.244365546218226], [71.774875115856545, 40.145844428053763], [73.055417108049156, 40.86603302668945], [71.870114780570447, 41.392900092121259], [71.157858514291576, 41.143587144529107], [70.420022414028196, 41.519998277343134], [71.259247674448218, 42.167710679689456], [70.96231489449913, 42.266154283205481]]] } }, - { "type": "Feature", "properties": { "admin": "Cambodia", "name": "Cambodia", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[103.497279901139677, 10.632555446815926], [103.090689731867229, 11.153660590047162], [102.58493248902667, 12.186594956913279], [102.348099399833004, 13.39424734135822], [102.988422072361601, 14.225721136934464], [104.281418084736586, 14.416743068901363], [105.218776890078871, 14.27321177821069], [106.04394616091551, 13.881091009979952], [106.496373325630856, 14.57058380783428], [107.382727492301058, 14.202440904186968], [107.614547967562402, 13.535530707244202], [107.491403029410861, 12.337205918827944], [105.810523716253101, 11.567614650921225], [106.249670037869436, 10.961811835163585], [105.199914992292321, 10.889309800658094], [104.334334751403446, 10.486543687375228], [103.497279901139677, 10.632555446815926]]] } }, - { "type": "Feature", "properties": { "admin": "South Korea", "name": "Korea", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[128.349716424676586, 38.612242946927843], [129.212919549680038, 37.432392483055942], [129.460449660358137, 36.784189154602821], [129.468304478066472, 35.632140611303939], [129.091376580929563, 35.08248423923142], [128.18585045787907, 34.890377102186385], [127.386519403188373, 34.475673733044111], [126.485747511908713, 34.390045884736473], [126.3739197124291, 34.934560451795939], [126.559231398627773, 35.684540513647896], [126.117397902532261, 36.725484727519252], [126.860143263863364, 36.893924058574612], [126.174758742376213, 37.749685777328033], [126.237338901881742, 37.840377916000271], [126.683719924018888, 37.804772854151174], [127.073308547067342, 38.256114813788393], [127.780035435090966, 38.304535630845884], [128.205745884311426, 38.370397243801882], [128.349716424676586, 38.612242946927843]]] } }, - { "type": "Feature", "properties": { "admin": "Kosovo", "name": "Kosovo", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[20.76216, 42.05186], [20.717310000000108, 41.84711], [20.59023, 41.85541], [20.52295, 42.21787], [20.28374, 42.32025], [20.0707, 42.58863], [20.25758, 42.81275], [20.49679, 42.88469], [20.63508, 43.21671], [20.81448, 43.27205], [20.95651, 43.13094], [21.143395, 43.068685000000123], [21.27421, 42.90959], [21.43866, 42.86255], [21.63302, 42.67717], [21.77505, 42.6827], [21.66292, 42.43922], [21.54332, 42.32025], [21.576635989402117, 42.245224397061847], [21.352700000000134, 42.2068], [20.76216, 42.05186]]] } }, - { "type": "Feature", "properties": { "admin": "Kuwait", "name": "Kuwait", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[47.974519077349889, 29.975819200148493], [48.183188510944483, 29.534476630159759], [48.09394331237641, 29.306299343374999], [48.416094191283939, 28.552004299426663], [47.708850538937376, 28.526062730416136], [47.459821811722819, 29.002519436147217], [46.568713413281742, 29.099025173452283], [47.302622104690947, 30.059069932570711], [47.974519077349889, 29.975819200148493]]] } }, - { "type": "Feature", "properties": { "admin": "Laos", "name": "Lao PDR", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[105.218776890078871, 14.27321177821069], [105.544338413517664, 14.723933620660414], [105.589038527450128, 15.570316066952856], [104.779320509868768, 16.441864935771445], [104.716947056092465, 17.428858954330078], [103.956476678485288, 18.240954087796872], [103.200192091893726, 18.309632066312769], [102.998705682387694, 17.961694647691598], [102.413004998791592, 17.932781683824281], [102.113591750092453, 18.109101670804161], [101.059547560635139, 17.512497259994486], [101.035931431077742, 18.408928330961611], [101.282014601651667, 19.462584947176762], [100.606293573003128, 19.508344427971217], [100.548881056726856, 20.109237982661124], [100.115987583417819, 20.41784963630818], [100.329101190189519, 20.786121731036229], [101.180005324307515, 21.436572984294024], [101.270025669359939, 21.201651923095177], [101.803119744882906, 21.174366766845065], [101.652017856861491, 22.318198757409544], [102.170435825613552, 22.464753119389297], [102.754896274834636, 21.675137233969462], [103.203861118586431, 20.766562201413745], [104.435000441508024, 20.758733221921528], [104.822573683697073, 19.886641750563879], [104.183387892678908, 19.624668077060214], [103.896532017026701, 19.265180975821799], [105.094598423281496, 18.666974595611073], [105.925762160264, 17.485315456608955], [106.55600792849566, 16.604283962464802], [107.312705926545576, 15.908538316303177], [107.564525181103875, 15.202173163305554], [107.382727492301058, 14.202440904186968], [106.496373325630856, 14.57058380783428], [106.04394616091551, 13.881091009979952], [105.218776890078871, 14.27321177821069]]] } }, - { "type": "Feature", "properties": { "admin": "Lebanon", "name": "Lebanon", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[35.821100701650231, 33.277426459276292], [35.552796665190805, 33.264274807258012], [35.460709262846699, 33.089040025356276], [35.126052687324538, 33.090900376918775], [35.48220665868012, 33.905450140919434], [35.979592319489392, 34.610058295219126], [35.998402540843628, 34.644914048799997], [36.448194207512095, 34.59393524834406], [36.611750115715886, 34.201788641897174], [36.066460402172048, 33.824912421192543], [35.821100701650231, 33.277426459276292]]] } }, - { "type": "Feature", "properties": { "admin": "Liberia", "name": "Liberia", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[-7.712159389669749, 4.364565944837721], [-7.974107224957249, 4.355755113131961], [-9.004793667018673, 4.832418524592199], [-9.913420376006682, 5.593560695819205], [-10.765383876986643, 6.140710760925556], [-11.438779466182053, 6.785916856305746], [-11.199801805048278, 7.105845648624735], [-11.14670427086838, 7.396706447779534], [-10.695594855176477, 7.939464016141085], [-10.230093553091276, 8.406205552601291], [-10.016566534861253, 8.42850393313523], [-9.755342169625832, 8.541055202666923], [-9.33727983238458, 7.928534450711351], [-9.403348151069748, 7.526905218938906], [-9.208786383490844, 7.313920803247952], [-8.926064622422002, 7.309037380396375], [-8.722123582382123, 7.711674302598509], [-8.439298468448696, 7.686042792181736], [-8.485445522485348, 7.395207831243068], [-8.385451626000572, 6.911800645368742], [-8.602880214868618, 6.467564195171659], [-8.311347622094017, 6.193033148621081], [-7.993692592795879, 6.126189683451541], [-7.570152553731686, 5.707352199725903], [-7.53971513511176, 5.313345241716517], [-7.63536821128403, 5.188159084489455], [-7.712159389669749, 4.364565944837721]]] } }, - { "type": "Feature", "properties": { "admin": "Libya", "name": "Libya", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[14.8513, 22.862950000000119], [14.143870883855239, 22.491288967371126], [13.581424594790459, 23.040506089769274], [11.999505649471697, 23.471668402596432], [11.560669386449032, 24.09790924732561], [10.771363559622952, 24.562532050061741], [10.303846876678445, 24.379313259370967], [9.948261346078024, 24.936953640232613], [9.910692579801774, 25.365454616796789], [9.319410841518218, 26.094324856057476], [9.716285841519662, 26.512206325785652], [9.629056023811073, 27.140953477481041], [9.756128370816779, 27.688258571884198], [9.68388471847288, 28.144173895779311], [9.859997999723472, 28.959989732371064], [9.805634392952353, 29.424638373323369], [9.482139926805415, 30.307556057246181], [9.970017124072966, 30.539324856075375], [10.056575148161697, 30.961831366493517], [9.950225050505194, 31.376069647745275], [10.636901482799484, 31.761420803345679], [10.944789666394511, 32.081814683555358], [11.43225345220378, 32.368903103152824], [11.488787469131008, 33.136995754523234], [12.66331, 32.79278], [13.08326, 32.87882], [13.91868, 32.71196], [15.24563, 32.26508], [15.71394, 31.37626], [16.61162, 31.18218], [18.02109, 30.76357], [19.08641, 30.26639], [19.57404, 30.52582], [20.05335, 30.98576], [19.82033, 31.751790000000135], [20.13397, 32.2382], [20.85452, 32.7068], [21.54298, 32.8432], [22.89576, 32.63858], [23.2368, 32.19149], [23.6091300000001, 32.18726], [23.9275, 32.01667], [24.92114, 31.89936], [25.16482, 31.56915], [24.80287, 31.08929], [24.95762, 30.6616], [24.70007, 30.04419], [25.00000000000011, 29.238654529533552], [25.00000000000011, 25.682499996360995], [25.00000000000011, 22.0], [25.00000000000011, 20.00304], [23.850000000000129, 20.0], [23.837660000000135, 19.580470000000101], [19.84926, 21.49509], [15.86085, 23.40972], [14.8513, 22.862950000000119]]] } }, - { "type": "Feature", "properties": { "admin": "Sri Lanka", "name": "Sri Lanka", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[81.787959018891371, 7.523055324733162], [81.637322218760573, 6.481775214051921], [81.218019647144317, 6.197141424988287], [80.348356968104397, 5.968369859232154], [79.872468703128519, 6.763463446474928], [79.6951668639351, 8.200843410673384], [80.147800734379629, 9.824077663609554], [80.838817986986541, 9.268426825391186], [81.304319289071756, 8.564206244333688], [81.787959018891371, 7.523055324733162]]] } }, - { "type": "Feature", "properties": { "admin": "Lesotho", "name": "Lesotho", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[28.978262566857236, -28.955596612261708], [29.325166456832587, -29.257386976846245], [29.018415154748016, -29.743765557577362], [28.848399692507734, -30.070050551068245], [28.291069370239903, -30.226216729454293], [28.107204624145421, -30.545732110314944], [27.749397006956478, -30.645105889612214], [26.999261915807629, -29.875953871379977], [27.532511020627471, -29.242710870075353], [28.07433841320778, -28.851468601193581], [28.541700066855491, -28.647501722937562], [28.978262566857236, -28.955596612261708]]] } }, - { "type": "Feature", "properties": { "admin": "Lithuania", "name": "Lithuania", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[22.731098667092649, 54.327536932993311], [22.651051873472536, 54.582740993866729], [22.757763706155256, 54.856574408581366], [22.31572350433057, 55.01529857036585], [21.26844892750346, 55.190481675835301], [21.05580040862241, 56.031076361711051], [22.201156853939491, 56.337801825579483], [23.878263787539957, 56.273671373105259], [24.860684441840753, 56.372528388079616], [25.000934279080887, 56.164530748104831], [25.533046502390327, 56.100296942766029], [26.494331495883749, 55.61510691997762], [26.588279249790386, 55.167175604871659], [25.768432651479792, 54.846962592175082], [25.536353794056989, 54.282423407602515], [24.45068362803703, 53.905702216194747], [23.484127638449841, 53.912497667041123], [23.243987257589506, 54.220566718149129], [22.731098667092649, 54.327536932993311]]] } }, - { "type": "Feature", "properties": { "admin": "Luxembourg", "name": "Luxembourg", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[6.043073357781109, 50.128051662794221], [6.242751092156992, 49.90222565367872], [6.186320428094176, 49.4638028021145], [5.897759230176403, 49.442667141307012], [5.674051954784828, 49.52948354755749], [5.782417433300905, 50.090327867221205], [6.043073357781109, 50.128051662794221]]] } }, - { "type": "Feature", "properties": { "admin": "Latvia", "name": "Latvia", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[21.05580040862241, 56.031076361711051], [21.090423618257965, 56.783872789122924], [21.581866489353668, 57.411870632549913], [22.524341261492872, 57.753374335350756], [23.31845299652209, 57.006236477274854], [24.120729607853423, 57.025692654032753], [24.312862583114615, 57.793423570376966], [25.164593540149262, 57.970156968815175], [25.602809685984365, 57.847528794986559], [26.46353234223778, 57.476388658266316], [27.288184848751509, 57.474528306703817], [27.770015903440925, 57.244258124411218], [27.855282016722519, 56.759326483784278], [28.17670942557799, 56.169129950578807], [27.102459751094525, 55.783313707087672], [26.494331495883749, 55.61510691997762], [25.533046502390327, 56.100296942766029], [25.000934279080887, 56.164530748104831], [24.860684441840753, 56.372528388079616], [23.878263787539957, 56.273671373105259], [22.201156853939491, 56.337801825579483], [21.05580040862241, 56.031076361711051]]] } }, - { "type": "Feature", "properties": { "admin": "Morocco", "name": "Morocco", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[-5.193863491222031, 35.755182196590845], [-4.591006232105143, 35.330711981745644], [-3.640056525070007, 35.39985504815197], [-2.604305792644111, 35.17909332940112], [-2.169913702798624, 35.168396307916694], [-1.792985805661658, 34.527918606091298], [-1.73345455566141, 33.919712836232115], [-1.388049282222596, 32.864015000941372], [-1.124551153966195, 32.651521511357195], [-1.30789913573787, 32.262888902306024], [-2.616604783529567, 32.094346218386157], [-3.068980271812648, 31.724497992473285], [-3.647497931320145, 31.637294012980814], [-3.690441046554666, 30.896951605751152], [-4.859646165374442, 30.501187649043874], [-5.242129278982786, 30.00044302013557], [-6.060632290053745, 29.731699734001801], [-7.059227667661899, 29.57922842052465], [-8.67411617678283, 28.841288967396643], [-8.665589565454836, 27.656425889592462], [-8.817809007940523, 27.656425889592462], [-8.817828334986642, 27.656425889592462], [-8.794883999049032, 27.120696316022553], [-9.413037482124507, 27.088476060488539], [-9.735343390328749, 26.860944729107409], [-10.189424200877452, 26.860944729107409], [-10.551262579785258, 26.990807603456879], [-11.392554897496948, 26.883423977154386], [-11.718219773800339, 26.104091701760801], [-12.030758836301654, 26.030866197203121], [-12.500962693725368, 24.770116278578136], [-13.891110398809044, 23.691009019459383], [-14.22116777185715, 22.310163072188338], [-14.630832688850942, 21.860939846274867], [-14.750954555713404, 21.500600083903802], [-17.002961798561071, 21.42073415779668], [-17.020428432675768, 21.422310288981631], [-16.973247849993182, 21.88574453377495], [-16.589136928767626, 22.158234361250091], [-16.26192175949566, 22.679339504481273], [-16.326413946995896, 23.017768459560894], [-15.982610642958059, 23.723358466074096], [-15.426003790742183, 24.359133612561035], [-15.089331834360729, 24.520260728446964], [-14.824645148161689, 25.103532619725307], [-14.800925665739666, 25.636264960222285], [-14.439939947964827, 26.254418443297645], [-13.773804897506462, 26.618892320252279], [-13.13994177901429, 27.640147813420491], [-13.121613369914709, 27.654147671719805], [-12.61883663578311, 28.038185533148656], [-11.688919236690761, 28.148643907172577], [-10.9009569971044, 28.832142238880913], [-10.39959225100864, 29.09858592377778], [-9.564811163765624, 29.933573716749855], [-9.814718390329174, 31.177735500609053], [-9.434793260119362, 32.038096421836478], [-9.300692918321827, 32.564679266890629], [-8.657476365585039, 33.24024526624239], [-7.654178432638217, 33.697064927702506], [-6.912544114601358, 34.11047638603744], [-6.24434200685141, 35.145865383437517], [-5.929994269219832, 35.759988104793983], [-5.193863491222031, 35.755182196590845]]] } }, - { "type": "Feature", "properties": { "admin": "Moldova", "name": "Moldova", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[26.619336785597788, 48.220726223333457], [26.857823520624798, 48.368210761094488], [27.52253746919515, 48.467119452501102], [28.259546746541837, 48.155562242213406], [28.670891147585163, 48.118148505234089], [29.122698195113024, 47.849095160506458], [29.050867954227321, 47.510226955752493], [29.415135125452732, 47.346645209332571], [29.559674106573105, 46.928582872091312], [29.908851759569295, 46.67436066343145], [29.838210076626289, 46.525325832701675], [30.024658644335364, 46.423936672545032], [29.759971958136383, 46.349987697935354], [29.170653924279879, 46.379262396828693], [29.072106967899288, 46.517677720722482], [28.862972446414055, 46.437889309263824], [28.933717482221621, 46.258830471372491], [28.659987420371575, 45.939986884131628], [28.48526940279276, 45.596907050145887], [28.233553501099035, 45.488283189468369], [28.054442986775392, 45.944586086605618], [28.160017937947707, 46.371562608417207], [28.128030226359037, 46.81047638608824], [27.551166212684841, 47.405117092470817], [27.233872918412736, 47.826770941756365], [26.924176059687561, 48.123264472030982], [26.619336785597788, 48.220726223333457]]] } }, - { "type": "Feature", "properties": { "admin": "Madagascar", "name": "Madagascar", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[49.543518914595737, -12.469832858940553], [49.80898074727908, -12.895284925999551], [50.05651085795715, -13.555761407121981], [50.217431268114055, -14.758788750876795], [50.476536899625515, -15.226512139550541], [50.377111443895942, -15.706069431219122], [50.200274692593169, -16.000263360256763], [49.860605503138665, -15.414252618066913], [49.672606642460849, -15.710203545802477], [49.863344354050142, -16.451036879138773], [49.774564243372694, -16.875042006093597], [49.49861209493411, -17.10603565843827], [49.435618523970298, -17.953064060134363], [49.04179243347393, -19.118781019774442], [48.548540887247995, -20.496888116134119], [47.930749139198653, -22.391501153251077], [47.547723423051295, -23.781958916928513], [47.095761346226588, -24.941629733990446], [46.282477654817079, -25.178462823184102], [45.409507684110444, -25.601434421493082], [44.833573846217547, -25.346101169538933], [44.039720493349755, -24.9883452287823], [43.763768344911156, -24.460677178649988], [43.697777540874441, -23.574116306250595], [43.345654331237611, -22.77690398528387], [43.254187046080986, -22.057413018484116], [43.433297560404633, -21.336475111580185], [43.893682895692919, -21.163307386970121], [43.89637007017209, -20.830459486578167], [44.374325392439644, -20.072366224856385], [44.464397413924374, -19.435454196859045], [44.23242190936616, -18.961994724200899], [44.042976108584149, -18.331387220943167], [43.963084344260899, -17.409944756746778], [44.312468702986273, -16.850495700754951], [44.446517368351387, -16.216219170804504], [44.944936557806521, -16.179373874580396], [45.502731967964976, -15.974373467678538], [45.872993605336255, -15.793454278224681], [46.312243279817203, -15.780018405828795], [46.882182651564271, -15.210182386946309], [47.70512983581235, -14.594302666891762], [48.005214878131241, -14.091232598530372], [47.869047479042152, -13.663868503476582], [48.29382775248137, -13.784067884987483], [48.845060255738773, -13.08917489995866], [48.863508742066976, -12.487867933810417], [49.194651320193302, -12.040556735891967], [49.543518914595737, -12.469832858940553]]] } }, - { "type": "Feature", "properties": { "admin": "Mexico", "name": "Mexico", "continent": "North America" }, "geometry": { "type": "Polygon", "coordinates": [[[-97.140008307670684, 25.869997463478395], [-97.528072475966539, 24.992144069920297], [-97.702945522842214, 24.272343044526728], [-97.776041836319024, 22.932579860927653], [-97.872366706111094, 22.444211737553356], [-97.699043952204164, 21.898689480064256], [-97.388959520236739, 21.411018988525818], [-97.189333462293277, 20.635433254473124], [-96.525575527720306, 19.890930894444061], [-96.292127244841737, 19.32037140550954], [-95.90088497595994, 18.828024196848727], [-94.8390634834427, 18.562717393462204], [-94.425729539756205, 18.144370835843343], [-93.548651292682365, 18.423836981677933], [-92.786113857783477, 18.524838568592255], [-92.037348192090391, 18.704569200103432], [-91.407903408559235, 18.876083278880227], [-90.771869879910852, 19.284120388256778], [-90.533589850613026, 19.867418117751292], [-90.451475999701231, 20.707521877520428], [-90.278618333684889, 20.999855454995547], [-89.601321173851474, 21.261725775634485], [-88.543866339862845, 21.493675441976613], [-87.658416510757704, 21.458845526611977], [-87.051890224948053, 21.543543199138295], [-86.811982388032931, 21.331514797444747], [-86.845907965832595, 20.849864610268348], [-87.383291185235848, 20.255404771398727], [-87.621054450210721, 19.646553046135917], [-87.436750454441764, 19.472403469312265], [-87.586560431655911, 19.040130113190738], [-87.837191128271485, 18.259815985583426], [-88.090664028663156, 18.516647854074048], [-88.300031094093626, 18.499982204659997], [-88.490122850279278, 18.486830552641717], [-88.84834387892657, 17.883198147040329], [-89.029857347351737, 18.001511338772556], [-89.150909389995462, 17.955467637600403], [-89.143080410503316, 17.808318996649401], [-90.067933519230891, 17.819326076727517], [-91.001519945015943, 17.817594916245692], [-91.002269253284155, 17.254657701074272], [-91.453921271515114, 17.252177232324183], [-91.08167009150057, 16.918476670799517], [-90.711821865587623, 16.687483018454767], [-90.600846727240921, 16.470777899638787], [-90.438866950221993, 16.410109768128105], [-90.464472622422633, 16.069562079324722], [-91.747960171255926, 16.066564846251762], [-92.229248623406278, 15.251446641495871], [-92.087215949252013, 15.06458466232851], [-92.203229539747255, 14.830102850804108], [-92.227750006869812, 14.538828640190953], [-93.359463874061746, 15.61542959234367], [-93.875168830118511, 15.94016429286591], [-94.691656460330108, 16.20097524664288], [-95.250227016973014, 16.128318182840641], [-96.053382127653293, 15.752087917539592], [-96.557434048228274, 15.653515122942787], [-97.263592495496624, 15.917064927631312], [-98.013029954809596, 16.107311713113912], [-98.947675747456486, 16.566043402568763], [-99.697397427147024, 16.706164048728166], [-100.829498867581293, 17.171071071842047], [-101.666088629954444, 17.649026394109622], [-101.918528001700196, 17.916090196193974], [-102.478132086988907, 17.975750637275095], [-103.500989549558057, 18.292294623278845], [-103.917527432046811, 18.748571682200005], [-104.992009650475467, 19.316133938061679], [-105.493038499761411, 19.946767279535429], [-105.731396043707633, 20.434101874264108], [-105.397772996831321, 20.531718654863422], [-105.500660773524402, 20.816895046466122], [-105.27075232625792, 21.076284898355137], [-105.265817226974022, 21.422103583252348], [-105.603160976975374, 21.871145941652568], [-105.693413865973113, 22.269080308516148], [-106.028716396898943, 22.77375234627862], [-106.909980434988341, 23.767774359628895], [-107.91544877809136, 24.548915310152946], [-108.401904873470954, 25.172313951105931], [-109.260198737406625, 25.580609442644054], [-109.444089321717314, 25.824883938087673], [-109.291643846456267, 26.44293406829842], [-109.801457689231796, 26.676175645447923], [-110.391731737085692, 27.162114976504533], [-110.641018846461606, 27.859876003525521], [-111.178918830187826, 27.941240546169062], [-111.759606899851619, 28.467952582303944], [-112.228234626090369, 28.954408677683482], [-112.27182369672866, 29.266844387320074], [-112.80959448937395, 30.021113593052341], [-113.163810594518651, 30.786880804969424], [-113.148669399857141, 31.170965887978912], [-113.871881069781836, 31.56760834403519], [-114.205736660603506, 31.524045111613123], [-114.776451178835003, 31.79953217216114], [-114.936699795372121, 31.393484605427595], [-114.771231859173483, 30.91361725516526], [-114.673899298951739, 30.162681179315985], [-114.330974494262918, 29.750432440707407], [-113.588875088335413, 29.061611436473008], [-113.424053107540516, 28.826173610951223], [-113.271969367305502, 28.754782619739892], [-113.140039435664363, 28.411289374295954], [-112.962298346796473, 28.425190334582503], [-112.761587083774856, 27.78021678314752], [-112.457910529411635, 27.525813706974752], [-112.24495195193677, 27.171726792910754], [-111.616489020619184, 26.662817287700474], [-111.284674648872993, 25.732589830014426], [-110.987819383572386, 25.294606228124557], [-110.71000688357131, 24.826004340101854], [-110.655048997828871, 24.298594672131113], [-110.17285620811343, 24.265547593680417], [-109.771847093528521, 23.811182562754194], [-109.409104377055698, 23.364672349536242], [-109.433392300232896, 23.185587673428696], [-109.85421932660168, 22.818271592698061], [-110.031391974714424, 22.823077500901199], [-110.295070970483636, 23.430973212166684], [-110.949501309028022, 24.000964260345988], [-111.670568407012681, 24.484423122652508], [-112.182035895621468, 24.73841278736716], [-112.148988817170817, 25.470125230404044], [-112.300710822379671, 26.012004299416613], [-112.777296719191526, 26.321959540303162], [-113.464670783321907, 26.768185533143416], [-113.596729906043805, 26.639459540304465], [-113.848936733844241, 26.900063788352437], [-114.465746629680027, 27.142090358991361], [-115.055142178184965, 27.722726752222904], [-114.982252570437382, 27.798200181585109], [-114.570365566854917, 27.741485297144884], [-114.199328782999231, 28.115002549750553], [-114.162018398884612, 28.566111965442296], [-114.931842210736605, 29.279479275015483], [-115.518653937626965, 29.556361599235395], [-115.887365282029563, 30.180793768834171], [-116.2583503894529, 30.836464341753572], [-116.721526252084956, 31.635743720012037], [-117.127759999999839, 32.53534], [-115.99135, 32.612390000000111], [-114.72139, 32.72083], [-114.815, 32.52528], [-113.30498, 32.03914], [-111.02361, 31.33472], [-109.035, 31.341940000000129], [-108.24194, 31.34222], [-108.24, 31.754853718166366], [-106.507589999999851, 31.75452], [-106.1429, 31.39995], [-105.63159, 31.08383], [-105.03737, 30.64402], [-104.70575, 30.12173], [-104.456969999999885, 29.57196], [-103.94, 29.27], [-103.11, 28.97], [-102.48, 29.76], [-101.6624, 29.7793], [-100.9576, 29.380710000000125], [-100.45584, 28.696120000000118], [-100.11, 28.11000000000012], [-99.52, 27.54], [-99.3, 26.84], [-99.019999999999897, 26.37], [-98.24, 26.06], [-97.529999999999887, 25.84], [-97.140008307670684, 25.869997463478395]]] } }, - { "type": "Feature", "properties": { "admin": "Macedonia", "name": "Macedonia", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[20.59023, 41.85541], [20.717310000000108, 41.84711], [20.76216, 42.05186], [21.352700000000134, 42.2068], [21.576635989402117, 42.245224397061847], [21.917080000000105, 42.30364], [22.380525750424674, 42.320259507815074], [22.881373732197339, 41.999297186850349], [22.952377150166505, 41.337993882811176], [22.76177, 41.3048], [22.597308383889008, 41.130487168943198], [22.055377638444266, 41.149865831052686], [21.674160597426969, 40.93127452245794], [21.020040317476397, 40.842726955725873], [20.60518, 41.08622], [20.46315, 41.51509], [20.59023, 41.85541]]] } }, - { "type": "Feature", "properties": { "admin": "Mali", "name": "Mali", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[-12.170750291380299, 14.616834214735503], [-11.834207526079465, 14.799096991428936], [-11.666078253617853, 15.388208319556295], [-11.349095017939502, 15.411256008358475], [-10.650791388379414, 15.132745876521422], [-10.086846482778212, 15.330485744686269], [-9.700255092802703, 15.264107367407359], [-9.550238409859388, 15.486496893775435], [-5.537744309908446, 15.501689764869253], [-5.315277268891931, 16.201853745991837], [-5.488522508150438, 16.325102037007962], [-5.971128709324247, 20.640833441647626], [-6.453786586930334, 24.956590684503418], [-4.92333736817423, 24.974574082940993], [-1.550054897457613, 22.792665920497377], [1.823227573259032, 20.61080943448604], [2.060990838233919, 20.142233384679482], [2.683588494486428, 19.856230170160114], [3.146661004253899, 19.693578599521441], [3.158133172222704, 19.057364203360034], [4.267419467800038, 19.155265204336995], [4.270209995143801, 16.852227484601212], [3.723421665063482, 16.184283759012612], [3.638258904646476, 15.568119818580453], [2.749992709981483, 15.409524847876693], [1.385528191746857, 15.323561102759168], [1.01578331869851, 14.968182277887944], [0.374892205414682, 14.928908189346128], [-0.26625729003058, 14.924308986872147], [-0.515854458000348, 15.116157741755725], [-1.066363491205663, 14.973815009007764], [-2.001035122068771, 14.559008287000887], [-2.191824510090384, 14.246417548067352], [-2.967694464520576, 13.798150336151506], [-3.103706834312759, 13.54126679122859], [-3.52280270019986, 13.337661647998612], [-4.006390753587225, 13.472485459848112], [-4.280405035814879, 13.228443508349738], [-4.427166103523802, 12.542645575404292], [-5.220941941743119, 11.713858954307224], [-5.197842576508648, 11.375145778850136], [-5.470564947929004, 10.951269842976044], [-5.404341599946973, 10.370736802609144], [-5.816926235365286, 10.222554633012191], [-6.050452032892266, 10.096360785355442], [-6.205222947606429, 10.524060777219132], [-6.493965013037267, 10.411302801958268], [-6.666460944027547, 10.430810655148447], [-6.850506557635057, 10.138993841996237], [-7.622759161804808, 10.147236232946792], [-7.89958980959237, 10.297382106970824], [-8.029943610048617, 10.206534939001711], [-8.335377163109738, 10.494811916541932], [-8.282357143578279, 10.792597357623842], [-8.407310756860026, 10.90925690352276], [-8.620321010767126, 10.810890814655181], [-8.581305304386772, 11.136245632364801], [-8.376304897484911, 11.393645941610627], [-8.786099005559462, 11.812560939984705], [-8.905264858424529, 12.088358059126433], [-9.127473517279581, 12.308060411015331], [-9.327616339546008, 12.334286200403451], [-9.567911749703212, 12.194243068892472], [-9.890992804392011, 12.060478623904968], [-10.165213792348835, 11.844083563682743], [-10.593223842806278, 11.923975328005977], [-10.870829637078211, 12.177887478072106], [-11.036555955438256, 12.211244615116513], [-11.297573614944508, 12.077971096235768], [-11.456168585648269, 12.076834214725336], [-11.513942836950587, 12.442987575729415], [-11.467899135778522, 12.754518947800973], [-11.553397793005427, 13.141213690641063], [-11.927716030311613, 13.422075100147392], [-12.124887457721256, 13.994727484589784], [-12.170750291380299, 14.616834214735503]]] } }, - { "type": "Feature", "properties": { "admin": "Myanmar", "name": "Myanmar", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[99.543309360759281, 20.186597601802056], [98.959675734454848, 19.752980658440944], [98.253723992915582, 19.708203029860041], [97.797782830804394, 18.627080389881751], [97.375896437573516, 18.445437730375811], [97.859122755934848, 17.567946071843657], [98.493761020911322, 16.837835598207928], [98.90334842325673, 16.177824204976115], [98.537375929765687, 15.308497422746081], [98.192074009191373, 15.123702500870349], [98.430819126379859, 14.622027696180831], [99.097755161538728, 13.827502549693275], [99.212011753336071, 13.269293728076462], [99.196353794351637, 12.804748439988666], [99.587286004639694, 11.892762762901695], [99.038120558673953, 10.960545762572435], [98.553550653073017, 9.932959906448543], [98.457174106848697, 10.675266018105146], [98.764545526120756, 11.441291612183745], [98.428338657629823, 12.032986761925681], [98.509574009192661, 13.122377631070675], [98.103603957107666, 13.64045970301285], [97.777732375075161, 14.837285874892638], [97.597071567782749, 16.100567938699765], [97.164539829499773, 16.928734442609336], [96.505768670642965, 16.427240505432845], [95.369352248112378, 15.714389960182599], [94.808404575584092, 15.803454291237637], [94.188804152404515, 16.037936102762014], [94.533485955791321, 17.277240301985724], [94.324816522196741, 18.213513902249893], [93.540988397193615, 19.366492621330021], [93.663254835996199, 19.726961574781992], [93.078277622452163, 19.855144965081973], [92.368553501355606, 20.670883287025344], [92.30323449093865, 21.475485337809815], [92.652257114637976, 21.324047552978481], [92.672720981825549, 22.041238918541247], [93.166127557348361, 22.278459580977099], [93.060294224014598, 22.703110663335565], [93.286326938859247, 23.043658352138998], [93.325187615942767, 24.078556423432197], [94.106741977925054, 23.850740871673477], [94.552657912171611, 24.675238348890328], [94.603249139385355, 25.162495428970399], [95.155153436262566, 26.001307277932078], [95.124767694074933, 26.573572089132295], [96.419365675850941, 27.264589341739221], [97.133999058015277, 27.08377350514996], [97.051988559968066, 27.699058946233144], [97.402561476636123, 27.88253611908544], [97.327113885490007, 28.261582749946331], [97.91198774616943, 28.335945136014338], [98.24623091023328, 27.747221381129172], [98.682690057370451, 27.508812160750612], [98.712093947344499, 26.74353587494026], [98.671838006589127, 25.918702500913518], [97.724609002679117, 25.083637193292994], [97.604719679761956, 23.897404690033039], [98.660262485755737, 24.063286037689959], [98.898749220782747, 23.142722072842524], [99.531992222087382, 22.949038804612574], [99.240898878987224, 22.118314317304577], [99.983489211021464, 21.742936713136398], [100.416537713627349, 21.558839423096607], [101.150032993578222, 21.849984442629015], [101.180005324307515, 21.436572984294024], [100.329101190189519, 20.786121731036229], [100.115987583417819, 20.41784963630818], [99.543309360759281, 20.186597601802056]]] } }, - { "type": "Feature", "properties": { "admin": "Montenegro", "name": "Montenegro", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[19.801613396898681, 42.500093492190835], [19.738051385179627, 42.688247382165564], [19.30449, 42.19574], [19.371770000000136, 41.87755], [19.16246, 41.95502], [18.88214, 42.28151], [18.45, 42.48], [18.56, 42.65], [18.70648, 43.20011], [19.03165, 43.43253], [19.21852, 43.52384], [19.48389, 43.35229], [19.63, 43.213779970270522], [19.95857, 43.10604], [20.3398, 42.89852], [20.25758, 42.81275], [20.0707, 42.58863], [19.801613396898681, 42.500093492190835]]] } }, - { "type": "Feature", "properties": { "admin": "Mongolia", "name": "Mongolia", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[87.751264276076697, 49.297197984405479], [88.805566847695488, 49.470520738312409], [90.713667433640666, 50.331811835321076], [92.234711541719662, 50.802170722041716], [93.104219191462661, 50.495290228876414], [94.147566359435615, 50.480536607457083], [94.815949334698701, 50.013433335970838], [95.814027947983973, 49.977466539095708], [97.259727817781396, 49.726060695995727], [98.231761509191543, 50.422400621128737], [97.825739780674283, 51.010995184933165], [98.861490513100307, 52.047366034546684], [99.981732212323507, 51.634006252643978], [100.889480421962588, 51.516855780638316], [102.065222609467298, 51.25992055928311], [102.255908644624299, 50.510560614618669], [103.676545444760194, 50.089966132195109], [104.621552362081687, 50.275329494826067], [105.886591424586726, 50.406019192092209], [106.888804152455336, 50.274295966180219], [107.868175897250936, 49.793705145865808], [108.475167270951275, 49.282547715850725], [109.402449171996636, 49.292960516957535], [110.662010532678764, 49.130128078805861], [111.581230910286607, 49.377968248077678], [112.897739699354361, 49.543565375356984], [114.362456496235239, 50.248302720737399], [114.962109816550154, 50.140247300815112], [115.485695428531386, 49.805177313834591], [116.678800897286152, 49.888531399121376], [116.191802199367544, 49.134598090199091], [115.485282017073018, 48.135382595403428], [115.742837355615748, 47.726544501326273], [116.308952671373206, 47.853410142602826], [117.295507440257396, 47.69770905210742], [118.064142694166691, 48.066730455103674], [118.866574334794933, 47.747060044946153], [119.772823927897477, 47.048058783550125], [119.66326989143873, 46.692679958678909], [118.874325799638711, 46.805412095723646], [117.421701287914175, 46.672732855814253], [116.717868280098841, 46.388202419615205], [115.985096470200062, 45.727235012385989], [114.46033165899604, 45.339816799493811], [113.463906691544139, 44.808893134127111], [112.436062453258785, 45.011645616224278], [111.873306105600278, 45.102079372735055], [111.348376906379428, 44.457441718110083], [111.667737257943202, 44.073175767587706], [111.829587843881342, 43.743118394539515], [111.129682244920218, 43.406834011400136], [110.412103306115256, 42.871233628911014], [109.243595819131428, 42.519446316084093], [107.744772576937933, 42.481515814781865], [106.129315627061658, 42.134327704428898], [104.964993931093446, 41.597409572916334], [104.522281935648977, 41.908346666016541], [103.312278273534787, 41.907468166667591], [101.833040399179922, 42.51487295182627], [100.845865513108237, 42.663804429691439], [99.515817498780009, 42.524691473961717], [97.451757440177985, 42.748889675460013], [96.349395786527793, 42.725635280928678], [95.762454868556674, 43.319449164394598], [95.306875441471504, 44.241330878265458], [94.688928664125299, 44.352331854828414], [93.480733677141274, 44.975472113619951], [92.133890822318193, 45.115075995456444], [90.945539585334288, 45.286073309910265], [90.585768263718265, 45.719716091487513], [90.970809360724985, 46.888146063822923], [90.280825636763893, 47.693549099307923], [88.854297723346733, 48.06908173277295], [88.013832228551721, 48.599462795600601], [87.751264276076697, 49.297197984405479]]] } }, - { "type": "Feature", "properties": { "admin": "Mozambique", "name": "Mozambique", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[34.559989047999345, -11.520020033415923], [35.312397902169032, -11.439146416879145], [36.514081658684248, -11.720938002166733], [36.775150994622791, -11.594537448780804], [37.471284214026596, -11.568750909067157], [37.827644891111383, -11.268769219612834], [38.427556593587745, -11.285202325081654], [39.521029900883768, -10.896853936408224], [40.316588576017182, -10.317096042525696], [40.478387485523022, -10.765440769089992], [40.437253045418672, -11.761710707245014], [40.560811395028558, -12.639176527561023], [40.599620395679743, -14.201975192931858], [40.775475294768988, -14.691764418194239], [40.477250604012596, -15.406294447493968], [40.089263950365208, -16.100774021064456], [39.452558628097044, -16.720891208566936], [38.53835086442151, -17.101023044505954], [37.411132846838875, -17.586368096591233], [36.281279331209348, -18.659687595293445], [35.896496616364054, -18.842260430580634], [35.198399692533137, -19.552811374593887], [34.786383497870041, -19.784011732667732], [34.701892531072836, -20.497043145431007], [35.176127150215358, -21.254361260668407], [35.373427768705731, -21.840837090748874], [35.385848253705397, -22.14], [35.562545536369079, -22.09], [35.533934767404297, -23.070787855727751], [35.371774122872374, -23.535358982031692], [35.607470330555621, -23.706563002214676], [35.458745558419615, -24.122609958596545], [35.040734897610655, -24.478350518493798], [34.215824008935463, -24.816314385682652], [33.013210076639005, -25.357573337507731], [32.574632195777859, -25.727318210556088], [32.660363396950082, -26.148584486599443], [32.915955031065685, -26.215867201443459], [32.830120477028878, -26.74219166433619], [32.071665480281062, -26.733820082304902], [31.985779249811962, -26.29177988048022], [31.837777947728057, -25.843331801051342], [31.752408481581874, -25.484283949487406], [31.930588820124242, -24.369416599222532], [31.670397983534645, -23.658969008073861], [31.191409132621278, -22.251509698172395], [32.244988234188007, -21.116488539313689], [32.508693068173436, -20.395292250248303], [32.659743279762573, -20.30429005298231], [32.772707960752619, -19.715592136313294], [32.611994256324884, -19.419382826416268], [32.654885695127142, -18.672089939043492], [32.849860874164385, -17.979057305577175], [32.847638787575839, -16.713398125884613], [32.328238966610222, -16.392074069893749], [31.852040643040592, -16.319417006091374], [31.636498243951188, -16.071990248277881], [31.173063999157673, -15.860943698797868], [30.338954705534537, -15.880839125230242], [30.274255812305103, -15.507786960515208], [30.179481235481827, -14.796099134991525], [33.214024692525207, -13.97186003993615], [33.789700148256678, -14.451830743063068], [34.064825473778619, -14.359950046448118], [34.459633416488536, -14.613009535381421], [34.517666049952304, -15.013708591372609], [34.307291294092089, -15.478641452702592], [34.381291945134045, -16.183559665596039], [35.033810255683527, -16.801299737213089], [35.339062941231639, -16.107440280830108], [35.771904738108347, -15.896858819240721], [35.686845330555926, -14.611045830954328], [35.267956170398001, -13.887834161029563], [34.907151320136158, -13.565424899960565], [34.559989047999345, -13.579997653866872], [34.280006137841973, -12.280025323132504], [34.559989047999345, -11.520020033415923]]] } }, - { "type": "Feature", "properties": { "admin": "Mauritania", "name": "Mauritania", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[-12.170750291380299, 14.616834214735503], [-12.830658331747513, 15.303691514542942], [-13.43573767745306, 16.039383042866188], [-14.099521450242175, 16.304302273010489], [-14.577347581428977, 16.598263658102805], [-15.135737270558813, 16.587282416240779], [-15.623666144258689, 16.369337063049809], [-16.120690070041928, 16.45566254319338], [-16.463098110407881, 16.135036119038457], [-16.549707810929061, 16.673892116761959], [-16.270551723688353, 17.166962795474866], [-16.146347418674846, 18.108481553616652], [-16.256883307347163, 19.096715806550304], [-16.377651129613266, 19.593817246981981], [-16.277838100641514, 20.092520656814695], [-16.536323614965465, 20.567866319251486], [-17.063423224342568, 20.99975210213082], [-16.845193650773989, 21.333323472574875], [-12.929101935263528, 21.327070624267559], [-13.118754441774708, 22.771220201096249], [-12.874221564169574, 23.284832261645171], [-11.93722449385332, 23.374594224536164], [-11.969418911171159, 25.933352769468261], [-8.687293667017398, 25.881056219988899], [-8.684399786809051, 27.395744126895998], [-4.92333736817423, 24.974574082940993], [-6.453786586930334, 24.956590684503418], [-5.971128709324247, 20.640833441647626], [-5.488522508150438, 16.325102037007962], [-5.315277268891931, 16.201853745991837], [-5.537744309908446, 15.501689764869253], [-9.550238409859388, 15.486496893775435], [-9.700255092802703, 15.264107367407359], [-10.086846482778212, 15.330485744686269], [-10.650791388379414, 15.132745876521422], [-11.349095017939502, 15.411256008358475], [-11.666078253617853, 15.388208319556295], [-11.834207526079465, 14.799096991428936], [-12.170750291380299, 14.616834214735503]]] } }, - { "type": "Feature", "properties": { "admin": "Malawi", "name": "Malawi", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[34.559989047999345, -11.520020033415923], [34.280006137841973, -12.280025323132504], [34.559989047999345, -13.579997653866872], [34.907151320136158, -13.565424899960565], [35.267956170398001, -13.887834161029563], [35.686845330555926, -14.611045830954328], [35.771904738108347, -15.896858819240721], [35.339062941231639, -16.107440280830108], [35.033810255683527, -16.801299737213089], [34.381291945134045, -16.183559665596039], [34.307291294092089, -15.478641452702592], [34.517666049952304, -15.013708591372609], [34.459633416488536, -14.613009535381421], [34.064825473778619, -14.359950046448118], [33.789700148256678, -14.451830743063068], [33.214024692525207, -13.97186003993615], [32.688165317523122, -13.712857761289273], [32.991764357237876, -12.783870537978272], [33.306422153463068, -12.435778090060214], [33.114289178201908, -11.607198174692311], [33.315310499817279, -10.796549981329695], [33.485687697083584, -10.525558770391111], [33.231387973775291, -9.676721693564799], [32.759375441221316, -9.230599053589058], [33.739729038230443, -9.417150974162722], [33.940837724096532, -9.693673841980292], [34.280006137841973, -10.159999688358402], [34.559989047999345, -11.520020033415923]]] } }, - { "type": "Feature", "properties": { "admin": "Malaysia", "name": "Malaysia", "continent": "Asia" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[101.075515578213299, 6.204867051615891], [101.154218784593809, 5.691384182147713], [101.814281854258013, 5.810808417174228], [102.141186964936423, 6.221636053894655], [102.371147088635212, 6.12820506431096], [102.961705356866673, 5.524495144061077], [103.381214634212142, 4.855001125503746], [103.438575474056165, 4.181605536308381], [103.332122023534851, 3.72669790284297], [103.42942874554052, 3.382868760589019], [103.502447544368877, 2.791018581550204], [103.854674106870334, 2.515454006353763], [104.247931756611479, 1.631141058759055], [104.228811476663523, 1.293048000489534], [103.519707472754433, 1.226333726400682], [102.573615350354771, 1.967115383304744], [101.39063846232915, 2.760813706875623], [101.273539666755838, 3.27029165284118], [100.69543541870668, 3.939139715994869], [100.557407668055092, 4.767280381688279], [100.19670617065772, 5.312492580583678], [100.306260207116509, 6.040561835143875], [100.085756870527078, 6.46448944745029], [100.259596388756918, 6.64282481528957], [101.075515578213299, 6.204867051615891]]], [[[118.618320754064825, 4.47820241944754], [117.882034946770162, 4.137551377779487], [117.01521447150634, 4.306094061699468], [115.86551720587677, 4.306559149590156], [115.51907840379198, 3.169238389494395], [115.134037306785231, 2.821481838386219], [114.621355422017473, 1.430688177898886], [113.805849644019531, 1.217548732911041], [112.859809198052176, 1.497790025229946], [112.380251906383648, 1.410120957846757], [111.797548455860408, 0.904441229654651], [111.159137811326559, 0.976478176269509], [110.514060907027101, 0.773131415200993], [109.830226678508836, 1.338135687664191], [109.663260125773718, 2.006466986494984], [110.396135288537039, 1.663774725751395], [111.168852980597478, 1.850636704918784], [111.370081007942076, 2.697303371588872], [111.796928338672842, 2.885896511238073], [112.995614862115247, 3.102394924324869], [113.712935418758718, 3.893509426281127], [114.204016554828399, 4.525873928236819], [114.659595981913526, 4.00763682699781], [114.869557326315373, 4.348313706881952], [115.347460972150671, 4.316636053887009], [115.405700311343594, 4.955227565933824], [115.450710483869798, 5.447729803891561], [116.220741001450961, 6.143191229675621], [116.725102980619752, 6.924771429873998], [117.129626092600461, 6.928052883324566], [117.643393182446303, 6.422166449403305], [117.689075148592337, 5.98749013918018], [118.347691278152197, 5.708695786965462], [119.181903924639926, 5.407835598162249], [119.110693800941718, 5.016128241389864], [118.439727004064082, 4.966518866389619], [118.618320754064825, 4.47820241944754]]]] } }, - { "type": "Feature", "properties": { "admin": "Namibia", "name": "Namibia", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[16.344976840895239, -28.576705010697697], [15.601818068105812, -27.821247247022797], [15.210472446359457, -27.09095590587404], [14.989710727608548, -26.117371921495153], [14.74321414557633, -25.392920017195376], [14.40814415859583, -23.85301401132984], [14.385716586981145, -22.656652927340687], [14.257714064194172, -22.111208184499951], [13.868642205468657, -21.699036960539974], [13.352497999737437, -20.872834161057497], [12.82684533046449, -19.673165785401661], [12.608564080463617, -19.045348809487695], [11.794918654028063, -18.069129327061912], [11.734198846085118, -17.30188933682447], [12.215461460019352, -17.11166838955808], [12.814081251688405, -16.941342868724067], [13.462362094789963, -16.971211846588769], [14.058501417709007, -17.42338062914266], [14.209706658595021, -17.353100681225715], [18.26330936043416, -17.309950860262003], [18.956186964603599, -17.789094740472255], [21.377176141045563, -17.930636488519688], [23.215048455506057, -17.52311614346598], [24.033861525170771, -17.29584319424632], [24.6823490740015, -17.35341073981947], [25.076950310982255, -17.578823337476617], [25.084443393664564, -17.661815687737366], [24.520705193792534, -17.887124932529932], [24.217364536239209, -17.889347019118485], [23.579005568137713, -18.281261081620055], [23.196858351339298, -17.869038181227783], [21.655040317478971, -18.219146010005222], [20.910641310314531, -18.252218926672018], [20.881134067475866, -21.814327080983144], [19.895457797940672, -21.849156996347865], [19.895767856534427, -24.767790215760588], [19.89473432788861, -28.461104831660769], [19.002127312911082, -28.972443129188857], [18.464899122804745, -29.045461928017271], [17.836151971109526, -28.856377862261311], [17.387497185951499, -28.783514092729774], [17.218928663815401, -28.355943291946804], [16.824017368240899, -28.082161553664466], [16.344976840895239, -28.576705010697697]]] } }, - { "type": "Feature", "properties": { "admin": "New Caledonia", "name": "New Caledonia", "continent": "Oceania" }, "geometry": { "type": "Polygon", "coordinates": [[[165.779989862326346, -21.080004978115621], [166.599991489933814, -21.700018812753523], [167.120011428086883, -22.159990736583488], [166.74003462144475, -22.399976088146943], [166.189732293968632, -22.129708347260447], [165.474375441752159, -21.679606621998229], [164.829815301775653, -21.149819838141948], [164.16799523341362, -20.444746595951624], [164.029605747735957, -20.105645847252347], [164.459967075862664, -20.120011895429492], [165.020036249041993, -20.459991143477726], [165.460009393575064, -20.800022067958253], [165.779989862326346, -21.080004978115621]]] } }, - { "type": "Feature", "properties": { "admin": "Niger", "name": "Niger", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[2.154473504249949, 11.940150051313422], [2.177107781593917, 12.625017808477534], [1.024103224297619, 12.851825669806598], [0.993045688490156, 13.335749620003865], [0.429927605805517, 13.988733018443893], [0.295646396495215, 14.444234930880663], [0.374892205414767, 14.928908189346144], [1.015783318698481, 14.968182277887989], [1.385528191746971, 15.323561102759237], [2.74999270998154, 15.409524847876751], [3.63825890464659, 15.56811981858044], [3.723421665063596, 16.184283759012654], [4.270209995143886, 16.852227484601311], [4.267419467800095, 19.155265204337123], [5.677565952180712, 19.601206976799794], [8.572893100629868, 21.565660712159225], [11.999505649471697, 23.471668402596432], [13.581424594790459, 23.040506089769274], [14.143870883855239, 22.491288967371126], [14.8513, 22.862950000000119], [15.096887648181847, 21.308518785074902], [15.471076694407314, 21.048457139565979], [15.487148064850143, 20.730414537025634], [15.90324669766431, 20.387618923417499], [15.68574059414777, 19.957180080642384], [15.300441114979716, 17.927949937405], [15.247731154041842, 16.627305813050778], [13.972201775781681, 15.684365953021139], [13.540393507550785, 14.36713369390122], [13.956698846094124, 13.996691189016925], [13.954476759505607, 13.353448798063765], [14.595781284247604, 13.330426947477859], [14.495787387762899, 12.859396267137353], [14.213530714584746, 12.80203542729333], [14.181336297266906, 12.483656927943169], [13.995352817448289, 12.4615652531383], [13.318701613018558, 13.55635630945795], [13.083987257548809, 13.596147162322492], [12.302071160540546, 13.037189032437535], [11.527803175511504, 13.328980007373556], [10.989593133191532, 13.387322699431191], [10.701031935273816, 13.246917832894038], [10.114814487354748, 13.277251898649464], [9.524928012743088, 12.85110219975456], [9.014933302454436, 12.826659247280414], [7.804671258178869, 13.343526923063731], [7.330746697630046, 13.098038031461213], [6.82044192874781, 13.115091254117598], [6.445426059605721, 13.492768459522718], [5.443058302440135, 13.865923977102225], [4.368343540066006, 13.747481594289408], [4.107945997747378, 13.531215725147941], [3.967282749048933, 12.956108710171574], [3.680633579125924, 12.552903347214167], [3.611180454125587, 11.660167141155965], [2.848643019226585, 12.235635891158207], [2.490163608418015, 12.233052069543588], [2.154473504249949, 11.940150051313422]]] } }, - { "type": "Feature", "properties": { "admin": "Nigeria", "name": "Nigeria", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[8.500287713259693, 4.771982937026847], [7.462108188515939, 4.41210826254624], [7.082596469764438, 4.464689032403228], [6.698072137080598, 4.240594183769516], [5.898172641634686, 4.262453314628984], [5.362804803090881, 4.887970689305957], [5.033574252959368, 5.611802476418233], [4.325607130560683, 6.270651149923466], [3.574180128604552, 6.258300482605717], [2.691701694356254, 6.258817246928628], [2.74906253420022, 7.870734361192886], [2.723792758809509, 8.506845404489708], [2.912308383810255, 9.13760793704432], [3.220351596702101, 9.4441525333997], [3.705438266625918, 10.063210354040207], [3.600070021182801, 10.332186184119406], [3.797112257511713, 10.734745591673104], [3.572216424177469, 11.327939357951516], [3.611180454125558, 11.660167141155966], [3.68063357912581, 12.552903347214222], [3.967282749048848, 12.956108710171572], [4.107945997747321, 13.531215725147829], [4.368343540066063, 13.747481594289324], [5.443058302440163, 13.865923977102295], [6.445426059605636, 13.492768459522676], [6.820441928747753, 13.115091254117514], [7.330746697630017, 13.098038031461199], [7.804671258178784, 13.343526923063745], [9.014933302454462, 12.826659247280427], [9.524928012742945, 12.851102199754477], [10.114814487354689, 13.277251898649409], [10.701031935273702, 13.246917832894081], [10.989593133191532, 13.387322699431108], [11.527803175511393, 13.328980007373584], [12.302071160540521, 13.037189032437521], [13.083987257548866, 13.596147162322563], [13.318701613018558, 13.556356309457824], [13.995352817448346, 12.461565253138343], [14.181336297266792, 12.483656927943112], [14.57717776862253, 12.085360826053501], [14.468192172918974, 11.90475169519341], [14.415378859116682, 11.572368882692071], [13.572949659894558, 10.798565985553564], [13.308676385153914, 10.160362046748926], [13.1675997249971, 9.64062632897341], [12.955467970438971, 9.417771714714702], [12.753671502339214, 8.717762762888993], [12.218872104550597, 8.305824082874322], [12.063946160539556, 7.799808457872301], [11.839308709366801, 7.397042344589434], [11.745774366918509, 6.981382961449753], [11.058787876030349, 6.644426784690593], [10.497375115611417, 7.055357774275562], [10.118276808318255, 7.038769639509879], [9.522705926154398, 6.453482367372116], [9.233162876023043, 6.444490668153334], [8.757532993208626, 5.47966583904791], [8.500287713259693, 4.771982937026847]]] } }, - { "type": "Feature", "properties": { "admin": "Nicaragua", "name": "Nicaragua", "continent": "North America" }, "geometry": { "type": "Polygon", "coordinates": [[[-85.712540452807289, 11.088444932494822], [-86.058488328785245, 11.40343862552994], [-86.525849982432931, 11.806876532432593], [-86.7459915839963, 12.143961900272483], [-87.167516242201131, 12.458257961471656], [-87.668493415054698, 12.909909979702629], [-87.557466600275603, 13.064551703336061], [-87.392386237319201, 12.914018256069836], [-87.316654425795463, 12.984685777228972], [-87.005769009127562, 13.025794379117157], [-86.880557013684339, 13.254204209847241], [-86.733821784191576, 13.263092556201441], [-86.755086636079696, 13.754845485890909], [-86.520708177419877, 13.778487453664436], [-86.312142096689911, 13.771356106008167], [-86.096263800790581, 14.038187364147245], [-85.801294725268576, 13.836054999237586], [-85.698665330736901, 13.960078436738083], [-85.514413011400222, 14.079011745657834], [-85.165364549484792, 14.354369615125076], [-85.148750576502948, 14.560196844943615], [-85.052787441736925, 14.551541042534719], [-84.924500698572388, 14.790492865452348], [-84.820036790694346, 14.819586696832669], [-84.649582078779602, 14.66680532476175], [-84.449335903648588, 14.621614284722494], [-84.228341640952394, 14.748764146376654], [-83.975721401693576, 14.749435939996458], [-83.628584967772895, 14.880073960830298], [-83.489988776366104, 15.016267198135534], [-83.147219000974104, 14.995829169164109], [-83.233234422523907, 14.8998660343981], [-83.28416154654758, 14.676623846897197], [-83.182126430987267, 14.310703029838447], [-83.412499966144424, 13.970077826386554], [-83.519831916014667, 13.56769928634588], [-83.55220720084553, 13.127054348193084], [-83.498515387694255, 12.869292303921226], [-83.473323126951968, 12.419087225794424], [-83.626104499022887, 12.320850328007563], [-83.719613003255034, 11.893124497927724], [-83.650857510090702, 11.629032090700116], [-83.855470343750369, 11.373311265503785], [-83.808935716471538, 11.103043524617274], [-83.655611741861563, 10.938764146361418], [-83.895054490885926, 10.726839097532444], [-84.190178595704822, 10.793450018756671], [-84.355930752281026, 10.999225572142901], [-84.673069017256239, 11.082657172078139], [-84.903003302738924, 10.952303371621895], [-85.561851976244171, 11.217119248901593], [-85.712540452807289, 11.088444932494822]]] } }, - { "type": "Feature", "properties": { "admin": "Netherlands", "name": "Netherlands", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[6.074182570020922, 53.51040334737813], [6.905139601274128, 53.482162177130633], [7.092053256873895, 53.14404328064488], [6.842869500362381, 52.228440253297542], [6.589396599970825, 51.85202912048338], [5.988658074577812, 51.85161570902504], [6.156658155958779, 50.803721015010574], [5.60697594567, 51.037298488969768], [4.973991326526913, 51.475023708698124], [4.047071160507527, 51.267258612668556], [3.314971144228536, 51.345755113319903], [3.830288527043137, 51.620544542031936], [4.705997348661184, 53.091798407597757], [6.074182570020922, 53.51040334737813]]] } }, - { "type": "Feature", "properties": { "admin": "Norway", "name": "Norway", "continent": "Europe" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[28.165547316202911, 71.185474351680497], [31.293418409965472, 70.453787746859902], [30.005435011522785, 70.186258856884876], [31.101078728975118, 69.558080145944857], [29.399580519332879, 69.156916002063056], [28.591929559043187, 69.064776923286686], [29.015572950971968, 69.76649119737796], [27.732292107867885, 70.164193020296281], [26.179622023226298, 69.825298977326142], [25.689212680776389, 69.092113755968995], [24.735679152126714, 68.649556789821432], [23.662049594830759, 68.891247463650515], [22.356237827247405, 68.841741441514941], [21.244936150810723, 69.370443020293109], [20.645592889089581, 69.106247260200846], [20.02526899585791, 69.065138658312705], [19.878559604581248, 68.407194322372604], [17.993868442464386, 68.567391262477329], [17.729181756265344, 68.01055186631622], [16.768878614985535, 68.013936672631374], [16.108712192456832, 67.302455552836889], [15.108411492583055, 66.193866889095418], [13.555689731509087, 64.787027696381458], [13.919905226302202, 64.445420640716108], [13.571916131248766, 64.049114081469654], [12.57993533697393, 64.066218980558332], [11.930569288794228, 63.128317572676977], [11.992064243221531, 61.800362453856557], [12.63114668137524, 61.293571682370079], [12.300365838274896, 60.117932847730046], [11.468271925511173, 59.432393296945989], [11.027368605196925, 58.856149400459394], [10.356556837616095, 59.469807033925363], [8.382000359743641, 58.313288479233265], [7.048748406613297, 58.078884182357271], [5.665835402050418, 58.588155422593658], [5.308234490590733, 59.663231919993805], [4.992078077829005, 61.97099803328426], [5.912900424837885, 62.614472968182682], [8.553411085655766, 63.454008287196459], [10.527709181366784, 64.486038316497471], [12.358346795306371, 65.879725857193151], [14.7611458675816, 67.810641587995121], [16.435927361728968, 68.563205471461671], [19.184028354578512, 69.817444159617807], [21.378416375420606, 70.255169379346043], [23.02374230316158, 70.202071845166259], [24.546543409938515, 71.030496731237221], [26.370049676221807, 70.986261705195361], [28.165547316202911, 71.185474351680497]]], [[[24.72412, 77.85385], [22.49032, 77.44493], [20.72601, 77.67704], [21.41611, 77.93504], [20.8119, 78.25463], [22.88426, 78.45494], [23.28134, 78.07954], [24.72412, 77.85385]]], [[[18.25183, 79.70175], [21.54383, 78.95611], [19.02737, 78.5626], [18.47172, 77.82669], [17.59441, 77.63796], [17.1182, 76.80941], [15.91315, 76.77045], [13.76259, 77.38035], [14.66956, 77.73565], [13.1706, 78.02493], [11.22231, 78.8693], [10.44453, 79.65239], [13.17077, 80.01046], [13.71852, 79.66039], [15.14282, 79.67431], [15.52255, 80.01608], [16.99085, 80.05086], [18.25183, 79.70175]]], [[[25.447625359811887, 80.407340399894494], [27.407505730913492, 80.056405748200447], [25.924650506298171, 79.517833970854539], [23.024465773213613, 79.40001170522909], [20.075188429451877, 79.566823228667232], [19.897266473070907, 79.842361965647498], [18.46226362475792, 79.859880276194403], [17.368015170977454, 80.318896186027004], [20.455992059010693, 80.598155626132225], [21.907944777115397, 80.357679348462071], [22.919252557067431, 80.657144273593488], [25.447625359811887, 80.407340399894494]]]] } }, - { "type": "Feature", "properties": { "admin": "Nepal", "name": "Nepal", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[88.120440708369841, 27.876541652939586], [88.043132765661198, 27.445818589786818], [88.174804315140904, 26.810405178325944], [88.060237664749806, 26.414615383402484], [87.22747195836628, 26.39789805755607], [86.024392938179147, 26.630984605408567], [85.25177859898335, 26.726198431906337], [84.675017938173767, 27.234901231387528], [83.304248895199535, 27.364505723575554], [81.999987420584958, 27.925479234319987], [81.057202589851997, 28.416095282499036], [80.088424513676259, 28.794470119740136], [80.476721225917373, 29.729865220655334], [81.11125613802929, 30.183480943313398], [81.525804477874729, 30.422716986608627], [82.327512648450863, 30.115268052688126], [83.337115106137176, 29.463731594352193], [83.898992954446712, 29.320226141877654], [84.234579705750136, 28.839893703724691], [85.011638218123025, 28.642773952747337], [85.823319940131498, 28.203575954698699], [86.954517043000592, 27.97426178640351], [88.120440708369841, 27.876541652939586]]] } }, - { "type": "Feature", "properties": { "admin": "New Zealand", "name": "New Zealand", "continent": "Oceania" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[173.020374790740703, -40.919052422856417], [173.247234328502003, -41.331998793300777], [173.958405389702875, -40.926700534835604], [174.2475867048081, -41.349155368821663], [174.248516880589449, -41.770008233406749], [173.876446568087886, -42.233184096038819], [173.222739699595621, -42.970038344088557], [172.711246372770717, -43.372287693048492], [173.080112746470206, -43.853343601253577], [172.308583612352464, -43.865694268571332], [171.452925246463622, -44.24251881284372], [171.185137974327233, -44.897104180684885], [170.616697219116588, -45.908928724959701], [169.83142215400926, -46.355774834987585], [169.332331170934253, -46.641235446967848], [168.411353794628525, -46.619944756863582], [167.763744745146823, -46.290197442409195], [166.676886021184202, -46.219917494492236], [166.509144321964669, -45.852704766626204], [167.046424188503238, -45.110941257508664], [168.303763462596862, -44.12397307716612], [168.949408807651508, -43.93581918719142], [169.667814569373149, -43.555325616226334], [170.524919875366152, -43.031688327812823], [171.125089960004004, -42.512753594737781], [171.569713983443194, -41.767424411792128], [171.948708937871885, -41.514416599291145], [172.097227004278722, -40.956104424809674], [172.798579543343948, -40.493962090823466], [173.020374790740703, -40.919052422856417]]], [[[174.612008905330526, -36.156397393540537], [175.336615838927173, -37.209097995758263], [175.3575964704375, -36.52619394302112], [175.808886753642469, -36.798942152657681], [175.958490025127475, -37.555381768546063], [176.763195428776555, -37.881253350578696], [177.438813104560495, -37.961248467766488], [178.010354445708657, -37.579824721020124], [178.517093540762801, -37.695373223624792], [178.274731073313802, -38.582812595373092], [177.970460239979332, -39.166342868812968], [177.206992629299123, -39.145775648760839], [176.939980503647007, -39.449736423501562], [177.032946405340113, -39.879942722331471], [176.8858236026052, -40.06597787858216], [176.508017206119348, -40.60480803808958], [176.012440220440283, -41.289624118821493], [175.239567499082966, -41.688307793953236], [175.067898391009408, -41.425894870775075], [174.650972935278418, -41.281820977545443], [175.227630243223615, -40.459235528323397], [174.900156691789959, -39.908933200847216], [173.824046665743992, -39.508854262043506], [173.852261997775315, -39.146602471677461], [174.57480187408035, -38.797683200842748], [174.743473749081033, -38.027807712558378], [174.69701663645057, -37.381128838857954], [174.292028436579187, -36.71109221776144], [174.319003534235549, -36.534823907213884], [173.840996535535766, -36.121980889634109], [173.05417117745958, -35.237125339500331], [172.636005487353714, -34.529106540669382], [173.007042271209457, -34.450661716450334], [173.551298456107475, -35.006183363587958], [174.329390497126241, -35.265495700828616], [174.612008905330526, -36.156397393540537]]]] } }, - { "type": "Feature", "properties": { "admin": "Oman", "name": "Oman", "continent": "Asia" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[58.861141391846573, 21.114034532144299], [58.487985874266961, 20.428985907467101], [58.03431847517659, 20.481437486243347], [57.826372511634098, 20.24300242764863], [57.66576216007094, 19.736004950433109], [57.788700392493368, 19.067570298737646], [57.694390903560667, 18.944709580963799], [57.2342639504338, 18.947991034414255], [56.609650913321971, 18.574267076079476], [56.512189162019482, 18.087113348863934], [56.283520949128011, 17.876066799383945], [55.661491733630683, 17.884128322821535], [55.269939406155189, 17.632309068263194], [55.274900343655091, 17.228354397037659], [54.791002231674113, 16.950696926333357], [54.239252964093751, 17.04498057704998], [53.57050825380459, 16.707662665264674], [53.108572625547502, 16.651051133688977], [52.782184279192066, 17.349742336491229], [52.000009800022227, 19.000003363516068], [54.999981723862405, 19.999994004796118], [55.666659376859869, 22.000001125572307], [55.208341098863187, 22.708329982997007], [55.234489373602869, 23.110992743415348], [55.52584109886449, 23.524869289640911], [55.528631626208288, 23.933604030853498], [55.981213820220503, 24.130542914317854], [55.80411868675624, 24.269604193615287], [55.88623253766805, 24.920830593357486], [56.396847365143984, 24.924732163995508], [56.845140415276049, 24.241673081961487], [57.403452589757428, 23.878594468678834], [58.136947869708322, 23.747930609628835], [58.729211460205427, 23.565667832935414], [59.180501743410346, 22.992395331305456], [59.450097690677033, 22.660270900965592], [59.80806033716285, 22.533611965418199], [59.806148309168087, 22.31052480721419], [59.442191196536399, 21.71454051359208], [59.282407667889871, 21.433885809814875], [58.861141391846573, 21.114034532144299]]], [[[56.391421339753393, 25.895990708921254], [56.261041701080913, 25.714606431576748], [56.070820753814544, 26.055464178973946], [56.362017449779344, 26.395934353128947], [56.485679152253809, 26.309117946878665], [56.391421339753393, 25.895990708921254]]]] } }, - { "type": "Feature", "properties": { "admin": "Pakistan", "name": "Pakistan", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[75.158027785140902, 37.13303091078911], [75.896897414050116, 36.666806138651829], [76.192848341785677, 35.898403428687821], [77.837450799474553, 35.494009507787759], [76.871721632804011, 34.653544012992732], [75.757060988268321, 34.504922593721311], [74.240202671204955, 34.748887030571247], [73.749948358051952, 34.317698879527846], [74.104293654277328, 33.441473293586846], [74.451559279278698, 32.764899603805489], [75.258641798813187, 32.271105455040491], [74.405928989564998, 31.692639471965272], [74.421380242820263, 30.97981476493117], [73.450638462217412, 29.976413479119863], [72.823751662084689, 28.961591701772047], [71.777665643200308, 27.913180243434521], [70.61649620960192, 27.989196275335861], [69.514392938113119, 26.940965684511365], [70.168926629522005, 26.491871649678835], [70.282873162725579, 25.722228705339823], [70.844699334602822, 25.215102037043511], [71.0432401874682, 24.356523952730193], [68.842599318318761, 24.359133612560932], [68.176645135373377, 23.691965033456704], [67.443666619745457, 23.944843654876983], [67.145441928989058, 24.663611151624639], [66.37282758979326, 25.425140896093847], [64.530407749291115, 25.237038682551425], [62.905700718034595, 25.218409328710202], [61.497362908784183, 25.078237006118492], [61.874187453056535, 26.239974880472097], [63.316631707619578, 26.756532497661659], [63.23389773952028, 27.217047024030702], [62.755425652929851, 27.378923448184985], [62.727830438085974, 28.259644883735383], [61.771868117118615, 28.699333807890792], [61.369308709564926, 29.303276272085917], [60.874248488208778, 29.829238999952604], [62.549856805272775, 29.318572496044304], [63.550260858011164, 29.468330796826162], [64.148002150331237, 29.340819200145965], [64.350418735618504, 29.560030625928089], [65.046862013616092, 29.472180691031902], [66.346472609324408, 29.88794342703617], [66.38145755398601, 30.738899237586448], [66.938891229118454, 31.304911200479346], [67.683393589147457, 31.303154201781414], [67.792689243444769, 31.582930406209623], [68.556932000609308, 31.713310044882011], [68.926676873657655, 31.620189113892064], [69.317764113242546, 31.901412258424436], [69.262522007122541, 32.501944078088293], [69.687147251264847, 33.105498969041228], [70.323594191371583, 33.358532619758385], [69.93054324735958, 34.020120144175102], [70.881803012988385, 33.988855902638512], [71.156773309213449, 34.348911444632144], [71.115018751921625, 34.733125718722228], [71.613076206350698, 35.153203436822857], [71.498767938121077, 35.650563259415996], [71.262348260385735, 36.074387518857797], [71.846291945283909, 36.509942328429851], [72.920024855444453, 36.720007025696312], [74.067551710917812, 36.836175645488446], [74.575892775372964, 37.02084137628345], [75.158027785140902, 37.13303091078911]]] } }, - { "type": "Feature", "properties": { "admin": "Panama", "name": "Panama", "continent": "North America" }, "geometry": { "type": "Polygon", "coordinates": [[[-77.881571417945239, 7.223771267114783], [-78.214936082660103, 7.512254950384159], [-78.429160732726061, 8.052041123888925], [-78.182095709938608, 8.319182440621772], [-78.43546525746568, 8.387705389840788], [-78.622120530903928, 8.718124497915026], [-79.120307176413732, 8.996092027213022], [-79.557877366845176, 8.932374986197145], [-79.760578172510037, 8.584515082224398], [-80.164481167303322, 8.333315944853593], [-80.382659064439608, 8.29840851484043], [-80.480689256497286, 8.090307522001067], [-80.003689948227148, 7.54752411542337], [-80.276670701808982, 7.419754136581713], [-80.421158006497066, 7.271571966984763], [-80.886400926420791, 7.220541490096535], [-81.059542812814698, 7.817921047390596], [-81.189715745757937, 7.647905585150339], [-81.519514736644666, 7.706610012233908], [-81.721311204744453, 8.108962714058434], [-82.131441209628889, 8.175392767769635], [-82.390934414382542, 8.292362372262287], [-82.820081346350406, 8.290863755725821], [-82.850958014644803, 8.073822740099954], [-82.965783047197348, 8.225027980985983], [-82.9131764391242, 8.423517157419068], [-82.829770677405151, 8.626295477732368], [-82.868657192704759, 8.807266343618521], [-82.719183112300513, 8.925708726431493], [-82.927154914059145, 9.074330145702914], [-82.932890998043561, 9.476812038608172], [-82.546196255203469, 9.566134751824674], [-82.187122565423394, 9.207448635286779], [-82.207586432610952, 8.995575262890098], [-81.808566860669259, 8.95061676679617], [-81.714154018872023, 9.031955471223581], [-81.43928707551153, 8.786234035675715], [-80.947301601876745, 8.858503526235905], [-80.521901211250054, 9.11107208906243], [-79.914599778955974, 9.312765204297618], [-79.573302781884294, 9.611610012241526], [-79.021191779277913, 9.552931423374103], [-79.058450486960353, 9.454565334506523], [-78.500887620747164, 9.420458889193879], [-78.055927700497989, 9.247730414258296], [-77.729513515926399, 8.946844387238867], [-77.353360765273848, 8.670504665558068], [-77.474722866511314, 8.524286200388216], [-77.242566494440069, 7.935278225125442], [-77.431107957656977, 7.638061224798733], [-77.75341386586139, 7.709839789252141], [-77.881571417945239, 7.223771267114783]]] } }, - { "type": "Feature", "properties": { "admin": "Peru", "name": "Peru", "continent": "South America" }, "geometry": { "type": "Polygon", "coordinates": [[[-69.590423753524036, -17.580011895419329], [-69.858443569605839, -18.092693780187009], [-70.3725723944777, -18.347975355708861], [-71.375250210236914, -17.77379851651385], [-71.462040778271117, -17.363487644116379], [-73.444529588500401, -16.359362888252992], [-75.23788265654143, -15.26568287522778], [-76.009205084929931, -14.649286390850317], [-76.423469204397733, -13.823186944232431], [-76.259241502574156, -13.535039157772939], [-77.10619238962181, -12.222716159720816], [-78.092152879534623, -10.377712497604062], [-79.036953091126918, -8.38656788496589], [-79.445920376284832, -7.930833428583859], [-79.760578172510037, -7.194340915560081], [-80.537481655586049, -6.541667575713715], [-81.249996304026411, -6.136834405139182], [-80.926346808582423, -5.690556735866563], [-81.410942552399433, -4.736764825055459], [-81.099669562489353, -4.036394138203696], [-80.302560594387188, -3.404856459164712], [-80.184014858709645, -3.821161797708043], [-80.46929460317692, -4.059286797708999], [-80.442241990872134, -4.425724379090673], [-80.028908047185581, -4.346090996928893], [-79.62497921417615, -4.454198093283494], [-79.205289069317715, -4.959128513207388], [-78.639897223612323, -4.547784112164072], [-78.450683966775628, -3.873096612161375], [-77.83790483265858, -3.003020521663103], [-76.635394253226707, -2.608677666843817], [-75.544995693652027, -1.56160979574588], [-75.233722703741932, -0.911416924649529], [-75.373223232713841, -0.15203175212045], [-75.106624518520064, -0.05720549886486], [-74.441600511355958, -0.530820000819887], [-74.122395189089048, -1.002832533373848], [-73.659503546834586, -1.260491224781134], [-73.070392218707212, -2.308954359550952], [-72.325786505813639, -2.434218031426453], [-71.774760708285385, -2.169789727388937], [-71.413645799429773, -2.342802422702128], [-70.813475714791949, -2.256864515800742], [-70.047708502874841, -2.725156345229699], [-70.692682054309699, -3.742872002785858], [-70.394043952094975, -3.766591485207825], [-69.893635219996611, -4.298186944194326], [-70.79476884630229, -4.251264743673302], [-70.928843349883564, -4.401591485210367], [-71.748405727816532, -4.59398284263301], [-72.891927659787243, -5.274561455916979], [-72.964507208941185, -5.741251315944892], [-73.219711269814596, -6.089188734566076], [-73.120027431923575, -6.629930922068238], [-73.724486660441627, -6.918595472850638], [-73.723401455363486, -7.340998630404412], [-73.987235480429646, -7.523829847853063], [-73.571059332967053, -8.424446709835832], [-73.015382656532537, -9.03283334720806], [-73.226713426390148, -9.462212823121233], [-72.563033006465631, -9.520193780152715], [-72.184890713169821, -10.05359791426943], [-71.302412278921523, -10.079436130415372], [-70.481893886991159, -9.490118096558842], [-70.548685675728393, -11.009146823778462], [-70.093752204046879, -11.123971856331011], [-69.52967810736493, -10.951734307502193], [-68.665079718689611, -12.561300144097171], [-68.880079515239956, -12.89972909917665], [-68.929223802349526, -13.602683607643007], [-68.94888668483658, -14.45363941819328], [-69.339534674747, -14.953195489158828], [-69.160346645774936, -15.323973890853015], [-69.389764166934697, -15.66012908291165], [-68.959635382753291, -16.500697930571267], [-69.590423753524036, -17.580011895419329]]] } }, - { "type": "Feature", "properties": { "admin": "Philippines", "name": "Philippines", "continent": "Asia" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[126.376813592637447, 8.414706325713352], [126.478512811387873, 7.750354112168976], [126.537423944200611, 7.189380601424572], [126.19677290253253, 6.274294338400038], [125.831420526229081, 7.293715318221855], [125.363852166852283, 6.78648529706099], [125.683160841983707, 6.049656887227257], [125.396511672060626, 5.581003322772288], [124.219787632342332, 6.16135549562618], [123.938719517106918, 6.88513560630612], [124.243662144061318, 7.360610459823659], [123.610212437027542, 7.833527329942753], [123.29607140512519, 7.418875637232786], [122.825505812675388, 7.457374579290216], [122.085499302255769, 6.899424139834847], [121.919928013192603, 7.192119452336072], [122.312358840017112, 8.034962063016506], [122.94239790251963, 8.316236883981174], [123.487687616063511, 8.693009751821192], [123.841154412939815, 8.240324204944384], [124.6014697612502, 8.514157619659015], [124.764612257995623, 8.960409450715458], [125.471390822451539, 8.986996975129641], [125.412117954612754, 9.760334784377545], [126.222714471543156, 9.28607432701885], [126.306636997585073, 8.782487494334573], [126.376813592637447, 8.414706325713352]]], [[[123.982437778825798, 10.278778591345811], [123.62318322153277, 9.950090643753297], [123.309920688979332, 9.318268744336676], [122.995883009941636, 9.022188625520398], [122.380054966319463, 9.713360907424201], [122.586088901867072, 9.981044826696104], [122.837081333508706, 10.261156927934234], [122.947410516451896, 10.881868394408029], [123.498849725438447, 10.940624497923945], [123.337774285984722, 10.267383938025445], [124.077935825701218, 11.232725531453706], [123.982437778825798, 10.278778591345811]]], [[[118.504580926590336, 9.316382554558087], [117.174274530100675, 8.367499904814663], [117.664477166821371, 9.066888739452933], [118.386913690261736, 9.684499619989223], [118.98734215706105, 10.376292019080507], [119.511496209797528, 11.36966807702721], [119.689676548339889, 10.554291490109872], [119.029458449378978, 10.003653265823869], [118.504580926590336, 9.316382554558087]]], [[[121.883547804859106, 11.891755072471977], [122.483821242361458, 11.582187404827506], [123.120216506035959, 11.583660183147867], [123.100837843926442, 11.165933742716486], [122.637713657726692, 10.741308498574226], [122.002610304859559, 10.441016750526087], [121.967366978036523, 10.905691229694622], [122.038370396005519, 11.415840969280039], [121.883547804859106, 11.891755072471977]]], [[[125.502551711123488, 12.162694606978347], [125.783464797062152, 11.046121934447767], [125.01188398651226, 11.311454576050377], [125.032761265158115, 10.975816148314703], [125.277449172060244, 10.358722032101308], [124.801819289245714, 10.134678859899889], [124.760168084818474, 10.8379951033923], [124.459101190286049, 10.889929917845633], [124.302521600441722, 11.495370998577227], [124.891012811381572, 11.415582587118589], [124.877990350443952, 11.794189968304988], [124.266761509295705, 12.557760931849682], [125.22711632700782, 12.53572093347719], [125.502551711123488, 12.162694606978347]]], [[[121.527393833503481, 13.069590155484516], [121.262190382981544, 12.2055602075644], [120.833896112146533, 12.704496161342416], [120.323436313967477, 13.466413479053866], [121.18012820850214, 13.429697373910439], [121.527393833503481, 13.069590155484516]]], [[[121.321308221523566, 18.504064642811013], [121.937601353036371, 18.21855235439838], [122.246006300954264, 18.478949896717094], [122.336956821787965, 18.224882717354173], [122.174279412933174, 17.810282701076371], [122.51565392465335, 17.09350474697197], [122.252310825693883, 16.262444362854122], [121.662786086108255, 15.931017564350125], [121.505069614753367, 15.124813544164621], [121.728828566577249, 14.328376369682244], [122.258925409027313, 14.218202216035973], [122.701275669445636, 14.336541245984417], [123.950295037940236, 13.782130642141066], [123.855107049658599, 13.237771104378464], [124.181288690284873, 12.997527370653469], [124.077419061378222, 12.536676947474573], [123.298035109552245, 13.027525539598981], [122.928651971529902, 13.552919826710404], [122.671355015148663, 13.185836289925131], [122.034649692880521, 13.784481919810343], [121.126384718918587, 13.636687323455559], [120.628637323083296, 13.857655747935649], [120.679383579593832, 14.271015529838319], [120.99181928923052, 14.525392767795079], [120.693336216312687, 14.756670640517282], [120.564145135582976, 14.396279201713821], [120.070428501466367, 14.970869452367094], [119.920928582846102, 15.406346747290735], [119.883773228028247, 16.363704331929963], [120.286487664878791, 16.034628811095327], [120.39004723519173, 17.599081122299506], [120.7158671407919, 18.505227362537536], [121.321308221523566, 18.504064642811013]]]] } }, - { "type": "Feature", "properties": { "admin": "Papua New Guinea", "name": "Papua New Guinea", "continent": "Oceania" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[155.880025669578401, -6.819996840037758], [155.599991082988765, -6.919990736522491], [155.166994256815087, -6.535931491729299], [154.729191522438327, -5.900828138862208], [154.514114211239644, -5.139117526880012], [154.652503696917336, -5.042430922061839], [154.759990676084357, -5.339983819198493], [155.062917922179338, -5.566791680527486], [155.547746209941693, -6.200654799019658], [156.019965448224752, -6.540013929880386], [155.880025669578401, -6.819996840037758]]], [[[151.982795851854462, -5.478063246282344], [151.459106887008659, -5.560280450058739], [151.301390415653884, -5.840728448106701], [150.754447056276661, -6.083762709175387], [150.241196730753813, -6.317753594592984], [149.709963006793316, -6.316513360218051], [148.890064732050462, -6.026040134305432], [148.318936802360696, -5.74714242922613], [148.401825799756864, -5.437755629094722], [149.298411900020824, -5.583741550319216], [149.845561965127217, -5.505503431829339], [149.996250441690279, -5.026101169457674], [150.139755894164921, -5.001348158389788], [150.236907586873485, -5.53222014732428], [150.807467075808063, -5.455842380396886], [151.089672072553981, -5.113692722192368], [151.647880894170811, -4.757073662946168], [151.537861769821518, -4.167807305521889], [152.136791620084352, -4.148790378438519], [152.338743117480988, -4.31296640382976], [152.318692661751754, -4.867661228050748], [151.982795851854462, -5.478063246282344]]], [[[147.191873814074938, -7.388024183789978], [148.084635858349372, -8.044108168167609], [148.734105259393573, -9.104663588093755], [149.306835158484432, -9.071435642130067], [149.266630894161324, -9.514406019736027], [150.038728469034311, -9.684318129111698], [149.738798456012262, -9.872937106977002], [150.801627638959133, -10.29368661869742], [150.690574985963849, -10.582712904505865], [150.028393182575826, -10.652476088099929], [149.782310012001972, -10.393267103723941], [148.923137648717216, -10.28092253992136], [147.913018426707993, -10.130440769087469], [147.135443150012236, -9.492443536012017], [146.567880894150619, -8.942554619994153], [146.048481073184917, -8.067414239131308], [144.74416792213799, -7.630128269077473], [143.897087844009661, -7.915330498896279], [143.286375767184268, -8.245491224809056], [143.413913202080664, -8.983068942910945], [142.628431431244223, -9.326820570516501], [142.068258905200196, -9.159595635620034], [141.033851760013874, -9.117892754760417], [141.017056919519007, -5.85902190513802], [141.000210402591847, -2.600151055515624], [142.735246616791443, -3.289152927263216], [144.583970982033236, -3.861417738463401], [145.27317955950997, -4.373737888205027], [145.829786411725649, -4.876497897972683], [145.981921828392956, -5.465609226100012], [147.648073358347574, -6.083659356310803], [147.891107619416175, -6.614014580922315], [146.970905389594861, -6.721656589386255], [147.191873814074938, -7.388024183789978]]], [[[153.14003787659874, -4.499983412294113], [152.827292108368255, -4.766427097190998], [152.63867313050298, -4.176127211120927], [152.406025832324929, -3.789742526874561], [151.953236932583536, -3.462062269711821], [151.384279413050024, -3.035421644710111], [150.6620495953388, -2.741486097833956], [150.939965448204532, -2.500002129734028], [151.479984165654514, -2.779985039891386], [151.820015090135087, -2.999971612157907], [152.239989455371074, -3.24000864015366], [152.640016717742526, -3.659983005389647], [153.019993524384631, -3.980015150573293], [153.14003787659874, -4.499983412294113]]]] } }, - { "type": "Feature", "properties": { "admin": "Poland", "name": "Poland", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[15.016995883858666, 51.106674099321566], [14.607098422919531, 51.745188096719964], [14.685026482815685, 52.089947414755187], [14.437599725002197, 52.624850165408382], [14.074521111719488, 52.981262518925426], [14.353315463934136, 53.248171291712957], [14.119686313542584, 53.757029120491026], [14.802900424873455, 54.050706285205735], [16.363477003655728, 54.513158677785711], [17.622831658608671, 54.851535956432897], [18.620858595461637, 54.682605699270766], [18.696254510175461, 54.438718777069276], [19.6606400896064, 54.426083889373913], [20.89224450041862, 54.312524929412518], [22.731098667092649, 54.327536932993311], [23.243987257589506, 54.220566718149129], [23.484127638449841, 53.912497667041123], [23.527535841574995, 53.47012156840654], [23.804934930117774, 53.08973135030606], [23.799198846133375, 52.691099351606553], [23.19949384938618, 52.486977444053664], [23.508002150168689, 52.023646552124717], [23.52707075368437, 51.578454087930233], [24.029985792748899, 50.705406602575174], [23.922757195743259, 50.424881089878738], [23.426508416444388, 50.308505764357449], [22.518450148211596, 49.476773586619736], [22.776418898212619, 49.027395331409608], [22.558137648211751, 49.08573802346713], [21.607808058364206, 49.470107326854077], [20.887955356538406, 49.328772284535823], [20.415839471119849, 49.431453355499755], [19.825022820726865, 49.217125352569219], [19.320712517990469, 49.571574001659179], [18.909574822676316, 49.435845852244562], [18.85314415861361, 49.496229763377634], [18.392913852622168, 49.988628648470737], [17.649445021238986, 50.049038397819942], [17.554567091551117, 50.36214590107641], [16.868769158605655, 50.473973700556016], [16.719475945714429, 50.215746568393527], [16.176253289462263, 50.4226073268579], [16.238626743238566, 50.697732652379827], [15.490972120839725, 50.7847299261432], [15.016995883858666, 51.106674099321566]]] } }, - { "type": "Feature", "properties": { "admin": "Puerto Rico", "name": "Puerto Rico", "continent": "North America" }, "geometry": { "type": "Polygon", "coordinates": [[[-66.2824344550082, 18.51476166429536], [-65.771302863209286, 18.426679185453875], [-65.591003790942935, 18.228034979723912], [-65.847163865813755, 17.975905666571855], [-66.599934455009475, 17.98182261806927], [-67.184162360285256, 17.946553453030074], [-67.24242753769434, 18.374460150622934], [-67.100679083917726, 18.520601101144347], [-66.2824344550082, 18.51476166429536]]] } }, - { "type": "Feature", "properties": { "admin": "North Korea", "name": "Dem. Rep. Korea", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[130.640015903852401, 42.39500946712527], [130.780007358931101, 42.220007229168843], [130.400030552288996, 42.280003567059701], [129.965948521037234, 41.941367906251052], [129.667362095254788, 41.601104437825221], [129.705189243692445, 40.882827867184318], [129.188114862179958, 40.661807766271984], [129.010399611528186, 40.485436102859801], [128.633368361526692, 40.189846910150301], [127.967414178581322, 40.025412502597547], [127.533435500194145, 39.756850083976694], [127.502119582225276, 39.323930772451526], [127.385434198110261, 39.213472398427648], [127.783342726757709, 39.050898342437414], [128.349716424676586, 38.612242946927843], [128.205745884311426, 38.370397243801882], [127.780035435090966, 38.304535630845884], [127.073308547067342, 38.256114813788393], [126.683719924018888, 37.804772854151174], [126.237338901881742, 37.840377916000271], [126.174758742376213, 37.749685777328033], [125.689103631697165, 37.940010077459014], [125.568439162295675, 37.752088731429616], [125.275330438336184, 37.66907054295271], [125.24008711151312, 37.857224432927424], [124.981033156433952, 37.948820909164773], [124.712160679219352, 38.108346055649783], [124.985994093933954, 38.548474229479673], [125.221948683778677, 38.665857245430665], [125.13285851450749, 38.848559271798578], [125.386589797060566, 39.387957872061158], [125.321115757346774, 39.551384589184202], [124.737482131042384, 39.660344346671614], [124.265624627785286, 39.928493353834149], [125.079941847840615, 40.569823716792442], [126.182045119329402, 41.107336127276362], [126.86908328664984, 41.816569322266176], [127.343782993682993, 41.50315176041596], [128.208433058790632, 41.466771552082477], [128.052215203972281, 41.994284572917934], [129.59666873587949, 42.424981797854542], [129.994267205933198, 42.985386867843779], [130.640015903852401, 42.39500946712527]]] } }, - { "type": "Feature", "properties": { "admin": "Portugal", "name": "Portugal", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[-9.034817674180244, 41.880570583659669], [-8.671945766626719, 42.134689439454952], [-8.26385698081779, 42.280468654950326], [-8.01317460776991, 41.790886135417118], [-7.422512986673794, 41.792074693359822], [-7.251308966490822, 41.91834605566504], [-6.668605515967655, 41.883386949219577], [-6.389087693700914, 41.381815497394641], [-6.851126674822551, 41.111082668617513], [-6.864019944679383, 40.330871893874821], [-7.026413133156593, 40.184524237624238], [-7.066591559263527, 39.711891587882768], [-7.498632371439724, 39.629571031241802], [-7.098036668313126, 39.03007274022378], [-7.374092169616317, 38.373058580064914], [-7.029281175148794, 38.075764065089757], [-7.166507941099863, 37.803894354802217], [-7.537105475281022, 37.428904323876232], [-7.45372555177809, 37.097787583966053], [-7.855613165711985, 36.838268540996253], [-8.382816127953687, 36.978880113262449], [-8.898856980820325, 36.868809312480771], [-8.746101446965552, 37.6513455266766], [-8.839997524439879, 38.266243394517609], [-9.287463751655221, 38.358485826158592], [-9.526570603869713, 38.737429104154906], [-9.44698889814023, 39.392066148428363], [-9.048305223008425, 39.755093085278766], [-8.977353481471679, 40.159306138665798], [-8.7686840478771, 40.76063894303018], [-8.790853237330309, 41.18433401139125], [-8.990789353867568, 41.543459377603625], [-9.034817674180244, 41.880570583659669]]] } }, - { "type": "Feature", "properties": { "admin": "Paraguay", "name": "Paraguay", "continent": "South America" }, "geometry": { "type": "Polygon", "coordinates": [[[-62.685057135657871, -22.24902922942238], [-62.291179368729203, -21.051634616787389], [-62.265961269770784, -20.513734633061272], [-61.786326463453761, -19.633736667562957], [-60.043564622626477, -19.342746677327419], [-59.11504248720609, -19.356906019775398], [-58.183471442280492, -19.868399346600359], [-58.166392381408038, -20.176700941653674], [-57.870673997617786, -20.732687676681948], [-57.937155727761287, -22.090175876557169], [-56.881509568902885, -22.282153822521476], [-56.473317430229379, -22.086300144135279], [-55.797958136606894, -22.356929620047815], [-55.61068274598113, -22.655619398694839], [-55.517639329639621, -23.57199757252663], [-55.400747239795407, -23.956935316668797], [-55.027901780809543, -24.001273695575225], [-54.652834235235119, -23.839578138933955], [-54.292959560754511, -24.021014092710722], [-54.293476325077435, -24.570799655863958], [-54.428946092330577, -25.162184747012162], [-54.625290696823562, -25.739255466415507], [-54.788794928595038, -26.621785577096126], [-55.695845506398143, -27.387837009390857], [-56.486701626192989, -27.548499037386286], [-57.609759690976134, -27.395898532828383], [-58.618173590719735, -27.123718763947089], [-57.633660040911117, -25.603656508081638], [-57.777217169817924, -25.162339776309032], [-58.807128465394968, -24.771459242453307], [-60.028966030504016, -24.032796319273267], [-60.846564704009907, -23.880712579038288], [-62.685057135657871, -22.24902922942238]]] } }, - { "type": "Feature", "properties": { "admin": "Palestine", "name": "Palestine", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[35.545665317534535, 32.393992011030569], [35.545251906076196, 31.782504787720832], [35.397560662586038, 31.489086005167572], [34.927408481594554, 31.35343537040141], [34.970506626125989, 31.616778469360803], [35.225891554512422, 31.754341132121759], [34.974640740709319, 31.866582343059715], [35.183930291491428, 32.532510687788935], [35.545665317534535, 32.393992011030569]]] } }, - { "type": "Feature", "properties": { "admin": "Qatar", "name": "Qatar", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[50.810108270069563, 24.754742539971371], [50.743910760303677, 25.482424221289389], [51.01335167827348, 26.006991685484191], [51.286461622936045, 26.114582017515865], [51.589078810437243, 25.801112779233375], [51.606700473848804, 25.215670477798735], [51.389607781790623, 24.627385972588051], [51.112415398977006, 24.556330878186721], [50.810108270069563, 24.754742539971371]]] } }, - { "type": "Feature", "properties": { "admin": "Romania", "name": "Romania", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[22.710531447040488, 47.882193915389394], [23.142236362406798, 48.096341050806942], [23.760958286237404, 47.985598456405448], [24.402056105250374, 47.981877753280422], [24.866317172960571, 47.737525743188307], [25.207743361112986, 47.891056423527459], [25.945941196402394, 47.987148749374207], [26.197450392366925, 48.220881252630342], [26.619336785597788, 48.220726223333457], [26.924176059687561, 48.123264472030982], [27.233872918412736, 47.826770941756365], [27.551166212684841, 47.405117092470817], [28.128030226359037, 46.81047638608824], [28.160017937947707, 46.371562608417207], [28.054442986775392, 45.944586086605618], [28.233553501099035, 45.488283189468369], [28.679779493939371, 45.30403087013169], [29.149724969201646, 45.464925442072442], [29.603289015427425, 45.293308010431119], [29.62654340995876, 45.035390936862392], [29.141611769331831, 44.820210272799038], [28.837857700320196, 44.913873806328041], [28.55808149589199, 43.707461656258118], [27.970107049275068, 43.812468166675202], [27.242399529740904, 44.175986029632398], [26.065158725699739, 43.943493760751259], [25.569271681426923, 43.688444729174712], [24.100679152124169, 43.741051337247846], [23.332302280376322, 43.897010809904707], [22.94483239105184, 43.823785305347123], [22.657149692482985, 44.234923000661276], [22.474008416440594, 44.409227606781762], [22.705725538837349, 44.578002834647016], [22.459022251075933, 44.702517198254291], [22.145087924902807, 44.478422349620573], [21.562022739353605, 44.768947251965486], [21.483526238702233, 45.181170152357772], [20.874312778413351, 45.416375433934228], [20.76217492033998, 45.734573065771428], [20.220192498462833, 46.127468980486547], [21.021952345471245, 46.316087958351886], [21.626514926853869, 46.994237779318148], [22.09976769378283, 47.672439276716695], [22.710531447040488, 47.882193915389394]]] } }, - { "type": "Feature", "properties": { "admin": "Russia", "name": "Russia", "continent": "Europe" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[143.648007440362846, 50.747600409541512], [144.65414757708561, 48.976390692737581], [143.173927850517174, 49.306551418650365], [142.558668247650076, 47.861575018904908], [143.533492466404027, 46.836728013692479], [143.505277134372591, 46.137907619809475], [142.747700636973889, 46.740764878926562], [142.092030064054484, 45.966755276058777], [141.906925083585008, 46.805928860046535], [142.018442824470867, 47.780132961612921], [141.904444614835029, 48.859188544299563], [142.135800002205656, 49.615163072297449], [142.179983351815281, 50.952342434281903], [141.594075962490024, 51.935434882202529], [141.682546014573632, 53.301966457728767], [142.606934035410745, 53.762145087287891], [142.209748976815376, 54.225475979216853], [142.654786411712934, 54.365880845753864], [142.914615513276544, 53.704577541714734], [143.260847609632037, 52.740760403039033], [143.235267775647628, 51.756660264688733], [143.648007440362846, 50.747600409541512]]], [[[22.731098667092649, 54.327536932993311], [20.892244500418652, 54.312524929412568], [19.6606400896064, 54.42608388937397], [19.88848147958134, 54.866160386771483], [21.268448927503492, 55.190481675835279], [22.315723504330599, 55.015298570365886], [22.757763706155281, 54.856574408581416], [22.651051873472564, 54.582740993866693], [22.731098667092649, 54.327536932993311]]], [[[180.000000000000114, 70.832199208546669], [178.903425, 70.78114], [178.7253, 71.0988], [180.000000000000114, 71.515714336428246], [180.000000000000114, 70.832199208546669]]], [[[143.60385, 73.21244], [142.08763, 73.20544], [140.038155, 73.31692], [139.86312, 73.36983], [140.81171, 73.76506], [142.06207, 73.85758], [143.48283, 73.47525], [143.60385, 73.21244]]], [[[150.73167, 75.08406], [149.575925, 74.68892], [147.977465, 74.778355], [146.11919, 75.17298], [146.358485, 75.49682], [148.22223, 75.345845], [150.73167, 75.08406]]], [[[145.086285, 75.562625], [144.3, 74.82], [140.61381, 74.84768], [138.95544, 74.61148], [136.97439, 75.26167], [137.51176, 75.94917], [138.831075, 76.13676], [141.471615, 76.09289], [145.086285, 75.562625]]], [[[57.535692579992386, 70.720463975702145], [56.944979282463933, 70.63274323188665], [53.677375115784187, 70.762657782668455], [53.412016635965372, 71.206661688920192], [51.601894565645708, 71.474759019650477], [51.455753615124209, 72.014881089965129], [52.478275180883564, 72.229441636840946], [52.444168735570841, 72.77473135038484], [54.427613559797649, 73.627547512497571], [53.508289829325136, 73.749813951300141], [55.902458937407644, 74.627486477345329], [55.631932814359701, 75.081412258597155], [57.868643833248839, 75.609390367323186], [61.170044386647497, 76.251883450008123], [64.498368361270209, 76.439055487769267], [66.210977003855092, 76.809782213031227], [68.157059767534818, 76.939696763812904], [68.852211134725124, 76.544811306454605], [68.180572544227644, 76.233641669409096], [64.637326287703004, 75.737754625136219], [61.583507521414752, 75.260884507946784], [58.477082147053366, 74.309056301562819], [56.986785516187993, 73.333043524866227], [55.41933597191094, 72.371267605265956], [55.622837762276291, 71.540594794390316], [57.535692579992386, 70.720463975702145]]], [[[106.970130000000111, 76.97419], [107.240000000000123, 76.48], [108.1538, 76.723350000000138], [111.077260000000138, 76.71], [113.33151, 76.22224], [114.13417, 75.84764], [113.88539, 75.327790000000121], [112.77918, 75.03186], [110.151250000000175, 74.47673], [109.4, 74.18], [110.64, 74.04], [112.11919, 73.787740000000113], [113.019540000000234, 73.976930000000138], [113.529580000000294, 73.33505], [113.96881, 73.59488], [115.56782, 73.75285], [118.776330000000215, 73.58772], [119.02, 73.12], [123.20066, 72.97122], [123.257770000000178, 73.73503], [125.380000000000166, 73.56], [126.97644, 73.56549], [128.59126, 73.03871], [129.05157, 72.39872], [128.46, 71.98], [129.715990000000204, 71.19304], [131.288580000000252, 70.786990000000102], [132.253500000000145, 71.8363], [133.857660000000294, 71.386420000000143], [135.56193, 71.655250000000123], [137.49755, 71.34763], [138.234090000000123, 71.62803], [139.86983, 71.487830000000116], [139.14791, 72.4161900000001], [140.46817, 72.849410000000134], [149.5, 72.2], [150.35118000000017, 71.60643], [152.96890000000019, 70.84222], [157.00688, 71.03141], [158.99779, 70.86672], [159.830310000000225, 70.45324], [159.70866, 69.72198], [160.94053000000028, 69.43728], [162.279070000000104, 69.64204], [164.05248, 69.66823], [165.940370000000172, 69.47199], [167.83567, 69.58269], [169.57763000000017, 68.6938], [170.816880000000253, 69.01363], [170.008200000000159, 69.65276], [170.453450000000259, 70.09703], [173.643910000000204, 69.81743], [175.72403000000017, 69.877250000000217], [178.6, 69.4], [180.000000000000114, 68.963636363636553], [180.000000000000114, 64.979708702198465], [179.99281, 64.97433], [178.707200000000199, 64.53493], [177.411280000000147, 64.60821], [178.313000000000187, 64.07593], [178.90825000000018, 63.251970000000128], [179.37034, 62.98262], [179.48636, 62.56894], [179.228250000000116, 62.304100000000133], [177.3643, 62.5219], [174.569290000000194, 61.76915], [173.68013, 61.65261], [172.15, 60.95], [170.6985, 60.33618], [170.330850000000282, 59.88177], [168.90046, 60.57355], [166.294980000000265, 59.7885500000002], [165.840000000000202, 60.16], [164.87674, 59.7316], [163.539290000000108, 59.86871], [163.217110000000218, 59.21101], [162.01733, 58.24328], [162.05297, 57.83912], [163.19191, 57.61503], [163.057940000000144, 56.159240000000111], [162.129580000000203, 56.12219], [161.70146, 55.285680000000148], [162.117490000000117, 54.85514], [160.368770000000325, 54.34433], [160.021730000000218, 53.20257], [158.530940000000157, 52.958680000000236], [158.23118, 51.94269], [156.789790000000266, 51.01105], [156.42000000000013, 51.7], [155.99182, 53.15895], [155.43366, 55.381030000000109], [155.914420000000291, 56.767920000000132], [156.75815, 57.3647], [156.81035, 57.83204], [158.364330000000166, 58.05575], [160.150640000000124, 59.314770000000109], [161.87204, 60.343000000000117], [163.66969, 61.1409], [164.473550000000103, 62.55061], [163.258420000000172, 62.46627], [162.65791, 61.6425], [160.12148, 60.54423], [159.30232, 61.77396], [156.72068, 61.43442], [154.218060000000293, 59.758180000000117], [155.04375, 59.14495], [152.81185, 58.88385], [151.265730000000246, 58.78089], [151.33815, 59.50396], [149.78371, 59.655730000000126], [148.54481, 59.16448], [145.48722, 59.33637], [142.197820000000121, 59.03998], [138.958480000000293, 57.08805], [135.12619, 54.72959], [136.70171, 54.603550000000112], [137.19342, 53.97732], [138.1647, 53.755010000000247], [138.80463, 54.25455], [139.90151, 54.189680000000166], [141.34531, 53.089570000000109], [141.37923, 52.23877], [140.59742000000017, 51.23967], [140.51308, 50.045530000000113], [140.061930000000189, 48.446710000000152], [138.554720000000202, 46.99965], [138.21971, 46.30795], [136.86232, 45.143500000000174], [135.515350000000183, 43.989], [134.869390000000237, 43.39821], [133.536870000000249, 42.81147], [132.90627, 42.79849], [132.278070000000241, 43.284560000000106], [130.935870000000136, 42.55274], [130.78, 42.220000000000191], [130.640000000000157, 42.395], [130.633866408409801, 42.903014634770543], [131.144687941614961, 42.929989732426932], [131.288555129115593, 44.111519680348252], [131.025190000000237, 44.96796], [131.883454217659562, 45.321161607436508], [133.097120000000189, 45.14409], [133.769643996313164, 46.116926988299149], [134.112350000000163, 47.212480000000127], [134.50081, 47.578450000000139], [135.026311476786759, 48.478229885443902], [133.373595819228001, 48.183441677434836], [132.506690000000106, 47.78896], [130.987260000000106, 47.79013], [130.582293328982644, 48.72968740497619], [129.397817824420486, 49.4406000840156], [127.657400000000351, 49.76027], [127.287455682484904, 50.739797268265434], [126.939156528837827, 51.353894151405896], [126.564399041856959, 51.784255479532689], [125.946348911646439, 52.792798570356936], [125.068211297710434, 53.161044826868924], [123.57147, 53.4588], [122.245747918793043, 53.431725979213681], [121.003084751470354, 53.251401068731226], [120.177088657716865, 52.753886216841195], [120.725789015791975, 52.516226304730893], [120.7382, 51.96411], [120.182080000000155, 51.64355], [119.27939, 50.58292], [119.288460728025839, 50.142882798861947], [117.87924441942647, 49.510983384797036], [116.67880089728618, 49.888531399121398], [115.485695428531415, 49.805177313834733], [114.962109816550353, 50.140247300815119], [114.362456496235325, 50.24830272073747], [112.897739699354361, 49.543565375356984], [111.581230910286649, 49.377968248077671], [110.662010532678835, 49.130128078805846], [109.402449171996707, 49.292960516957685], [108.475167270951275, 49.282547715850704], [107.868175897251092, 49.793705145865871], [106.888804152455293, 50.274295966180276], [105.886591424586868, 50.40601919209216], [104.62158, 50.275320000000157], [103.676545444760336, 50.08996613219513], [102.25589, 50.510560000000105], [102.06521, 51.25991], [100.889480421962631, 51.516855780638409], [99.981732212323564, 51.63400625264395], [98.861490513100492, 52.047366034546698], [97.82573978067451, 51.010995184933236], [98.231761509191699, 50.422400621128716], [97.259760000000199, 49.72605], [95.814020000000156, 49.977460000000114], [94.815949334698757, 50.01343333597088], [94.147566359435601, 50.480536607457161], [93.10421, 50.49529], [92.234711541719676, 50.802170722041737], [90.713667433640765, 50.331811835321098], [88.805566847695573, 49.470520738312459], [87.751264276076824, 49.297197984405543], [87.359970330762692, 49.214980780629148], [86.829356723989648, 49.826674709668133], [85.541269972682485, 49.69285858824815], [85.115559523462082, 50.117302964877631], [84.416377394553038, 50.311399644565817], [83.935114780618903, 50.889245510453563], [83.383003778012451, 51.069182847693881], [81.945985548839943, 50.812195949906325], [80.568446893235446, 51.388336493528435], [80.035559523441705, 50.864750881547209], [77.80091556184432, 53.404414984747532], [76.525179477854749, 54.177003485727127], [76.891100294913443, 54.490524400441913], [74.384820000000119, 53.546850000000113], [73.425678745420512, 53.489810289109741], [73.50851606638436, 54.035616766976588], [72.224150018202195, 54.376655381886778], [71.180131056609468, 54.133285224008247], [70.86526655465515, 55.169733588270091], [69.068166945272893, 55.385250149143488], [68.169100376258896, 54.970391750704366], [65.66687, 54.601250000000149], [65.178533563095939, 54.354227810272064], [61.436600000000126, 54.00625], [60.978066440683236, 53.664993394579128], [61.69998619980062, 52.979996446334255], [60.73999311711453, 52.719986477257734], [60.927268507740237, 52.447548326214999], [59.967533807215567, 51.96042043721566], [61.588003371024136, 51.272658799843171], [61.337424350840998, 50.799070136104248], [59.932807244715555, 50.842194118851822], [59.642282342370564, 50.545442206415707], [58.363320000000122, 51.06364], [56.77798, 51.04355], [55.71694, 50.621710000000142], [54.532878452376181, 51.026239732459359], [52.328723585831042, 51.718652248738088], [50.766648390512174, 51.692762356159861], [48.702381626181044, 50.605128485712825], [48.577841424357601, 49.87475962991563], [47.549480421749379, 50.454698391311119], [46.751596307162764, 49.356005764353725], [47.043671502476585, 49.152038886097571], [46.466445753776291, 48.394152330104923], [47.315240000000152, 47.71585], [48.05725, 47.74377], [48.694733514201872, 47.075628160177885], [48.59325000000014, 46.56104], [49.101160000000121, 46.39933], [48.645410000000105, 45.80629], [47.67591, 45.641490000000111], [46.68201, 44.6092], [47.59094, 43.660160000000118], [47.49252, 42.98658], [48.58437000000017, 41.80888], [47.987283156126033, 41.405819200194387], [47.815665724484653, 41.151416124021338], [47.373315464066387, 41.219732367511135], [46.686070591016708, 41.827137152669899], [46.404950799348924, 41.860675157227426], [45.7764, 42.092440000000224], [45.470279168485909, 42.502780666670041], [44.537622918482057, 42.711992702803677], [43.93121, 42.554960000000101], [43.755990000000182, 42.74083], [42.394400000000154, 43.2203], [40.922190000000128, 43.382150000000131], [40.076964959479838, 43.553104153002486], [39.95500857927108, 43.434997666999287], [38.68, 44.28], [37.539120000000104, 44.65721], [36.675460000000122, 45.24469], [37.40317, 45.40451], [38.23295, 46.24087], [37.67372, 46.63657], [39.14767, 47.044750000000128], [39.121200000000123, 47.26336], [38.22353803889947, 47.102189846375971], [38.2551123390298, 47.546400458356956], [38.77057, 47.825620000000228], [39.738277622238982, 47.898937079452068], [39.895620000000136, 48.23241], [39.67465, 48.783820000000127], [40.080789015469477, 49.307429917999364], [40.069040000000108, 49.60105], [38.594988234213552, 49.926461900423718], [38.010631137857068, 49.915661526074715], [37.393459506995228, 50.383953355503664], [36.626167840325387, 50.225590928745127], [35.35611616388811, 50.577197374059139], [35.37791, 50.77394], [35.02218305841793, 51.207572333371495], [34.224815708154402, 51.255993150428921], [34.141978387190612, 51.56641347920619], [34.391730584457228, 51.768881740925892], [33.75269982273587, 52.335074571331646], [32.715760532367163, 52.238465481162159], [32.412058139787767, 52.288694973349763], [32.15944000000021, 52.061250000000101], [31.78597, 52.10168], [31.540018344862254, 52.742052313846429], [31.305200636527978, 53.073995876673301], [31.49764, 53.167430000000124], [32.304519484188368, 53.132726141972839], [32.693643019346119, 53.351420803432141], [32.405598585751157, 53.618045355842], [31.731272820774585, 53.794029446012011], [31.791424187962399, 53.974638576872181], [31.384472283663818, 54.157056382862365], [30.757533807098774, 54.811770941784388], [30.971835971813245, 55.08154775656412], [30.873909132620064, 55.55097646750351], [29.896294386522435, 55.789463202530484], [29.371571893030783, 55.670090643936263], [29.229513380660389, 55.918344224666399], [28.176709425577933, 56.169129950578778], [27.855282016722519, 56.759326483784363], [27.770015903440985, 57.244258124411189], [27.288184848751648, 57.474528306703903], [27.716685825315771, 57.791899115624439], [27.420150000000202, 58.724570000000128], [28.131699253051856, 59.300825100330982], [27.98112, 59.47537], [29.1177, 60.028050000000107], [28.07, 60.503520000000137], [30.211107212044645, 61.780027777749673], [31.139991082491029, 62.357692776124431], [31.516092156711263, 62.867687486412898], [30.035872430142796, 63.552813625738551], [30.444684686003736, 64.204453436939062], [29.544429559047014, 64.948671576590542], [30.21765, 65.80598], [29.054588657352376, 66.944286200622017], [29.977426385220689, 67.69829702419274], [28.445943637818765, 68.364612942163987], [28.591929559043358, 69.064776923286686], [29.39955, 69.15692000000017], [31.101080000000103, 69.55811], [32.132720000000255, 69.905950000000232], [33.77547, 69.301420000000107], [36.51396, 69.06342], [40.292340000000159, 67.9324], [41.059870000000124, 67.457130000000106], [41.125950000000174, 66.79158000000011], [40.01583, 66.266180000000119], [38.38295, 65.99953], [33.918710000000168, 66.75961], [33.18444, 66.63253], [34.81477, 65.900150000000124], [34.87857425307876, 65.436212877048192], [34.943910000000152, 64.414370000000147], [36.23129, 64.10945], [37.012730000000111, 63.84983], [37.141970000000143, 64.33471], [36.539579035089801, 64.76446], [37.176040000000135, 65.143220000000113], [39.59345, 64.520790000000162], [40.4356, 64.76446], [39.762600000000148, 65.49682], [42.09309, 66.47623], [43.01604000000011, 66.41858], [43.94975000000013, 66.06908], [44.53226, 66.756340000000122], [43.69839, 67.35245], [44.187950000000136, 67.95051], [43.45282, 68.57079], [46.250000000000135, 68.25], [46.821340000000156, 67.68997], [45.55517, 67.56652], [45.56202, 67.010050000000192], [46.349150000000137, 66.66767], [47.894160000000248, 66.884550000000146], [48.13876, 67.52238], [50.227660000000142, 67.998670000000132], [53.717430000000164, 68.85738], [54.47171, 68.80815], [53.485820000000118, 68.20131], [54.72628, 68.09702], [55.442680000000124, 68.43866], [57.317020000000149, 68.46628], [58.802000000000206, 68.88082], [59.941420000000178, 68.27844], [61.077840000000165, 68.94069], [60.03, 69.52], [60.55, 69.85], [63.504000000000147, 69.54739], [64.888115, 69.234835000000132], [68.512160000000108, 68.09233000000016], [69.18068, 68.61563000000011], [68.16444, 69.14436], [68.13522, 69.35649], [66.930080000000103, 69.454610000000102], [67.25976, 69.92873], [66.724920000000125, 70.708890000000125], [66.69466, 71.028970000000228], [68.540060000000111, 71.934500000000227], [69.19636, 72.843360000000146], [69.94, 73.04000000000012], [72.58754, 72.77629], [72.79603, 72.22006], [71.84811, 71.40898], [72.47011, 71.09019], [72.79188, 70.39114], [72.564700000000201, 69.02085], [73.66787, 68.4079], [73.2387, 67.7404], [71.280000000000101, 66.320000000000149], [72.423010000000147, 66.172670000000167], [72.82077, 66.53267], [73.920990000000131, 66.789460000000119], [74.186510000000183, 67.28429], [75.052, 67.760470000000154], [74.469260000000148, 68.32899], [74.93584, 68.98918], [73.84236, 69.07146], [73.601870000000204, 69.62763], [74.3998, 70.63175], [73.1011, 71.447170000000241], [74.890820000000204, 72.12119], [74.65926, 72.83227], [75.158010000000175, 72.854970000000108], [75.68351, 72.300560000000118], [75.288980000000109, 71.33556], [76.35911, 71.152870000000135], [75.903130000000161, 71.87401], [77.5766500000001, 72.26717], [79.652020000000107, 72.32011], [81.5, 71.75], [80.61071, 72.582850000000107], [80.51109, 73.6482], [82.25, 73.85], [84.65526, 73.805910000000154], [86.822300000000226, 73.93688], [86.00956, 74.459670000000145], [87.166820000000143, 75.11643], [88.31571, 75.14393], [90.26, 75.64], [92.90058, 75.77333], [93.234210000000132, 76.0472], [95.860000000000127, 76.14], [96.67821, 75.91548], [98.922540000000197, 76.44689], [100.759670000000199, 76.43028], [101.03532, 76.86189], [101.990840000000105, 77.287540000000192], [104.3516, 77.69792], [106.066640000000135, 77.37389], [104.705000000000211, 77.1274], [106.970130000000111, 76.97419]]], [[[105.07547, 78.30689], [99.43814, 77.921], [101.2649, 79.23399], [102.08635, 79.34641], [102.837815, 79.28129], [105.37243, 78.71334], [105.07547, 78.30689]]], [[[51.136186557831266, 80.54728017854093], [49.793684523320692, 80.415427761548202], [48.894411248577526, 80.33956675894369], [48.75493655782175, 80.175468248200829], [47.586119012244147, 80.010181179515328], [46.502825962109647, 80.247246812654339], [47.072455275262897, 80.559424140129451], [44.846958042181107, 80.589809882317169], [46.799138624871226, 80.771917629713627], [48.31847741068465, 80.784009914869927], [48.52280602396668, 80.514568996900138], [49.097189568890897, 80.753985907708412], [50.039767693894603, 80.918885403151791], [51.522932977103679, 80.699725653801906], [51.136186557831266, 80.54728017854093]]], [[[99.93976, 78.88094], [97.75794, 78.7562], [94.97259, 79.044745], [93.31288, 79.4265], [92.5454, 80.14379], [91.18107, 80.34146], [93.77766, 81.0246], [95.940895, 81.2504], [97.88385, 80.746975], [100.186655, 79.780135], [99.93976, 78.88094]]]] } }, - { "type": "Feature", "properties": { "admin": "Rwanda", "name": "Rwanda", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[30.419104852019235, -1.134659112150416], [30.816134881317705, -1.698914076345388], [30.758308953583104, -2.287250257988368], [30.469696079232978, -2.413857517103458], [29.938359002407935, -2.348486830254238], [29.632176141078585, -2.917857761246096], [29.02492638521678, -2.839257907730157], [29.117478875451546, -2.292211195488384], [29.254834832483336, -2.215109958508911], [29.29188683443661, -1.620055840667987], [29.579466180140876, -1.341313164885626], [29.821518588996003, -1.443322442229785], [30.419104852019235, -1.134659112150416]]] } }, - { "type": "Feature", "properties": { "admin": "Western Sahara", "name": "W. Sahara", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[-8.794883999049075, 27.120696316022503], [-8.81782833498667, 27.656425889592349], [-8.665589565454805, 27.656425889592349], [-8.66512447756419, 27.58947907155822], [-8.684399786809051, 27.395744126895998], [-8.687293667017398, 25.881056219988899], [-11.969418911171159, 25.933352769468261], [-11.93722449385332, 23.374594224536164], [-12.874221564169574, 23.284832261645171], [-13.118754441774708, 22.771220201096249], [-12.929101935263528, 21.327070624267559], [-16.845193650773989, 21.333323472574875], [-17.063423224342568, 20.99975210213082], [-17.020428432675736, 21.422310288981475], [-17.002961798561085, 21.420734157796574], [-14.750954555713532, 21.50060008390366], [-14.630832688851068, 21.860939846274899], [-14.221167771857251, 22.310163072188153], [-13.891110398809044, 23.691009019459297], [-12.500962693725368, 24.770116278578193], [-12.030758836301613, 26.030866197203036], [-11.718219773800353, 26.104091701760616], [-11.392554897496977, 26.883423977154358], [-10.551262579785272, 26.990807603456879], [-10.18942420087758, 26.860944729107398], [-9.735343390328877, 26.860944729107398], [-9.413037482124464, 27.088476060488514], [-8.794883999049075, 27.120696316022503]]] } }, - { "type": "Feature", "properties": { "admin": "Saudi Arabia", "name": "Saudi Arabia", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[42.779332309750963, 16.34789134364868], [42.64957278826607, 16.77463532151496], [42.347989129410706, 17.075805568911996], [42.270887892431219, 17.474721787989122], [41.754381951673949, 17.833046169500971], [41.221391229015573, 18.671599636301206], [40.939341261566533, 19.486485297111752], [40.247652215339819, 20.174634507726488], [39.801684604660934, 20.338862209550054], [39.139399448408277, 21.29190481209293], [39.023695916506782, 21.986875311770191], [39.066328973147577, 22.579655666590263], [38.492772251140075, 23.688451036060851], [38.023860304523616, 24.078685614512928], [37.483634881344379, 24.285494696545008], [37.154817742671177, 24.858482977797301], [37.209491408035994, 25.084541530858104], [36.931627231602583, 25.602959499610172], [36.639603712721218, 25.826227525327219], [36.249136590323808, 26.570135606384873], [35.640181512196385, 27.376520494083415], [35.130186801907875, 28.063351955674712], [34.632336053207972, 28.058546047471559], [34.787778761541936, 28.607427273059692], [34.832220493312938, 28.957483425404838], [34.956037225084252, 29.356554673778835], [36.068940870922049, 29.19749461518445], [36.501214227043583, 29.505253607698702], [36.740527784987243, 29.865283311476183], [37.503581984209028, 30.003776150018396], [37.668119744626374, 30.338665269485894], [37.998848911294367, 30.508499864213128], [37.002165561681004, 31.508412990844736], [39.004885695152545, 32.010216986614971], [39.195468377444961, 32.16100881604266], [40.399994337736238, 31.889991766887931], [41.889980910007829, 31.190008653278362], [44.709498732284736, 29.178891099559376], [46.568713413281742, 29.099025173452283], [47.459821811722819, 29.002519436147217], [47.708850538937376, 28.526062730416136], [48.416094191283939, 28.552004299426663], [48.807594842327163, 27.689627997339876], [49.299554477745815, 27.461218166609804], [49.470913527225647, 27.109999294538078], [50.152422316290874, 26.689663194275994], [50.212935418504671, 26.277026882425371], [50.113303257045928, 25.943972276304248], [50.23985883972874, 25.608049628190923], [50.527386509000728, 25.327808335872099], [50.660556675016885, 24.999895534764018], [50.810108270069563, 24.754742539971371], [51.112415398977006, 24.556330878186721], [51.389607781790623, 24.627385972588051], [51.579518670463258, 24.245497137951102], [51.617707553926969, 24.014219265228824], [52.000733270074321, 23.001154486578937], [55.006803012924898, 22.496947536707129], [55.208341098863187, 22.708329982997039], [55.666659376859812, 22.000001125572336], [54.999981723862355, 19.999994004796104], [52.000009800022227, 19.000003363516054], [49.116671583864857, 18.616667588774941], [48.183343540241324, 18.166669216377311], [47.466694777217626, 17.116681626854877], [47.000004917189749, 16.949999294497438], [46.749994337761642, 17.283338120996174], [46.366658563020529, 17.233315334537632], [45.399999220568752, 17.333335069238554], [45.216651238797184, 17.43332896572333], [44.062613152855072, 17.410358791569589], [43.791518589051904, 17.319976711491105], [43.380794305196098, 17.579986680567668], [43.115797560403351, 17.088440456607369], [43.218375278502734, 16.666889960186406], [42.779332309750963, 16.34789134364868]]] } }, - { "type": "Feature", "properties": { "admin": "Sudan", "name": "Sudan", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[33.963392794971178, 9.464285229420623], [33.824963480907506, 9.48406084571536], [33.842130853028145, 9.981914637215992], [33.721959248183097, 10.325262079630191], [33.206938084561777, 10.720111638406591], [33.086766479716729, 11.441141267476493], [33.206938084561777, 12.179338268667093], [32.743419037302537, 12.24800775714999], [32.674749548819641, 12.024831919580716], [32.073891524594778, 11.973329803218517], [32.314234734284746, 11.681484477166519], [32.400071594888338, 11.080626452941486], [31.850715687025509, 10.531270545078822], [31.352861895524875, 9.810240916008693], [30.837840731903377, 9.707236683284519], [29.996639497988546, 10.290927335388684], [29.618957311332842, 10.084918869940223], [29.515953078608607, 9.793073543888053], [29.000931914987166, 9.604232450560287], [28.966597170745779, 9.398223985111654], [27.970889587744345, 9.398223985111654], [27.833550610778783, 9.604232450560287], [27.112520981708876, 9.638567194801622], [26.752006167173811, 9.466893473594492], [26.477328213242508, 9.552730334198086], [25.96230704962101, 10.136420986302422], [25.790633328413943, 10.411098940233726], [25.069603699343979, 10.27375996326799], [24.79492574541268, 9.810240916008693], [24.537415163602017, 8.917537565731719], [24.194067721187643, 8.728696472403895], [23.886979580860665, 8.619729712933063], [23.805813429466745, 8.666318874542522], [23.459012892355979, 8.954285793489019], [23.394779087017291, 9.26506785729225], [23.557249790142915, 9.681218166538766], [23.554304233502187, 10.089255275915319], [22.977543572692749, 10.714462591998538], [22.864165480244246, 11.142395127807616], [22.87622, 11.384610000000119], [22.50869, 11.67936], [22.49762, 12.26024], [22.28801, 12.64605], [21.93681, 12.588180000000133], [22.03759, 12.95546], [22.29658, 13.37232], [22.18329, 13.78648], [22.51202, 14.09318], [22.30351, 14.32682], [22.567950000000106, 14.944290000000134], [23.02459, 15.68072], [23.886890000000101, 15.61084], [23.837660000000135, 19.580470000000101], [23.850000000000129, 20.0], [25.00000000000011, 20.00304], [25.00000000000011, 22.0], [29.02, 22.0], [32.9, 22.0], [36.86623, 22.0], [37.18872, 21.01885], [36.96941, 20.837440000000125], [37.114700000000134, 19.80796], [37.48179, 18.61409], [37.86276, 18.36786], [38.410089959473218, 17.998307399970312], [37.904000000000103, 17.42754], [37.16747, 17.263140000000128], [36.852530000000108, 16.95655], [36.75389, 16.29186], [36.32322, 14.82249], [36.42951, 14.42211], [36.27022, 13.563330000000118], [35.86363, 12.57828], [35.26049, 12.08286], [34.831630000000125, 11.318960000000116], [34.73115000000012, 10.910170000000106], [34.25745, 10.63009], [33.96162, 9.58358], [33.963392794971178, 9.464285229420623]]] } }, - { "type": "Feature", "properties": { "admin": "South Sudan", "name": "S. Sudan", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[33.963392794971178, 9.464285229420623], [33.97498, 8.68456], [33.82550000000014, 8.37916], [33.294800000000116, 8.35458], [32.95418, 7.7849700000001], [33.56829, 7.71334], [34.0751, 7.22595], [34.25032, 6.82607], [34.70702, 6.59422000000012], [35.298007118233095, 5.506], [34.620196267853935, 4.847122742082034], [34.005, 4.249884947362147], [33.39, 3.79], [32.68642, 3.79232], [31.881450000000136, 3.55827], [31.24556, 3.7819], [30.83385, 3.50917], [29.95349, 4.1737], [29.715995314256013, 4.600804755060152], [29.159078403446635, 4.389267279473244], [28.696677687298795, 4.455077215996993], [28.428993768026992, 4.287154649264607], [27.979977247842946, 4.408413397637388], [27.374226108517625, 5.233944403500173], [27.213409051225248, 5.550953477394613], [26.465909458123289, 5.946717434101855], [26.213418409945113, 6.546603298362127], [25.796647983511257, 6.979315904158169], [25.124130893664805, 7.500085150579422], [25.114932488716867, 7.825104071479244], [24.567369012152191, 8.229187933785452], [23.886979580860665, 8.619729712933063], [24.194067721187643, 8.728696472403895], [24.537415163602017, 8.917537565731719], [24.79492574541268, 9.810240916008693], [25.069603699343979, 10.27375996326799], [25.790633328413943, 10.411098940233726], [25.96230704962101, 10.136420986302422], [26.477328213242508, 9.552730334198086], [26.752006167173811, 9.466893473594492], [27.112520981708876, 9.638567194801622], [27.833550610778783, 9.604232450560287], [27.970889587744345, 9.398223985111654], [28.966597170745779, 9.398223985111654], [29.000931914987166, 9.604232450560287], [29.515953078608607, 9.793073543888053], [29.618957311332842, 10.084918869940223], [29.996639497988546, 10.290927335388684], [30.837840731903377, 9.707236683284519], [31.352861895524875, 9.810240916008693], [31.850715687025509, 10.531270545078822], [32.400071594888338, 11.080626452941486], [32.314234734284746, 11.681484477166519], [32.073891524594778, 11.973329803218517], [32.674749548819641, 12.024831919580716], [32.743419037302537, 12.24800775714999], [33.206938084561777, 12.179338268667093], [33.086766479716729, 11.441141267476493], [33.206938084561777, 10.720111638406591], [33.721959248183097, 10.325262079630191], [33.842130853028145, 9.981914637215992], [33.824963480907506, 9.48406084571536], [33.963392794971178, 9.464285229420623]]] } }, - { "type": "Feature", "properties": { "admin": "Senegal", "name": "Senegal", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[-16.713728807023468, 13.594958604379853], [-17.126106736712611, 14.373515733289221], [-17.625042690490655, 14.72954051356407], [-17.185172898822227, 14.91947724045286], [-16.700706346085919, 15.621527411354107], [-16.463098110407881, 16.135036119038457], [-16.120690070041928, 16.45566254319338], [-15.623666144258689, 16.369337063049809], [-15.135737270558813, 16.587282416240779], [-14.577347581428977, 16.598263658102805], [-14.099521450242175, 16.304302273010489], [-13.43573767745306, 16.039383042866188], [-12.830658331747513, 15.303691514542942], [-12.170750291380299, 14.616834214735503], [-12.124887457721256, 13.994727484589784], [-11.927716030311613, 13.422075100147392], [-11.553397793005427, 13.141213690641063], [-11.467899135778522, 12.754518947800973], [-11.513942836950587, 12.442987575729415], [-11.658300950557928, 12.386582749882834], [-12.20356482588563, 12.465647691289401], [-12.278599005573438, 12.354440008997285], [-12.499050665730561, 12.332089952031053], [-13.217818162478235, 12.575873521367964], [-13.700476040084322, 12.586182969610192], [-15.548476935274005, 12.628170070847343], [-15.816574266004251, 12.515567124883345], [-16.147716844130581, 12.547761542201185], [-16.67745195155457, 12.38485158940105], [-16.84152462408127, 13.151393947802557], [-15.931295945692208, 13.130284125211331], [-15.691000535534991, 13.270353094938455], [-15.511812506562931, 13.278569647672864], [-15.141163295949463, 13.509511623585235], [-14.712197231494626, 13.298206691943774], [-14.277701788784553, 13.28058502853224], [-13.844963344772404, 13.505041612191999], [-14.046992356817478, 13.794067898000446], [-14.376713833055785, 13.625680243377371], [-14.687030808968483, 13.63035696049978], [-15.081735398813816, 13.876491807505982], [-15.398770310924457, 13.860368760630916], [-15.624596320039936, 13.623587347869556], [-16.713728807023468, 13.594958604379853]]] } }, - { "type": "Feature", "properties": { "admin": "Solomon Islands", "name": "Solomon Is.", "continent": "Oceania" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[162.119024693040842, -10.482719008021133], [162.398645868172196, -10.826367282762119], [161.700032180018354, -10.820011081590222], [161.319796991214702, -10.204751478723123], [161.917383254237933, -10.446700534713653], [162.119024693040842, -10.482719008021133]]], [[[160.852228631837903, -9.872937106977002], [160.462588332357228, -9.89520964929484], [159.849447463214176, -9.794027194867367], [159.640002883135139, -9.639979750205269], [159.70294477766663, -9.242949720906777], [160.362956170898428, -9.400304457235533], [160.688517694337179, -9.610162448772808], [160.852228631837903, -9.872937106977002]]], [[[161.679981724289121, -9.599982191611373], [161.52939660059053, -9.784312025596433], [160.788253208660507, -8.917543226764918], [160.579997186524338, -8.320008640173965], [160.92002811100491, -8.320008640173965], [161.280006138349961, -9.120011488484449], [161.679981724289121, -9.599982191611373]]], [[[159.875027297198585, -8.337320244991714], [159.917401971677975, -8.538289890174864], [159.133677199539335, -8.114181410355398], [158.586113722974687, -7.754823500197713], [158.211149530264834, -7.421872246941147], [158.359977655265425, -7.320017998893915], [158.820001255527671, -7.56000335045739], [159.640002883135139, -8.020026950719567], [159.875027297198585, -8.337320244991714]]], [[[157.53842573468927, -7.347819919466928], [157.339419793933217, -7.404767347852554], [156.902030471014768, -7.176874281445391], [156.491357863591304, -6.765943291860394], [156.542827590153934, -6.599338474151478], [157.140000441718882, -7.021638278840653], [157.53842573468927, -7.347819919466928]]]] } }, - { "type": "Feature", "properties": { "admin": "Sierra Leone", "name": "Sierra Leone", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[-11.438779466182053, 6.785916856305746], [-11.708194545935736, 6.860098374860724], [-12.428098924193815, 7.262942002792029], [-12.949049038128193, 7.798645738145736], [-13.124025437868479, 8.163946438016977], [-13.246550258832512, 8.903048610871506], [-12.711957566773076, 9.342711696810765], [-12.596719122762206, 9.620188300001969], [-12.425928514037562, 9.835834051955953], [-12.150338100625003, 9.858571682164378], [-11.917277390988655, 10.046983954300556], [-11.117481248407328, 10.045872911006283], [-10.839151984083299, 9.688246161330367], [-10.622395188835037, 9.267910061068276], [-10.65477047366589, 8.977178452994194], [-10.494315151399629, 8.715540676300433], [-10.505477260774667, 8.348896389189603], [-10.230093553091276, 8.406205552601291], [-10.695594855176477, 7.939464016141085], [-11.14670427086838, 7.396706447779534], [-11.199801805048278, 7.105845648624735], [-11.438779466182053, 6.785916856305746]]] } }, - { "type": "Feature", "properties": { "admin": "El Salvador", "name": "El Salvador", "continent": "North America" }, "geometry": { "type": "Polygon", "coordinates": [[[-87.793111131526558, 13.384480495655051], [-87.904112108089507, 13.149016831917134], [-88.483301561216791, 13.163951320849488], [-88.843227912129692, 13.259733588102474], [-89.256742723329282, 13.4585328231293], [-89.812393561547637, 13.520622056527994], [-90.095554572290951, 13.73533763270073], [-90.064677903996568, 13.881969509328924], [-89.7219339668207, 14.134228013561694], [-89.5342193265205, 14.244815578666302], [-89.587342698916544, 14.362586167859485], [-89.353325975282772, 14.424132798719112], [-89.058511929057644, 14.340029405164085], [-88.843072882832814, 14.140506700085169], [-88.541230841815974, 13.980154730683475], [-88.50399797234968, 13.845485948130854], [-88.065342576840123, 13.964625962779774], [-87.859515347021585, 13.893312486216979], [-87.723502977229387, 13.785050360565503], [-87.793111131526558, 13.384480495655051]]] } }, - { "type": "Feature", "properties": { "admin": "Somaliland", "name": "Somaliland", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[48.938129510296491, 9.451748968946672], [48.486735874226994, 8.837626247589979], [47.78942, 8.003], [46.948328484897942, 7.996876532417386], [43.67875, 9.183580000000116], [43.296975132018744, 9.540477403191742], [42.92812, 10.021940000000139], [42.55876, 10.572580000000126], [42.776851841000948, 10.926878566934416], [43.145304803242126, 11.462039699748853], [43.470659620951658, 11.27770986576388], [43.666668328634834, 10.864169216348158], [44.117803582542805, 10.445538438351603], [44.614259067570849, 10.442205308468941], [45.556940545439133, 10.698029486529775], [46.645401238802997, 10.816549383991171], [47.525657586462778, 11.127228094929986], [48.021596307167769, 11.193063869669741], [48.378783807169263, 11.375481675660122], [48.948206414593457, 11.410621649618516], [48.942005242718423, 11.394266058798163], [48.938491245322595, 10.982327378783451], [48.938232863161076, 9.973500067581481], [48.938129510296491, 9.451748968946672]]] } }, - { "type": "Feature", "properties": { "admin": "Somalia", "name": "Somalia", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[49.72862, 11.5789], [50.25878, 11.67957], [50.73202, 12.0219], [51.1112, 12.02464], [51.13387, 11.74815], [51.04153, 11.16651], [51.04531, 10.6409], [50.83418, 10.27972], [50.55239, 9.19874], [50.07092, 8.08173], [49.4527, 6.80466], [48.59455, 5.33911], [47.74079, 4.2194], [46.56476, 2.85529], [45.56399, 2.04576], [44.06815, 1.05283], [43.13597, 0.2922], [42.04157, -0.91916], [41.81095, -1.44647], [41.58513, -1.68325], [40.993, -0.85829], [40.98105, 2.78452], [41.855083092643966, 3.918911920483726], [42.12861, 4.23413], [42.76967, 4.25259], [43.66087, 4.95755], [44.9636, 5.00162], [47.78942, 8.003], [48.486735874226937, 8.837626247589993], [48.938129510296442, 9.451748968946616], [48.938232863161026, 9.973500067581508], [48.938491245322481, 10.982327378783465], [48.942005242718345, 11.394266058798136], [48.948204758509732, 11.410617281697961], [49.26776, 11.43033], [49.72862, 11.5789]]] } }, - { "type": "Feature", "properties": { "admin": "Republic of Serbia", "name": "Serbia", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[20.874312778413408, 45.416375433934306], [21.483526238702204, 45.181170152357865], [21.562022739353718, 44.768947251965635], [22.145087924902892, 44.478422349620573], [22.459022251075961, 44.702517198254426], [22.705725538837434, 44.578002834647002], [22.47400841644065, 44.409227606781762], [22.657149692483067, 44.234923000661347], [22.410446404721593, 44.008063462900047], [22.500156691180219, 43.642814439460999], [22.986018507588479, 43.211161200527094], [22.604801466571352, 42.898518785161109], [22.43659467946139, 42.580321153323943], [22.545011834409642, 42.461362006188025], [22.380525750424674, 42.320259507815074], [21.917080000000105, 42.30364], [21.576635989402117, 42.245224397061847], [21.54332, 42.32025], [21.66292, 42.43922], [21.77505, 42.6827], [21.63302, 42.67717], [21.43866, 42.86255], [21.27421, 42.90959], [21.143395, 43.068685000000123], [20.95651, 43.13094], [20.81448, 43.27205], [20.63508, 43.21671], [20.49679, 42.88469], [20.25758, 42.81275], [20.3398, 42.89852], [19.95857, 43.10604], [19.63, 43.213779970270522], [19.48389, 43.35229], [19.21852, 43.52384], [19.454, 43.568100000000115], [19.59976, 44.03847], [19.11761, 44.42307], [19.36803, 44.863], [19.00548, 44.86023], [19.390475701584588, 45.236515611342369], [19.072768995854172, 45.521511135432078], [18.82982, 45.90888], [19.596044549241636, 46.171729844744547], [20.22019249846289, 46.127468980486569], [20.76217492033998, 45.734573065771478], [20.874312778413408, 45.416375433934306]]] } }, - { "type": "Feature", "properties": { "admin": "Suriname", "name": "Suriname", "continent": "South America" }, "geometry": { "type": "Polygon", "coordinates": [[[-57.147436489476874, 5.973149929219161], [-55.949318406789786, 5.772877915872], [-55.841779751190408, 5.953125311706059], [-55.033250291551759, 6.025291449401662], [-53.958044603070888, 5.756548163267764], [-54.478632981979224, 4.896755682795585], [-54.3995422023565, 4.212611395683466], [-54.006930508018996, 3.620037746592558], [-54.181726040246261, 3.189779771330421], [-54.269705166223183, 2.732391669115046], [-54.524754197799709, 2.311848863123785], [-55.097587449755125, 2.523748073736612], [-55.569755011605984, 2.42150625244713], [-55.973322109589361, 2.510363877773016], [-56.073341844290283, 2.220794989425499], [-55.905600145070871, 2.021995754398659], [-55.995698004771739, 1.817667141116601], [-56.53938574891454, 1.89952260986692], [-57.150097825739898, 2.768926906745406], [-57.281433478409703, 3.333491929534119], [-57.601568976457848, 3.334654649260684], [-58.044694383360664, 4.060863552258382], [-57.860209520078691, 4.576801052260449], [-57.914288906472123, 4.812626451024413], [-57.307245856339492, 5.073566595882225], [-57.147436489476874, 5.973149929219161]]] } }, - { "type": "Feature", "properties": { "admin": "Slovakia", "name": "Slovakia", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[18.85314415861361, 49.496229763377634], [18.909574822676316, 49.435845852244562], [19.320712517990469, 49.571574001659179], [19.825022820726865, 49.217125352569219], [20.415839471119849, 49.431453355499755], [20.887955356538406, 49.328772284535823], [21.607808058364206, 49.470107326854077], [22.558137648211751, 49.08573802346713], [22.280841912533553, 48.825392157580659], [22.085608351334848, 48.422264309271782], [21.872236362401729, 48.319970811550007], [20.801293979584919, 48.62385407164237], [20.473562045989862, 48.562850043321809], [20.239054396249344, 48.327567247096916], [19.769470656013109, 48.2026911484636], [19.66136355965849, 48.266614895208647], [19.174364861739885, 48.111378892603859], [18.777024773847668, 48.081768296900627], [18.696512892336923, 47.88095368101439], [17.857132602620023, 47.758428860050365], [17.488472934649813, 47.867466132186209], [16.979666782304033, 48.123497015976298], [16.879982944412998, 48.470013332709463], [16.960288120194573, 48.596982326850593], [17.101984897538895, 48.8169688991171], [17.545006951577101, 48.800019029325362], [17.886484816161808, 48.903475246773695], [17.913511590250462, 48.996492824899072], [18.104972771891848, 49.043983466175298], [18.170498488037961, 49.271514797556421], [18.399993523846174, 49.315000515330034], [18.554971144289478, 49.495015367218777], [18.85314415861361, 49.496229763377634]]] } }, - { "type": "Feature", "properties": { "admin": "Slovenia", "name": "Slovenia", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[13.806475457421524, 46.509306138691201], [14.632471551174827, 46.431817328469535], [15.137091912504982, 46.658702704447016], [16.011663852612653, 46.683610744811688], [16.202298211337361, 46.852385972676949], [16.370504998447412, 46.841327216166498], [16.564808383864854, 46.503750922219822], [15.768732944408548, 46.238108222023442], [15.671529575267552, 45.834153550797865], [15.323953891672403, 45.731782538427673], [15.327674594797424, 45.452316392593218], [14.935243767972931, 45.471695054702671], [14.595109490627804, 45.6349409043127], [14.411968214585411, 45.466165676447446], [13.715059848697221, 45.500323798192369], [13.937630242578305, 45.591015936864608], [13.698109978905475, 46.016778062517339], [13.806475457421524, 46.509306138691201]]] } }, - { "type": "Feature", "properties": { "admin": "Sweden", "name": "Sweden", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[22.183173455501922, 65.723740546320158], [21.213516879977213, 65.02600535751526], [21.369631381930954, 64.413587958424273], [19.778875766690216, 63.609554348395022], [17.847779168375208, 62.749400132896803], [17.11955488451812, 61.341165676510954], [17.831346062906388, 60.636583360427394], [18.787721795332086, 60.081914374422581], [17.869224887776337, 58.95376618105869], [16.829185011470084, 58.719826972073385], [16.44770958829147, 57.041118069071871], [15.87978559740378, 56.104301866268649], [14.666681349352071, 56.20088511822216], [14.100721062891461, 55.407781073622637], [12.942910597392054, 55.361737372450563], [12.625100538797025, 56.307080186581956], [11.787942335668671, 57.441817125063061], [11.027368605196866, 58.856149400459344], [11.468271925511145, 59.432393296946024], [12.300365838274896, 60.117932847730025], [12.631146681375181, 61.293571682370121], [11.992064243221559, 61.800362453856543], [11.930569288794228, 63.128317572676963], [12.57993533697393, 64.066218980558318], [13.571916131248711, 64.049114081469696], [13.9199052263022, 64.445420640716065], [13.555689731509087, 64.7870276963815], [15.108411492582999, 66.19386688909546], [16.108712192456775, 67.302455552836875], [16.768878614985478, 68.013936672631388], [17.729181756265344, 68.010551866316263], [17.993868442464329, 68.567391262477344], [19.878559604581248, 68.407194322372561], [20.025268995857882, 69.065138658312691], [20.645592889089521, 69.106247260200846], [21.978534783626113, 68.616845608180682], [23.539473097434435, 67.936008612735236], [23.565879754335576, 66.396050930437411], [23.903378533633795, 66.006927395279604], [22.183173455501922, 65.723740546320158]]] } }, - { "type": "Feature", "properties": { "admin": "Swaziland", "name": "Swaziland", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[32.071665480281062, -26.733820082304902], [31.868060337051073, -27.17792734142127], [31.282773064913325, -27.285879408478991], [30.685961948374477, -26.743845310169526], [30.676608514129633, -26.398078301704604], [30.949666782359905, -26.022649021104144], [31.044079624157146, -25.731452325139436], [31.333157586397899, -25.660190525008943], [31.837777947728057, -25.843331801051342], [31.985779249811962, -26.29177988048022], [32.071665480281062, -26.733820082304902]]] } }, - { "type": "Feature", "properties": { "admin": "Syria", "name": "Syria", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[38.792340529136077, 33.378686428352218], [36.834062127435537, 32.312937526980768], [35.719918247222743, 32.709192409794859], [35.700797967274745, 32.716013698857374], [35.836396925608618, 32.868123277308506], [35.821100701650231, 33.277426459276292], [36.066460402172048, 33.824912421192543], [36.611750115715886, 34.201788641897174], [36.448194207512095, 34.59393524834406], [35.998402540843628, 34.644914048799997], [35.905023227692219, 35.410009467097318], [36.149762811026527, 35.821534735653664], [36.417550083163029, 36.040616970355053], [36.685389031731795, 36.259699205056457], [36.739494256341395, 36.817520453431079], [37.066761102045824, 36.623036200500614], [38.167727492024191, 36.901210435527766], [38.699891391765895, 36.712927354472335], [39.522580193852541, 36.716053778625984], [40.673259311695681, 37.091276353497285], [41.212089471203043, 37.074352321921687], [42.349591098811764, 37.22987254490409], [41.837064243340954, 36.605853786763568], [41.289707472505448, 36.358814602192261], [41.383965285005807, 35.628316555314349], [41.00615888851992, 34.419372260062111], [38.792340529136077, 33.378686428352218]]] } }, - { "type": "Feature", "properties": { "admin": "Chad", "name": "Chad", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[14.495787387762899, 12.859396267137353], [14.595781284247604, 13.330426947477859], [13.954476759505607, 13.353448798063765], [13.956698846094124, 13.996691189016925], [13.540393507550785, 14.36713369390122], [13.97217, 15.68437], [15.247731154041842, 16.627305813050778], [15.300441114979716, 17.927949937405], [15.68574059414777, 19.957180080642384], [15.90324669766431, 20.387618923417499], [15.487148064850143, 20.730414537025634], [15.47106, 21.04845], [15.096887648181847, 21.308518785074902], [14.8513, 22.862950000000119], [15.86085, 23.40972], [19.84926, 21.49509], [23.837660000000135, 19.580470000000101], [23.886890000000101, 15.61084], [23.02459, 15.68072], [22.567950000000106, 14.944290000000134], [22.30351, 14.32682], [22.51202, 14.09318], [22.18329, 13.78648], [22.29658, 13.37232], [22.03759, 12.95546], [21.93681, 12.588180000000133], [22.28801, 12.64605], [22.49762, 12.26024], [22.50869, 11.67936], [22.87622, 11.384610000000119], [22.864165480244246, 11.142395127807616], [22.231129184668756, 10.971888739460608], [21.723821648859538, 10.567055568885959], [21.000868361096305, 9.475985215691479], [20.059685499764267, 9.012706000194838], [19.094008009526071, 9.074846910025768], [18.81200971850927, 8.982914536978623], [18.911021762780589, 8.630894680206435], [18.389554884523303, 8.281303615751879], [17.964929640380884, 7.890914008002992], [16.705988396886365, 7.508327541529978], [16.4561845231874, 7.734773667832938], [16.290561557691884, 7.754307359239417], [16.106231723706738, 7.497087917506461], [15.279460483469164, 7.42192454673801], [15.436091749745737, 7.692812404811887], [15.120865512765302, 8.382150173369437], [14.979995558337688, 8.796104234243442], [14.544466586981851, 8.965861314322238], [13.954218377344088, 9.549494940626685], [14.17146609869911, 10.021378282100043], [14.627200555081057, 9.920919297724591], [14.909353875394796, 9.992129421422758], [15.46787275560524, 9.982336737503543], [14.923564894275042, 10.891325181517514], [14.960151808337679, 11.555574042197234], [14.89336, 12.21905], [14.495787387762899, 12.859396267137353]]] } }, - { "type": "Feature", "properties": { "admin": "Togo", "name": "Togo", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[1.865240512712318, 6.14215770102973], [1.060121697604927, 5.928837388528875], [0.836931186536333, 6.279978745952147], [0.570384148774849, 6.914358628767188], [0.490957472342245, 7.411744289576474], [0.712029249686878, 8.312464504423827], [0.461191847342121, 8.677222601756013], [0.365900506195885, 9.46500397382948], [0.367579990245389, 10.191212876827176], [-0.049784715159944, 10.706917832883928], [0.023802524423701, 11.018681748900802], [0.899563022474069, 10.997339382364258], [0.772335646171484, 10.470808213742357], [1.077795037448737, 10.175606594275022], [1.425060662450136, 9.825395412632998], [1.46304284018467, 9.334624335157086], [1.664477573258381, 9.128590399609378], [1.618950636409238, 6.832038072126236], [1.865240512712318, 6.14215770102973]]] } }, - { "type": "Feature", "properties": { "admin": "Thailand", "name": "Thailand", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[102.58493248902667, 12.186594956913279], [101.687157830819928, 12.645740057826568], [100.831809523524839, 12.627084865769204], [100.978467238369191, 13.412721665902563], [100.097797479251099, 13.406856390837429], [100.018732537844528, 12.307001044153353], [99.478920526123602, 10.846366685423545], [99.153772414143134, 9.963061428258554], [99.222398716226749, 9.239255479362425], [99.873831821698118, 9.207862046745118], [100.279646844486194, 8.29515289960605], [100.45927412313273, 7.429572658717175], [101.017327915452697, 6.856868597842476], [101.623079054778032, 6.740622463401918], [102.141186964936367, 6.221636053894626], [101.81428185425797, 5.810808417174242], [101.154218784593837, 5.691384182147713], [101.075515578213327, 6.20486705161592], [100.259596388756933, 6.642824815289542], [100.085756870527092, 6.46448944745029], [99.690690545655727, 6.848212795433595], [99.519641554769606, 7.343453884302759], [98.988252801512289, 7.907993068875325], [98.503786248775967, 8.382305202666286], [98.339661899816988, 7.794511623562384], [98.150009393305808, 8.350007432483876], [98.259150018306229, 8.973922837759799], [98.553550653073017, 9.932959906448543], [99.038120558673953, 10.960545762572435], [99.587286004639694, 11.892762762901695], [99.196353794351637, 12.804748439988666], [99.212011753336071, 13.269293728076462], [99.097755161538728, 13.827502549693275], [98.430819126379859, 14.622027696180831], [98.192074009191373, 15.123702500870349], [98.537375929765687, 15.308497422746081], [98.90334842325673, 16.177824204976115], [98.493761020911322, 16.837835598207928], [97.859122755934848, 17.567946071843657], [97.375896437573516, 18.445437730375811], [97.797782830804394, 18.627080389881751], [98.253723992915582, 19.708203029860041], [98.959675734454848, 19.752980658440944], [99.543309360759281, 20.186597601802056], [100.115987583417819, 20.41784963630818], [100.548881056726856, 20.109237982661124], [100.606293573003128, 19.508344427971217], [101.282014601651667, 19.462584947176762], [101.035931431077742, 18.408928330961611], [101.059547560635139, 17.512497259994486], [102.113591750092453, 18.109101670804161], [102.413004998791592, 17.932781683824281], [102.998705682387694, 17.961694647691598], [103.200192091893726, 18.309632066312769], [103.956476678485288, 18.240954087796872], [104.716947056092465, 17.428858954330078], [104.779320509868768, 16.441864935771445], [105.589038527450128, 15.570316066952856], [105.544338413517664, 14.723933620660414], [105.218776890078871, 14.27321177821069], [104.281418084736586, 14.416743068901363], [102.988422072361601, 14.225721136934464], [102.348099399833004, 13.39424734135822], [102.58493248902667, 12.186594956913279]]] } }, - { "type": "Feature", "properties": { "admin": "Tajikistan", "name": "Tajikistan", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[71.014198032520156, 40.244365546218226], [70.648018833299957, 39.935753892571157], [69.559609816368507, 40.103211371412968], [69.464886915977516, 39.526683254548693], [70.549161818325601, 39.604197902986492], [71.784693637991992, 39.279463202464363], [73.67537926625478, 39.431236884105594], [73.928852166646408, 38.505815334622724], [74.257514276022718, 38.606506862943441], [74.864815708316812, 38.378846340481587], [74.829985792952087, 37.990007025701388], [74.980002475895404, 37.419990139305888], [73.948695916646486, 37.421566270490786], [73.260055779924983, 37.495256862938994], [72.636889682917271, 37.047558091778349], [72.193040805962383, 36.94828766534566], [71.84463829945058, 36.738171291646914], [71.448693475230229, 37.065644843080513], [71.541917759084768, 37.905774441065631], [71.239403924448155, 37.953265082341879], [71.348131137990251, 38.258905341132156], [70.806820509732873, 38.486281643216408], [70.376304152309274, 38.138395901027515], [70.270574171840124, 37.73516469985401], [70.116578403610319, 37.588222764632086], [69.518785434857946, 37.608996690413413], [69.196272820924364, 37.15114350030742], [68.859445835245921, 37.344335842430588], [68.135562371701369, 37.023115139304302], [67.829999627559502, 37.144994004864678], [68.392032505165943, 38.157025254868728], [68.176025018185911, 38.901553453113898], [67.442219679641298, 39.140143541005479], [67.701428664017342, 39.580478420564518], [68.536416456989414, 39.533452867178923], [69.011632928345477, 40.086158148756653], [69.329494663372813, 40.727824408524839], [70.666622348925031, 40.960213324541407], [70.458159621059608, 40.49649485937028], [70.601406691372674, 40.218527330072284], [71.014198032520156, 40.244365546218226]]] } }, - { "type": "Feature", "properties": { "admin": "Turkmenistan", "name": "Turkmenistan", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[61.21081709172573, 35.650072333309218], [61.123070509694131, 36.491597194966239], [60.377637973883864, 36.52738312432836], [59.234761997316795, 37.412987982730336], [58.436154412678192, 37.522309475243794], [57.330433790928964, 38.029229437810933], [56.619366082592805, 38.121394354803478], [56.180374790273319, 37.935126654607423], [55.511578403551894, 37.964117133123153], [54.800303989486558, 37.392420762678178], [53.921597934795543, 37.198918361961255], [53.735511102112504, 37.906136176091685], [53.880928582581831, 38.952093003895349], [53.101027866432894, 39.290573635407121], [53.357808058491216, 39.975286363274442], [52.693972609269807, 40.033629055331964], [52.91525109234361, 40.87652334244472], [53.85813927594112, 40.631034450842165], [54.736845330632136, 40.951014919593455], [54.0083109881813, 41.551210842447404], [53.721713494690576, 42.123191433270016], [52.916749708880069, 41.868116563477322], [52.81468875510361, 41.135370591794704], [52.502459751196135, 41.783315538086356], [52.94429324729164, 42.116034247397586], [54.079417759014937, 42.324109402020817], [54.755345493392625, 42.04397146256656], [55.455251092353755, 41.259859117185826], [55.968191359282898, 41.308641669269356], [57.096391229079089, 41.32231008561056], [56.93221520368779, 41.82602610937559], [57.786529982337065, 42.170552883465511], [58.629010857991453, 42.751551011723045], [59.976422153569771, 42.223081976890199], [60.083340691981654, 41.425146185871391], [60.46595299667068, 41.22032664648254], [61.547178989513547, 41.2663703476546], [61.882714064384679, 41.084856879229392], [62.374260288344992, 40.053886216790382], [63.518014764261018, 39.363256537425627], [64.170223016216752, 38.892406724598231], [65.215998976507379, 38.402695013984292], [66.546150343700205, 37.974684963526855], [66.518606805288655, 37.362784328758785], [66.217384881459324, 37.393790188133913], [65.745630731066811, 37.661164048812061], [65.588947788357828, 37.305216783185628], [64.746105177677393, 37.111817735333297], [64.546479119733888, 36.31207326918426], [63.982895949158696, 36.007957465146596], [63.193538445900337, 35.857165635718907], [62.984662306576588, 35.404040839167614], [62.230651483005879, 35.270663967422287], [61.21081709172573, 35.650072333309218]]] } }, - { "type": "Feature", "properties": { "admin": "East Timor", "name": "Timor-Leste", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[124.96868248911619, -8.892790215697081], [125.086246372580248, -8.656887302284678], [125.947072381698234, -8.432094821815033], [126.64470421763852, -8.39824675866385], [126.957243280139792, -8.273344821814396], [127.335928175974615, -8.397316582882601], [126.967991978056517, -8.668256117388891], [125.925885044458568, -9.106007175333351], [125.088520135601073, -9.393173109579292], [125.070019972840583, -9.08998748132287], [124.96868248911619, -8.892790215697081]]] } }, - { "type": "Feature", "properties": { "admin": "Trinidad and Tobago", "name": "Trinidad and Tobago", "continent": "North America" }, "geometry": { "type": "Polygon", "coordinates": [[[-61.68, 10.76], [-61.105, 10.89], [-60.895, 10.855], [-60.935, 10.11], [-61.77, 10.0], [-61.95, 10.09], [-61.66, 10.365], [-61.68, 10.76]]] } }, - { "type": "Feature", "properties": { "admin": "Tunisia", "name": "Tunisia", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[9.482139926805273, 30.307556057246181], [9.055602654668148, 32.102691962201284], [8.439102817426116, 32.506284898400814], [8.430472853233367, 32.748337307255944], [7.612641635782181, 33.344114895148955], [7.524481642292242, 34.097376410451453], [8.140981479534302, 34.655145982393783], [8.376367628623766, 35.479876003555937], [8.217824334352313, 36.433176988260271], [8.420964389691674, 36.946427313783154], [9.509993523810605, 37.349994411766531], [10.210002475636315, 37.230001735984807], [10.180650262094529, 36.724037787415071], [11.028867221733348, 37.09210317641395], [11.100025668999249, 36.899996039368908], [10.600004510143092, 36.410000108377368], [10.593286573945134, 35.947444362932806], [10.939518670300686, 35.698984076473486], [10.807847120821007, 34.833507188449182], [10.149592726287123, 34.330773016897702], [10.339658644256613, 33.785741685515312], [10.856836378633684, 33.768740139291275], [11.108500603895118, 33.293342800422188], [11.488787469131008, 33.136995754523134], [11.432253452203692, 32.368903103152867], [10.944789666394453, 32.081814683555358], [10.636901482799484, 31.761420803345747], [9.950225050505081, 31.376069647745251], [10.056575148161752, 30.961831366493595], [9.97001712407285, 30.539324856075236], [9.482139926805273, 30.307556057246181]]] } }, - { "type": "Feature", "properties": { "admin": "Turkey", "name": "Turkey", "continent": "Asia" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[36.913127068842151, 41.335358384764291], [38.347664829264502, 40.948586127275711], [39.512606642420238, 41.102762763018561], [40.373432651538245, 41.013672593747337], [41.554084100110707, 41.535656236327604], [42.619548781104548, 41.58317271581992], [43.582745802592704, 41.09214325618256], [43.752657911968491, 40.740200914058811], [43.656436395040963, 40.253563951166157], [44.400008579288759, 40.005000311842302], [44.79398969908199, 39.713002631177027], [44.109225294782355, 39.428136298168049], [44.421402622257595, 38.281281236314513], [44.225755649600522, 37.971584377589345], [44.772699008977739, 37.170444647768441], [44.293451775902852, 37.001514390606353], [43.942258742047343, 37.256227525372928], [42.77912560402185, 37.385263576805798], [42.349591098811764, 37.229872544904104], [41.212089471203015, 37.074352321921729], [40.673259311695702, 37.091276353497356], [39.522580193852512, 36.716053778626012], [38.699891391765917, 36.712927354472313], [38.167727492024156, 36.90121043552778], [37.066761102045824, 36.623036200500614], [36.739494256341366, 36.817520453431108], [36.685389031731816, 36.259699205056499], [36.417550083163086, 36.040616970355096], [36.149762811026584, 35.821534735653664], [35.782084995269848, 36.274995429014915], [36.160821567537049, 36.650605577128367], [35.550936313628334, 36.565442816711325], [34.714553256984367, 36.795532131490909], [34.026894972476455, 36.219960028623966], [32.509158156064096, 36.107563788389193], [31.69959516777956, 36.644275214172602], [30.621624790171062, 36.677864895162308], [30.391096225717114, 36.262980658506983], [29.69997562024556, 36.144357408181001], [28.732902866335387, 36.676831366516431], [27.641186557737363, 36.658822129862749], [27.048767937943289, 37.653360907536005], [26.318218214633042, 38.208133246405382], [26.804700148228726, 38.985760199533551], [26.170785353304375, 39.463612168936457], [27.280019972449388, 40.420013739578302], [28.819977654747209, 40.460011298172212], [29.240003696415574, 41.219990749672682], [31.145933872204434, 41.087621568357058], [32.347979363745786, 41.736264146484629], [33.513282911927512, 42.018960069337304], [35.167703891751863, 42.040224921225438], [36.913127068842151, 41.335358384764291]]], [[[27.192376743282406, 40.690565700842448], [26.358009067497782, 40.151993923496477], [26.043351271272535, 40.617753607743161], [26.056942172965332, 40.824123440100735], [26.294602085075692, 40.936261298174166], [26.604195590936282, 41.562114569661013], [26.117041863720825, 41.826904608724554], [27.135739373490505, 42.141484890301307], [27.996720411905407, 42.007358710287768], [28.115524529744441, 41.622886054036279], [28.988442824018779, 41.299934190428175], [28.806438429486743, 41.05496206314853], [27.619017368284112, 40.999823309893102], [27.192376743282406, 40.690565700842448]]]] } }, - { "type": "Feature", "properties": { "admin": "Taiwan", "name": "Taiwan", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[121.777817824389899, 24.394273586519393], [121.175632358892713, 22.790857245367164], [120.747079705896198, 21.970571397382106], [120.220083449383651, 22.814860948166732], [120.106188592612369, 23.556262722258229], [120.694679803552233, 24.53845083261373], [121.49504438688875, 25.295458889257379], [121.951243931161429, 24.997595933527034], [121.777817824389899, 24.394273586519393]]] } }, - { "type": "Feature", "properties": { "admin": "United Republic of Tanzania", "name": "Tanzania", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[33.903711197104592, -0.95], [34.07262, -1.05982], [37.69869, -3.09699], [37.7669, -3.67712], [39.20222, -4.67677], [38.74054, -5.90895], [38.79977, -6.47566], [39.44, -6.84], [39.470000000000134, -7.1], [39.19469, -7.7039], [39.25203, -8.00781], [39.18652, -8.48551], [39.53574, -9.112369999999883], [39.9496, -10.0984], [40.31659, -10.317099999999867], [39.521, -10.89688], [38.427556593587767, -11.285202325081626], [37.82764, -11.26879], [37.47129, -11.56876], [36.775150994622884, -11.59453744878078], [36.514081658684397, -11.720938002166745], [35.312397902169145, -11.439146416879165], [34.559989047999451, -11.520020033415845], [34.28, -10.16], [33.940837724096518, -9.693673841980283], [33.73972, -9.41715], [32.759375441221373, -9.230599053589001], [32.191864861791935, -8.930358981973255], [31.556348097466628, -8.762048841998647], [31.157751336950064, -8.594578747317312], [30.74, -8.34], [30.2, -7.08], [29.62, -6.52], [29.419992710088305, -5.939998874539297], [29.519986606573063, -5.419978936386257], [29.339997592900367, -4.499983412294113], [29.753512404099858, -4.452389418153301], [30.11632, -4.09012], [30.50554, -3.56858], [30.75224, -3.35931], [30.74301, -3.03431], [30.52766, -2.80762], [30.46967, -2.41383], [30.758308953583132, -2.287250257988375], [30.816134881317844, -1.698914076345374], [30.419104852019291, -1.134659112150416], [30.769860000000101, -1.01455], [31.86617, -1.02736], [33.903711197104592, -0.95]]] } }, - { "type": "Feature", "properties": { "admin": "Uganda", "name": "Uganda", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[31.86617, -1.02736], [30.769860000000101, -1.01455], [30.419104852019291, -1.134659112150416], [29.821518588996121, -1.443322442229771], [29.579466180141019, -1.341313164885605], [29.587837762172164, -0.587405694179381], [29.8195, -0.2053], [29.875778842902431, 0.597379868976361], [30.086153598762785, 1.062312730306416], [30.468507521290285, 1.583805446779706], [30.852670118948133, 1.849396470543752], [31.174149204235952, 2.204465236821306], [30.77332, 2.339890000000139], [30.83385, 3.50917], [31.24556, 3.7819], [31.88145, 3.55827], [32.68642, 3.79232], [33.39, 3.79], [34.005, 4.249884947362147], [34.47913, 3.5556], [34.59607, 3.053740000000118], [35.03599, 1.90584], [34.6721, 1.17694], [34.18, 0.515], [33.893568969666994, 0.109813537861839], [33.903711197104592, -0.95], [31.86617, -1.02736]]] } }, - { "type": "Feature", "properties": { "admin": "Ukraine", "name": "Ukraine", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[31.78599816257158, 52.10167796488544], [32.159412062312661, 52.061266994833204], [32.412058139787625, 52.288694973349735], [32.715760532366964, 52.238465481162038], [33.7526998227357, 52.335074571331681], [34.391730584457001, 51.768881740925778], [34.141978387190385, 51.566413479206226], [34.22481570815426, 51.255993150428942], [35.022183058417873, 51.207572333371445], [35.377923618315116, 50.773955390010343], [35.35611616388794, 50.577197374059054], [36.62616784032533, 50.225590928745127], [37.393459506995065, 50.383953355503586], [38.01063113785689, 49.915661526074622], [38.59498823421341, 49.926461900423618], [40.069058465339097, 49.601055406281688], [40.080789015469342, 49.307429917999272], [39.674663934087526, 48.783818467801872], [39.895632358567575, 48.232405097031425], [39.738277622238819, 47.898937079451983], [38.770584751141186, 47.825608222029807], [38.255112339029743, 47.546400458356807], [38.223538038899413, 47.102189846375872], [37.42513715998998, 47.022220567404197], [36.759854770664383, 46.698700263040919], [35.823684523264816, 46.645964463887054], [34.962341749823871, 46.273196519549636], [35.020787794745978, 45.65121898048465], [35.51000857925316, 45.409993394546177], [36.529997999830151, 45.46998973243705], [36.334712762199146, 45.113215643893952], [35.239999220528112, 44.939996242851599], [33.882511020652878, 44.361478583344066], [33.326420932760037, 44.564877020844875], [33.546924269349446, 45.034770819674883], [32.454174432105496, 45.327466132176063], [32.630804477679128, 45.519185695978905], [33.588162062318382, 45.851568508480227], [33.298567335754704, 46.08059845639783], [31.744140252415171, 46.333347886737378], [31.675307244602401, 46.706245022155528], [30.748748813609094, 46.583100084003995], [30.37760867688888, 46.032410183285663], [29.603289015427425, 45.293308010431119], [29.149724969201646, 45.464925442072442], [28.679779493939371, 45.30403087013169], [28.233553501099035, 45.488283189468369], [28.48526940279276, 45.596907050145887], [28.659987420371575, 45.939986884131628], [28.933717482221621, 46.258830471372491], [28.862972446414055, 46.437889309263824], [29.072106967899288, 46.517677720722482], [29.170653924279879, 46.379262396828693], [29.759971958136383, 46.349987697935354], [30.024658644335364, 46.423936672545032], [29.838210076626289, 46.525325832701675], [29.908851759569295, 46.67436066343145], [29.559674106573105, 46.928582872091312], [29.415135125452732, 47.346645209332571], [29.050867954227321, 47.510226955752493], [29.122698195113024, 47.849095160506458], [28.670891147585163, 48.118148505234089], [28.259546746541837, 48.155562242213406], [27.52253746919515, 48.467119452501102], [26.857823520624798, 48.368210761094488], [26.619336785597788, 48.220726223333457], [26.197450392366925, 48.220881252630342], [25.945941196402394, 47.987148749374207], [25.207743361112986, 47.891056423527459], [24.866317172960571, 47.737525743188307], [24.402056105250374, 47.981877753280422], [23.760958286237404, 47.985598456405448], [23.142236362406798, 48.096341050806942], [22.710531447040488, 47.882193915389394], [22.640819939878746, 48.150239569687351], [22.085608351334848, 48.422264309271782], [22.280841912533553, 48.825392157580659], [22.558137648211751, 49.08573802346713], [22.776418898212619, 49.027395331409608], [22.518450148211596, 49.476773586619736], [23.426508416444388, 50.308505764357449], [23.922757195743259, 50.424881089878738], [24.029985792748899, 50.705406602575174], [23.52707075368437, 51.578454087930233], [24.005077752384206, 51.617443956094448], [24.553106316839511, 51.888461005249177], [25.327787713327005, 51.910656032918538], [26.337958611768549, 51.832288723347915], [27.454066196408426, 51.59230337178446], [28.241615024536564, 51.572227077839059], [28.617612745892242, 51.427713934934836], [28.992835320763522, 51.602044379271462], [29.254938185347921, 51.368234361366881], [30.157363722460889, 51.416138414101454], [30.55511722181145, 51.319503485715643], [30.619454380014837, 51.822806098022362], [30.927549269338975, 52.042353420614383], [31.78599816257158, 52.10167796488544]]] } }, - { "type": "Feature", "properties": { "admin": "Uruguay", "name": "Uruguay", "continent": "South America" }, "geometry": { "type": "Polygon", "coordinates": [[[-57.625133429582945, -30.216294854454258], [-56.976025763564721, -30.109686374636119], [-55.97324459494093, -30.883075860316296], [-55.601510179249331, -30.853878676071385], [-54.572451544805105, -31.494511407193745], [-53.787951626182185, -32.047242526987617], [-53.209588995971529, -32.727666110974717], [-53.650543992718084, -33.202004082981823], [-53.373661668498229, -33.768377780900757], [-53.806425950726521, -34.396814874002224], [-54.935866054897716, -34.952646579733617], [-55.674089728403274, -34.752658786764066], [-56.215297003796053, -34.85983570733741], [-57.139685024633096, -34.430456231424238], [-57.817860683815489, -34.462547295877492], [-58.427074144104381, -33.909454441057569], [-58.349611172098854, -33.2631889788154], [-58.132647671121433, -33.040566908502008], [-58.142440355040748, -32.044503676076147], [-57.874937303281875, -31.016556084926201], [-57.625133429582945, -30.216294854454258]]] } }, - { "type": "Feature", "properties": { "admin": "United States of America", "name": "United States", "continent": "North America" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[-155.54211, 19.08348], [-155.68817, 18.91619], [-155.93665, 19.05939], [-155.90806, 19.33888], [-156.07347, 19.70294], [-156.02368, 19.81422], [-155.85008, 19.97729], [-155.91907, 20.17395], [-155.86108, 20.26721], [-155.78505, 20.2487], [-155.40214, 20.07975], [-155.22452, 19.99302], [-155.06226, 19.8591], [-154.80741, 19.50871], [-154.83147, 19.45328], [-155.222169999999892, 19.23972], [-155.54211, 19.08348]]], [[[-156.07926, 20.64397], [-156.41445, 20.57241], [-156.58673, 20.783], [-156.70167, 20.8643], [-156.71055, 20.92676], [-156.61258, 21.01249], [-156.25711, 20.91745], [-155.99566, 20.76404], [-156.07926, 20.64397]]], [[[-156.75824, 21.17684], [-156.78933, 21.06873], [-157.32521, 21.09777], [-157.25027, 21.21958], [-156.75824, 21.17684]]], [[[-157.65283, 21.32217], [-157.70703, 21.26442], [-157.7786, 21.27729], [-158.12667, 21.31244], [-158.2538, 21.53919], [-158.29265, 21.57912], [-158.0252, 21.71696], [-157.94161, 21.65272], [-157.65283, 21.32217]]], [[[-159.34512, 21.982], [-159.46372, 21.88299], [-159.80051, 22.06533], [-159.74877, 22.1382], [-159.5962, 22.23618], [-159.36569, 22.21494], [-159.34512, 21.982]]], [[[-94.81758, 49.38905], [-94.639999999999858, 48.840000000000103], [-94.32914, 48.67074], [-93.63087, 48.60926], [-92.61, 48.45], [-91.64, 48.14], [-90.829999999999856, 48.27], [-89.6, 48.01], [-89.272917446636654, 48.019808254582834], [-88.378114183286513, 48.302917588893806], [-87.439792623300207, 47.94], [-86.461990831228135, 47.553338019392037], [-85.652363247403215, 47.220218817730498], [-84.876079881514855, 46.900083319682366], [-84.779238247399817, 46.637101955749117], [-84.54374874544564, 46.538684190449224], [-84.6049, 46.4396], [-84.3367, 46.408770000000104], [-84.142119513673279, 46.512225857115723], [-84.091851264161463, 46.275418606138253], [-83.890765347005654, 46.116926988299149], [-83.616130947590491, 46.116926988299149], [-83.469550747394621, 45.994686387712584], [-83.592850714843067, 45.816893622412543], [-82.550924648758169, 45.347516587905446], [-82.337763125431053, 44.44], [-82.137642381503952, 43.571087551439987], [-82.43, 42.98], [-82.899999999999878, 42.430000000000135], [-83.119999999999877, 42.08], [-83.141999681312555, 41.975681057292995], [-83.029810146806909, 41.832795722005997], [-82.690089280920162, 41.675105088867319], [-82.439277716791608, 41.675105088867319], [-81.277746548167059, 42.209025987306845], [-80.247447679347843, 42.36619985612267], [-78.939362148743683, 42.863611355148116], [-78.92, 42.965], [-79.009999999999863, 43.27], [-79.171673550111862, 43.466339423184301], [-78.720279914042365, 43.625089423184953], [-77.737885097957601, 43.629055589363382], [-76.820034145805565, 43.628784288093748], [-76.5, 44.018458893758599], [-76.375, 44.09631], [-75.31821, 44.81645000000016], [-74.867, 45.00048000000011], [-73.347829999999874, 45.00738], [-71.505059999999858, 45.0082], [-71.405, 45.255000000000123], [-71.08482, 45.305240000000154], [-70.659999999999783, 45.46], [-70.305, 45.915], [-69.99997, 46.69307], [-69.237216, 47.447781], [-68.905, 47.185], [-68.23444, 47.35486], [-67.79046, 47.06636], [-67.79134, 45.702810000000134], [-67.13741, 45.13753], [-66.96466, 44.809700000000149], [-68.03252, 44.3252], [-69.059999999999874, 43.98], [-70.116169999999897, 43.684050000000141], [-70.645475633410967, 43.090238348964043], [-70.81489, 42.8653], [-70.825, 42.335], [-70.494999999999891, 41.805], [-70.08, 41.78], [-70.185, 42.145], [-69.88497, 41.922830000000111], [-69.96503, 41.637170000000161], [-70.64, 41.475], [-71.12039, 41.494450000000164], [-71.859999999999829, 41.32], [-72.295, 41.27], [-72.87643, 41.22065], [-73.71, 40.931102351654481], [-72.24126, 41.119480000000138], [-71.944999999999808, 40.93], [-73.345, 40.63], [-73.982, 40.628], [-73.952325, 40.75075], [-74.25671, 40.47351], [-73.96244, 40.42763], [-74.17838, 39.70926], [-74.90604, 38.93954], [-74.98041, 39.1964], [-75.20002, 39.24845], [-75.52805, 39.4985], [-75.32, 38.96], [-75.071834764789784, 38.782032230179276], [-75.05673, 38.404120000000106], [-75.37747, 38.01551], [-75.94023, 37.21689], [-76.03127, 37.2566], [-75.722049999999783, 37.937050000000106], [-76.23287, 38.319215], [-76.35, 39.15], [-76.542725, 38.717615], [-76.32933, 38.08326], [-76.98999793161353, 38.239991766913384], [-76.301619999999886, 37.917945], [-76.25874, 36.9664000000001], [-75.9718, 36.89726], [-75.868039999999809, 36.55125], [-75.72749, 35.550740000000125], [-76.36318, 34.808540000000129], [-77.39763499999988, 34.51201], [-78.05496, 33.92547], [-78.554349999999815, 33.861330000000116], [-79.06067, 33.49395], [-79.20357, 33.15839], [-80.301325, 32.509355], [-80.86498, 32.0333], [-81.33629, 31.44049], [-81.49042, 30.729990000000122], [-81.31371, 30.03552], [-80.98, 29.18000000000011], [-80.53558499999987, 28.47213], [-80.529999999999774, 28.04], [-80.056539284977532, 26.88000000000013], [-80.088015, 26.205765], [-80.131559999999837, 25.816775], [-80.38103, 25.20616], [-80.679999999999879, 25.08], [-81.17213, 25.201260000000126], [-81.33, 25.64], [-81.709999999999795, 25.87], [-82.239999999999895, 26.730000000000125], [-82.70515, 27.49504], [-82.85526, 27.88624], [-82.65, 28.550000000000146], [-82.929999999999865, 29.100000000000129], [-83.70959, 29.93656], [-84.1, 30.090000000000114], [-85.10882, 29.63615], [-85.28784, 29.686120000000127], [-85.7731, 30.152610000000116], [-86.399999999999878, 30.400000000000112], [-87.530359999999831, 30.27433], [-88.41782, 30.3849], [-89.180489999999836, 30.31598], [-89.593831178419748, 30.159994004836843], [-89.413735, 29.89419], [-89.43, 29.48864], [-89.21767, 29.29108], [-89.40823, 29.15961], [-89.77928, 29.307140000000135], [-90.15463, 29.11743], [-90.880224999999896, 29.148535000000116], [-91.626784999999842, 29.677000000000127], [-92.49906, 29.5523], [-93.22637, 29.78375], [-93.84842, 29.71363], [-94.69, 29.480000000000125], [-95.60026, 28.73863], [-96.59404, 28.30748], [-97.139999999999802, 27.83], [-97.37, 27.38], [-97.379999999999853, 26.69], [-97.33, 26.210000000000115], [-97.139999999999802, 25.87], [-97.529999999999859, 25.84], [-98.239999999999895, 26.060000000000109], [-99.019999999999854, 26.37], [-99.3, 26.84], [-99.52, 27.54], [-100.11, 28.11000000000012], [-100.45584, 28.696120000000118], [-100.957599999999886, 29.380710000000125], [-101.6624, 29.779300000000113], [-102.48, 29.76], [-103.11, 28.97], [-103.94, 29.27], [-104.456969999999814, 29.57196], [-104.705749999999895, 30.12173], [-105.03737, 30.64402], [-105.63159, 31.083830000000113], [-106.1429, 31.39995], [-106.507589999999794, 31.75452], [-108.24, 31.754853718166398], [-108.24194, 31.34222], [-109.035, 31.341940000000161], [-111.02361, 31.33472], [-113.30498, 32.03914], [-114.815, 32.52528], [-114.721389999999829, 32.72083], [-115.991349999999869, 32.61239000000014], [-117.127759999999753, 32.53534], [-117.295937691273863, 33.04622461520389], [-117.944, 33.621236431201389], [-118.410602275897475, 33.740909223124497], [-118.519894822799685, 34.027781577575745], [-119.081, 34.078], [-119.438840642016658, 34.348477178284291], [-120.36778, 34.44711], [-120.62286, 34.60855], [-120.74433, 35.156860000000101], [-121.714569999999853, 36.16153], [-122.54747, 37.551760000000101], [-122.51201, 37.783390000000132], [-122.95319, 38.113710000000104], [-123.7272, 38.951660000000111], [-123.865169999999878, 39.766990000000128], [-124.39807, 40.3132], [-124.17886, 41.142020000000109], [-124.2137, 41.999640000000134], [-124.532839999999894, 42.76599], [-124.14214, 43.70838], [-124.020535, 44.615895], [-123.898929999999893, 45.52341], [-124.079635, 46.86475], [-124.395669999999896, 47.72017], [-124.687210083007812, 48.184432983398537], [-124.566101074218736, 48.379714965820384], [-123.12, 48.04], [-122.587359999999876, 47.096], [-122.34, 47.36], [-122.5, 48.18], [-122.84, 49.0], [-120.0, 49.0], [-117.03121, 49.0], [-116.04818, 49.0], [-112.999999999999872, 49.0], [-110.049999999999812, 49.0], [-107.049999999999898, 49.0], [-104.04826, 48.99986], [-100.65, 49.0], [-97.228720000004699, 49.0007], [-95.159069509171943, 49.0], [-95.15609, 49.38425], [-94.81758, 49.38905]]], [[[-153.006314053336837, 57.115842190165878], [-154.0050902984581, 56.734676825581047], [-154.516402757770067, 56.992748928446687], [-154.670992804971092, 57.461195787172493], [-153.762779507441451, 57.816574612043773], [-153.228729417921073, 57.968968410872421], [-152.564790615835108, 57.901427313866961], [-152.141147223906273, 57.591058661521977], [-153.006314053336837, 57.115842190165878]]], [[[-165.579164191733554, 59.909986884187539], [-166.192770148767238, 59.754440822988961], [-166.848337368821944, 59.941406155020942], [-167.455277066090048, 60.213069159579376], [-166.467792121424566, 60.384169826897775], [-165.674429694663644, 60.293606879306232], [-165.579164191733554, 59.909986884187539]]], [[[-171.731656867539357, 63.782515367275906], [-171.114433560245175, 63.592191067144981], [-170.491112433940657, 63.694975490973505], [-169.682505459653555, 63.431115627691142], [-168.689439460300662, 63.297506212000584], [-168.77194088445458, 63.188598130945437], [-169.529439867204985, 62.976931464277882], [-170.290556200215917, 63.194437567794452], [-170.671385667990847, 63.375821845138965], [-171.553063117538642, 63.317789211675077], [-171.791110602891166, 63.40584585230048], [-171.731656867539357, 63.782515367275906]]], [[[-155.067790290324211, 71.147776394323685], [-154.344165208941206, 70.696408596470192], [-153.900006273392563, 70.889988511835682], [-152.210006069935275, 70.829992173944831], [-152.270002407826127, 70.60000621202984], [-150.739992438744508, 70.430016588005699], [-149.720003018167489, 70.530010484490433], [-147.613361579357047, 70.214034939241785], [-145.689989800225248, 70.120009670686741], [-144.920010959076393, 69.989991767040479], [-143.58944618042517, 70.152514146598307], [-142.072510348713365, 69.851938178172631], [-140.985987521560702, 69.711998399526365], [-140.985988329004869, 69.711998399526365], [-140.992498752029377, 66.000028591568665], [-140.997769748123119, 60.306396796298593], [-140.012997816153074, 60.276837877027575], [-139.03900042031583, 60.000007229240012], [-138.340889999999888, 59.562110000000146], [-137.4525, 58.905000000000101], [-136.47972, 59.46389], [-135.47583, 59.78778], [-134.945, 59.270560000000117], [-134.27111, 58.86111], [-133.355548882207188, 58.410285142645151], [-132.73042, 57.692890000000105], [-131.707809999999853, 56.55212], [-130.00778, 55.91583], [-129.979994263358265, 55.284997870497207], [-130.536110189467223, 54.802753404349389], [-131.08581823797212, 55.178906155002025], [-131.967211467142278, 55.497775580459049], [-132.250010742859445, 56.369996242897443], [-133.539181084356386, 57.178887437562125], [-134.07806292029602, 58.123067531966889], [-135.038211032279037, 58.187714748763931], [-136.628062309954629, 58.212209377670447], [-137.800006279686016, 58.499995429103777], [-139.867787041412981, 59.537761542389134], [-140.825273817133024, 59.72751740176507], [-142.574443535564427, 60.084446519604981], [-143.958880994879848, 59.99918040632339], [-145.925556816827822, 60.458609727614274], [-147.114373949146625, 60.884656073644628], [-148.224306200127643, 60.672989406977152], [-148.018065558850736, 59.978328965893631], [-148.570822516860858, 59.914172675203297], [-149.727857835875824, 59.705658270905545], [-150.608243374616421, 59.368211168039487], [-151.716392788683294, 59.155821031319974], [-151.859433153267105, 59.74498403587959], [-151.40971900124714, 60.725802720779392], [-150.346941494732505, 61.033587551509854], [-150.621110806256951, 61.284424953854447], [-151.895839199816834, 60.727197984451273], [-152.578329841095581, 60.061657212964285], [-154.019172126257558, 59.350279446034264], [-153.287511359653166, 58.864727688219787], [-154.232492438758442, 58.146373602930531], [-155.307491421510207, 57.727794501366319], [-156.308334723923082, 57.422774359763636], [-156.556097378546298, 56.979984849670636], [-158.117216559867728, 56.463608099994175], [-158.433321296197136, 55.994153550838533], [-159.603327399717415, 55.566686102920116], [-160.289719611634183, 55.643580634170561], [-161.223047655257773, 55.364734605523481], [-162.23776607974105, 55.024186916720097], [-163.069446581046378, 54.689737046927171], [-164.785569221027174, 54.40417308208216], [-164.942226325520011, 54.572224839895327], [-163.84833960676562, 55.039431464246107], [-162.870001390615897, 55.348043117893198], [-161.804174974596009, 55.894986477270429], [-160.563604702781134, 56.008054511125025], [-160.070559862284483, 56.418055324928744], [-158.684442918919416, 57.016675116597852], [-158.461097378553944, 57.216921291728866], [-157.722770352183858, 57.570000515363056], [-157.550274421193564, 58.328326321030218], [-157.041674974576949, 58.918884589261708], [-158.194731208305427, 58.615802313869828], [-158.517217984023034, 58.787781480537305], [-159.058606126928709, 58.424186102931671], [-159.711667040017318, 58.931390285876333], [-159.981288825500144, 58.572549140041623], [-160.355271165996498, 59.071123358793628], [-161.355003425115001, 58.670837714260742], [-161.968893602526293, 58.671664537177371], [-162.054986538724648, 59.266925360747436], [-161.874170702135331, 59.633621324290587], [-162.518059048492034, 59.989723619213905], [-163.818341437820123, 59.798055731843377], [-164.662217577146407, 60.267484442782639], [-165.346387702474772, 60.507495632562396], [-165.350831875651835, 61.073895168697497], [-166.121379157555907, 61.500019029376212], [-165.734451870770471, 62.074996853271792], [-164.919178636717788, 62.633076483807919], [-164.562507901039339, 63.146378485763044], [-163.753332485996964, 63.219448961023758], [-163.067224494457832, 63.05945872664801], [-162.260555386381697, 63.541935736741159], [-161.534449836248569, 63.455816962326757], [-160.772506680321101, 63.76610810002326], [-160.958335130842528, 64.222798570402759], [-161.518068407212184, 64.402787584075313], [-160.777777676414729, 64.788603827566405], [-161.391926235987597, 64.777235012462327], [-162.453050096668818, 64.559444688568206], [-162.757786017894034, 64.338605455168803], [-163.54639421288428, 64.559160468190484], [-164.960829841145141, 64.446945095468848], [-166.425288255864473, 64.686672064870706], [-166.845004238939026, 65.088895575614529], [-168.110560065767146, 65.669997056736733], [-166.70527116602193, 66.088317776139391], [-164.474709642575448, 66.576660061297488], [-163.652511766595637, 66.576660061297488], [-163.788601651036117, 66.077207343196662], [-161.677774421210131, 66.116119696712403], [-162.489714525379981, 66.735565090595102], [-163.719716966791083, 67.116394558370089], [-164.430991380856511, 67.616338202577779], [-165.390286831706703, 68.042772121850234], [-166.764440680995989, 68.35887685817967], [-166.204707404626561, 68.883030910916162], [-164.430810513343431, 68.915535386827727], [-163.168613654614489, 69.371114813912882], [-162.930566169261965, 69.858061835399255], [-161.908897264635499, 70.333329983187625], [-160.93479651593367, 70.447689927849567], [-159.039175788387126, 70.891642157668926], [-158.119722866833939, 70.824721177851032], [-156.580824551398024, 71.357763576941736], [-155.067790290324211, 71.147776394323685]]]] } }, - { "type": "Feature", "properties": { "admin": "Uzbekistan", "name": "Uzbekistan", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[66.518606805288655, 37.362784328758785], [66.546150343700205, 37.974684963526855], [65.215998976507379, 38.402695013984292], [64.170223016216752, 38.892406724598231], [63.518014764261018, 39.363256537425627], [62.374260288344992, 40.053886216790382], [61.882714064384679, 41.084856879229392], [61.547178989513547, 41.2663703476546], [60.46595299667068, 41.22032664648254], [60.083340691981654, 41.425146185871391], [59.976422153569771, 42.223081976890199], [58.629010857991453, 42.751551011723045], [57.786529982337065, 42.170552883465511], [56.93221520368779, 41.82602610937559], [57.096391229079089, 41.32231008561056], [55.968191359282898, 41.308641669269356], [55.928917270741081, 44.995858466159099], [58.503127068928457, 45.586804307632818], [58.689989048095882, 45.500013739598621], [60.239971958258316, 44.784036770194717], [61.05831994003244, 44.405816962250505], [62.013300408786236, 43.504476630215642], [63.185786981056559, 43.650074978197999], [64.900824415959264, 43.728080552742576], [66.098012322865074, 42.997660020513088], [66.023391554635609, 41.994646307943974], [66.510648634715707, 41.987644151368436], [66.714047072216502, 41.168443508461493], [67.985855747351806, 41.135990708982213], [68.259895867795606, 40.662324530594894], [68.632482944620008, 40.668680731766798], [69.070027296835306, 41.384244289712363], [70.388964878220776, 42.081307684897439], [70.96231489449913, 42.266154283205481], [71.259247674448218, 42.167710679689456], [70.420022414028196, 41.519998277343134], [71.157858514291576, 41.143587144529107], [71.870114780570447, 41.392900092121259], [73.055417108049156, 40.86603302668945], [71.774875115856545, 40.145844428053763], [71.014198032520156, 40.244365546218226], [70.601406691372674, 40.218527330072284], [70.458159621059608, 40.49649485937028], [70.666622348925031, 40.960213324541407], [69.329494663372813, 40.727824408524839], [69.011632928345477, 40.086158148756653], [68.536416456989414, 39.533452867178923], [67.701428664017342, 39.580478420564518], [67.442219679641298, 39.140143541005479], [68.176025018185911, 38.901553453113898], [68.392032505165943, 38.157025254868728], [67.829999627559502, 37.144994004864678], [67.075782098259609, 37.35614390720928], [66.518606805288655, 37.362784328758785]]] } }, - { "type": "Feature", "properties": { "admin": "Venezuela", "name": "Venezuela", "continent": "South America" }, "geometry": { "type": "Polygon", "coordinates": [[[-71.331583624950284, 11.776284084515805], [-71.36000566271079, 11.53999359786121], [-71.947049933546495, 11.423282375530018], [-71.620868292920164, 10.969459947142791], [-71.633063930941063, 10.446494452349027], [-72.074173956984495, 9.865651353388369], [-71.695644090446521, 9.072263088411246], [-71.26455929226772, 9.137194525585981], [-71.039999355743376, 9.859992784052407], [-71.350083787710773, 10.211935126176213], [-71.400623338492224, 10.968969021036013], [-70.155298834906503, 11.375481675660039], [-70.293843349881016, 11.846822414594211], [-69.943244594996813, 12.162307033736095], [-69.584300096297454, 11.459610907431211], [-68.882999233664435, 11.44338450769156], [-68.233271450458716, 10.885744126829945], [-68.194126552997616, 10.554653225135921], [-67.296248541926317, 10.545868231646306], [-66.227864142507983, 10.648626817258684], [-65.655237596281737, 10.20079885501732], [-64.890452236578156, 10.077214667191296], [-64.329478725833724, 10.389598700395679], [-64.318006557864933, 10.641417954953978], [-63.079322475828725, 10.701724351438598], [-61.880946010980182, 10.7156253117251], [-62.730118984616396, 10.420268662960904], [-62.388511928950969, 9.948204453974636], [-61.588767462801918, 9.873066921422263], [-60.830596686431711, 9.38133982994894], [-60.671252407459718, 8.580174261911877], [-60.150095587796166, 8.602756862823425], [-59.758284878159181, 8.367034816924045], [-60.550587938058186, 7.779602972846178], [-60.637972785063752, 7.414999904810853], [-60.295668097562377, 7.043911444522918], [-60.543999192940966, 6.856584377464881], [-61.159336310456467, 6.696077378766317], [-61.139415045807937, 6.234296779806142], [-61.410302903881941, 5.959068101419616], [-60.733574184803707, 5.2002772078619], [-60.601179165271922, 4.918098049332129], [-60.966893276601517, 4.536467596856638], [-62.085429653559125, 4.162123521334308], [-62.804533047116692, 4.006965033377951], [-63.093197597899092, 3.770571193858784], [-63.888342861574145, 4.020530096854571], [-64.628659430587533, 4.14848094320925], [-64.816064012294007, 4.056445217297422], [-64.368494432214092, 3.797210394705246], [-64.408827887617903, 3.126786200366623], [-64.269999152265783, 2.497005520025566], [-63.422867397705105, 2.411067613124174], [-63.368788011311644, 2.200899562993129], [-64.083085496666072, 1.91636912679408], [-64.199305792890499, 1.49285492594602], [-64.611011928959854, 1.328730576987041], [-65.354713304288353, 1.0952822941085], [-65.548267381437554, 0.78925446207603], [-66.325765143484944, 0.724452215982012], [-66.876325853122566, 1.253360500489336], [-67.181294318293041, 2.250638129074062], [-67.447092047786299, 2.600280869960869], [-67.809938117123693, 2.820655015469569], [-67.303173183853417, 3.31845408773718], [-67.33756384954367, 3.542342230641721], [-67.621835903581271, 3.839481716319994], [-67.823012254493534, 4.503937282728898], [-67.744696621355203, 5.221128648291667], [-67.521531948502741, 5.556870428891968], [-67.34143958196556, 6.095468044454021], [-67.695087246355001, 6.267318020040645], [-68.265052456318216, 6.153268133972473], [-68.985318569602327, 6.206804917826856], [-69.389479946557103, 6.099860541198835], [-70.093312954372408, 6.960376491723109], [-70.674233567981503, 7.087784735538717], [-71.960175747348629, 6.991614895043538], [-72.19835242378187, 7.340430813013682], [-72.444487270788059, 7.42378489830048], [-72.479678921178831, 7.632506008327352], [-72.360900641555958, 8.002638454617893], [-72.439862230097944, 8.405275376820027], [-72.660494757768092, 8.62528778730268], [-72.788729824500379, 9.085027167187331], [-73.304951544880026, 9.151999823437604], [-73.027604132769554, 9.736770331252441], [-72.905286017534692, 10.45034434655477], [-72.614657762325194, 10.821975409381777], [-72.227575446242923, 11.108702093953237], [-71.973921678338272, 11.608671576377116], [-71.331583624950284, 11.776284084515805]]] } }, - { "type": "Feature", "properties": { "admin": "Vietnam", "name": "Vietnam", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[108.050180291782908, 21.552379869060111], [106.715067987090066, 20.696850694252014], [105.881682163519002, 19.752050482659694], [105.662005649846279, 19.058165188060567], [106.426816847765991, 18.004120998603224], [107.36195356651973, 16.697456569887049], [108.269495070429599, 16.079742336486145], [108.877106561317447, 15.276690578670436], [109.335269810017209, 13.42602834721772], [109.200135939573954, 11.666859239137761], [108.366129998815424, 11.00832062422627], [107.22092858279521, 10.36448395430183], [106.4051127462034, 9.530839748569317], [105.158263787865081, 8.599759629750492], [104.795185174582372, 9.2410383162765], [105.076201613385592, 9.918490505406806], [104.334334751403446, 10.486543687375228], [105.199914992292321, 10.889309800658094], [106.249670037869436, 10.961811835163585], [105.810523716253101, 11.567614650921225], [107.491403029410861, 12.337205918827944], [107.614547967562402, 13.535530707244202], [107.382727492301058, 14.202440904186968], [107.564525181103875, 15.202173163305554], [107.312705926545576, 15.908538316303177], [106.55600792849566, 16.604283962464802], [105.925762160264, 17.485315456608955], [105.094598423281496, 18.666974595611073], [103.896532017026701, 19.265180975821799], [104.183387892678908, 19.624668077060214], [104.822573683697073, 19.886641750563879], [104.435000441508024, 20.758733221921528], [103.203861118586431, 20.766562201413745], [102.754896274834636, 21.675137233969462], [102.170435825613552, 22.464753119389297], [102.706992222100084, 22.708795070887668], [103.504514601660546, 22.703756618739202], [104.476858351664447, 22.819150092046961], [105.329209425886603, 23.352063300056908], [105.811247186305209, 22.976892401617899], [106.725403273548451, 22.794267889898414], [106.567273390735295, 22.218204860924768], [107.043420037872608, 21.811898912029907], [108.050180291782908, 21.552379869060111]]] } }, - { "type": "Feature", "properties": { "admin": "Vanuatu", "name": "Vanuatu", "continent": "Oceania" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[167.844876743845077, -16.466333103097153], [167.515181105822847, -16.597849623279966], [167.180007765977791, -16.159995212470957], [167.2168013857696, -15.891846205308449], [167.844876743845077, -16.466333103097153]]], [[[167.107712437201485, -14.933920179913951], [167.2700281110302, -15.74002084723487], [167.001207310247935, -15.614602146062492], [166.79315799384085, -15.668810723536719], [166.649859247095549, -15.392703545801192], [166.629136997746429, -14.6264970842096], [167.107712437201485, -14.933920179913951]]]] } }, - { "type": "Feature", "properties": { "admin": "Yemen", "name": "Yemen", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[53.108572625547502, 16.651051133688949], [52.385205926325874, 16.38241120041965], [52.191729363825075, 15.938433132384018], [52.168164910699986, 15.597420355689945], [51.172515089732471, 15.175249742081489], [49.574576450403136, 14.708766587782746], [48.679230584514151, 14.003202419485657], [48.238947381387412, 13.948089504446369], [47.938914015500771, 14.007233181204423], [47.354453566279702, 13.592219753468379], [46.71707645039173, 13.399699204965016], [45.877592807810252, 13.347764390511681], [45.625050083199874, 13.290946153206759], [45.406458774605241, 13.02690542241143], [45.144355910020849, 12.953938300015306], [44.9895333188744, 12.699586900274708], [44.494576450382844, 12.721652736863344], [44.175112745954486, 12.585950425664873], [43.48295861183712, 12.63680003504008], [43.222871128112118, 13.220950425667422], [43.251448195169516, 13.767583726450848], [43.087943963398047, 14.062630316621306], [42.892245314308717, 14.802249253798745], [42.604872674333606, 15.213335272680592], [42.805015496600042, 15.261962795467252], [42.702437778500652, 15.718885809791995], [42.823670688657408, 15.911742255105263], [42.779332309750963, 16.34789134364868], [43.218375278502734, 16.666889960186406], [43.115797560403351, 17.088440456607369], [43.380794305196098, 17.579986680567668], [43.791518589051904, 17.319976711491105], [44.062613152855072, 17.410358791569589], [45.216651238797184, 17.43332896572333], [45.399999220568752, 17.333335069238554], [46.366658563020529, 17.233315334537632], [46.749994337761642, 17.283338120996174], [47.000004917189749, 16.949999294497438], [47.466694777217626, 17.116681626854877], [48.183343540241324, 18.166669216377311], [49.116671583864857, 18.616667588774941], [52.000009800022227, 19.000003363516054], [52.782184279192037, 17.349742336491229], [53.108572625547502, 16.651051133688949]]] } }, - { "type": "Feature", "properties": { "admin": "South Africa", "name": "South Africa", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[31.521001417778869, -29.257386976846245], [31.325561150850994, -29.401977634398907], [30.901762729625336, -29.909956963828034], [30.622813348113816, -30.423775730106122], [30.055716180142774, -31.140269463832951], [28.925552605919535, -32.172041110972494], [28.219755893677092, -32.771952813448848], [27.464608188595967, -33.226963799778794], [26.419452345492818, -33.614950453426175], [25.909664340933482, -33.667040297176392], [25.78062828950069, -33.944646091448334], [25.172861769315965, -33.796851495093577], [24.67785322439212, -33.987175795224537], [23.594043409934635, -33.794474379208147], [22.988188917744729, -33.916430759416976], [22.574157342222232, -33.864082533505304], [21.542799106541022, -34.258838799782922], [20.689052768646999, -34.417175388325226], [20.071261020597628, -34.795136814107984], [19.616405063564567, -34.819166355123706], [19.193278435958714, -34.462598972309777], [18.855314568769867, -34.444305515278458], [18.424643182049376, -33.997872816708963], [18.377410922934612, -34.13652068454806], [18.244499139079917, -33.867751560198023], [18.250080193767442, -33.281430759414434], [17.925190463948436, -32.61129078545342], [18.247909783611185, -32.429131361624563], [18.221761508871477, -31.661632989225662], [17.566917758868861, -30.72572112398754], [17.0644161312627, -29.878641045859158], [17.06291751472622, -29.875953871379977], [16.344976840895239, -28.576705010697697], [16.824017368240899, -28.082161553664466], [17.218928663815401, -28.355943291946804], [17.387497185951499, -28.783514092729774], [17.836151971109526, -28.856377862261311], [18.464899122804745, -29.045461928017271], [19.002127312911082, -28.972443129188857], [19.89473432788861, -28.461104831660769], [19.895767856534427, -24.767790215760588], [20.165725538827186, -24.917961928000768], [20.758609246511831, -25.868136488551446], [20.666470167735437, -26.477453301704916], [20.889609002371731, -26.828542982695907], [21.60589603036939, -26.726533705351748], [22.105968865657864, -26.28025603607913], [22.579531691180584, -25.979447523708142], [22.824271274514896, -25.500458672794768], [23.312096795350179, -25.268689873965712], [23.733569777122703, -25.39012948985161], [24.211266717228792, -25.670215752873567], [25.025170525825782, -25.719670098576891], [25.664666375437712, -25.486816094669706], [25.765848829865206, -25.174845472923671], [25.941652052522151, -24.696373386333214], [26.485753208123292, -24.616326592713097], [26.78640669119741, -24.240690606383478], [27.119409620886238, -23.574323011979772], [28.017235955525244, -22.827753594659072], [29.432188348109033, -22.091312758067584], [29.839036899542965, -22.102216485281172], [30.322883335091767, -22.271611830333931], [30.659865350067083, -22.151567478119912], [31.191409132621278, -22.251509698172395], [31.670397983534645, -23.658969008073861], [31.930588820124242, -24.369416599222532], [31.752408481581874, -25.484283949487406], [31.837777947728057, -25.843331801051342], [31.333157586397899, -25.660190525008943], [31.044079624157146, -25.731452325139436], [30.949666782359905, -26.022649021104144], [30.676608514129633, -26.398078301704604], [30.685961948374477, -26.743845310169526], [31.282773064913325, -27.285879408478991], [31.868060337051073, -27.17792734142127], [32.071665480281062, -26.733820082304902], [32.830120477028878, -26.74219166433619], [32.580264926897677, -27.470157566031808], [32.462132602678444, -28.30101124442055], [32.203388706193032, -28.752404880490065], [31.521001417778869, -29.257386976846245]], [[28.978262566857236, -28.955596612261708], [28.541700066855491, -28.647501722937562], [28.07433841320778, -28.851468601193581], [27.532511020627471, -29.242710870075353], [26.999261915807629, -29.875953871379977], [27.749397006956478, -30.645105889612214], [28.107204624145421, -30.545732110314944], [28.291069370239903, -30.226216729454293], [28.848399692507734, -30.070050551068245], [29.018415154748016, -29.743765557577362], [29.325166456832587, -29.257386976846245], [28.978262566857236, -28.955596612261708]]] } }, - { "type": "Feature", "properties": { "admin": "Zambia", "name": "Zambia", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[32.759375441221316, -9.230599053589058], [33.231387973775291, -9.676721693564799], [33.485687697083584, -10.525558770391111], [33.315310499817279, -10.796549981329695], [33.114289178201908, -11.607198174692311], [33.306422153463068, -12.435778090060214], [32.991764357237876, -12.783870537978272], [32.688165317523122, -13.712857761289273], [33.214024692525207, -13.97186003993615], [30.179481235481827, -14.796099134991525], [30.274255812305103, -15.507786960515208], [29.51683434420314, -15.644677829656386], [28.947463413211256, -16.043051446194436], [28.825868768028492, -16.389748630440611], [28.467906121542676, -16.468400160388843], [27.598243442502753, -17.290830580314005], [27.044427117630729, -17.938026218337427], [26.706773309035633, -17.961228936436477], [26.381935255648919, -17.846042168857892], [25.264225701608005, -17.736539808831413], [25.084443393664564, -17.661815687737366], [25.076950310982255, -17.578823337476617], [24.6823490740015, -17.35341073981947], [24.033861525170771, -17.29584319424632], [23.215048455506057, -17.52311614346598], [22.562478468524255, -16.89845142992181], [21.887842644953867, -16.080310153876876], [21.933886346125913, -12.898437188369357], [24.016136508894672, -12.91104623784857], [23.930922072045373, -12.565847670138854], [24.079905226342838, -12.191296888887361], [23.904153680118181, -11.722281589406318], [24.017893507592586, -11.237298272347088], [23.912215203555714, -10.926826267137512], [24.257155389103982, -10.951992689663655], [24.314516228947948, -11.262826429899269], [24.783169793402948, -11.238693536018962], [25.418118116973197, -11.330935967659958], [25.752309604604726, -11.784965101776356], [26.55308759939961, -11.924439792532125], [27.164419793412456, -11.608748467661071], [27.38879886242378, -12.132747491100663], [28.15510867687998, -12.272480564017894], [28.52356163912102, -12.698604424696679], [28.934285922976834, -13.248958428605132], [29.699613885219485, -13.257226657771827], [29.616001417771223, -12.178894545137307], [29.341547885869087, -12.36074391037241], [28.642417433392346, -11.971568698782312], [28.372253045370421, -11.793646742401389], [28.496069777141763, -10.789883721564044], [28.673681674928922, -9.605924981324931], [28.449871046672818, -9.164918308146083], [28.734866570762495, -8.526559340044576], [29.002912225060467, -8.40703175215347], [30.34608605319081, -8.238256524288216], [30.740015496551781, -8.340007419470913], [31.157751336950042, -8.594578747317362], [31.55634809746649, -8.76204884199864], [32.191864861791963, -8.930358981973276], [32.759375441221316, -9.230599053589058]]] } }, - { "type": "Feature", "properties": { "admin": "Zimbabwe", "name": "Zimbabwe", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[31.191409132621278, -22.251509698172395], [30.659865350067083, -22.151567478119912], [30.322883335091767, -22.271611830333931], [29.839036899542965, -22.102216485281172], [29.432188348109033, -22.091312758067584], [28.794656202924209, -21.639454034107445], [28.02137007010861, -21.485975030200578], [27.727227817503252, -20.851801853114711], [27.724747348753247, -20.499058526290387], [27.296504754350501, -20.391519870690995], [26.164790887158478, -19.293085625894935], [25.850391473094724, -18.714412937090533], [25.649163445750155, -18.536025892818987], [25.264225701608005, -17.736539808831413], [26.381935255648919, -17.846042168857892], [26.706773309035633, -17.961228936436477], [27.044427117630729, -17.938026218337427], [27.598243442502753, -17.290830580314005], [28.467906121542676, -16.468400160388843], [28.825868768028492, -16.389748630440611], [28.947463413211256, -16.043051446194436], [29.51683434420314, -15.644677829656386], [30.274255812305103, -15.507786960515208], [30.338954705534537, -15.880839125230242], [31.173063999157673, -15.860943698797868], [31.636498243951188, -16.071990248277881], [31.852040643040592, -16.319417006091374], [32.328238966610222, -16.392074069893749], [32.847638787575839, -16.713398125884613], [32.849860874164385, -17.979057305577175], [32.654885695127142, -18.672089939043492], [32.611994256324884, -19.419382826416268], [32.772707960752619, -19.715592136313294], [32.659743279762573, -20.30429005298231], [32.508693068173436, -20.395292250248303], [32.244988234188007, -21.116488539313689], [31.191409132621278, -22.251509698172395]]] } } - ] - }; - -var randomcountriesData1 = [ - { country: "Iran", "continent": "Asia", "CategoryName": "Books", "Sales": 550 }, - { country: "Benin", "continent": "Africa", "CategoryName": "Books", "Sales": 1000 }, - { country: "China", "continent": "Asia", "CategoryName": "Books", "Sales": 420 }, - { country: "Chile", "continent": "South America", "CategoryName": "Books", "Sales": 1100 }, - { country: "Cuba", "continent": "North America", "CategoryName": "Books", "Sales": 450 }, - { country: "Spain", "continent": "Europe", "CategoryName": "Books", "Sales": 1200 }, - { country: "Fiji", "continent": "Oceania", "CategoryName": "Books", "Sales": 618.0 }, -]; - -module mapcomponenet { - $(function () { - var mapsample = new ej.datavisualization.Map($("#map"), { - enableAnimation: true, - navigationControl: { - enableNavigation: true, - orientation: 'vertical', - absolutePosition: { x: 5, y: 15 }, - dockPosition: 'none' - }, - layers: [ - { - layerType: 'geometry', - enableMouseHover: false, - enableSelection: false, - shapeSettings: { - fill: "#626171", - autoFill: false, - highlightStroke: "white", - stroke: "white", - strokeThickness: 0.5, - highlightColor: "#BFBFBF" - }, - shapeData: world_map, - legendSettings: { dockOnMap: false } - } - ] - }); - }); -} - - - - - - - -module MenuComponent { - $(function () { - var sample = new ej.Menu($("#syncfusionProducts"), { - width: "100%", - animationType: ej.AnimationType.Default, - cssClass: 'gradient-lime ', - enableAnimation: true, - enableSeparator: true, - height: 40, - htmlAttributes: { "aria-label": "menu" }, - menuType: "normalmenu", - orientation: ej.Orientation.Horizontal, - showRootLevelArrows: true, - showSubLevelArrows: true, - subMenuDirection: ej.Direction.Right, - titleText: "Menu", - - }); - }); - -} - - - - - - - - -module NavigationDrawerComponent { - $(function () { - var navigationdrawerInstance = new ej.NavigationDrawer($("#navpane"), { - targetId: "butdrawer", - contentId: "content_container", - type: "overlay", - direction: "left", - enableListView: true, - listViewSettings: { - width: 300, - selectedItemIndex: 0 - }, - position: "normal" - }); - $("#navpane_listview").click(function (e: any) { - var text = e.target["text"] || $(e.target).closest("li.e-list").text(); - $("#butdrawer").parent().children("h2").text(text); - }); - }); -} - - - -module PDFViewerComponent { - $(function () { - var pdfviewerControl = new ej.PdfViewer($("#pdfviewer"), { - serviceUrl: (window).baseurl + "api/PdfViewer", - isResponsive: true - }); - }); -} - - - -module PivotChartOlap { - $(function () { - var sample = new ej.PivotChart($("#PivotChart"), { - dataSource: { - data: "//bi.syncfusion.com/olap/msmdpump.dll", - catalog: "Adventure Works DW 2008 SE", - cube: "Adventure Works", - rows: [ - { - fieldName: "[Date].[Fiscal]" - } - ], - columns: [ - { - fieldName: "[Customer].[Customer Geography]" - } - ], - values: [ - { - measures: [ - { - fieldName: "[Measures].[Internet Sales Amount]" - } - ], - axis: "columns" - } - ], - filters: [] - }, - isResponsive: true, zooming: { enableScrollbar: true }, - commonSeriesOptions: { - type: "column" - }, - size: { height: "460px", width: "100%" }, - primaryXAxis: { title: { text: "Date - Fiscal" }, labelRotation: 0 }, - primaryYAxis: { title: { text: "Internet Sales Amount" } }, - legend: { visible: true, rowCount: 2 } - // load:"loadTheme" - }); - }); -} - - - -var pivot_dataset = [ - { Amount: 100, Country: "Canada", Date: "FY 2005", Product: "Bike", Quantity: 2, State: "Alberta" }, - { Amount: 200, Country: "Canada", Date: "FY 2006", Product: "Van", Quantity: 3, State: "British Columbia" }, - { Amount: 300, Country: "Canada", Date: "FY 2007", Product: "Car", Quantity: 4, State: "Brunswick" }, - { Amount: 150, Country: "Canada", Date: "FY 2008", Product: "Bike", Quantity: 3, State: "Manitoba" }, - { Amount: 200, Country: "Canada", Date: "FY 2006", Product: "Car", Quantity: 4, State: "Ontario" }, - { Amount: 100, Country: "Canada", Date: "FY 2007", Product: "Van", Quantity: 1, State: "Quebec" }, - { Amount: 200, Country: "France", Date: "FY 2005", Product: "Bike", Quantity: 2, State: "Charente-Maritime" }, - { Amount: 250, Country: "France", Date: "FY 2006", Product: "Van", Quantity: 4, State: "Essonne" }, - { Amount: 300, Country: "France", Date: "FY 2007", Product: "Car", Quantity: 3, State: "Garonne (Haute)" }, - { Amount: 150, Country: "France", Date: "FY 2008", Product: "Van", Quantity: 2, State: "Gers" }, - { Amount: 200, Country: "Germany", Date: "FY 2006", Product: "Van", Quantity: 3, State: "Bayern" }, - { Amount: 250, Country: "Germany", Date: "FY 2007", Product: "Car", Quantity: 3, State: "Brandenburg" }, - { Amount: 150, Country: "Germany", Date: "FY 2008", Product: "Car", Quantity: 4, State: "Hamburg" }, - { Amount: 200, Country: "Germany", Date: "FY 2008", Product: "Bike", Quantity: 4, State: "Hessen" }, - { Amount: 150, Country: "Germany", Date: "FY 2007", Product: "Van", Quantity: 3, State: "Nordrhein-Westfalen" }, - { Amount: 100, Country: "Germany", Date: "FY 2005", Product: "Bike", Quantity: 2, State: "Saarland" }, - { Amount: 150, Country: "United Kingdom", Date: "FY 2008", Product: "Bike", Quantity: 5, State: "England" }, - { Amount: 250, Country: "United States", Date: "FY 2007", Product: "Car", Quantity: 4, State: "Alabama" }, - { Amount: 200, Country: "United States", Date: "FY 2005", Product: "Van", Quantity: 4, State: "California" }, - { Amount: 100, Country: "United States", Date: "FY 2006", Product: "Bike", Quantity: 2, State: "Colorado" }, - { Amount: 150, Country: "United States", Date: "FY 2008", Product: "Car", Quantity: 3, State: "New Mexico" }, - { Amount: 200, Country: "United States", Date: "FY 2005", Product: "Bike", Quantity: 4, State: "New York" }, - { Amount: 250, Country: "United States", Date: "FY 2008", Product: "Car", Quantity: 3, State: "North Carolina" }, - { Amount: 300, Country: "United States", Date: "FY 2007", Product: "Van", Quantity: 4, State: "South Carolina" } -] - -module PivotChartRelational { - - $(function () { - var sample = new ej.PivotChart($("#PivotChart"), { - dataSource: { - data: pivot_dataset, - rows: [ - { - fieldName: "Country", - fieldCaption: "Country" - }, - { - fieldName: "State", - fieldCaption: "State" - }, - { - fieldName: "Date", - fieldCaption: "Date" - } - ], - columns: [ - { - fieldName: "Product", - fieldCaption: "Product" - } - ], - values: [ - { - fieldName: "Amount", - fieldCaption: "Amount" - } - ], - filters: [] - }, - isResponsive: true, zooming: { enableScrollbar: true }, - commonSeriesOptions: { - type: "column" - }, - size: { height: "460px", width: "100%" }, - primaryYAxis: { title: { text: "Amount" } }, - legend: { visible: true } - // load:"loadTheme" - }); - }); -} - - - -module PivotGaugeOlap { - - $(function () { - var sample = new ej.PivotGauge($("#PivotGauge"), { - dataSource: { - data: "//bi.syncfusion.com/olap/msmdpump.dll", - catalog: "Adventure Works DW 2008 SE", - cube: "Adventure Works", - rows: [ - { - fieldName: "[Date].[Fiscal]", - filterItems: { filterType: "include", values: ["[Date].[Fiscal].[Fiscal Year].&[2004]"] } - }, - ], - columns: [ - { - fieldName: "[Customer].[Customer Geography]" - } - ], - values: [ - { - measures: [ - { - fieldName: "[Measures].[Internet Sales Amount]" - }, - { - fieldName: "[Measures].[Internet Revenue Status]" - }, - { - fieldName: "[Measures].[Internet Revenue Trend]" - }, - { - fieldName: "[Measures].[Internet Revenue Goal]" - }, - ], - axis: "columns" - } - ], - filters: [] - }, - enableTooltip: true, isResponsive: true, - labelFormatSettings: { decimalPlaces: 2 }, - scales: [{ - showRanges: true, - radius: 150, showScaleBar: true, size: 1, - border: { - width: 0.5 - }, - showIndicators: true, showLabels: true, - pointers: [{ - showBackNeedle: true, - backNeedleLength: 20, - length: 120, - width: 7 - }, - { - type: "marker", - markerType: "diamond", - distanceFromScale: 5, - placement: "center", - backgroundColor: "#29A4D9", - length: 25, - width: 15 - }], - ticks: [{ - type: "major", - distanceFromScale: 2, - height: 16, - width: 1, color: "#8c8c8c" - }, - { - type: "minor", - height: 6, - width: 1, - distanceFromScale: 2, - color: "#8c8c8c" - }], - labels: [{ - color: "#8c8c8c" - }], - ranges: [{ - distanceFromScale: -5, - backgroundColor: "#fc0606", - border: { color: "#fc0606" } - }, - { - distanceFromScale: -5 - }], - customLabels: [{ - position: { x: 180, y: 290 }, - font: { size: "10px", fontFamily: "Segoe UI", fontStyle: "Normal" }, color: "#666666" - }, - { - position: { x: 180, y: 320 }, - font: { size: "10px", fontFamily: "Segoe UI", fontStyle: "Normal" }, color: "#666666" - }, - { - position: { x: 180, y: 150 }, - font: { size: "12px", fontFamily: "Segoe UI", fontStyle: "Normal" }, color: "#666666" - }] - }] - }); - }); -} - - - -var pivot_dataset = [ - { Amount: 100, Country: "Canada", Date: "FY 2005", Product: "Bike", Quantity: 2, State: "Alberta" }, - { Amount: 200, Country: "Canada", Date: "FY 2006", Product: "Van", Quantity: 3, State: "British Columbia" }, - { Amount: 300, Country: "Canada", Date: "FY 2007", Product: "Car", Quantity: 4, State: "Brunswick" }, - { Amount: 150, Country: "Canada", Date: "FY 2008", Product: "Bike", Quantity: 3, State: "Manitoba" }, - { Amount: 200, Country: "Canada", Date: "FY 2006", Product: "Car", Quantity: 4, State: "Ontario" }, - { Amount: 100, Country: "Canada", Date: "FY 2007", Product: "Van", Quantity: 1, State: "Quebec" }, - { Amount: 200, Country: "France", Date: "FY 2005", Product: "Bike", Quantity: 2, State: "Charente-Maritime" }, - { Amount: 250, Country: "France", Date: "FY 2006", Product: "Van", Quantity: 4, State: "Essonne" }, - { Amount: 300, Country: "France", Date: "FY 2007", Product: "Car", Quantity: 3, State: "Garonne (Haute)" }, - { Amount: 150, Country: "France", Date: "FY 2008", Product: "Van", Quantity: 2, State: "Gers" }, - { Amount: 200, Country: "Germany", Date: "FY 2006", Product: "Van", Quantity: 3, State: "Bayern" }, - { Amount: 250, Country: "Germany", Date: "FY 2007", Product: "Car", Quantity: 3, State: "Brandenburg" }, - { Amount: 150, Country: "Germany", Date: "FY 2008", Product: "Car", Quantity: 4, State: "Hamburg" }, - { Amount: 200, Country: "Germany", Date: "FY 2008", Product: "Bike", Quantity: 4, State: "Hessen" }, - { Amount: 150, Country: "Germany", Date: "FY 2007", Product: "Van", Quantity: 3, State: "Nordrhein-Westfalen" }, - { Amount: 100, Country: "Germany", Date: "FY 2005", Product: "Bike", Quantity: 2, State: "Saarland" }, - { Amount: 150, Country: "United Kingdom", Date: "FY 2008", Product: "Bike", Quantity: 5, State: "England" }, - { Amount: 250, Country: "United States", Date: "FY 2007", Product: "Car", Quantity: 4, State: "Alabama" }, - { Amount: 200, Country: "United States", Date: "FY 2005", Product: "Van", Quantity: 4, State: "California" }, - { Amount: 100, Country: "United States", Date: "FY 2006", Product: "Bike", Quantity: 2, State: "Colorado" }, - { Amount: 150, Country: "United States", Date: "FY 2008", Product: "Car", Quantity: 3, State: "New Mexico" }, - { Amount: 200, Country: "United States", Date: "FY 2005", Product: "Bike", Quantity: 4, State: "New York" }, - { Amount: 250, Country: "United States", Date: "FY 2008", Product: "Car", Quantity: 3, State: "North Carolina" }, - { Amount: 300, Country: "United States", Date: "FY 2007", Product: "Van", Quantity: 4, State: "South Carolina" } -] - -module PivotGaugeRelational { - $(function () { - var sample = new ej.PivotGauge($("#PivotGauge"), { - dataSource: { - data: pivot_dataset, - rows: [ - { - fieldName: "Country", - }, - { - fieldName: "State", - } - ], - columns: [ - { - fieldName: "Product", - } - ], - values: [ - { - fieldName: "Amount", - }, - { - fieldName: "Quantity", - } - ] - }, - enableTooltip: true, isResponsive: true, - labelFormatSettings: { decimalPlaces: 2 }, - scales: [{ - showRanges: true, - radius: 150, showScaleBar: true, size: 1, - border: { - width: 0.5 - }, - showIndicators: true, showLabels: true, - pointers: [{ - showBackNeedle: true, - backNeedleLength: 20, - length: 120, - width: 7 - }, - { - type: "marker", - markerType: "diamond", - distanceFromScale: 5, - placement: "center", - backgroundColor: "#29A4D9", - length: 25, - width: 15 - }], - ticks: [{ - type: "major", - distanceFromScale: 2, - height: 16, - width: 1, color: "#8c8c8c" - }, - { - type: "minor", - height: 6, - width: 1, - distanceFromScale: 2, - color: "#8c8c8c" - }], - labels: [{ - color: "#8c8c8c" - }], - ranges: [{ - distanceFromScale: -5, - backgroundColor: "#fc0606", - border: { color: "#fc0606" } - }, - { - distanceFromScale: -5 - }], - customLabels: [{ - position: { x: 180, y: 290 }, - font: { size: "10px", fontFamily: "Segoe UI", fontStyle: "Normal" }, color: "#666666" - }, - { - position: { x: 180, y: 320 }, - font: { size: "10px", fontFamily: "Segoe UI", fontStyle: "Normal" }, color: "#666666" - }, - { - position: { x: 180, y: 150 }, - font: { size: "12px", fontFamily: "Segoe UI", fontStyle: "Normal" }, color: "#666666" - }] - }] - }); - }); -} - - - -module PivotGridOlap { - - $(function () { - var sample = new ej.PivotGrid($("#PivotGrid"), { - dataSource: { - data: "//bi.syncfusion.com/olap/msmdpump.dll", - catalog: "Adventure Works DW 2008 SE", - cube: "Adventure Works", - rows: [ - { - fieldName: "[Date].[Fiscal]" - } - ], - columns: [ - { - fieldName: "[Customer].[Customer Geography]" - } - ], - values: [ - { - measures: [ - { - fieldName: "[Measures].[Internet Sales Amount]", - } - ], - axis: "columns" - } - ], - filters: [] - }, - enableGroupingBar: true, - pivotTableFieldListID: "PivotSchemaDesigner" - }); - $("#PivotSchemaDesigner").ejPivotSchemaDesigner(); - }); -} - - - -var pivot_dataset = [ - { Amount: 100, Country: "Canada", Date: "FY 2005", Product: "Bike", Quantity: 2, State: "Alberta" }, - { Amount: 200, Country: "Canada", Date: "FY 2006", Product: "Van", Quantity: 3, State: "British Columbia" }, - { Amount: 300, Country: "Canada", Date: "FY 2007", Product: "Car", Quantity: 4, State: "Brunswick" }, - { Amount: 150, Country: "Canada", Date: "FY 2008", Product: "Bike", Quantity: 3, State: "Manitoba" }, - { Amount: 200, Country: "Canada", Date: "FY 2006", Product: "Car", Quantity: 4, State: "Ontario" }, - { Amount: 100, Country: "Canada", Date: "FY 2007", Product: "Van", Quantity: 1, State: "Quebec" }, - { Amount: 200, Country: "France", Date: "FY 2005", Product: "Bike", Quantity: 2, State: "Charente-Maritime" }, - { Amount: 250, Country: "France", Date: "FY 2006", Product: "Van", Quantity: 4, State: "Essonne" }, - { Amount: 300, Country: "France", Date: "FY 2007", Product: "Car", Quantity: 3, State: "Garonne (Haute)" }, - { Amount: 150, Country: "France", Date: "FY 2008", Product: "Van", Quantity: 2, State: "Gers" }, - { Amount: 200, Country: "Germany", Date: "FY 2006", Product: "Van", Quantity: 3, State: "Bayern" }, - { Amount: 250, Country: "Germany", Date: "FY 2007", Product: "Car", Quantity: 3, State: "Brandenburg" }, - { Amount: 150, Country: "Germany", Date: "FY 2008", Product: "Car", Quantity: 4, State: "Hamburg" }, - { Amount: 200, Country: "Germany", Date: "FY 2008", Product: "Bike", Quantity: 4, State: "Hessen" }, - { Amount: 150, Country: "Germany", Date: "FY 2007", Product: "Van", Quantity: 3, State: "Nordrhein-Westfalen" }, - { Amount: 100, Country: "Germany", Date: "FY 2005", Product: "Bike", Quantity: 2, State: "Saarland" }, - { Amount: 150, Country: "United Kingdom", Date: "FY 2008", Product: "Bike", Quantity: 5, State: "England" }, - { Amount: 250, Country: "United States", Date: "FY 2007", Product: "Car", Quantity: 4, State: "Alabama" }, - { Amount: 200, Country: "United States", Date: "FY 2005", Product: "Van", Quantity: 4, State: "California" }, - { Amount: 100, Country: "United States", Date: "FY 2006", Product: "Bike", Quantity: 2, State: "Colorado" }, - { Amount: 150, Country: "United States", Date: "FY 2008", Product: "Car", Quantity: 3, State: "New Mexico" }, - { Amount: 200, Country: "United States", Date: "FY 2005", Product: "Bike", Quantity: 4, State: "New York" }, - { Amount: 250, Country: "United States", Date: "FY 2008", Product: "Car", Quantity: 3, State: "North Carolina" }, - { Amount: 300, Country: "United States", Date: "FY 2007", Product: "Van", Quantity: 4, State: "South Carolina" } -] - -module PivotGridRelational { - $(function () { - var sample = new ej.PivotGrid($("#PivotGrid"), { - dataSource: { - data: pivot_dataset, - rows: [ - { - fieldName: "Country", - fieldCaption: "Country" - }, - { - fieldName: "State", - fieldCaption: "State" - } - ], - columns: - [{ - fieldName: "Product", - fieldCaption: "Product" - } - ], - values: [ - { - fieldName: "Amount", - fieldCaption: "Amount" - }, - { - fieldName: "Quantity", - fieldCaption: "Quantity" - } - ], - filters: [] - }, - enableGroupingBar: true, - pivotTableFieldListID: "PivotSchemaDesigner" - }); - $("#PivotSchemaDesigner").ejPivotSchemaDesigner(); - - }); -} - - - -module PivotTreeMap { - $(function () { - var sample = new ej.PivotTreeMap($("#PivotTreeMap"), { - dataSource: { - data: "//bi.syncfusion.com/olap/msmdpump.dll;Locale Identifier=1033;", - catalog: "Adventure Works DW 2008 SE", - cube: "Adventure Works", - rows: [ - { - fieldName: "[Customer].[Customer Geography]" - } - ], - columns: [ - { - fieldName: "[Date].[Fiscal]" - } - ], - values: [ - { - measures: [ - { - fieldName: "[Measures].[Customer Count]", - } - ], - axis: "columns" - } - ], - filters: [] - } - }); - }); -} - - - -module ProgressBarComponent { - $(function () { - var sample = new ej.ProgressBar($("#progressBar"), { - width: 200, - value: 45, - height: 20, - enablePersistence: true, - maxValue: 200, - minValue: 0, - showRoundedCorner: true, - text: 'loading...' - }); - }); - -} - - - - -declare var rteObj: any; -declare var data: any; -var radialEle = $('#defaultradialmenu'), action = 0, forRedo = 0; -var rteEle = $("#rteSample1"); -module RadialMenuComponent { - $(function () { - - if (!(ej.browserInfo().name == "msie" && parseInt(ej.browserInfo().version) < 9)) { - var radialmenuInstance = new ej.RadialMenu($("#defaultradialmenu"), { - imageClass: "imageclass", - backImageClass: "backimageclass", - targetElementId: "radialtarget1" - }); - $("#radialtarget1").parent().css("position", "relative"); - } - else { - $("#contentDiv").html("Radial Menu is only supported from Internet Explorer Versioned 9 and above.").css({ "font-size": "20px", "color": "red" }); - } - var rteInstance = new ej.RTE($("#rteSample1"), { - width: "100%", - minWidth: "10px", - change: (e) => { radialEle.ejRadialMenu("enableItem", "Undo"); }, - select: (e) => { - var target = $("#radialtarget1"), radialRadius = 150, radialDiameter = 2 * radialRadius, - // To get Iframe positions - iframeY = e.event.clientY, iframeX = e.event.clientX, - // To set Radial Menu position within target - x = iframeX > target.width() - radialRadius ? target.width() - radialDiameter : (iframeX > radialRadius ? iframeX - radialRadius : 0), - y = iframeY > target.height() - radialRadius ? target.height() - radialDiameter : (iframeY > radialRadius ? iframeY - radialRadius : 0); - radialEle.ejRadialMenu("setPosition", x, y); - radialEle.focus(); - $('iframe').contents().find('body').blur(); - }, - showToolbar: false, - showContextMenu: false - }); - $(window).resize(function () { - if (ej.isMobile() && ej.isPortrait()) - $('#defaultradialmenu').css({ "left": 25 }); - }); - }); -} - - -function bold(e: any) { - - rteObj = rteEle.data("ejRTE"); - rteObj.executeCommand("bold"); - data = rteObj._getSelectedHtmlString() ? true : false; - if (data) action += 1; - forRedo = action; - radialEle.focus(); -} -function italic(e: any) { - rteObj = rteEle.data("ejRTE"); - rteObj.executeCommand("italic"); - data = rteObj._getSelectedHtmlString() ? true : false; - if (data) action += 1; - forRedo = action; - radialEle.focus(); -} -function undo(e: any) { - rteObj = rteEle.data("ejRTE"); - rteObj.executeCommand("undo"); - action -= 1; - if (action == 0) - radialEle.ejRadialMenu("disableItem", "Undo"); - radialEle.ejRadialMenu("enableItem", "Redo"); - radialEle.focus(); -} -function redo(e: any) { - rteObj = rteEle.data("ejRTE"); - rteObj.executeCommand("redo"); - action += 1; - if (forRedo == action) radialEle.ejRadialMenu("disableItem", "Redo"); - radialEle.ejRadialMenu("enableItem", "Undo"); - radialEle.focus(); -} - - - - -module RadialSliderComponent { - $(function () { - var radialsliderInstance = new ej.RadialSlider($("#radialSlider"), { - innerCircleImageUrl: "images/radialslider/chevron-right.png" - }); - }); -} - - -module rangecomponent { - $(function () { - var linearsample = new ej.datavisualization.RangeNavigator($("#RangeNavigator"), { - enableDeferredUpdate: true, - padding: "15", - allowSnapping: true, - selectedRangeSettings: { - start: "2010/5/1", end: "2011/10/1" - }, - isResponsive: true, - tooltipSettings: { - visible: true, labelFormat: "MM/dd/yyyy", backgroundColor: "gray", tooltipDisplayMode: "ondemand" - }, - load: () => { - var rn = $("#RangeNavigator").data("ejRangeNavigator"); - rn.model.series = [ - { - type: 'line', - dataSource: data.Open, xName: "XValue", yName: "YValue", - fill: '#69D2E7' - } - ]; - }, - loaded: function () { - var sender = $("#RangeNavigator").data("ejRangeNavigator"); - var theme = (window).themeStyle + (window).themeColor + (window).themeVarient; - if (theme) { - switch (theme) { - case "flatazurelight": - theme = "azurelight"; - break; - case "flatlimelight": - theme = "limelight"; - break; - case "flatsaffronlight": - theme = "saffronlight"; - break; - case "gradientazurelight": - theme = "gradientazure"; - break; - case "gradientlimelight": - theme = "gradientlime"; - break; - case "gradientsaffronlight": - theme = "gradientsaffron"; - break; - case "flatazuredark": - theme = "azuredark"; - break; - case "flatlimedark": - theme = "limedark"; - break; - case "flatsaffrondark": - theme = "saffrondark"; - break; - case "gradientazuredark": - theme = "gradientazuredark"; - break; - case "gradientlimedark": - theme = "gradientlimedark"; - break; - case "gradientsaffrondark": - theme = "gradientsaffrondark"; - break; - case "flathigh-contrast-01dark": - theme = "highcontrast01"; - break; - case "flathigh-contrast-02dark": - theme = "highcontrast02"; - break; - case "flatmateriallight": - theme = "material"; - break; - case "flatoffice-365light": - theme = "office"; - break; - default: - theme = "flatlight"; - break; - } - sender.model.theme = theme; - } - } - - }); - }); -} -var data; -data = GetData(); - -function GetData() { - var series1: any[] = []; - var series2: any[] = []; - var value = 100; - var value1 = 120; - for (var i = 1; i < 730; i++) { - - if (Math.random() > .5) { - value += Math.random(); - value1 += Math.random(); - } else { - value -= Math.random(); - value1 -= Math.random(); - } - var point1 = { XValue: new Date(2010, 0, i), YValue: value }; - var point2 = { XValue: new Date(2010, 0, i), YValue: value1 }; - series1.push(point1); - series2.push(point2); - } - - data = { Open: series1, Close: series2 }; - return data; -}; - - - -module RatingComponent { - $(function () { - - var sample1 = new ej.Rating($("#fullRating"), { - value: 4, - precision: ej.Rating.Precision.Full, - allowReset: true, - cssClass: "gradient-lime", - enabled: true, - enablePersistence: true, - incrementStep: 2, - maxValue: 10, - minValue: 0, - orientation: ej.Orientation.Horizontal, - shapeHeight: 25, - shapeWidth: 25, - showTooltip: true - }); - - var sample2 = new ej.Rating($("#halfRating"), { - precision: ej.Rating.Precision.Half, - value: 3.5, - allowReset: true, - cssClass: "gradient-lime", - enabled: true, - enablePersistence: true, - incrementStep: 2, - maxValue: 10, - minValue: 0, - orientation: "horizontal", - shapeHeight: 25, - shapeWidth: 25, - showTooltip: true - }); - - var sample3 = new ej.Rating($("#exactRating"), { - precision: ej.Rating.Precision.Exact, - value: 3.7, - allowReset: true, - cssClass: "gradient-lime", - enabled: true, - enablePersistence: true, - incrementStep: 2, - maxValue: 10, - minValue: 0, - orientation: "horizontal", - shapeHeight: 25, - shapeWidth: 25, - showTooltip: true - }); - }); - -} - - - -module ReportViewerComponent { - $(function () { - var report = new ej.ReportViewer($("#territoryReportViewer"), { - reportServiceUrl: (window).baseurl + 'api/ReportViewer', - reportServerUrl: 'http://104.207.134.201/reportserver', - processingMode: ej.ReportViewer.ProcessingMode.Remote, - reportPath: "/SSRSSamples2/Territory Sales new", - isResponsive: true - }); - }); -} - - - -var fontfamily = ["Segoe UI", "Arial", "Times New Roman", "Tahoma", "Helvetica"], fontsize = ["1pt", "2pt", "3pt", "4pt", "5pt"], action1 = ["New", "Clear"], action2 = ["Bold", "Italic", "Underline", "strikethrough", "superscript", "subscript", "JustifyLeft", "JustifyCenter", "JustifyRight", "JustifyFull", "Undo", "Redo"]; -module RibbonComponent { - $(function () { - var sample = new ej.Ribbon($("#defaultRibbon"), { - width: "100%", - expandPinSettings: { - toolTip: "Collapse the Ribbon" - }, - collapsePinSettings: { - toolTip: "Pin the Ribbon" - }, - applicationTab: { - type: ej.Ribbon.ApplicationTabType.Menu, menuItemID: "ribbonmenu", menuSettings: { openOnClick: false } - }, - tabs: [{ - id: "home", text: "HOME", groups: [{ - text: "New", alignType: ej.Ribbon.AlignType.Rows, content: [{ - groups: [{ - id: "new", - text: "New", - toolTip: "New", - buttonSettings: { - contentType: ej.ContentType.ImageOnly, - imagePosition: ej.ImagePosition.ImageTop, - prefixIcon: "e-icon e-ribbon e-new", - click: "onClick" - } - } - ], - defaults: { - type: "button", - width: 60, - height: 70 - } - }] - }, - { - text: "Clipboard", alignType: ej.Ribbon.AlignType.Columns, content: [{ - groups: [{ - id: "paste", - text: "paste", - toolTip: "Paste", - splitButtonSettings: { - contentType: ej.ContentType.ImageOnly, - prefixIcon: "e-icon e-ribbon e-ribbonpaste", - targetID: "pasteSplit", - buttonMode: "dropdown", - click: "onClick", - arrowPosition: ej.ArrowPosition.Bottom - } - } - ], - defaults: { - type: "splitbutton", - width: 50, - height: 70 - } - }, - { - groups: [{ - id: "cut", - text: "Cut", - toolTip: "Cut", - buttonSettings: { - contentType: ej.ContentType.TextAndImage, - click: "onClick", - prefixIcon: "e-icon e-ribbon e-ribboncut" - } - }, - { - id: "copy", - text: "Copy", - toolTip: "Copy", - buttonSettings: { - contentType: ej.ContentType.TextAndImage, - click: "onClick", - prefixIcon: "e-icon e-ribbon e-ribboncopy" - } - }, - { - id: "clear", - text: "Clear", - toolTip: "Clear All", - buttonSettings: { - contentType: ej.ContentType.TextAndImage, - click: "onClick", - prefixIcon: "e-icon e-ribbon clearAll" - } - }], - defaults: { - type: "button", - width: 60, - isBig: false - } - }] - }, - { - text: "Font", alignType: "rows", content: [{ - groups: [{ - id: "fontfamily", - toolTip: "Font", - dropdownSettings: { - dataSource: fontfamily, - text: "Segoe UI", - select: "onClick", - width: 150 - } - }, - { - id: "fontsize", - toolTip: "FontSize", - dropdownSettings: { - dataSource: fontsize, - text: "1pt", - select: "onClick", - width: 65 - } - }], - defaults: { - type: "dropdownlist", - height: 28 - } - }, - { - groups: [{ - id: "bold", - toolTip: "Bold", - type: ej.Ribbon.Type.ToggleButton, - toggleButtonSettings: { - contentType: ej.ContentType.ImageOnly, - defaultText: "Bold", - activeText: "Bold", - click: "onClick", - defaultPrefixIcon: "e-icon e-ribbon bold", - activePrefixIcon: "e-icon e-ribbon bold" - } - }, - { - id: "italic", - toolTip: "Italic", - type: ej.Ribbon.Type.ToggleButton, - toggleButtonSettings: { - contentType: ej.ContentType.ImageOnly, - defaultText: "Italic", - activeText: "Italic", - click: "onClick", - defaultPrefixIcon: "e-icon e-ribbon e-ribbonitalic", - activePrefixIcon: "e-icon e-ribbon e-ribbonitalic" - } - }, - { - id: "underline", - text: "Underline", - toolTip: "Underline", - type: ej.Ribbon.Type.ToggleButton, - toggleButtonSettings: { - contentType: ej.ContentType.ImageOnly, - defaultText: "Underline", - activeText: "Underline", - click: "onClick", - defaultPrefixIcon: "e-icon e-ribbon e-ribbonunderline", - activePrefixIcon: "e-icon e-ribbon e-ribbonunderline" - } - }, - { - id: "strikethrough", - text: "strikethrough", - toolTip: "Strikethrough", - type: ej.Ribbon.Type.ToggleButton, - toggleButtonSettings: { - contentType: ej.ContentType.ImageOnly, - defaultText: "Strikethrough", - activeText: "Strikethrough", - click: "onClick", - defaultPrefixIcon: "e-icon e-ribbon strikethrough", - activePrefixIcon: "e-icon e-ribbon strikethrough" - } - }, - { - id: "superscript", - text: "superscript", - toolTip: "Superscript", - buttonSettings: { - click: "onClick", - contentType: ej.ContentType.ImageOnly, - prefixIcon: "e-icon e-ribbon e-superscripticon" - } - }, - { - id: "subscript", - text: "subscript", - toolTip: "Subscript", - enableSeparator: true, - buttonSettings: { - click: "onClick", - contentType: ej.ContentType.ImageOnly, - prefixIcon: "e-icon e-ribbon e-subscripticon" - } - }, - { - id: "fontcolor", - text: "Font Color", - toolTip: "Font Color", - type: ej.Ribbon.Type.Custom, - contentID: "fontcolor" - }, - { - id: "fillcolor", - text: "Fill Color", - toolTip: "Fill Color", - type: ej.Ribbon.Type.Custom, - contentID: "fillcolor" - } - ], - defaults: { - isBig: false - } - }] - }, - { - text: "Alignment", alignType: ej.Ribbon.AlignType.Rows, content: [ - { - groups: [{ - id: "bullet", - text: "Bullet Format", - toolTip: "Bullets", - buttonSettings: { - click: "onClick", - contentType: ej.ContentType.ImageOnly, - prefixIcon: "e-icon e-ribbon e-bullet" - } - }, - { - id: "number", - text: "Number Format", - toolTip: "Numbering", - enableSeparator: true, - buttonSettings: { - click: "onClick", - contentType: ej.ContentType.ImageOnly, - prefixIcon: "e-icon e-ribbon e-numbericon" - } - }, - { - id: "textindent", - text: "Indent", - toolTip: "Text Indent", - buttonSettings: { - click: "onClick", - contentType: ej.ContentType.ImageOnly, - prefixIcon: "e-icon e-ribbon e-indent" - } - }, - { - id: "textoudent", - text: "Outdent", - toolTip: "Text Outdent", - enableSeparator: true, - buttonSettings: { - click: "onClick", - contentType: ej.ContentType.ImageOnly, - prefixIcon: "e-icon e-ribbon e-outdent" - } - }, - { - id: "sortascending", - text: "Sort", - toolTip: "Sort", - enableSeparator: true, - buttonSettings: { - click: "onClick", - contentType: ej.ContentType.ImageOnly, - prefixIcon: "e-icon e-ribbon e-sort" - } - }, - { - id: "border", - text: "Border", - toolTip: "Border", - buttonSettings: { - click: "onClick", - contentType: ej.ContentType.ImageOnly, - prefixIcon: "e-icon e-ribbon e-border" - } - }], - defaults: { - type: "button", - isBig: false - } - }, - { - groups: [{ - id: "alignleft", - text: "JustifyLeft", - toolTip: "Align Left", - buttonSettings: { - click: "onClick", - contentType: ej.ContentType.ImageOnly, - prefixIcon: "e-icon e-ribbon alignleft" - } - }, - { - id: "aligncenter", - text: "JustifyCenter", - toolTip: "Align Center", - buttonSettings: { - click: "onClick", - contentType: ej.ContentType.ImageOnly, - prefixIcon: "e-icon e-ribbon aligncenter" - } - }, - { - id: "alignright", - text: "JustifyRight", - toolTip: "Align Right", - buttonSettings: { - click: "onClick", - contentType: ej.ContentType.ImageOnly, - prefixIcon: "e-icon e-ribbon alignright" - } - }, - { - id: "justify", - text: "JustifyFull", - toolTip: "Justify", - enableSeparator: true, - buttonSettings: { - click: "onClick", - contentType: ej.ContentType.ImageOnly, - prefixIcon: "e-icon e-ribbon justify" - } - }, - { - id: "uppercase", - text: "Upper Case", - toolTip: "Upper Case", - buttonSettings: { - click: "onClick", - contentType: ej.ContentType.ImageOnly, - prefixIcon: "e-icon e-ribbon e-uppercase" - } - }, - { - id: "lowercase", - text: "Lower Case", - toolTip: "Lower Case", - buttonSettings: { - click: "onClick", - contentType: ej.ContentType.ImageOnly, - prefixIcon: "e-icon e-ribbon e-lowercase" - } - }], - defaults: { - type: "button", - isBig: false - } - }] - }, - { - text: "Actions", alignType: ej.Ribbon.AlignType.Rows, content: [{ - groups: [{ - id: "undo", - text: "Undo", - toolTip: "Undo", - buttonSettings: { - click: "onClick", - contentType: ej.ContentType.TextAndImage, - imagePosition: ej.ImagePosition.ImageTop, - prefixIcon: "e-icon e-ribbon e-undo" - } - }, - { - id: "redo", - text: "Redo", - toolTip: "Redo", - buttonSettings: { - click: "onClick", - contentType: ej.ContentType.TextAndImage, - imagePosition: ej.ImagePosition.ImageTop, - prefixIcon: "e-icon e-ribbon e-redo" - } - } - ], - defaults: { - type: "button", - width: 40, - height: 70 - } - }] - }, - { - text: "View", alignType: ej.Ribbon.AlignType.Rows, content: [{ - groups: [{ - id: "zoomin", - text: "Zoom In", - toolTip: "Zoom In", - buttonSettings: { - width: 58, - click: "onClick", - contentType: ej.ContentType.TextAndImage, - imagePosition: ej.ImagePosition.ImageTop, - prefixIcon: "e-icon e-ribbon e-zoomin" - } - }, - { - id: "zoomout", - text: "Zoom Out", - toolTip: "Zoom Out", - buttonSettings: { - width: 70, - click: "onClick", - contentType: ej.ContentType.TextAndImage, - imagePosition: ej.ImagePosition.ImageTop, - prefixIcon: "e-icon e-ribbon e-zoomout" - } - }, - { - id: "fullscreen", - text: "Full Screen", - toolTip: "Full Screen", - buttonSettings: { - width: 73, - click: "onClick", - contentType: ej.ContentType.TextAndImage, - imagePosition: ej.ImagePosition.ImageTop, - prefixIcon: "e-icon e-ribbon e-fullscreen" - } - } - ], - defaults: { - type: "button", - height: 70 - } - }] - }] - }, { - id: "insert", text: "INSERT", groups: [{ - text: "Tables", alignType: ej.Ribbon.AlignType.Columns, content: [{ - groups: [{ - id: "tables", - text: "Tables", - toolTip: "Tables", - buttonSettings: { - click: "onClick", - contentType: ej.ContentType.TextAndImage, - imagePosition: ej.ImagePosition.ImageTop, - prefixIcon: "e-icon e-ribbon e-table" - } - } - ], - defaults: { - type: "button", - width: 50, - height: 70 - } - }] - }, - { - text: "Illustrations", alignType: ej.Ribbon.AlignType.Rows, content: [{ - groups: [{ - id: "pictures", - text: "Pictures", - toolTip: "Pictures", - buttonSettings: { - click: "onClick", - contentType: ej.ContentType.TextAndImage, - imagePosition: ej.ImagePosition.ImageTop, - prefixIcon: "e-icon e-ribbon e-picture" - } - }, - { - id: "videos", - text: "Videos", - toolTip: "Videos", - buttonSettings: { - click: "onClick", - contentType: ej.ContentType.TextAndImage, - imagePosition: ej.ImagePosition.ImageTop, - prefixIcon: "e-icon e-ribbon e-video" - } - }, - { - id: "shapes", - text: "Shapes", - toolTip: "Shapes", - buttonSettings: { - click: "onClick", - contentType: ej.ContentType.TextAndImage, - imagePosition: ej.ImagePosition.ImageTop, - prefixIcon: "e-icon e-ribbon e-shape" - } - }, - { - id: "charts", - text: "Charts", - toolTip: "Charts", - buttonSettings: { - click: "onClick", - contentType: ej.ContentType.TextAndImage, - imagePosition: ej.ImagePosition.ImageTop, - prefixIcon: "e-icon e-ribbon e-chart" - } - } - ], - defaults: { - type: "button", - width: 56, - height: 70 - } - }] - }, - { - text: "Comments", alignType: ej.Ribbon.AlignType.Rows, content: [{ - groups: [{ - id: "comments", - text: "Comments", - toolTip: "Comments", - buttonSettings: { - click: "onClick", - contentType: ej.ContentType.TextAndImage, - imagePosition: ej.ImagePosition.ImageTop, - prefixIcon: "e-icon e-ribbon e-comment" - } - } - ], - defaults: { - type: "button", - width: 70, - height: 70 - } - }] - }, - { - text: "Text", alignType: ej.Ribbon.AlignType.Rows, content: [{ - groups: [{ - id: "text", - text: "Text", - toolTip: "Text", - buttonSettings: { - click: "onClick", - contentType: ej.ContentType.TextAndImage, - imagePosition: ej.ImagePosition.ImageTop, - prefixIcon: "e-icon e-ribbon e-text", - width: 50 - } - }, - { - id: "datetime", - text: "Date Time", - toolTip: "DateTime", - buttonSettings: { - click: "onClick", - contentType: ej.ContentType.TextAndImage, - imagePosition: ej.ImagePosition.ImageTop, - prefixIcon: "e-icon e-ribbon e-datetimenew" - } - } - ], - defaults: { - type: "button", - width: 70, - height: 70 - } - }] - }, - { - text: "Hyperlink", alignType: ej.Ribbon.AlignType.Rows, content: [{ - groups: [{ - id: "hyperlink", - text: "Hyperlink", - toolTip: "Hyperlink", - buttonSettings: { - click: "onClick", - contentType: ej.ContentType.TextAndImage, - imagePosition: ej.ImagePosition.ImageTop, - prefixIcon: "e-icon e-ribbon e-hyperlink" - } - } - ], - defaults: { - type: "button", - width: 70, - height: 70 - } - }] - }, - { - text: "Equation", alignType: ej.Ribbon.AlignType.Rows, content: [{ - groups: [{ - id: "equation", - text: "Equation", - toolTip: "Equation", - buttonSettings: { - click: "onClick", - contentType: ej.ContentType.TextAndImage, - imagePosition: ej.ImagePosition.ImageTop, - prefixIcon: "e-icon e-ribbon e-equation" - } - } - ], - defaults: { - type: "button", - width: 60, - height: 70 - } - }] - }, - { - text: "Print Layout", alignType: ej.Ribbon.AlignType.Rows, content: [{ - groups: [{ - id: "printlayout", - text: "Print Layout", - toolTip: "Print Layout", - buttonSettings: { - click: "onClick", - contentType: ej.ContentType.TextAndImage, - imagePosition: ej.ImagePosition.ImageTop, - prefixIcon: "e-icon e-ribbon e-printlayout" - } - } - ], - defaults: { - type: "button", - width: 80, - height: 70 - } - }] - }, - { - text: "Save", alignType: ej.Ribbon.AlignType.Rows, content: [{ - groups: [{ - id: "print", - text: "Print", - toolTip: "Print", - buttonSettings: { - click: "onClick", - contentType: ej.ContentType.TextAndImage, - imagePosition: ej.ImagePosition.ImageTop, - prefixIcon: "e-icon e-ribbon e-print" - } - }, - { - id: "save", - text: "Save", - toolTip: "Save", - buttonSettings: { - click: "onClick", - contentType: ej.ContentType.TextAndImage, - imagePosition: ej.ImagePosition.ImageTop, - prefixIcon: "e-icon e-ribbon e-save" - } - } - ], - defaults: { - type: "button", - width: 50, - height: 70 - } - }] - } - ] - } - ], - create: function createControl(args) { - var ribbon = $("#defaultRibbon").data("ejRibbon"); - $("#fontcolor").ejColorPicker({ value: "#FFFF00", modelType: "palette", cssClass: "e-ribbon", toolIcon: "e-fontcoloricon", select: colorHandler }); - $("#fillcolor").ejColorPicker({ value: "#FF0000", modelType: "palette", cssClass: "e-ribbon", toolIcon: "e-fillcoloricon", select: colorHandler }); - } - }); - }); -} -function colorHandler(args:any) { - (this._id.indexOf("fillcolor") != -1) ? $("#contenteditor").css('background-color', args.value) : document.execCommand('forecolor', false, args.value); -} -function onClick(args: any) { - var val, prop = args.text; - val = (ej.isNullOrUndefined(args.model.text)) ? args.model.activeText : args.model.text; - if (action1.indexOf(val) != -1) - $("#contenteditor").empty(); - else if (action2.indexOf(val) != -1) - document.execCommand(val, false, null); - else if (fontfamily.indexOf(prop) != -1) - document.execCommand("FontName", false, prop); - else if (fontsize.indexOf(prop) != -1) - document.execCommand("FontSize", false, prop.replace("pt", "")); - else - $("#contenteditor").append("

Action: " + val + " Triggered

"); -} - - - - - - -module RotatorComponent { - $(function () { - var rotatorInstance = new ej.Rotator($("#sliderContent"), { - slideWidth: "100%", - frameSpace: "0px", - slideHeight: "auto", - displayItemsCount: "1", - navigateSteps: "1", - pagerPosition: "outside", - orientation: "horizontal", - showPager: true, - enabled: true, - showCaption: true, - allowKeyboardNavigation: true, - showPlayButton: true, - isResponsive: true, - animationType: "slide", - }); - }); -} - - - -module RTEComponent { - $(function () { - var sample = new ej.RTE($("#rteSample"), { - width: "100%", - minWidth: "150px", - showFooter: true, - showHtmlSource: true, - allowEditing: true, - allowKeyboardNavigation: true, - autoFocus: true, - autoHeight: true, - colorPaletteColumns: 10, - colorPaletteRows: 5, - cssClass: 'gradient-lime', - enableResize: true, - enableTabKeyNavigation: true, - fileBrowser: { - filePath: (window).baseurl + "Content/FileBrowser/", - extensionAllow: "*.png, *.doc, *.pdf, *.txt, *.docx", - ajaxAction: (window).baseurl + "api/FileExplorer/FileOperations" - }, - imageBrowser: { - filePath: (window).baseurl + "Content/FileBrowser/", - extensionAllow: "*.png, *.gif, *.jpg, *.jpeg, *.docx", - ajaxAction: (window).baseurl + "api/FileExplorer/FileOperations" - }, - isResponsive: true, - showClearAll: true, - showClearFormat: true, - showDimensions: true, - showCharCount: true, - tools: { - formatStyle: ["format"], - edit: ["findAndReplace"], - font: ["fontName", "fontSize", "fontColor", "backgroundColor"], - style: ["bold", "italic", "underline", "strikethrough"], - alignment: ["justifyLeft", "justifyCenter", "justifyRight", "justifyFull"], - lists: ["unorderedList", "orderedList"], - clipboard: ["cut", "copy", "paste"], - doAction: ["undo", "redo"], - indenting: ["outdent", "indent"], - clear: ["clearFormat", "clearAll"], - links: ["createLink", "removeLink"], - images: ["image"], - media: ["video"], - tables: ["createTable", "addRowAbove", "addRowBelow", "addColumnLeft", "addColumnRight", "deleteRow", "deleteColumn", "deleteTable"], - effects: ["superscript", "subscript"], - casing: ["upperCase", "lowerCase"], - view: ["fullScreen", "zoomIn", "zoomOut"], - print: ["print"], - customUnorderedList: [{ - name: "unOrderInsert", - tooltip: "Custom UnOrderList", - css: "e-rte-toolbar-icon e-rte-unlistitems customUnOrder", - text: "Smiley", - listImage: "url('../content/images/rte/Smiley-GIF.gif')" - }], - customOrderedList: [{ - name: "orderInsert", - tooltip: "Custom OrderList", - css: "e-rte-toolbar-icon e-rte-listitems customOrder", - text: "Lower-Greek", - listStyle: "lower-greek" - }] - } - }); - }); - -} - - - -module ScheduleComponent { - $(function () { - var sample = new ej.Schedule($("#Schedule1"), { - width: "100%", - height: "525px", - currentDate: new Date(2017, 5, 5), - timeScale: { - minorSlotCount: 4, - majorSlot: 60 - }, - contextMenuSettings: { - enable: true, - menuItems: { - appointment: [ - { id: "open", text: "Open Appointment" }, - { id: "delete", text: "Delete Appointment" }, - { id: "customMenu3", text: "Menu Item 3" }, - { id: "customMenu4", text: "Menu Item 4" } - ], - cells: [ - { id: "new", text: "New Appointment" }, - { id: "recurrence", text: "New Recurring Appointment" }, - { id: "today", text: "Today" }, - { id: "gotodate", text: "Go to date" }, - { id: "settings", text: "Settings" }, - { id: "view", text: "View", parentId: "settings" }, - { id: "timemode", text: "TimeMode", parentId: "settings" }, - { id: "view_Day", text: "Day", parentId: "view" }, - { id: "view_Week", text: "Week", parentId: "view" }, - { id: "view_Workweek", text: "Workweek", parentId: "view" }, - { id: "view_Month", text: "Month", parentId: "view" }, - { id: "timemode_Hour12", text: "12 Hours", parentId: "timemode" }, - { id: "timemode_Hour24", text: "24 Hours", parentId: "timemode" }, - { id: "workhours", text: "Work Hours", parentId: "settings" }, - { id: "customMenu1", text: "Menu Item 1" }, - { id: "customMenu2", text: "Menu Item 2" } - ] - } - }, - resources: [{ - field: "ownerId", - title: "Owner", - name: "Owners", allowMultiple: true, - resourceSettings: { - dataSource: [ - { text: "Nancy", id: 1, groupId: 1, color: "#f8a398" }, - { text: "Steven", id: 3, groupId: 2, color: "#56ca85" }, - { text: "Michael", id: 5, groupId: 1, color: "#51a0ed" } - ], - text: "text", id: "id", groupId: "groupId", color: "color" - } - }], - appointmentSettings: { - dataSource: new ej.DataManager((window).ResourcesData).executeLocal(new ej.Query().take(10)), - id: "Id", - subject: "Subject", - startTime: "StartTime", - endTime: "EndTime", - description: "Description", - allDay: "AllDay", - recurrence: "Recurrence", - recurrenceRule: "RecurrenceRule", - resourceFields: "ownerId" - } - }); - }); -} - - - -module ScrollerComponent { - $(function () { - var scrollerSample = new ej.Scroller($("#scrollcontent"), { - height: "300px", - width: "100%" - }); - $(window).bind('resize', function () { - scrollerSample.refresh(); - }); - }); -} - - - -module SignatureComponent { - $(function () { - var basicSignature = new ej.Signature($("#signature"), { - height: "400px", - isResponsive: true, - strokeWidth: 3 - }); - }); -} - - - - -module SliderComponent { - $(function () { - var slider = new ej.Slider($("#minSlider"), { - sliderType: "MinRange", - value: 60, - minValue: 0, - maxValue: 100 - }); - var rangeslider = new ej.Slider($("#rangeSlider"), { - sliderType: "Range", - values: [30, 60], - minValue: 0 - }); - - }); -} - - - - - - -module linesparkline { - $(function () { - - var sparklinesample = new ej.Sparkline($("#line"), { - dataSource: [12, 14, 11, 12, 11, 15, 12, 10, 11, 12, 15, 13, 12, 11, 10, 13, 15, 12, 14, 16, 14, 12, 11], - tooltip: { - visible: true, - font: { size: "12px" } - }, - type: "line", - size: { height: "40", width: "170" }, - }); - }); -} - -module columnsparkline { - $(function () { - var sparkcolumnsample = new ej.Sparkline($("#column"), { - dataSource: [2, 6, -1, 1, 12, 5, -2, 7, -3, 5, 8, 10, ], - negativePointColor: "red", - highPointColor: "blue", - tooltip: { - visible: true, - font: { - size: "12px", - } - }, - type: "column", - size: { height: "100", width: "150" }, - }); - }); -} - -module areasparkline { - $(function () { - var sparkareasample = new ej.Sparkline($("#area"), { - dataSource: [12, -10, 11, 8, 17, 6, 2, -17, 13, -6, 8, 10, ], - markerSettings: { visible: true }, - highPointColor: "blue", - lowPointColor: "orange", - type: "area", - opacity: 0.5, - tooltip: { - visible: true, - font: { - size: "12px", - } - }, - size: { height: "100", width: "150" }, - }); - }); -} - -module windlosssparkline { - $(function () { - var sparkwinlosssample = new ej.Sparkline($("#winloss"), { - dataSource: [12, 15, -11, 13, 17, 0, -12, 17, 13, -15, 8, 10, ], - type: "winloss", - size: { height: "100", width: "150" }, - }); - }); -} - -module piesparkline1 { - $(function () { - var sparkpiesample1 = new ej.Sparkline($("#pie1"), { - dataSource: [4, 6, 7], - type: "pie", - tooltip: { - visible: true, - font: { - size: "12px", - } - }, - size: { height: "40", width: "40" }, - }); - }); -} - -module piesparkline2 { - $(function () { - var sparkpiesample2 = new ej.Sparkline($("#pie2"), { - dataSource: [8, 9, 1, ], - type: "pie", - tooltip: { - visible: true, - font: { - size: "12px", - } - }, - size: { height: "40", width: "40" }, - }); - }); -} - -module piesparkline3 { - $(function () { - var sparkpiesample3 = new ej.Sparkline($("#pie3"), { - dataSource: [2, 3, 5], - type: "pie", - tooltip: { - visible: true, - font: { - size: "12px", - } - }, - size: { height: "40", width: "40" }, - }); - }); -} - -module piesparkline4 { - $(function () { - var sparkpiesample4 = new ej.Sparkline($("#pie4"), { - dataSource: [10, 12, 11], - type: "pie", - tooltip: { - visible: true, - font: { - size: "12px", - } - }, - size: { height: "40", width: "40" }, - }); - }); -} - - - - - - -module SplitterComponent { - $(function () { - var splitterInstance = new ej.Splitter($("#outterSpliter"), { - height: "250px", - width: "50%", - orientation: ej.Orientation.Vertical, - properties: [{}, { paneSize: 80 }], - isResponsive: true - }); - var splitterInstance1 = new ej.Splitter($("#innerSpliter"), { - isResponsive: true, - }); - }); -} - - - -module SpreadsheetComponent { - $(function () { - var sample = new ej.Spreadsheet($("#basicSpreadsheet"), { - scrollSettings: { - height: 550, - }, - importSettings: { - importMapper: (window).baseurl + "api/Spreadsheet/Import" - }, - exportSettings: { - excelUrl: (window).baseurl + "api/Spreadsheet/ExcelExport", - csvUrl: (window).baseurl + "api/Spreadsheet/CsvExport", - pdfUrl: (window).baseurl + "api/Spreadsheet/PdfExport" - }, - sheets: [{ rangeSettings: [{ dataSource: (window).defaultData, startCell: "A1" }] }], - loadComplete: () => { - var spreadsheet = $("#basicSpreadsheet").data("ejSpreadsheet"), xlFormat = spreadsheet.XLFormat; - if (!(spreadsheet).isImport) { - spreadsheet.setWidthToColumns([140, 128, 105, 100, 100, 110, 120, 120, 100]); - xlFormat.format({ "style": { "font-weight": "bold" } }, "A1:H1"); - xlFormat.format({ "type": "currency" }, "E2:H11"); - spreadsheet.XLRibbon.updateRibbonIcons(); - } - } - }); - }); -} - - - - -var default_data: Array = [ - { Category: "Employees", Country: "USA", JobDescription: "Sales", JobGroup: "Executive", EmployeesCount: 50 }, - { Category: "Employees", Country: "USA", JobDescription: "Sales", JobGroup: "Analyst", EmployeesCount: 40 }, - { Category: "Employees", Country: "USA", JobDescription: "Marketing", EmployeesCount: 40 }, - { Category: "Employees", Country: "USA", JobDescription: "Technical", JobGroup: "Testers", EmployeesCount: 55 }, - { Category: "Employees", Country: "USA", JobDescription: "Technical", JobGroup: "Developers", JobRole: "Windows", EmployeesCount: 175 }, - { Category: "Employees", Country: "USA", JobDescription: "Technical", JobGroup: "Developers", JobRole: "Web", EmployeesCount: 70 }, - { Category: "Employees", Country: "USA", JobDescription: "Management", EmployeesCount: 40 }, - { Category: "Employees", Country: "USA", JobDescription: "Accounts", EmployeesCount: 60 }, - - { Category: "Employees", Country: "India", JobDescription: "Technical", JobGroup: "Testers", EmployeesCount: 43 }, - { Category: "Employees", Country: "India", JobDescription: "Technical", JobGroup: "Developers", JobRole: "Windows", EmployeesCount: 125 }, - { Category: "Employees", Country: "India", JobDescription: "Technical", JobGroup: "Developers", JobRole: "Web", EmployeesCount: 60 }, - { Category: "Employees", Country: "India", JobDescription: "HR Executives", EmployeesCount: 70 }, - { Category: "Employees", Country: "India", JobDescription: "Accounts", EmployeesCount: 45 }, - - { Category: "Employees", Country: "Germany", JobDescription: "Sales", JobGroup: "Executive", EmployeesCount: 30 }, - { Category: "Employees", Country: "Germany", JobDescription: "Sales", JobGroup: "Analyst", EmployeesCount: 40 }, - { Category: "Employees", Country: "Germany", JobDescription: "Marketing", EmployeesCount: 50 }, - { Category: "Employees", Country: "Germany", JobDescription: "Technical", JobGroup: "Testers", EmployeesCount: 40 }, - { Category: "Employees", Country: "Germany", JobDescription: "Technical", JobGroup: "Developers", JobRole: "Windows", EmployeesCount: 65 }, - { Category: "Employees", Country: "Germany", JobDescription: "Technical", JobGroup: "Developers", JobRole: "Web", EmployeesCount: 27 }, - { Category: "Employees", Country: "Germany", JobDescription: "Management", EmployeesCount: 33 }, - { Category: "Employees", Country: "Germany", JobDescription: "Accounts", EmployeesCount: 55 }, - - { Category: "Employees", Country: "UK", JobDescription: "Technical", JobGroup: "Testers", EmployeesCount: 45 }, - { Category: "Employees", Country: "UK", JobDescription: "Technical", JobGroup: "Developers", JobRole: "Windows", EmployeesCount: 96 }, - { Category: "Employees", Country: "UK", JobDescription: "Technical", JobGroup: "Developers", JobRole: "Web", EmployeesCount: 55 }, - { Category: "Employees", Country: "UK", JobDescription: "HR Executives", EmployeesCount: 60 }, - { Category: "Employees", Country: "UK", JobDescription: "Accounts", EmployeesCount: 30 }, - - { Category: "Employees", Country: "France", JobDescription: "Technical", JobGroup: "Testers", EmployeesCount: 40 }, - { Category: "Employees", Country: "France", JobDescription: "Technical", JobGroup: "Developers", JobRole: "Windows", EmployeesCount: 65 }, - { Category: "Employees", Country: "France", JobDescription: "Technical", JobGroup: "Developers", JobRole: "Web", EmployeesCount: 27 }, - { Category: "Employees", Country: "France", JobDescription: "Marketing", EmployeesCount: 50 } -]; - -module sunburstcomponent { - $(function () { - var sunburstsample = new ej.SunburstChart($("#Sunburst"), { - valueMemberPath: "EmployeesCount", - levels: [ - { groupMemberPath: "Country" }, - { groupMemberPath: "JobDescription" }, - { groupMemberPath: "JobGroup" }, - { groupMemberPath: "JobRole" } - ], - dataSource: default_data, - dataLabelSettings: { visible: true }, - tooltip: { visible: false }, - enableAnimation: false, - size: { height: "600" }, - innerRadius: 0.2, - load: function () { - var sender = $("#Sunburst").data("ejSunburstChart"); - var SunBurstTheme = (window).themeStyle + (window).themeColor + (window).themeVarient; - SunBurstTheme = SunBurstTheme.toString(); - if (SunBurstTheme.indexOf("dark") > -1 || SunBurstTheme.indexOf("contrast") > -1) - SunBurstTheme = "flatdark"; - else - SunBurstTheme = "flatlight"; - sender.model.theme = SunBurstTheme; - }, - title: { text: "Employees Count" }, - zoomSettings: { enable: false }, - legend: { visible: true, position: 'top' } - // load:"loadTheme" - }); - }); -} - - - - -module TabComponent { - $(function () { - var sample = new ej.Tab($("#defaultTab"), { - width: "500px", - collapsible: true, - events: "click", - heightAdjustMode: ej.Tab.HeightAdjustMode.Content, - showCloseButton: true, - showRoundedCorner: false - }); - }); -} - - - -module TagCloudComponent { - - - var websiteCollection = [ - { text: "Google", url: "http://www.google.com", frequency: 12 }, - { text: "All Things Digital", url: "http://allthingsd.com/", frequency: 3 }, - { text: "Arts Technica", url: "http://arstechnica.com/", frequency: 8 }, - { text: "Business Week", url: "http://www.businessweek.com/", frequency: 2 }, - { text: "Yahoo", url: "http://in.yahoo.com/", frequency: 12 }, - { text: "Center Networks", url: "http://www.centernetworks.com/", frequency: 5 }, - { text: "Crave", url: "http://news.cnet.com/crave/", frequency: 8 }, - { text: "Crunch Gear", url: "http://techcrunch.com/gadgets/", frequency: 20 }, - { text: "Daily Tech", url: "http://www.dailytech.com/", frequency: 1 }, - { text: "Electronista", url: "http://www.electronista.com/", frequency: 3 }, - { text: "Engadget", url: "http://www.engadget.com/", frequency: 5 }, - { text: "Gearlog", url: "http://www.gearlog.com/", frequency: 9 }, - { text: "Information Week", url: "http://www.informationweek.com/", frequency: 0 }, - { text: "PCWorld", url: "http://www.pcworld.com/", frequency: 11 }, - { text: "Tech Republic", url: "http://techrepublic.com/", frequency: 3 }, - { text: "Valleywag", url: "http://valleywag.gawker.com/", frequency: 6 }, - { text: "Rediff", url: "http://in.rediff.com/", frequency: 9 }, - { text: "WebProNews", url: "http://www.webpronews.com/", frequency: 2 } - ]; - - $(function () { - var sample = new ej.TagCloud($("#techWebList"), { - titleText: "Tech Sites", - dataSource: websiteCollection, - cssClass: "gradient-lime", - fields: { - text: "text", url: "url", frequency: "frequency" - } - }); - - }); -} - - - -module EditorComponent { - $(function () { - var num = new ej.NumericTextbox($("#numeric"), { - value: 30, - minValue: 1, - maxValue: 100, - name: "numeric", - width: "100%" - }); - var per = new ej.PercentageTextbox($("#percent"), { - value: 60, - minValue: 10, - maxValue: 1000, - name: "percent", - width: "100%" - }); - var cur = new ej.CurrencyTextbox($("#currency"), { - value: 100, - minValue: 10, - maxValue: 1000, - name: "currency", - width: "100%" - }); - var mask = new ej.MaskEdit($("#maskedit"), { - name: "mask", - value: "4242422424", - maskFormat: "99 999-99999", - width: "100%" - }) - }); -} - - - - - -module TileViewComponent { - $(function () { - var tile1 = new ej.Tile($("#tile1"), { - imagePosition: "fill", - caption: { text: "People" }, - tileSize: "medium", - imageUrl: 'content/images/tile/windows/people_1.png' - }); - var tile2 = new ej.Tile($("#tile2"), { - imagePosition: "center", - tileSize: "small", - imageUrl: 'content/images/tile/windows/alerts.png', - - }); - var tile3 = new ej.Tile($("#tile3"), { - imagePosition: "center", - tileSize: "small", - imageUrl: 'content/images/tile/windows/bing.png', - }); - var tile4 = new ej.Tile($("#tile4"), { - tileSize: "small", - imageUrl: 'content/images/tile/windows/camera.png', - }); - var tile5 = new ej.Tile($("#tile5"), { - imagePosition: "center", - tileSize: "small", - imageUrl: 'content/images/tile/windows/messages.png', - }); - var tile6 = new ej.Tile($("#tile6"), { - imagePosition: "center", - tileSize: "medium", - imageUrl: 'content/images/tile/windows/games.png', - caption: { text: "Play" } - }); - var tile7 = new ej.Tile($("#tile7"), { - tileSize: "medium", - imageUrl: 'content/images/tile/windows/map.png', - caption: { text: "Maps" } - }); - var tile8 = new ej.Tile($("#tile8"), { - imagePosition: "fill", - tileSize: "wide", - imageUrl: 'content/images/tile/windows/sports.png', - caption: { text: "Sports" } - }); - var tile9 = new ej.Tile($("#tile9"), { - imagePosition: "fill", - tileSize: "medium", - imageUrl: 'content/images/tile/windows/people_2.png', - caption: { text: "People" } - }); - var tile10 = new ej.Tile($("#tile10"), { - imagePosition: "center", - tileSize: "medium", - imageUrl: 'content/images/tile/windows/pictures.png', - caption: { text: "Photo" } - }); - var tile11 = new ej.Tile($("#tile11"), { - imagePosition: "center", - tileSize: "wide", - imageUrl: 'content/images/tile/windows/weather.png', - caption: { text: "Weather" } - }); - var tile12 = new ej.Tile($("#tile12"), { - imagePosition: "center", - tileSize: "medium", - imageUrl: 'content/images/tile/windows/music.png', - caption: { text: "Music" } - }); - var tile13 = new ej.Tile($("#tile13"), { - imagePosition: "center", - tileSize: "medium", - imageUrl: 'content/images/tile/windows/favs.png', - caption: { text: "Favorites" } - }); - }); -} - - - -module TimePickerComponent { - $(function () { - var timeSample = new ej.TimePicker($("#timepick"), { - width: "100%" - }); - }); -} - - - - -module ToolbarComponent { - - $(function () { - var sample = new ej.Toolbar($("#editingToolbar"), { - width: "100%", - cssClass: "gradient-lime", - enableSeparator: true, - - isResponsive: true, - orientation: ej.Orientation.Horizontal, - showRoundedCorner: true - }); - }); - -} - - - - -module TooltipComponent { - - $(function () { - - var sample1 = new ej.Tooltip($("#link1"), { - content: "ECMAScript (or ES) is a trademarked scripting-language specification standardized by Ecma International in ECMA-262 and ISO/IEC 16262.", - associate: "mousefollow", - autoCloseTimeout: 5000, - collision: "fit", - containment: ".frame", - showRoundedCorner: true, - showShadow: true - }); - - var sample2 = new ej.Tooltip($("#link2"), { - content: "The World Wide Web (WWW) is an information space where documents and other web resources are identified by URLs, interlinked by hypertext links, and can be accessed via the Internet.", - position: { - stem: { - horizontal: "right", - vertical: "center" - }, - target: { - horizontal: "left", - vertical: "center" - } - }, - autoCloseTimeout: 5000, - collision: "fit", - containment: ".frame", - showRoundedCorner: true, - showShadow: true - }); - - var sample3 = new ej.Tooltip($("#link3"), { - content: 'Object-oriented programming (OOP) is a programming language model organized around objects rather than "actions" and data rather than logic.', - position: { - stem: { - horizontal: "right", - vertical: "center" - }, - target: { - horizontal: "left", - vertical: "center", - }, - }, - associate: "mousefollow", - autoCloseTimeout: 5000, - collision: "fit", - containment: ".frame", - showRoundedCorner: true, - showShadow: true - }); - }); -} - - - -module TreeGridComponent { - $(function () { - var treegridInstance = new ej.TreeGrid($("#TreeGridContainer"), { - dataSource: (window).treeGridData, - childMapping: "subtasks", - allowSorting: true, - allowMultiSorting: true, - enableAltRow: true, - allowFiltering: true, - treeColumnIndex: 1, - allowKeyboardNavigation: true, - showColumnChooser: true, - showColumnOptions: true, - contextMenuSettings: { - showContextMenu: true, - contextMenuItems: ["add", "edit", "delete"] - }, - columnDialogFields: ["field", "headerText", "editType", "width", "visible", "allowSorting", "textAlign", "headerTextAlign"], - editSettings: { - allowAdding: true, - allowEditing: true, - allowDeleting: true, - editMode: "cellEditing", - rowPosition: "belowSelectedRow" - }, - toolbarSettings: { - showToolbar: true, - toolbarItems: ["add", "edit", "delete", "update", "cancel", "expandAll", "collapseAll"] - }, - columns: [ - { field: "taskID", headerText: "Task Id", allowFiltering: false, editType: "numericedit", filterEditType: "numericedit" }, - { field: "taskName", headerText: "Task Name", editType: "stringedit", filterEditType: "stringedit" }, - { field: "startDate", headerText: "Start Date", editType: "datepicker", filterEditType: "datepicker", format: "{0:MM/dd/yyyy}" }, - { field: "endDate", headerText: "End Date", editType: "datepicker", filterEditType: "datepicker", format: "{0:MM/dd/yyyy}" }, - { field: "progress", headerText: "Progress", editType: "numericedit", filterEditType: "numericedit" } - ], - isResponsive: true, - }); - }); -} - - - - -var population_data: Array = [ - { Continent: "Asia", Country: "Indonesia", Growth: 3, Population: 237641326 }, - { Continent: "Asia", Country: "Russia", Growth: 2, Population: 152518015 }, - { Continent: "Asia", Country: "Malaysia", Growth: 1, Population: 29672000 }, - { Continent: "North America", Country: "United States", Growth: 4, Population: 315645000 }, - { Continent: "North America", Country: "Mexico", Growth: 2, Population: 112336538 }, - { Continent: "North America", Country: "Canada", Growth: 1, Population: 39056064 }, - { Continent: "South America", Country: "Colombia", Growth: 1, Population: 47000000 }, - { Continent: "South America", Country: "Brazil", Growth: 3, Population: 193946886 }, - { Continent: "Africa", Country: "Nigeria", Growth: 2, Population: 170901000 }, - { Continent: "Africa", Country: "Egypt", Growth: 1, Population: 83661000 }, - { Continent: "Europe", Country: "Germany", Growth: 1, Population: 81993000 }, - { Continent: "Europe", Country: "France", Growth: 1, Population: 65605000 }, - { Continent: "Europe", Country: "UK", Growth: 1, Population: 63181775 } -]; - -module treemapcomponent { - $(function () { - var treemapsample = new ej.datavisualization.TreeMap($("#treemap"), { - leafItemSettings: { showLabels: true, labelPath: "Country" }, - rangeColorMapping: [ - { color: "#77D8D8", legendLabel: "1% Growth", from: 0, to: 1 }, - { color: "#AED960", from: 0, legendLabel: "2% Growth", to: 2 }, - { color: "#FFAF51", from: 0, legendLabel: "3% Growth", to: 3 }, - { color: "#F3D240", from: 0, legendLabel: "4% Growth", to: 4 } - ], - levels: [ - { groupPath: "Continent", groupGap: 5, headerHeight: 25, showHeader: true, headerTemplate: 'headertemplate' } - ], - dataSource: population_data, - colorValuePath: "Growth", - weightValuePath: "Population", - borderThickness: 0, - showLegend: true - }); - }); -} - - - - - -module TreeViewComponent { - $(function () { - var tree = new ej.TreeView($("#treeView"), { - allowEditing: true, - allowDragAndDrop: true, - allowDropChild: true, - allowDropSibling: true, - }); - }); -} - - - - -module UploadboxComponent { - - $(function () { - var sample = new ej.Uploadbox($("#UploadDefault"), { - saveUrl: (window).baseurl + "api/uploadbox/Save", - removeUrl: (window).baseurl + "api/uploadbox/Remove", - buttonText: { - browse: "Choose File", upload: "Upload", cancel: "Cancel" - }, - cssClass: "gradient- purple", - dialogAction: { - modal: false, closeOnComplete: false, drag: true - }, - extensionsAllow: ".zip", - multipleFilesSelection: true, - showFileDetails: true - }); - }); - -} - - - - -module WaitingPopupComponent { - $(function () { - var sample = new ej.WaitingPopup($("#target"), { - showOnInit: true, - showImage: true, - text: 'waiting…', - target: "#target", - appendTo: "#waiting" - }); - }); - -} +module AccordionComponent { + $(function () { + var sample = new ej.Accordion($("#basicAccordion"), { + width: "100%", + allowKeyboardNavigation: true, + collapseSpeed: 500, + collapsible: true, + enableAnimation: true, + enableMultipleOpen: true, + events: "click", + expandSpeed: 500, + headerSize: "40px", + htmlAttributes: { title: "Demo" }, + selectedItemIndex: 1, + showCloseButton: true, + showRoundedCorner: true + }); + }); +} + + + +module AutocompleteComponent{ + var carList = [ + "Audi S6", "Austin-Healey", "Alfa Romeo", "Aston Martin", + "BMW 7", "Bentley Mulsanne", "Bugatti Veyron", + "Chevrolet Camaro", "Cadillac", + "Duesenberg J", "Dodge Sprinter", + "Elantra", "Excavator", + "Ford Boss 302", "Ferrari 360", "Ford Thunderbird", + "GAZ Siber", + "Honda S2000", "Hyundai Santro", + "Isuzu Swift", "Infiniti Skyline", + "Jaguar XJS", + "Kia Sedona EX", "Koenigsegg Agera", + "Lotus Esprit", "Lamborghini Diablo", + "Mercedes-Benz", "Mercury Coupe", "Maruti Alto 800", + "Nissan Qashqai", + "Oldsmobile S98", "Opel Superboss", + "Porsche 356", "Pontiac Sunbird", + "Scion SRS/SC/SD", "Saab Sportcombi", "Subaru Sambar", "Suzuki Swift", + "Triumph Spitfire", "Toyota 2000GT", + "Volvo P1800", "Volkswagen Shirako" + ]; + $(function () { + var autocompleteInstance =new ej.Autocomplete($("#selectCar"), { + width: "100%", + watermarkText: "Select a car", + dataSource: carList, + enableAutoFill: true, + showPopupButton: true, + multiSelectMode: "delimiter" + }); + }); +} + + + + +module Barcodecomponent { + $(function () { + var barcodesample = new ej.datavisualization.Barcode($("#Barcode"), { + text:"http://www.syncfusion.com" + }); + }); +} + + + + + +module Bulletgraphcomponent { + $(function () { + var bulletsample = new ej.datavisualization.BulletGraph($("#BulletGraph"), { + isResponsive: true, + load: function () { + var sender = $("#BulletGraph").data("ejBulletGraph"); + var bulletTheme = (window).themeStyle + (window).themeColor + (window).themeVarient; + if (bulletTheme) { + switch (bulletTheme) { + case "flatdark": + case "flatazuredark": + case "flatlimedark": + case "flatsaffrondark": + case "gradientdark": + case "gradientazuredark": + case "gradientlimedark": + case "gradientsaffrondark": + case "flathigh-contrast-01dark": + case "flathigh-contrast-02dark": + bulletTheme = "flatdark"; + break; + case "flatoffice-365light": + case "flatmateriallight": + bulletTheme = "material"; + break; + default: + bulletTheme = "flatlight"; + break; + } + sender.model.theme = bulletTheme; + } + + }, + tooltipSettings: { visible: true }, + quantitativeScaleSettings: { + featureMeasures: [{ + value: 8, comparativeMeasureValue:6.7 + }] + }, + qualitativeRanges: [{ + rangeEnd: 4.3, rangeStroke:"#ebebeb", + }, + { + rangeEnd: 7.3, rangeStroke:"#d8d8d8" + }, + { + rangeEnd: 10, rangeStroke: "#7f7f7f" + } + ], + captionSettings: { + textPosition: 'right', text: 'Revenue YTD', + subTitle: { + text: "$ in Thousands", textPosition:"right" + } + } + }); + }); +} + + + + + +module ButtonComponent { + $(function () { + var basicButton = new ej.Button($("#buttonnormal"), { + size: "large", + showRoundedCorner: true, + contentType: "textandimage", + prefixIcon: "e-icon e-save", + text: "Save" + }); + var toggleButton = new ej.ToggleButton($("#TextOnly"), { + showRoundedCorner: true, + size: "large", + contentType: "textandimage", + defaultPrefixIcon: "e-icon e-save", + activePrefixIcon: "e-icon e-delete", + defaultText: "Save", + activeText: "Delete" + }); + var splitbuttonnormal = new ej.SplitButton($("#splitbuttonnormal"), { + showRoundedCorner: true, + size: "large", + prefixIcon: "e-icon e-file-empty", + targetID: "menu1", + contentType: "textandimage", + text: "File" + }); + var groupButton = new ej.GroupButton($("#groupButton"), { + showRoundedCorner: true, + size: "large" + }); + var check1 = new ej.CheckBox($("#check1"), { + size: "medium", enableTriState: true + }); + var check2 = new ej.CheckBox($("#check2"), { + size: "medium", enableTriState: true + }); + var radio1 = new ej.RadioButton($("#radio1"), { + size: "medium" + }); + var radio2 = new ej.RadioButton($("#radio2"), { + size: "medium", checked: true + }); + }); +} + + + + +module ChartComponent { + $(function () { + var chartsample = new ej.datavisualization.Chart($("#Chart"), { + primaryXAxis: { + range: { min: 2005, max: 2011, interval: 1 }, + title: { text: "Year" }, + valueType: "category" + }, + primaryYAxis: { + range: { min: 25, max: 50, interval: 5 }, + labelFormat: "{value}%", + title: { text: "Efficiency" }, + }, + commonSeriesOptions: + { + type: 'line', enableAnimation: true, + tooltip:{ visible :true, template:'Tooltip'}, + marker: + { + shape: 'circle', + size: + { + height: 10, width: 10 + }, + visible: true + }, + border : { width: 2 } + }, + series: + [ + { + points: [{ x: 2005, y: 28 }, { x: 2006, y: 25 }, { x: 2007, y: 26 }, { x: 2008, y: 27 }, + { x: 2009, y: 32 }, { x: 2010, y: 35 }, { x: 2011, y: 30 }], + name: 'India' + }, + { + points: [{ x: 2005, y: 31 }, { x: 2006, y: 28 }, { x: 2007, y: 30 }, { x: 2008, y: 36 }, + { x: 2009, y: 36 }, { x: 2010, y: 39 }, { x: 2011, y: 37 }], + name: 'Germany' + }, + { + points: [{ x: 2005, y: 36 }, { x: 2006, y: 32 }, { x: 2007, y: 34 }, { x: 2008, y: 41 }, + { x: 2009, y: 42 }, { x: 2010, y: 42 }, { x: 2011, y: 43 }], + name: 'England' + }, + { + points: [{ x: 2005, y: 39 }, { x: 2006, y: 36 }, { x: 2007, y: 40 }, { x: 2008, y: 44 }, + { x: 2009, y: 45 }, { x: 2010, y: 48 }, { x: 2011, y: 46 }], + name: 'France' + } + ], + isResponsive: true, + load: function () { + var sender = $("#Chart").data("ejChart"); + if (!!window.orientation && sender) { //to modify chart properties for mobile view + var model = sender.model, + seriesLength = model.series.length; + model.legend.visible = false; + model.size.height = null; + model.size.width = null; + for (var i = 0; i < seriesLength; i++) { + if (!model.series[i].marker) + model.series[i].marker = {}; + if (!model.series[i].marker.size) + model.series[i].marker.size = {}; + model.series[i].marker.size.width = 6; + model.series[i].marker.size.height = 6; + } + model.primaryXAxis.labelIntersectAction = "rotate45"; + if (model.primaryXAxis.title) + model.primaryXAxis.title.text = ""; + if (model.primaryYAxis.title) + model.primaryYAxis.title.text = ""; + model.primaryXAxis.edgeLabelPlacement = "hide"; + model.primaryYAxis.labelIntersectAction = "rotate45"; + model.primaryYAxis.edgeLabelPlacement = "hide"; + } + var theme = (window).themeStyle + (window).themeColor + (window).themeVarient; + if (theme) { + switch (theme) { + case "flatdark": + case "flatazuredark": + case "flatlimedark": + case "flatsaffrondark": + theme = "flatdark"; + break; + case "gradientlight": + case "gradientazurelight": + case "gradientlimelight": + case "gradientsaffronlight": + theme = "gradientlight"; + break; + case "gradientdark": + case "gradientazuredark": + case "gradientlimedark": + case "gradientsaffrondark": + theme = "gradientdark"; + break; + case "flatbootstraplight": + theme = "bootstrap"; + break; + case "flathigh-contrast-01dark": + case "flathigh-contrast-02dark": + theme = "high-contrast-01"; + break; + case "flatmateriallight": + case "flatoffice-365light": + theme = "material"; + break; + + default: + theme = "flatlight"; + break; + } + sender.model.theme = theme; + } + }, + title: { text: 'Efficiency of oil-fired power production' }, + size: { height: "600" }, + legend: { visible: true}, + }); + }); +} + + + + +module circulargaugecomponent { + $(function () { + var circularsample = new ej.datavisualization.CircularGauge($("#CircularGauge"), { + enableAnimation: false, + isResponsive: true, + backgroundColor: "transparent", width: 500, + scales: [{ + showRanges: true, + startAngle: 122, sweepAngle: 296, radius: 130, showScaleBar: true, size: 1, maximum: 120, majorIntervalValue: 20, minorIntervalValue: 10, + border: { + width: 0.5, + }, + pointers: [{ + value: 60, + showBackNeedle: true, + backNeedleLength: 20, + length: 95, + width: 7 + }], + ticks: [{ + type: "major", + distanceFromScale: 2, + height: 16, + width: 1, color: "#8c8c8c" + }, { type: "minor", height: 8, width: 1, distanceFromScale: 2, color: "#8c8c8c" }], + labels: [{ + color: "#8c8c8c" + }], + ranges: [{ + distanceFromScale: -30, + startValue: 0, + endValue: 70 + }, { + distanceFromScale: -30, + startValue: 70, + endValue: 110, + backgroundColor: "#fc0606", + border: { color: "#fc0606" } + }, + { + distanceFromScale: -30, + startValue: 110, + endValue: 120, + backgroundColor: "#f5b43f", + border: { color: "#f5b43f" } + }] + }] + }); + }); +} + + + +module ColorPickerComponent { + $(function () { + var colorSample = new ej.ColorPicker($("#colorpick"), { + value: "#278787" + }); + }); +} + + + + +module ComboBoxComponent{ + var BikeList = [ + { empid: "bk1", text: "Apache RTR" }, { empid: "bk2", text: "CBR 150-R" }, { empid: "bk3", text: "CBZ Xtreme" }, + { empid: "bk4", text: "Discover" }, { empid: "bk5", text: "Dazzler" }, { empid: "bk6", text: "Flame" }, + { empid: "bk7", text: "Fazzer" }, { empid: "bk8", text: "FZ-S" }, { empid: "bk9", text: "Pulsar" }, + { empid: "bk10", text: "Shine" }, { empid: "bk11", text: "R15" }, { empid: "bk12", text: "Unicorn" } + ]; + $(function () { + var comboboxInstance =new ej.ComboBox($("#selectCar"), { + width: "100%", + placeholder: "Select a Bike", + fields: { text: "text", value: "empid" }, + dataSource: BikeList, + autofill: true + }); + }); +} + + + +module DatePickerComponent { + $(function () { + var dateSample = new ej.DatePicker($("#datepick"), { + width: "100%" + }); + }); +} + + + + +module DateTimePickerComponent { + $(function () { + var datetimeSample = new ej.DateRangePicker($("#daterangepick"), { + width: "100%" + }); + }); +} + + + +module DateTimePickerComponent { + $(function () { + var datetimeSample = new ej.DateTimePicker($("#datetimepick"), { + width: "100%" + }); + }); +} + + + +$(function () { + var diagram = new ej.datavisualization.Diagram($("#diagram"), { + width: "1000px", + height: "600px", + pageSettings: { + //Sets page size + pageHeight: 500, + pageWidth: 500, + //Customizes the appearance of page + pageBorderWidth: 4, + pageBackgroundColor: "white", + pageBorderColor: "lightgray", + pageMargin: 25, + showPageBreak: true, + multiplePage: true, + pageOrientation: ej.datavisualization.Diagram.PageOrientations.Portrait + }, + scrollSettings: { + horizontalOffset: 0, + verticalOffset: 0 + }, + snapSettings: { + snapConstraints: ej.datavisualization.Diagram.SnapConstraints.ShowLines + }, + nodes: [ + createNode({ name: "NewIdea", width: 150, height: 60, offsetX: 300, offsetY: 60, labels: [createLabel({ "text": "New idea identified" })], type: "flow", shape: ej.datavisualization.Diagram.FlowShapes.Terminator }), + createNode({ name: "Meeting", width: 150, height: 60, offsetX: 300, offsetY: 155, labels: [createLabel({ "text": "Meeting with board" })], type: "flow", shape: ej.datavisualization.Diagram.FlowShapes.Process }), + createNode({ + name: "BoardDecision", width: 150, height: 110, offsetX: 300, offsetY: 280, labels: [createLabel({ text: "Board decides \nwhether \nto proceed", wrapText: "true", "margin": { left: 20, top: 0, right: 20, bottom: 0 } })], + type: "flow", shape: ej.datavisualization.Diagram.FlowShapes.Decision + }), + createNode({ name: "Project", width: 150, height: 100, offsetX: 300, offsetY: 430, labels: [createLabel({ "text": "Find Project \nmanager" })], type: "flow", shape: ej.datavisualization.Diagram.FlowShapes.Decision }), + createNode({ + name: "End", width: 150, height: 60, offsetX: 300, offsetY: 555, labels: [createLabel({ "text": "Implement and Deliver" })], type: "flow", shape: ej.datavisualization.Diagram.FlowShapes.Process }), + createNode({ name: "Decision", width: 250, height: 60, offsetX: 550, offsetY: 60, labels: [createLabel({ "text": "Decision Process for new software ideas" })], type: "flow", shape: ej.datavisualization.Diagram.FlowShapes.Card, fillColor: "#858585", borderColor: "#858585" }), + createNode({ name: "Reject", width: 150, height: 60, offsetX: 550, offsetY: 285, labels: [createLabel({ "text": "Reject and write report" })], type: "flow", shape: ej.datavisualization.Diagram.FlowShapes.Process }), + createNode({ name: "Resources", width: 150, height: 60, offsetX: 550, offsetY: 430, labels: [createLabel({ "text": "Hire new resources" })], type: "flow", shape: ej.datavisualization.Diagram.FlowShapes.Process }) + ], + connectors: [ + createConnector({ name: "connector1", sourceNode: "NewIdea", targetNode: "Meeting" }), + createConnector({ name: "connector2", sourceNode: "Meeting", targetNode: "BoardDecision" }), + createConnector({ name: "connector3", sourceNode: "BoardDecision", targetNode: "Project", labels: [createLabel({ "text": "Yes" })] }), + createConnector({ name: "connector4", sourceNode: "Project", targetNode: "End", labels: [createLabel({ "text": "Yes" })] }), + createConnector({ name: "connector5", sourceNode: "BoardDecision", targetNode: "Reject", labels: [createLabel({ "text": "No" })] }), + createConnector({ name: "connector6", sourceNode: "Project", targetNode: "Resources", labels: [createLabel({ "text": "No" })] }) + ] + }); +}); + +function createNode(option: ej.datavisualization.Diagram.Node) { + if (!option.fillColor) { + option.borderColor = "#1BA0E2"; + option.fillColor = "#1BA0E2"; + } + option.labels[0].fontColor = "white"; + return option; +} + +function createConnector(option: ej.datavisualization.Diagram.Connector) { + option.targetDecorator = { shape: ej.datavisualization.Diagram.DecoratorShapes.Arrow, borderColor: "#606060", width: 10, height: 10 }; + option.lineColor = "#606060"; + if (option.labels && option.labels.length > 0) { + option.labels[0].fillColor = "white"; + } + return option; +} + +function createLabel(options : any) { + return options; +} + + +module DialogComponent { + $(function () { + var dialogInstance = new ej.Dialog($("#basicDialog"), { + width: 550, + minWidth: 310, + minHeight: 215, + target:".control", + close:()=>{ + $("#btnOpen").show();} + }); + var btnInstance = new ej.Button($("#btnOpen"), { + size: "medium", + click: ()=>{ + $("#btnOpen").hide(); + $("#basicDialog").ejDialog("open");}, + type: "button", + height: 30, + width: 150 + }); + }); +} + + + + +module digitalgaugecomponent { + $(function () { + var digitalgaugesample = new ej.datavisualization.DigitalGauge($("#DigitalGauge"), { + width: 525, + height: 305, + isResponsive: true, + items: [{ + segmentSettings: { + width: 1, + spacing: 0, + color: "#8c8c8c" + }, + characterSettings: { + opacity: 0.8, + }, + value: "Syncfusion", + position: { x: 52, y: 52 } + }] + }); + }); +} + + + + + +module DropDownListComponent { + var BikeList = [ + { empid: "bk1", text: "Apache RTR" }, { empid: "bk2", text: "CBR 150-R" }, { empid: "bk3", text: "CBZ Xtreme" }, + { empid: "bk4", text: "Discover" }, { empid: "bk5", text: "Dazzler" }, { empid: "bk6", text: "Flame" }, + { empid: "bk7", text: "Fazzer" }, { empid: "bk8", text: "FZ-S" }, { empid: "bk9", text: "Pulsar" }, + { empid: "bk10", text: "Shine" }, { empid: "bk11", text: "R15" }, { empid: "bk12", text: "Unicorn" } + ]; + $(function () { + var sample = new ej.DropDownList($("#bikeList"),{ + dataSource: BikeList, + width: "100%", + watermarkText: "Select a bike", + fields: { id: "empid", text: "text", value: "text" }, + enableFilterSearch: true, + caseSensitiveSearch: true, + enableIncrementalSearch: true, + enablePopupResize: true, + delimiterChar: ";", + multiSelectMode: ej.MultiSelectMode.Delimiter, + maxPopupHeight: "300px", + minPopupHeight: "150px", + maxPopupWidth: "500px", + minPopupWidth: "350px", + showCheckbox: true, + showRoundedCorner: true + }); + }); +} + + + + + +module ExplorerComponent { + $(function () { + var file = new ej.FileExplorer($("#fileExplorer"), { + path: (window).baseurl + "Content/FileBrowser/", + width: "100%", + minWidth: "150px", + layout: "tile", + isResponsive: true, + ajaxAction: (window).baseurl + "api/FileExplorer/FileOperations" + }); + }); +} + + + + +module GanttComponent { + $(function () { + var ganttInstance = new ej.Gantt($("#GanttContainer"), { + dataSource: (window).projectData, + allowColumnResize: true, + allowSorting: true, + allowSelection: true, + enableContextMenu: true, + taskIdMapping: "taskID", + allowDragAndDrop: true, + taskNameMapping: "taskName", + startDateMapping: "startDate", + showColumnChooser: true, + showColumnOptions: true, + progressMapping: "progress", + durationMapping: "duration", + endDateMapping: "endDate", + childMapping: "subtasks", + scheduleStartDate: "02/01/2017", + scheduleEndDate: "04/09/2017", + //Resources mapping + resourceInfoMapping: "resourceId", + resourceNameMapping: "resourceName", + resourceIdMapping: "resourceId", + resources: (window).projectResources, + predecessorMapping: "predecessor", + showResourceNames: true, + toolbarSettings: { + showToolbar: true, + toolbarItems: ["add","edit","delete","update","cancel","indent","outdent","expandAll","collapseAll","search"] + }, + editSettings: { + allowEditing: true, + allowAdding: true, + allowDeleting: true, + allowIndent: true, + editMode: "cellEditing" + }, + sizeSettings: { + width: "100%", + height: "100%" + }, + dragTooltip: { showTooltip: true }, + showGridCellTooltip: true, + treeColumnIndex: 1, + isResponsive: true, + }); +}); +} + + + +module GridComponent { + $(function () { + var gridInstance = new ej.Grid($("#Grid"), { + dataSource: (window).gridData, + allowGrouping: true, + allowSorting: true, + allowMultiSorting: true, + enableAltRow: true, + allowPaging: true, + allowReordering: true, + allowResizing: true, + allowFiltering: true, + allowScrolling: true, + enableRowHover: true, + selectionType: "multiple", + selectionSettings: { enableToggle: true, selectionMode: ["row", "cell", "column"] }, + allowKeyboardNavigation: true, + editSettings: { allowEditing: true, allowAdding: true, allowDeleting: true, allowEditOnDblClick: true, showDeleteConfirmDialog: true }, + toolbarSettings: { showToolbar: true, toolbarItems: ["add", "edit", "delete", "update", "cancel", "search"] }, + columns: [ + { field: "OrderID", headerText: "Order ID", isPrimaryKey: true, width: 75, textAlign: ej.TextAlign.Right }, + { field: "CustomerID", headerText: "Customer ID", editType: ej.Grid.EditingType.String, width: 80 }, + { field: "EmployeeID", headerText: "Employee ID", width: 75, editType: ej.Grid.EditingType.Dropdown, textAlign: ej.TextAlign.Right, priority: 4 }, + { field: "Freight", width: 75, format: "{0:C}", editType: ej.Grid.EditingType.Numeric, textAlign: ej.TextAlign.Right, priority: 3 }, + { field: "OrderDate", headerText: "Order Date", width: 80, format: "{0:MM/dd/yyyy}", textAlign: ej.TextAlign.Right, priority: 2 }, + { field: "ShipCity", headerText: "Ship City", editType: ej.Grid.EditingType.Dropdown, width: 110, priority: 2 } + ], + isResponsive: true, + minWidth: 700, + showSummary: true, + summaryRows: [{ title: "Sum", summaryColumns: [{ summaryType: ej.Grid.SummaryType.Sum, displayColumn: "Freight", dataMember: "Freight", format: "{0:C2}" }] }] + }); + }); +} + + + +var columns = ["Vegie-spread", "Tofuaa", "Alice Mutton", "Konbu", "Fl�temysost"] +var itemSource: any[] = []; +for (var i = 0; i < columns.length; i++) { + for (var j = 0; j < 6; j++) { + var value = Math.floor((Math.random() * 100) + 1); + itemSource.push({ ProductName: columns[i], Year: "Y" + (2011 + j), Value: value }) + } +} + +$(function () { + var heatmap = new ej.datavisualization.HeatMap($("#heatmap"), { + colorMappingCollection: [ + { value: 0, color: "#8ec8f8", label: { text: "0" } }, + { value: 100, color: "#0d47a1", label: { text: "100" } } + ], + isResponsive: true, + itemsSource: itemSource, + width: "100%", + itemsMapping: { + column: { propertyName: "ProductName", displayName: "Product Name" }, + row: { propertyName: "Year", displayName: "Year" }, + value: { propertyName: "Value" }, + columnMapping: [ + { "propertyName": columns[0], "displayName": columns[0] }, + { "propertyName": columns[1], "displayName": columns[1] }, + { "propertyName": columns[2], "displayName": columns[2] }, + { "propertyName": columns[3], "displayName": columns[3] }, + { "propertyName": columns[4], "displayName": columns[4] }, + { "propertyName": columns[5], "displayName": columns[5] } + ], + headerMapping: { propertyName: "Year", displayName: "Year", columnStyle: { width: 105, textAlign: "right" } }, + }, + legendCollection: ["heatmap_legend"] + }); + var heatmaplegend = new ej.datavisualization.HeatMapLegend($("#heatmap_legend"), { + colorMappingCollection: [ + { value: 0, color: "#8ec8f8", label: { text: "0" } }, + { value: 100, color: "#0d47a1", label: { text: "100" } } + ], + height: "50px", + width: "75%", + isResponsive: true + }); +}); + + + + +module KanbanComponent { + $(function () { + var sample = new ej.Kanban($("#Kanban"), { + dataSource: new ej.DataManager((window).kanbanData).executeLocal(new ej.Query().take(20)), + columns: [ + { headerText: "Backlog", key: "Open" }, + { headerText: "In Progress", key: "InProgress" }, + { headerText: "Testing", key: "Testing" }, + { headerText: "Done", key: "Close" } + ], + keyField: "Status", + allowTitle: true, + fields: { + content: "Summary", + primaryKey: "Id", + imageUrl: "ImgUrl" + }, + allowSelection: false + }); + }); +} + + +module lineargaugecomponent { + $(function () { + var linearsample = new ej.datavisualization.LinearGauge($("#LinearGauge"), { + labelColor: "#8c8c8c", width: 500, + isResponsive: true, enableAnimation: false, + scales: [{ + width: 4, border: { color: "transparent", width: 0 }, showBarPointers: false, showRanges: true, length: 310, + position: { x: 52, y: 50 }, markerPointers: [{ + value: 50, length: 10, width: 10, backgroundColor: "#4D4D4D", border: { color: "#4D4D4D" } + }], + labels: [{ font: { size: "11px", fontFamily: "Segoe UI", fontStyle: "bold" }, distanceFromScale: { x: -13 } }], + ticks: [{ type: "majorinterval", width: 1, color: "#8c8c8c" }], + ranges: [{ + endValue: 60, + startValue: 0, + backgroundColor: "#F6B53F", + border: { color: "#F6B53F" }, startWidth: 4, endWidth: 4 + }, { + endValue: 100, + startValue: 60, + backgroundColor: "#E94649", + border: { color: "#E94649" }, startWidth: 4, endWidth: 4 + }] + }] + }); + }); +} + + + +module ListBoxComponent { + $(function () { + var listboxInstance = new ej.ListBox($("#selectcar"), { + showCheckbox: true + }); + }); +} + + + +module ListviewComponent { + $(function () { + var listviewInstance = new ej.ListView($("#defaultlistview"), { + enableCheckMark: true, + width: 400 + }); + }); +} + + +var world_map= + { + "type": "FeatureCollection", + "crs": { "type": "name", "properties": { "name": "urn:ogc:def:crs:OGC:1.3:CRS84" } }, + "features": [ + { "type": "Feature", "properties": { "admin": "Afghanistan", "name": "Afghanistan", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[61.21081709172573, 35.650072333309218], [62.230651483005879, 35.270663967422287], [62.984662306576588, 35.404040839167614], [63.193538445900337, 35.857165635718907], [63.982895949158696, 36.007957465146596], [64.546479119733888, 36.31207326918426], [64.746105177677393, 37.111817735333297], [65.588947788357828, 37.305216783185628], [65.745630731066811, 37.661164048812061], [66.217384881459324, 37.393790188133913], [66.518606805288655, 37.362784328758785], [67.075782098259609, 37.35614390720928], [67.829999627559502, 37.144994004864678], [68.135562371701369, 37.023115139304302], [68.859445835245921, 37.344335842430588], [69.196272820924364, 37.15114350030742], [69.518785434857946, 37.608996690413413], [70.116578403610319, 37.588222764632086], [70.270574171840124, 37.73516469985401], [70.376304152309274, 38.138395901027515], [70.806820509732873, 38.486281643216408], [71.348131137990251, 38.258905341132156], [71.239403924448155, 37.953265082341879], [71.541917759084768, 37.905774441065631], [71.448693475230229, 37.065644843080513], [71.84463829945058, 36.738171291646914], [72.193040805962383, 36.94828766534566], [72.636889682917271, 37.047558091778349], [73.260055779924983, 37.495256862938994], [73.948695916646486, 37.421566270490786], [74.980002475895404, 37.419990139305888], [75.158027785140902, 37.13303091078911], [74.575892775372964, 37.02084137628345], [74.067551710917812, 36.836175645488446], [72.920024855444453, 36.720007025696312], [71.846291945283909, 36.509942328429851], [71.262348260385735, 36.074387518857797], [71.498767938121077, 35.650563259415996], [71.613076206350698, 35.153203436822857], [71.115018751921625, 34.733125718722228], [71.156773309213449, 34.348911444632144], [70.881803012988385, 33.988855902638512], [69.93054324735958, 34.020120144175102], [70.323594191371583, 33.358532619758385], [69.687147251264847, 33.105498969041228], [69.262522007122541, 32.501944078088293], [69.317764113242546, 31.901412258424436], [68.926676873657655, 31.620189113892064], [68.556932000609308, 31.713310044882011], [67.792689243444769, 31.582930406209623], [67.683393589147457, 31.303154201781414], [66.938891229118454, 31.304911200479346], [66.38145755398601, 30.738899237586448], [66.346472609324408, 29.88794342703617], [65.046862013616092, 29.472180691031902], [64.350418735618504, 29.560030625928089], [64.148002150331237, 29.340819200145965], [63.550260858011164, 29.468330796826162], [62.549856805272775, 29.318572496044304], [60.874248488208778, 29.829238999952604], [61.78122155136343, 30.735850328081231], [61.699314406180811, 31.379506130492661], [60.941944614511115, 31.548074652628745], [60.863654819588952, 32.182919623334421], [60.536077915290761, 32.981268825811561], [60.963700392505991, 33.528832302376252], [60.528429803311575, 33.676446031217999], [60.80319339380744, 34.404101874319856], [61.21081709172573, 35.650072333309218]]] } }, + { "type": "Feature", "properties": { "admin": "Angola", "name": "Angola", "continent": "Africa" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[16.326528354567042, -5.877470391466217], [16.573179965896141, -6.622644545115092], [16.860190870845226, -7.222297865429978], [17.089995965247166, -7.545688978712474], [17.472970004962288, -8.068551120641656], [18.134221632569048, -7.987677504104865], [18.464175652752683, -7.847014255406475], [19.016751743249664, -7.988245944860138], [19.166613396896079, -7.738183688999724], [19.417502475673214, -7.155428562044277], [20.037723016040214, -7.116361179231658], [20.091621534920616, -6.943090101756949], [20.60182295093832, -6.939317722199688], [20.514748162526526, -7.299605808138663], [21.728110792739752, -7.290872491081315], [21.74645592620336, -7.920084730667113], [21.949130893652033, -8.305900974158304], [21.80180138518795, -8.908706556842985], [21.875181919042397, -9.523707777548564], [22.208753289486417, -9.894796237836529], [22.155268182064326, -11.084801120653777], [22.402798292742428, -10.99307545333569], [22.837345411884762, -11.017621758674334], [23.456790805767461, -10.867863457892481], [23.912215203555743, -10.926826267137541], [24.017893507592614, -11.237298272347115], [23.904153680118235, -11.722281589406332], [24.079905226342895, -12.191296888887305], [23.930922072045373, -12.565847670138821], [24.0161365088947, -12.91104623784855], [21.933886346125941, -12.898437188369353], [21.887842644953871, -16.080310153876891], [22.562478468524283, -16.898451429921831], [23.215048455506086, -17.523116143465952], [21.377176141045592, -17.930636488519706], [18.956186964603628, -17.789094740472233], [18.263309360434217, -17.309950860262003], [14.209706658595049, -17.353100681225708], [14.058501417709035, -17.423380629142653], [13.462362094789963, -16.971211846588741], [12.814081251688405, -16.941342868724075], [12.21546146001938, -17.111668389558059], [11.734198846085146, -17.301889336824498], [11.640096062881609, -16.673142185129205], [11.778537224991563, -15.793816013250687], [12.123580763404444, -14.878316338767927], [12.175618930722264, -14.449143568583889], [12.500095249083014, -13.547699883684398], [12.738478631245439, -13.137905775609934], [13.312913852601834, -12.483630466362511], [13.633721144269824, -12.038644707897189], [13.738727654686924, -11.297863050993142], [13.686379428775293, -10.73107594161584], [13.38732791510216, -10.373578383020726], [13.120987583069873, -9.766897067914112], [12.875369500386567, -9.166933689005488], [12.929061313537797, -8.959091078327573], [13.23643273280987, -8.56262948978434], [12.933040398824314, -7.596538588087752], [12.728298374083916, -6.927122084178803], [12.227347039446441, -6.294447523629372], [12.322431674863562, -6.100092461779651], [12.735171339578695, -5.965682061388476], [13.024869419006988, -5.984388929878106], [13.375597364971892, -5.864241224799555], [16.326528354567042, -5.877470391466217]]], [[[12.436688266660919, -5.684303887559223], [12.182336866920277, -5.789930515163801], [11.914963006242115, -5.037986748884733], [12.318607618873923, -4.606230157086158], [12.620759718484548, -4.438023369976121], [12.995517205465202, -4.781103203961918], [12.631611769265842, -4.991271254092935], [12.468004184629759, -5.248361504744991], [12.436688266660919, -5.684303887559223]]]] } }, + { "type": "Feature", "properties": { "admin": "Albania", "name": "Albania", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[20.590247430104906, 41.855404161133592], [20.463175083099195, 41.515089016275333], [20.605181919037356, 41.086226304685219], [21.020040317476397, 40.842726955725873], [20.99998986174722, 40.580003973953964], [20.67499677906363, 40.43499990494302], [20.61500044117275, 40.110006822259365], [20.150015903410516, 39.624997666983965], [19.980000441170144, 39.694993394523401], [19.9600016618732, 39.915005805006039], [19.40608198413673, 40.250773423822459], [19.319058872157139, 40.727230129553554], [19.403549838954287, 41.409565741535445], [19.540027296637099, 41.71998607031275], [19.371768833094958, 41.87754751237064], [19.304486118250786, 42.195745144207812], [19.738051385179627, 42.688247382165564], [19.801613396898681, 42.500093492190835], [20.0707, 42.58863], [20.28375451018189, 42.320259507815074], [20.52295, 42.21787], [20.590247430104906, 41.855404161133592]]] } }, + { "type": "Feature", "properties": { "admin": "United Arab Emirates", "name": "United Arab Emirates", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[51.579518670463258, 24.245497137951102], [51.757440626844172, 24.294072984305462], [51.794389275932865, 24.019826158132499], [52.577080519425593, 24.177439276622703], [53.404006788960139, 24.151316840099167], [54.008000929587574, 24.121757920828212], [54.693023716048614, 24.797892360935084], [55.439024692614126, 25.439145209244934], [56.070820753814544, 26.055464178973978], [56.261041701080948, 25.714606431576762], [56.396847365143991, 24.924732163995483], [55.886232537667993, 24.92083059335744], [55.804118686756212, 24.269604193615258], [55.981213820220454, 24.130542914317822], [55.528631626208231, 23.933604030853498], [55.525841098864461, 23.524869289640929], [55.234489373602869, 23.110992743415316], [55.208341098863187, 22.708329982997039], [55.006803012924898, 22.496947536707129], [52.000733270074321, 23.001154486578937], [51.617707553926969, 24.014219265228824], [51.579518670463258, 24.245497137951102]]] } }, + { "type": "Feature", "properties": { "admin": "Argentina", "name": "Argentina", "continent": "South America" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[-65.5, -55.2], [-66.45, -55.25], [-66.95992, -54.89681], [-67.56244, -54.87001], [-68.63335, -54.8695], [-68.634010227583147, -52.636370458874453], [-68.25, -53.1], [-67.75, -53.85], [-66.45, -54.45], [-65.05, -54.7], [-65.5, -55.2]]], [[[-64.964892137294569, -22.075861504812348], [-64.377021043542257, -22.79809132252354], [-63.986838141522462, -21.993644301035953], [-62.84646847192154, -22.034985446869452], [-62.685057135657885, -22.249029229422401], [-60.846564704009928, -23.880712579038299], [-60.028966030503973, -24.032796319273238], [-58.807128465394939, -24.771459242453268], [-57.777217169817952, -25.162339776309032], [-57.633660040911124, -25.603656508081666], [-58.618173590719707, -27.123718763947117], [-57.609759690976134, -27.395898532828419], [-56.486701626192989, -27.548499037386243], [-55.695845506398186, -27.387837009390815], [-54.788794928595038, -26.621785577096087], [-54.625290696823541, -25.739255466415479], [-54.130049607954412, -25.547639255477243], [-53.628348965048716, -26.12486500417743], [-53.648735317587885, -26.923472588816104], [-54.490725267135517, -27.474756768505767], [-55.162286342984586, -27.881915378533414], [-56.290899624239088, -28.852760512000849], [-57.62513342958291, -30.21629485445424], [-57.874937303281897, -31.016556084926158], [-58.14244035504074, -32.044503676076182], [-58.132647671121404, -33.040566908502008], [-58.349611172098818, -33.263188978815428], [-58.427074144104367, -33.909454441057541], [-58.495442064026541, -34.4314897600701], [-57.225829637263629, -35.288026625307886], [-57.362358771378737, -35.977390232081497], [-56.737487352105447, -36.413125909166574], [-56.788285285048339, -36.901571547189327], [-57.749156867083421, -38.183870538079901], [-59.231857062401865, -38.720220228837199], [-61.2374452378656, -38.92842457454114], [-62.335956997310134, -38.827707208004362], [-62.125763108962914, -39.424104913084868], [-62.33053097191943, -40.172586358400316], [-62.145994432205228, -40.676896661136723], [-62.74580278181697, -41.028761488612083], [-63.770494757732514, -41.166789239263657], [-64.732089809819698, -40.802677097335128], [-65.118035244391578, -41.064314874028874], [-64.97856055363583, -42.058000990569312], [-64.303407965742466, -42.359016208669495], [-63.755947842042339, -42.043686618824495], [-63.458059048095883, -42.563138116222355], [-64.378803880456289, -42.873558444999638], [-65.181803961839691, -43.495380954767782], [-65.328823411710133, -44.501366062193689], [-65.565268927661592, -45.03678557716978], [-66.509965786389344, -45.039627780945843], [-67.293793911392427, -45.551896254255183], [-67.580546434180079, -46.301772963242527], [-66.597066413017259, -47.033924655953804], [-65.641026577401433, -47.23613453551188], [-65.98508826360073, -48.133289076531128], [-67.166178961847649, -48.697337334996931], [-67.816087612566449, -49.869668877970412], [-68.728745083273154, -50.26421843851886], [-69.138539191347789, -50.732510267947788], [-68.815561489523517, -51.771104011594097], [-68.149994879820397, -52.349983406127699], [-68.571545376241332, -52.299443855346247], [-69.498362189396076, -52.142760912637236], [-71.914803839796321, -52.009022305865912], [-72.329403856074023, -51.425956312872394], [-72.309973517532342, -50.677009779666342], [-72.975746832964617, -50.741450290734299], [-73.328050910114456, -50.378785088909865], [-73.415435757120022, -49.318436374712952], [-72.648247443314929, -48.878618259476774], [-72.331160854771937, -48.244238376661819], [-72.44735531278026, -47.738532810253517], [-71.917258470330196, -46.884838148791786], [-71.552009446891233, -45.560732924177117], [-71.659315558545316, -44.973688653341434], [-71.222778896759721, -44.784242852559409], [-71.329800788036195, -44.407521661151677], [-71.793622606071935, -44.207172133156099], [-71.464056159130493, -43.787611179378324], [-71.915423956983901, -43.408564548517404], [-72.148898078078517, -42.254888197601375], [-71.746803758415453, -42.051386407235988], [-71.915734015577542, -40.832339369470716], [-71.680761277946445, -39.808164157878061], [-71.413516608349042, -38.916022230791107], [-70.814664272734703, -38.552995293940732], [-71.118625047475419, -37.576827487947192], [-71.121880662709771, -36.65812387466233], [-70.364769253201658, -36.005088799789931], [-70.388049485949082, -35.169687595359441], [-69.817309129501453, -34.193571465798279], [-69.814776984319209, -33.273886000299839], [-70.074399380153622, -33.09120981214803], [-70.535068935819439, -31.365010267870279], [-69.919008348251921, -30.336339206668306], [-70.013550381129861, -29.367922865518544], [-69.656130337183143, -28.459141127233686], [-69.001234910748266, -27.521213881136127], [-68.295541551370391, -26.899339694935787], [-68.594799770772667, -26.50690886811126], [-68.386001146097342, -26.185016371365229], [-68.417652960876111, -24.518554782816874], [-67.328442959244128, -24.025303236590908], [-66.985233934177629, -22.986348565362825], [-67.106673550063604, -22.735924574476392], [-66.273339402924833, -21.832310479420677], [-64.964892137294569, -22.075861504812348]]]] } }, + { "type": "Feature", "properties": { "admin": "Armenia", "name": "Armenia", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[43.582745802592726, 41.09214325618256], [44.972480096218071, 41.248128567055588], [45.179495883979335, 40.985353908851401], [45.560351189970433, 40.812289537105919], [45.359174839058156, 40.561503811193447], [45.891907179555076, 40.218475653639992], [45.610012241402913, 39.899993801425175], [46.034534132680662, 39.628020738273058], [46.483498976432443, 39.464154771475528], [46.505719842317966, 38.770605373686287], [46.143623081248812, 38.74120148371221], [45.735379266143006, 39.319719143219736], [45.739978468616975, 39.473999131827114], [45.298144972521456, 39.471751207022422], [45.00198733905674, 39.740003567049548], [44.793989699081934, 39.713002631177041], [44.400008579288695, 40.005000311842267], [43.656436395040934, 40.253563951166178], [43.752657911968399, 40.740200914058754], [43.582745802592726, 41.09214325618256]]] } }, + { "type": "Feature", "properties": { "admin": "French Southern and Antarctic Lands", "name": "Fr. S. Antarctic Lands", "continent": "Seven seas (open ocean)" }, "geometry": { "type": "Polygon", "coordinates": [[[68.935, -48.625], [69.58, -48.94], [70.525, -49.065], [70.56, -49.255], [70.28, -49.71], [68.745, -49.775], [68.72, -49.2425], [68.8675, -48.83], [68.935, -48.625]]] } }, + { "type": "Feature", "properties": { "admin": "Australia", "name": "Australia", "continent": "Oceania" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[145.397978143494782, -40.792548516605883], [146.364120721623692, -41.137695407883335], [146.908583612250823, -41.000546156580668], [147.689259474884125, -40.808258152022681], [148.289067824495987, -40.875437514002122], [148.359864536735785, -42.062445163746439], [148.017301467073082, -42.40702361426861], [147.914051955353784, -43.211522312188485], [147.564564243763982, -42.937688897473855], [146.87034305235494, -43.634597263362082], [146.663327264593647, -43.580853773778543], [146.048377720320389, -43.54974456153888], [145.431929559510536, -42.693776137056268], [145.295090366801674, -42.03360971452755], [144.7180713238306, -41.162551771815707], [144.743754510679622, -40.703975111657705], [145.397978143494782, -40.792548516605883]]], [[[143.561811151299935, -13.763655694232209], [143.922099237238882, -14.548310642152], [144.563713820574804, -14.171176039285879], [144.894908075133515, -14.594457696188622], [145.374723748963419, -14.984976495018284], [145.271991001567244, -15.428205254785691], [145.48525963763575, -16.285672295804769], [145.637033319276952, -16.784918308176611], [145.888904250267672, -16.906926364817647], [146.160308872664473, -17.76165455492524], [146.063673944278662, -18.280072523677315], [146.387478469019584, -18.958274021075905], [147.471081577747896, -19.480722751546676], [148.177601760042478, -19.955939222902767], [148.848413527623222, -20.391209812097252], [148.717465448195583, -20.633468926681513], [149.289420200802056, -21.260510756111096], [149.678337030230637, -22.342511895438388], [150.07738244038859, -22.122783705333315], [150.482939081015161, -22.556142266533012], [150.727265252891158, -22.402404880464655], [150.899554478152254, -23.462236830338679], [151.609175246384211, -24.076256198830755], [152.07353966695905, -24.45788665130619], [152.855197381805908, -25.267501316023008], [153.136162144176751, -26.071173191026187], [153.161948683890358, -26.641319268502439], [153.09290897034856, -27.260299574494503], [153.569469028944184, -28.110066827102099], [153.512108189100218, -28.995077406532751], [153.339095493787056, -29.458201592732443], [153.069241164358857, -30.350240166954809], [153.089601678681788, -30.923641859665445], [152.891577590139377, -31.640445651985949], [152.450002476205327, -32.550002536755237], [151.709117466436766, -33.041342054986337], [151.343971795862387, -33.816023451473846], [151.010555454715103, -34.310360202777879], [150.714139439089024, -35.173459974916803], [150.328219842733233, -35.671879164371923], [150.075212030232251, -36.420205580390508], [149.946124302367139, -37.109052422841224], [149.997283970336127, -37.425260512035123], [149.423882277625523, -37.772681166333463], [148.304622430615893, -37.809061374666875], [147.38173302631526, -38.219217217767543], [146.922122837511324, -38.606532077795116], [146.317921991154776, -39.035756524411433], [145.489652134380549, -38.593767999019043], [144.876976353128157, -38.41744801203911], [145.032212355732952, -37.896187839510972], [144.485682407814011, -38.085323581699257], [143.609973586196077, -38.809465427405321], [142.745426873952965, -38.538267510737519], [142.17832970598198, -38.380034275059835], [141.606581659104677, -38.308514092767872], [140.638578729413211, -38.019332777662541], [139.992158237874321, -37.402936293285094], [139.806588169514043, -36.643602797188272], [139.574147577065219, -36.138362318670666], [139.082808058834075, -35.732754001611774], [138.120747918856296, -35.612296237939397], [138.449461704664998, -35.127261244447887], [138.207564325106659, -34.384722588845925], [137.719170363516128, -35.07682504653102], [136.829405552314711, -35.260534763328614], [137.352371047108477, -34.707338555644093], [137.503886346588331, -34.130267836240769], [137.890116001537649, -33.640478610978327], [137.810327590079112, -32.900007012668105], [136.996837192940347, -33.752771498348629], [136.372069126531642, -34.094766127256186], [135.98904341038434, -34.89011809666048], [135.208212518454104, -34.478670342752601], [135.239218377829161, -33.947953383114971], [134.613416782774607, -33.222778008763136], [134.085903761939107, -32.848072198214759], [134.273902622617015, -32.617233575166949], [132.990776808809812, -32.011224053680188], [132.288080682504869, -31.982646986622761], [131.326330601120901, -31.495803318001041], [129.535793898639668, -31.590422865527476], [128.240937534702198, -31.948488864877849], [127.102867466338282, -32.282266941051041], [126.148713820501129, -32.2159660784206], [125.088623488465586, -32.728751316052829], [124.22164798390493, -32.959486586236061], [124.028946567888511, -33.483847344701708], [123.65966678273071, -33.890179131812722], [122.811036411633609, -33.914467054989835], [122.18306440642283, -34.003402194964217], [121.299190708502579, -33.821036065406126], [120.580268182458113, -33.930176690406618], [119.893695103028222, -33.976065362281808], [119.298899367348781, -34.50936614353396], [119.007340936357977, -34.464149265278529], [118.505717808100769, -34.746819349915093], [118.024971958489516, -35.064732761374707], [117.295507440257438, -35.025458672832862], [116.62510908413492, -35.025096937806829], [115.564346958479689, -34.386427911111547], [115.026808709779516, -34.196517022438918], [115.048616164206763, -33.623425388322026], [115.545123325667078, -33.487257989232951], [115.714673700016661, -33.259571628554944], [115.679378696761376, -32.900368747694124], [115.801645135563959, -32.205062351207026], [115.689610630355105, -31.612437025683782], [115.160909051576937, -30.601594333622455], [114.99704308477942, -30.030724786094162], [115.040037876446249, -29.461095472940794], [114.64197431850198, -28.810230808224706], [114.61649783738217, -28.516398614213042], [114.173579136208446, -28.118076674107321], [114.048883905088132, -27.33476531342712], [113.477497593236876, -26.543134047147898], [113.338953078262477, -26.116545098578477], [113.77835778204026, -26.549025160429174], [113.440962355606587, -25.621278171493152], [113.936901076311642, -25.911234633082877], [114.232852004047288, -26.298446140245868], [114.216160516417006, -25.786281019801105], [113.721255324357685, -24.998938897402123], [113.625343866024025, -24.683971042583146], [113.393523390762667, -24.384764499613262], [113.502043898575607, -23.80635019297025], [113.706992629045146, -23.56021534596406], [113.843418410295669, -23.059987481378734], [113.736551548316072, -22.475475355725372], [114.149756300921865, -21.755881036061009], [114.225307244932651, -22.51748829517863], [114.64776207891866, -21.829519952076904], [115.460167270979298, -21.495173435148541], [115.94737267462699, -21.068687839443708], [116.711615431791529, -20.701681817306817], [117.166316359527684, -20.623598728113802], [117.441545037914238, -20.746898695562162], [118.229558953932951, -20.374208265873232], [118.836085239742701, -20.263310642174822], [118.987807244951753, -20.044202569257319], [119.252493931150624, -19.952941989829835], [119.805225050944543, -19.976506442954978], [120.856220330896633, -19.683707777589188], [121.399856398607199, -19.239755547769729], [121.655137974129062, -18.70531788500713], [122.241665480641757, -18.197648614171765], [122.286623976735655, -17.798603204013911], [122.312772251475408, -17.254967136303446], [123.012574497571904, -16.405199883695854], [123.433789097183009, -17.268558037996225], [123.859344517106592, -17.069035332917249], [123.503242222183232, -16.596506036040363], [123.817073195491915, -16.11131601325199], [124.258286574399847, -16.32794361741956], [124.379726190285794, -15.567059828353973], [124.926152785340022, -15.07510019293532], [125.167275018413875, -14.680395603090004], [125.670086704613823, -14.510070082256018], [125.685796340030493, -14.230655612853834], [126.125149367376096, -14.347340996968949], [126.142822707219864, -14.095986830301211], [126.582589146023736, -13.95279143642041], [127.065867140817332, -13.817967624570922], [127.804633416861932, -14.276906019755042], [128.359689976108939, -14.869169610252253], [128.985543247595899, -14.875990899314738], [129.621473423379598, -14.969783623924553], [129.409600050982988, -14.420669854391031], [129.888640578328591, -13.618703301653481], [130.339465773642928, -13.357375583553473], [130.183506300985982, -13.107520033422301], [130.617795037966971, -12.536392103732464], [131.223494500859999, -12.183648776908113], [131.73509118054946, -12.302452894747159], [132.575298293183096, -12.114040622611013], [132.557211541881031, -11.603012383676683], [131.824698114143644, -11.273781833545097], [132.357223748911395, -11.128519382372641], [133.019560581596409, -11.376411228076844], [133.550845981989028, -11.786515394745134], [134.393068475481982, -12.042365411022173], [134.678632440327021, -11.9411829565947], [135.298491245667975, -12.248606052299051], [135.882693312727611, -11.962266940969796], [136.258380975489445, -12.049341729381606], [136.492475213771627, -11.857208754120389], [136.951620314684988, -12.351958916882735], [136.685124953355739, -12.887223402562054], [136.305406528875096, -13.291229750219895], [135.961758254134111, -13.324509372615889], [136.077616815332533, -13.72427825282578], [135.783836297753226, -14.223989353088211], [135.4286641786112, -14.715432224183896], [135.500184360903177, -14.997740573794427], [136.295174595281367, -15.550264987859121], [137.065360142159477, -15.870762220933353], [137.580470819244795, -16.215082289294084], [138.303217401278971, -16.807604261952658], [138.58516401586337, -16.806622409739173], [139.108542922115475, -17.062679131745366], [139.260574985918197, -17.371600843986183], [140.215245396078274, -17.710804945550063], [140.875463495039241, -17.36906869880394], [141.071110467696258, -16.832047214426719], [141.274095493738798, -16.388870131091604], [141.398222284103781, -15.840531508042584], [141.702183058844611, -15.044921156476928], [141.563380161708665, -14.561333103089506], [141.635520461188094, -14.270394789286284], [141.519868605718955, -13.698078301653805], [141.650920038011009, -12.944687595270562], [141.842691278246207, -12.741547539931187], [141.68699018775078, -12.407614434461134], [141.928629185147543, -11.877465915578778], [142.118488397387978, -11.328042087451619], [142.14370649634634, -11.04273650476814], [142.51526004452495, -10.668185723516642], [142.797310011974048, -11.157354831591515], [142.866763136974271, -11.784706719614929], [143.11594689348567, -11.90562957117791], [143.158631626558758, -12.325655612846187], [143.522123651299864, -12.834358412327429], [143.597157830987669, -13.400422051652594], [143.561811151299935, -13.763655694232209]]]] } }, + { "type": "Feature", "properties": { "admin": "Austria", "name": "Austria", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[16.979666782304033, 48.123497015976298], [16.903754103267257, 47.714865627628321], [16.340584344150411, 47.712901923201215], [16.534267612380372, 47.496170966169103], [16.202298211337361, 46.852385972676949], [16.011663852612653, 46.683610744811688], [15.137091912504982, 46.658702704447016], [14.632471551174827, 46.431817328469535], [13.806475457421524, 46.509306138691201], [12.376485223040813, 46.767559109069843], [12.153088006243051, 47.115393174826437], [11.164827915093268, 46.941579494812721], [11.048555942436533, 46.751358547546324], [10.442701450246627, 46.893546250997424], [9.932448357796657, 46.920728054382948], [9.479969516649019, 47.102809963563367], [9.632931756232974, 47.347601223329974], [9.594226108446346, 47.525058091820256], [9.896068149463188, 47.58019684507569], [10.402083774465209, 47.302487697939156], [10.544504021861625, 47.566399237653762], [11.426414015354736, 47.523766181012967], [12.141357456112784, 47.703083401065761], [12.620759718484491, 47.672387600284395], [12.932626987365945, 47.467645575543983], [13.025851271220487, 47.637583523135824], [12.884102817443901, 48.289145819687903], [13.243357374736998, 48.41611481382904], [13.595945672264433, 48.877171942737135], [14.33889773932472, 48.555305284207193], [14.901447381254055, 48.964401760445817], [15.253415561593979, 49.039074205107575], [16.029647251050218, 48.733899034207916], [16.49928266771877, 48.785808010445095], [16.960288120194573, 48.596982326850593], [16.879982944412998, 48.470013332709463], [16.979666782304033, 48.123497015976298]]] } }, + { "type": "Feature", "properties": { "admin": "Azerbaijan", "name": "Azerbaijan", "continent": "Asia" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[45.001987339056789, 39.740003567049591], [45.298144972521435, 39.471751207022422], [45.739978468616997, 39.473999131827149], [45.735379266143092, 39.319719143219785], [46.143623081248812, 38.74120148371221], [45.457721795438729, 38.874139105783108], [44.952688022650264, 39.33576467544642], [44.79398969908199, 39.713002631177027], [45.001987339056789, 39.740003567049591]]], [[[47.373315464066216, 41.219732367511249], [47.81566572448471, 41.151416124021338], [47.987283156126033, 41.405819200194223], [48.584352654826283, 41.808869533854669], [49.110263706260653, 41.282286688800518], [49.618914829309588, 40.572924302729966], [50.084829542853093, 40.526157131505776], [50.392821079312704, 40.256561184239096], [49.569202101444795, 40.176100979160701], [49.395259230350419, 39.39948171646224], [49.2232283872507, 39.04921885838791], [48.856532423707584, 38.815486355131775], [48.883249139202533, 38.320245266262638], [48.634375441284831, 38.270377509100925], [48.010744256386502, 38.794014797514528], [48.355529412637928, 39.288764960276886], [48.060095249225256, 39.582235419262439], [47.685079380083117, 39.508363959301185], [46.505719842317966, 38.770605373686251], [46.483498976432443, 39.464154771475528], [46.034534132680697, 39.628020738273044], [45.610012241402913, 39.899993801425175], [45.891907179555133, 40.21847565363997], [45.359174839058156, 40.561503811193482], [45.560351189970469, 40.812289537105947], [45.179495883979392, 40.98535390885143], [44.972480096218156, 41.248128567055623], [45.217426385281634, 41.411451931314041], [45.962600538930438, 41.123872585609789], [46.501637404166978, 41.064444688474104], [46.637908156120567, 41.181672675128219], [46.145431756378983, 41.72280243587263], [46.404950799348818, 41.860675157227341], [46.686070591016652, 41.827137152669899], [47.373315464066216, 41.219732367511249]]]] } }, + { "type": "Feature", "properties": { "admin": "Burundi", "name": "Burundi", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[29.339997592900342, -4.499983412294092], [29.276383904749046, -3.293907159034063], [29.02492638521678, -2.839257907730157], [29.632176141078585, -2.917857761246096], [29.938359002407935, -2.348486830254238], [30.469696079232978, -2.413857517103458], [30.527677036264457, -2.807631931167534], [30.743012729624692, -3.034284763199686], [30.752262811004943, -3.359329522315569], [30.505559523243559, -3.568567396665364], [30.116332635221166, -4.090137627787242], [29.753512404099919, -4.45238941815328], [29.339997592900342, -4.499983412294092]]] } }, + { "type": "Feature", "properties": { "admin": "Belgium", "name": "Belgium", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[3.314971144228536, 51.345780951536071], [4.047071160507527, 51.267258612668556], [4.973991326526913, 51.475023708698124], [5.60697594567, 51.037298488969768], [6.156658155958779, 50.803721015010574], [6.043073357781109, 50.128051662794221], [5.782417433300905, 50.090327867221205], [5.674051954784828, 49.52948354755749], [4.799221632515809, 49.985373033236371], [4.286022983425084, 49.90749664977254], [3.588184441755685, 50.378992418003563], [3.123251580425801, 50.780363267614561], [2.658422071960274, 50.796848049515731], [2.513573032246142, 51.148506171261815], [3.314971144228536, 51.345780951536071]]] } }, + { "type": "Feature", "properties": { "admin": "Benin", "name": "Benin", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[2.691701694356254, 6.258817246928628], [1.865240512712318, 6.14215770102973], [1.618950636409238, 6.832038072126236], [1.664477573258381, 9.128590399609378], [1.46304284018467, 9.334624335157086], [1.425060662450136, 9.825395412632998], [1.077795037448737, 10.175606594275022], [0.772335646171484, 10.470808213742357], [0.899563022474069, 10.997339382364258], [1.243469679376488, 11.11051076908346], [1.447178175471066, 11.547719224488857], [1.93598554851988, 11.641150214072551], [2.154473504249921, 11.940150051313337], [2.49016360841793, 12.233052069543671], [2.84864301922667, 12.235635891158266], [3.611180454125558, 11.660167141155966], [3.572216424177469, 11.327939357951516], [3.797112257511713, 10.734745591673104], [3.600070021182801, 10.332186184119406], [3.705438266625918, 10.063210354040207], [3.220351596702101, 9.4441525333997], [2.912308383810255, 9.13760793704432], [2.723792758809509, 8.506845404489708], [2.74906253420022, 7.870734361192886], [2.691701694356254, 6.258817246928628]]] } }, + { "type": "Feature", "properties": { "admin": "Burkina Faso", "name": "Burkina Faso", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[-2.827496303712706, 9.642460842319775], [-3.511898972986272, 9.900326239456216], [-3.980449184576684, 9.862344061721698], [-4.330246954760383, 9.610834865757139], [-4.779883592131966, 9.821984768101741], [-4.954653286143098, 10.152713934769732], [-5.404341599946973, 10.370736802609144], [-5.470564947929004, 10.951269842976044], [-5.197842576508648, 11.375145778850136], [-5.220941941743119, 11.713858954307224], [-4.427166103523802, 12.542645575404292], [-4.280405035814879, 13.228443508349738], [-4.006390753587225, 13.472485459848112], [-3.52280270019986, 13.337661647998612], [-3.103706834312759, 13.54126679122859], [-2.967694464520576, 13.798150336151506], [-2.191824510090384, 14.246417548067352], [-2.001035122068771, 14.559008287000887], [-1.066363491205663, 14.973815009007764], [-0.515854458000348, 15.116157741755725], [-0.26625729003058, 14.924308986872147], [0.374892205414682, 14.928908189346128], [0.295646396495101, 14.444234930880651], [0.429927605805517, 13.988733018443922], [0.993045688490071, 13.335749620003821], [1.024103224297477, 12.851825669806573], [2.177107781593775, 12.625017808477532], [2.154473504249921, 11.940150051313337], [1.93598554851988, 11.641150214072551], [1.447178175471066, 11.547719224488857], [1.243469679376488, 11.11051076908346], [0.899563022474069, 10.997339382364258], [0.023802524423701, 11.018681748900802], [-0.438701544588582, 11.09834096927872], [-0.761575893548183, 10.936929633015053], [-1.203357713211431, 11.009819240762736], [-2.94040930827046, 10.962690334512557], [-2.963896246747111, 10.395334784380081], [-2.827496303712706, 9.642460842319775]]] } }, + { "type": "Feature", "properties": { "admin": "Bangladesh", "name": "Bangladesh", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[92.672720981825549, 22.041238918541247], [92.652257114637976, 21.324047552978481], [92.30323449093865, 21.475485337809815], [92.368553501355606, 20.670883287025344], [92.082886183646124, 21.192195135985767], [92.025215285208361, 21.701569729086764], [91.834890985077408, 22.182935695885561], [91.417087029997646, 22.765019029221218], [90.496006300827247, 22.805016587815125], [90.586956821660948, 22.392793687422863], [90.272970819055544, 21.836367702720107], [89.847467075564268, 22.039146023033421], [89.70204959509492, 21.857115790285299], [89.41886274613546, 21.966178900637296], [89.031961297566198, 22.055708319582973], [88.876311883503064, 22.879146429937826], [88.529769728553759, 23.631141872649163], [88.699940220090895, 24.233714911388557], [88.084422235062405, 24.501657212821918], [88.30637251175601, 24.866079413344199], [88.931553989623069, 25.238692328384769], [88.209789259802477, 25.768065700782707], [88.56304935094974, 26.446525580342716], [89.355094028687276, 26.014407253518065], [89.832480910199592, 25.965082098895476], [89.920692580121838, 25.269749864192171], [90.872210727912105, 25.13260061288954], [91.799595981822065, 25.14743174895731], [92.376201613334786, 24.976692816664961], [91.915092807994398, 24.130413723237108], [91.467729933643668, 24.072639471934789], [91.158963250699713, 23.503526923104381], [91.706475050832083, 22.985263983649183], [91.869927606171302, 23.62434642180278], [92.146034783906799, 23.62749868417259], [92.672720981825549, 22.041238918541247]]] } }, + { "type": "Feature", "properties": { "admin": "Bulgaria", "name": "Bulgaria", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[22.657149692482985, 44.234923000661276], [22.94483239105184, 43.823785305347123], [23.332302280376322, 43.897010809904707], [24.100679152124169, 43.741051337247846], [25.569271681426923, 43.688444729174712], [26.065158725699739, 43.943493760751259], [27.242399529740904, 44.175986029632398], [27.970107049275068, 43.812468166675202], [28.55808149589199, 43.707461656258118], [28.039095086384712, 43.293171698574177], [27.673897739378042, 42.577892361006214], [27.996720411905383, 42.007358710287775], [27.135739373490473, 42.141484890301335], [26.117041863720793, 41.826904608724554], [26.106138136507205, 41.328898830727766], [25.197201368925441, 41.234485988930523], [24.492644891058031, 41.583896185872028], [23.692073601992345, 41.309080918943842], [22.952377150166445, 41.337993882811141], [22.881373732197424, 41.999297186850242], [22.380525750424585, 42.320259507815081], [22.545011834409614, 42.461362006188025], [22.436594679461273, 42.580321153323929], [22.604801466571324, 42.898518785161137], [22.986018507588479, 43.211161200526959], [22.500156691180276, 43.642814439460977], [22.410446404721593, 44.008063462899948], [22.657149692482985, 44.234923000661276]]] } }, + { "type": "Feature", "properties": { "admin": "The Bahamas", "name": "Bahamas", "continent": "North America" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[-77.53466, 23.75975], [-77.78, 23.71], [-78.03405, 24.28615], [-78.40848, 24.57564], [-78.19087, 25.2103], [-77.89, 25.17], [-77.54, 24.34], [-77.53466, 23.75975]]], [[[-77.82, 26.58], [-78.91, 26.42], [-78.98, 26.79], [-78.51, 26.87], [-77.85, 26.84], [-77.82, 26.58]]], [[[-77.0, 26.59], [-77.17255, 25.87918], [-77.35641, 26.00735], [-77.34, 26.53], [-77.78802, 26.92516], [-77.79, 27.04], [-77.0, 26.59]]]] } }, + { "type": "Feature", "properties": { "admin": "Bosnia and Herzegovina", "name": "Bosnia and Herz.", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[19.005486281010118, 44.860233669609144], [19.36803, 44.863], [19.11761, 44.42307], [19.59976, 44.03847], [19.454, 43.568100000000115], [19.21852, 43.52384], [19.03165, 43.43253], [18.70648, 43.20011], [18.56, 42.65], [17.674921502358981, 43.028562527023603], [17.297373488034449, 43.446340643887353], [16.916156447017325, 43.667722479825663], [16.456442905348862, 44.041239732431265], [16.239660271884528, 44.351143296885695], [15.750026075918978, 44.81871165626255], [15.959367303133373, 45.233776760430935], [16.318156772535868, 45.004126695325901], [16.534939406000202, 45.211607570977705], [17.00214603035101, 45.233776760430935], [17.861783481526398, 45.067740383477137], [18.553214145591646, 45.08158966733145], [19.005486281010118, 44.860233669609144]]] } }, + { "type": "Feature", "properties": { "admin": "Belarus", "name": "Belarus", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[23.484127638449841, 53.912497667041123], [24.45068362803703, 53.905702216194747], [25.536353794056989, 54.282423407602515], [25.768432651479792, 54.846962592175082], [26.588279249790386, 55.167175604871659], [26.494331495883749, 55.61510691997762], [27.102459751094525, 55.783313707087672], [28.17670942557799, 56.169129950578807], [29.2295133806603, 55.918344224666356], [29.371571893030669, 55.67009064393617], [29.896294386522353, 55.789463202530406], [30.87390913262, 55.550976467503396], [30.971835971813132, 55.081547756564028], [30.75753380709871, 54.811770941784303], [31.384472283663733, 54.157056382862422], [31.791424187962232, 53.974638576872117], [31.731272820774503, 53.794029446012011], [32.405598585751157, 53.618045355842028], [32.693643019346034, 53.351420803432106], [32.304519484188226, 53.132726141972903], [31.497643670382924, 53.167426866256889], [31.30520063652801, 53.073995876673195], [31.540018344862254, 52.742052313846344], [31.78599816257158, 52.10167796488544], [30.927549269338975, 52.042353420614383], [30.619454380014837, 51.822806098022362], [30.55511722181145, 51.319503485715643], [30.157363722460889, 51.416138414101454], [29.254938185347921, 51.368234361366881], [28.992835320763522, 51.602044379271462], [28.617612745892242, 51.427713934934836], [28.241615024536564, 51.572227077839059], [27.454066196408426, 51.59230337178446], [26.337958611768549, 51.832288723347915], [25.327787713327005, 51.910656032918538], [24.553106316839511, 51.888461005249177], [24.005077752384206, 51.617443956094448], [23.52707075368437, 51.578454087930233], [23.508002150168689, 52.023646552124717], [23.19949384938618, 52.486977444053664], [23.799198846133375, 52.691099351606553], [23.804934930117774, 53.08973135030606], [23.527535841574995, 53.47012156840654], [23.484127638449841, 53.912497667041123]]] } }, + { "type": "Feature", "properties": { "admin": "Belize", "name": "Belize", "continent": "North America" }, "geometry": { "type": "Polygon", "coordinates": [[[-89.143080410503302, 17.808318996649316], [-89.150909389995519, 17.955467637600414], [-89.029857347351808, 18.001511338772485], [-88.848343878926585, 17.883198147040229], [-88.490122850279334, 18.486830552641603], [-88.300031094093669, 18.499982204659897], [-88.296336229184803, 18.353272813383263], [-88.106812913754368, 18.348673610909284], [-88.123478563168476, 18.076674709541003], [-88.285354987322776, 17.644142971258031], [-88.197866787452625, 17.489475409408453], [-88.302640753924422, 17.13169363043566], [-88.239517991879893, 17.036066392479551], [-88.355428229510551, 16.530774237529624], [-88.551824510435821, 16.265467434143144], [-88.732433641295927, 16.233634751851351], [-88.930612759135244, 15.887273464415072], [-89.229121670269265, 15.886937567605166], [-89.15080603713092, 17.015576687075832], [-89.143080410503302, 17.808318996649316]]] } }, + { "type": "Feature", "properties": { "admin": "Bolivia", "name": "Bolivia", "continent": "South America" }, "geometry": { "type": "Polygon", "coordinates": [[[-62.84646847192154, -22.034985446869442], [-63.986838141522462, -21.993644301035946], [-64.377021043542243, -22.798091322523533], [-64.964892137294598, -22.07586150481232], [-66.273339402924833, -21.832310479420713], [-67.10667355006359, -22.735924574476414], [-67.82817989772272, -22.872918796482171], [-68.219913092711266, -21.494346612231858], [-68.757167121033731, -20.372657972904459], [-68.442225104430904, -19.405068454671426], [-68.966818406841853, -18.9816834449041], [-69.100246955019472, -18.260125420812674], [-69.590423753524036, -17.580011895419329], [-68.959635382753291, -16.500697930571267], [-69.389764166934697, -15.66012908291165], [-69.160346645774936, -15.323973890853015], [-69.339534674747, -14.953195489158828], [-68.94888668483658, -14.45363941819328], [-68.929223802349526, -13.602683607643007], [-68.880079515239956, -12.89972909917665], [-68.665079718689611, -12.561300144097171], [-69.52967810736493, -10.951734307502193], [-68.786157599549469, -11.036380303596276], [-68.27125362819325, -11.014521172736817], [-68.048192308205373, -10.712059014532484], [-67.173801235610725, -10.30681243249961], [-66.646908331962791, -9.931331475466861], [-65.33843522811641, -9.76198780684639], [-65.444837002205375, -10.51145110437543], [-65.321898769783004, -10.895872084194675], [-65.402281460213018, -11.566270440317151], [-64.31635291203159, -12.461978041232191], [-63.196498786050562, -12.627032565972433], [-62.803060268796372, -13.000653171442682], [-62.127080857986371, -13.19878061284972], [-61.713204311760769, -13.489202162330049], [-61.084121263255646, -13.479383640194595], [-60.503304002511122, -13.775954685117656], [-60.459198167550014, -14.354007256734551], [-60.264326341377355, -14.645979099183638], [-60.251148851142922, -15.077218926659318], [-60.542965664295131, -15.093910414289592], [-60.158389655179022, -16.258283786690082], [-58.241219855366673, -16.299573256091289], [-58.388058437724027, -16.877109063385273], [-58.280804002502244, -17.271710300366014], [-57.734558274960989, -17.552468357007765], [-57.498371141170971, -18.174187513911289], [-57.676008877174297, -18.961839694904025], [-57.949997321185819, -19.400004164306814], [-57.853801642474494, -19.969995212486186], [-58.166392381408038, -20.176700941653674], [-58.183471442280492, -19.868399346600359], [-59.11504248720609, -19.356906019775398], [-60.043564622626477, -19.342746677327419], [-61.786326463453761, -19.633736667562957], [-62.265961269770784, -20.513734633061272], [-62.291179368729203, -21.051634616787389], [-62.685057135657871, -22.24902922942238], [-62.84646847192154, -22.034985446869442]]] } }, + { "type": "Feature", "properties": { "admin": "Brazil", "name": "Brazil", "continent": "South America" }, "geometry": { "type": "Polygon", "coordinates": [[[-57.625133429582945, -30.216294854454258], [-56.290899624239067, -28.852760512000884], [-55.162286342984558, -27.881915378533456], [-54.49072526713551, -27.474756768505785], [-53.648735317587885, -26.923472588816086], [-53.628348965048737, -26.124865004177465], [-54.130049607954376, -25.547639255477247], [-54.625290696823562, -25.739255466415507], [-54.428946092330577, -25.162184747012162], [-54.293476325077435, -24.570799655863958], [-54.292959560754511, -24.021014092710722], [-54.652834235235119, -23.839578138933955], [-55.027901780809543, -24.001273695575225], [-55.400747239795407, -23.956935316668797], [-55.517639329639621, -23.57199757252663], [-55.61068274598113, -22.655619398694839], [-55.797958136606894, -22.356929620047815], [-56.473317430229379, -22.086300144135279], [-56.881509568902885, -22.282153822521476], [-57.937155727761287, -22.090175876557169], [-57.870673997617786, -20.732687676681948], [-58.166392381408038, -20.176700941653674], [-57.853801642474494, -19.969995212486186], [-57.949997321185819, -19.400004164306814], [-57.676008877174297, -18.961839694904025], [-57.498371141170971, -18.174187513911289], [-57.734558274960989, -17.552468357007765], [-58.280804002502244, -17.271710300366014], [-58.388058437724027, -16.877109063385273], [-58.241219855366673, -16.299573256091289], [-60.158389655179022, -16.258283786690082], [-60.542965664295131, -15.093910414289592], [-60.251148851142922, -15.077218926659318], [-60.264326341377355, -14.645979099183638], [-60.459198167550014, -14.354007256734551], [-60.503304002511122, -13.775954685117656], [-61.084121263255646, -13.479383640194595], [-61.713204311760769, -13.489202162330049], [-62.127080857986371, -13.19878061284972], [-62.803060268796372, -13.000653171442682], [-63.196498786050562, -12.627032565972433], [-64.31635291203159, -12.461978041232191], [-65.402281460213018, -11.566270440317151], [-65.321898769783004, -10.895872084194675], [-65.444837002205375, -10.51145110437543], [-65.33843522811641, -9.76198780684639], [-66.646908331962791, -9.931331475466861], [-67.173801235610725, -10.30681243249961], [-68.048192308205373, -10.712059014532484], [-68.27125362819325, -11.014521172736817], [-68.786157599549469, -11.036380303596276], [-69.52967810736493, -10.951734307502193], [-70.093752204046879, -11.123971856331011], [-70.548685675728393, -11.009146823778462], [-70.481893886991159, -9.490118096558842], [-71.302412278921523, -10.079436130415372], [-72.184890713169821, -10.05359791426943], [-72.563033006465631, -9.520193780152715], [-73.226713426390148, -9.462212823121233], [-73.015382656532537, -9.03283334720806], [-73.571059332967053, -8.424446709835832], [-73.987235480429646, -7.523829847853063], [-73.723401455363486, -7.340998630404412], [-73.724486660441627, -6.918595472850638], [-73.120027431923575, -6.629930922068238], [-73.219711269814596, -6.089188734566076], [-72.964507208941185, -5.741251315944892], [-72.891927659787243, -5.274561455916979], [-71.748405727816532, -4.59398284263301], [-70.928843349883564, -4.401591485210367], [-70.79476884630229, -4.251264743673302], [-69.893635219996611, -4.298186944194326], [-69.444101935489599, -1.556287123219817], [-69.420485805932216, -1.122618503426409], [-69.577065395776586, -0.549991957200163], [-70.02065589057004, -0.185156345219539], [-70.015565761989293, 0.541414292804205], [-69.452396002872447, 0.706158758950693], [-69.252434048119042, 0.602650865070075], [-69.218637661400166, 0.985676581217433], [-69.804596727157701, 1.089081122233466], [-69.816973232691609, 1.714805202639624], [-67.868565029558823, 1.692455145673392], [-67.537810024674684, 2.037162787276329], [-67.25999752467358, 1.719998684084956], [-67.065048183852483, 1.130112209473225], [-66.876325853122566, 1.253360500489336], [-66.325765143484944, 0.724452215982012], [-65.548267381437554, 0.78925446207603], [-65.354713304288353, 1.0952822941085], [-64.611011928959854, 1.328730576987041], [-64.199305792890499, 1.49285492594602], [-64.083085496666072, 1.91636912679408], [-63.368788011311644, 2.200899562993129], [-63.422867397705105, 2.411067613124174], [-64.269999152265783, 2.497005520025566], [-64.408827887617903, 3.126786200366623], [-64.368494432214092, 3.797210394705246], [-64.816064012294007, 4.056445217297422], [-64.628659430587533, 4.14848094320925], [-63.888342861574145, 4.020530096854571], [-63.093197597899092, 3.770571193858784], [-62.804533047116692, 4.006965033377951], [-62.085429653559125, 4.162123521334308], [-60.966893276601517, 4.536467596856638], [-60.601179165271922, 4.918098049332129], [-60.733574184803707, 5.2002772078619], [-60.213683437731319, 5.2444863956876], [-59.980958624904865, 5.014061184098138], [-60.111002366767373, 4.574966538914082], [-59.767405768458701, 4.423502915866606], [-59.538039923731219, 3.958802598481937], [-59.815413174057852, 3.606498521332085], [-59.974524909084543, 2.755232652188055], [-59.718545701726732, 2.249630438644359], [-59.646043667221242, 1.786893825686789], [-59.030861579002639, 1.317697658692722], [-58.540012986878288, 1.26808828369252], [-58.429477098205957, 1.46394196207872], [-58.113449876525003, 1.507195135907025], [-57.660971035377358, 1.682584947105638], [-57.33582292339689, 1.948537705895759], [-56.782704230360814, 1.863710842288653], [-56.53938574891454, 1.89952260986692], [-55.995698004771739, 1.817667141116601], [-55.905600145070871, 2.021995754398659], [-56.073341844290283, 2.220794989425499], [-55.973322109589361, 2.510363877773016], [-55.569755011605984, 2.42150625244713], [-55.097587449755125, 2.523748073736612], [-54.524754197799709, 2.311848863123785], [-54.088062506717243, 2.105556545414629], [-53.778520677288903, 2.376702785650081], [-53.554839240113537, 2.33489655192595], [-53.4184651352953, 2.05338918701598], [-52.939657151894949, 2.124857692875636], [-52.556424730018414, 2.504705308437053], [-52.249337531123942, 3.241094468596244], [-51.657797410678882, 4.156232408053028], [-51.317146369010842, 4.203490505383953], [-51.069771287629649, 3.65039765056403], [-50.508875291533641, 1.901563828942456], [-49.974075893745045, 1.736483465986069], [-49.947100796088705, 1.046189683431223], [-50.699251268096901, 0.222984117021681], [-50.388210822132123, -0.078444512536819], [-48.620566779156313, -0.235489190271821], [-48.584496629416577, -1.237805271005001], [-47.824956427590621, -0.5816179337628], [-46.566583624851219, -0.941027520352776], [-44.9057030909904, -1.551739597178134], [-44.417619187993658, -2.137750339367975], [-44.581588507655773, -2.691308282078523], [-43.418791266440188, -2.383110039889793], [-41.47265682632824, -2.912018324397116], [-39.97866533055403, -2.87305429444904], [-38.50038347019656, -3.700652357603394], [-37.223252122535193, -4.820945733258915], [-36.45293738457638, -5.109403578312153], [-35.597795783010454, -5.149504489770648], [-35.235388963347553, -5.464937432480245], [-34.896029832486825, -6.738193047719709], [-34.729993455533027, -7.343220716992965], [-35.128212042774216, -8.996401462442284], [-35.636966518687707, -9.649281508017811], [-37.046518724096991, -11.040721123908799], [-37.683611619607355, -12.17119475672582], [-38.423876512188436, -13.038118584854285], [-38.673887091616507, -13.057652276260615], [-38.953275722802537, -13.79336964280002], [-38.882298143049645, -15.667053724838764], [-39.161092495264306, -17.208406670808468], [-39.267339240056394, -17.867746270420479], [-39.583521491034219, -18.262295830968934], [-39.76082333022763, -19.599113457927402], [-40.774740770010332, -20.90451181405242], [-40.944756232250597, -21.937316989837807], [-41.75416419123821, -22.370675551037454], [-41.988284267736546, -22.970070489190888], [-43.074703742024738, -22.967693373305462], [-44.647811855637798, -23.351959323827838], [-45.35213578955991, -23.796841729428579], [-46.472093268405523, -24.088968601174539], [-47.648972337420645, -24.885199069927715], [-48.495458136577689, -25.877024834905647], [-48.641004808127725, -26.623697605090928], [-48.474735887228647, -27.175911960561887], [-48.661520351747612, -28.186134535435713], [-48.888457404157393, -28.674115085567877], [-49.587329474472668, -29.224469089476333], [-50.696874152211478, -30.984465020472953], [-51.576226162306149, -31.777698256153204], [-52.256081305538032, -32.245369968394662], [-52.71209998229768, -33.196578057591175], [-53.373661668498229, -33.768377780900757], [-53.650543992718084, -33.202004082981823], [-53.209588995971529, -32.727666110974717], [-53.787951626182185, -32.047242526987617], [-54.572451544805105, -31.494511407193745], [-55.601510179249331, -30.853878676071385], [-55.97324459494093, -30.883075860316296], [-56.976025763564721, -30.109686374636119], [-57.625133429582945, -30.216294854454258]]] } }, + { "type": "Feature", "properties": { "admin": "Brunei", "name": "Brunei", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[114.204016554828343, 4.525873928236805], [114.599961379048707, 4.900011298029965], [115.450710483869798, 5.447729803891532], [115.405700311343566, 4.955227565933837], [115.347460972150643, 4.316636053887009], [114.869557326315373, 4.348313706881924], [114.659595981913498, 4.007636826997753], [114.204016554828343, 4.525873928236805]]] } }, + { "type": "Feature", "properties": { "admin": "Bhutan", "name": "Bhutan", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[91.69665652869665, 27.771741848251661], [92.10371178585973, 27.4526140406332], [92.033483514375078, 26.838310451763554], [91.217512648486405, 26.808648179628019], [90.37327477413406, 26.875724188742872], [89.744527622438838, 26.71940298105995], [88.835642531289366, 27.098966376243755], [88.814248488320544, 27.299315904239361], [89.475810174521101, 28.04275889740639], [90.015828891971154, 28.296438503527209], [90.730513950567769, 28.064953925075748], [91.258853794319904, 28.040614325466287], [91.69665652869665, 27.771741848251661]]] } }, + { "type": "Feature", "properties": { "admin": "Botswana", "name": "Botswana", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[25.649163445750155, -18.536025892818987], [25.850391473094724, -18.714412937090533], [26.164790887158478, -19.293085625894935], [27.296504754350501, -20.391519870690995], [27.724747348753247, -20.499058526290387], [27.727227817503252, -20.851801853114711], [28.02137007010861, -21.485975030200578], [28.794656202924209, -21.639454034107445], [29.432188348109033, -22.091312758067584], [28.017235955525244, -22.827753594659072], [27.119409620886238, -23.574323011979772], [26.78640669119741, -24.240690606383478], [26.485753208123292, -24.616326592713097], [25.941652052522151, -24.696373386333214], [25.765848829865206, -25.174845472923671], [25.664666375437712, -25.486816094669706], [25.025170525825782, -25.719670098576891], [24.211266717228792, -25.670215752873567], [23.733569777122703, -25.39012948985161], [23.312096795350179, -25.268689873965712], [22.824271274514896, -25.500458672794768], [22.579531691180584, -25.979447523708142], [22.105968865657864, -26.28025603607913], [21.60589603036939, -26.726533705351748], [20.889609002371731, -26.828542982695907], [20.666470167735437, -26.477453301704916], [20.758609246511831, -25.868136488551446], [20.165725538827186, -24.917961928000768], [19.895767856534427, -24.767790215760588], [19.895457797940672, -21.849156996347865], [20.881134067475866, -21.814327080983144], [20.910641310314531, -18.252218926672018], [21.655040317478971, -18.219146010005222], [23.196858351339298, -17.869038181227783], [23.579005568137713, -18.281261081620055], [24.217364536239209, -17.889347019118485], [24.520705193792534, -17.887124932529932], [25.084443393664564, -17.661815687737366], [25.264225701608005, -17.736539808831413], [25.649163445750155, -18.536025892818987]]] } }, + { "type": "Feature", "properties": { "admin": "Central African Republic", "name": "Central African Rep.", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[15.279460483469107, 7.421924546737968], [16.106231723706767, 7.497087917506504], [16.290561557691884, 7.754307359239304], [16.456184523187343, 7.734773667832966], [16.705988396886251, 7.508327541529978], [17.964929640380884, 7.890914008002865], [18.389554884523218, 8.281303615751822], [18.911021762780504, 8.630894680206351], [18.81200971850927, 8.982914536978596], [19.094008009526018, 9.074846910025837], [20.059685499764267, 9.01270600019485], [21.00086836109616, 9.475985215691507], [21.723821648859452, 10.567055568885973], [22.231129184668784, 10.971888739460507], [22.864165480244218, 11.142395127807543], [22.977543572692603, 10.714462591998538], [23.554304233502187, 10.089255275915306], [23.557249790142826, 9.681218166538683], [23.394779087017181, 9.26506785729222], [23.459012892355979, 8.954285793488891], [23.805813429466745, 8.666318874542425], [24.567369012152078, 8.229187933785466], [25.114932488716786, 7.825104071479172], [25.12413089366472, 7.500085150579436], [25.796647983511171, 6.979315904158069], [26.21341840994511, 6.546603298362071], [26.465909458123232, 5.94671743410187], [27.213409051225163, 5.550953477394557], [27.374226108517483, 5.233944403500059], [27.044065382604703, 5.127852688004835], [26.402760857862535, 5.150874538590869], [25.650455356557465, 5.256087754737123], [25.278798455514302, 5.170408229997191], [25.128833449003274, 4.927244777847789], [24.805028924262409, 4.897246608902349], [24.41053104014625, 5.108784084489129], [23.297213982850135, 4.609693101414221], [22.841479526468103, 4.710126247573483], [22.704123569436284, 4.633050848810156], [22.405123732195531, 4.02916006104732], [21.659122755630019, 4.224341945813719], [20.927591180106273, 4.322785549329736], [20.290679152108932, 4.691677761245287], [19.467783644293146, 5.031527818212779], [18.932312452884755, 4.709506130385973], [18.542982211997778, 4.201785183118317], [18.453065219809925, 3.504385891123348], [17.809900343505259, 3.560196437998569], [17.133042433346297, 3.728196519379451], [16.537058139724135, 3.198254706226278], [16.01285241055535, 2.267639675298084], [15.907380812247649, 2.557389431158612], [15.862732374747479, 3.013537298998982], [15.405395948964379, 3.335300604664339], [15.036219516671249, 3.851367295747123], [14.950953403389658, 4.21038930909492], [14.478372430080466, 4.732605495620446], [14.558935988023501, 5.03059764243153], [14.459407179429345, 5.451760565610299], [14.536560092841111, 6.22695872642069], [14.776545444404572, 6.408498033062044], [15.279460483469107, 7.421924546737968]]] } }, + { "type": "Feature", "properties": { "admin": "Canada", "name": "Canada", "continent": "North America" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[-63.6645, 46.55001], [-62.9393, 46.41587], [-62.01208, 46.44314], [-62.50391, 46.03339], [-62.87433, 45.96818], [-64.1428, 46.39265], [-64.39261, 46.72747], [-64.01486, 47.03601], [-63.6645, 46.55001]]], [[[-61.806305, 49.10506], [-62.29318, 49.08717], [-63.58926, 49.40069], [-64.51912, 49.87304], [-64.17322, 49.95718], [-62.85829, 49.70641], [-61.835585, 49.28855], [-61.806305, 49.10506]]], [[[-123.510001587551116, 48.51001089130343], [-124.012890788399474, 48.370846259141402], [-125.655012777338342, 48.825004584338494], [-125.954994466792726, 49.179995835967638], [-126.850004435871853, 49.530000311880421], [-127.029993449544392, 49.814995835970073], [-128.059336304366212, 49.994959011426594], [-128.444584107102145, 50.53913768167611], [-128.358413656255408, 50.770648098343678], [-127.308581096029883, 50.552573554071948], [-126.695000977212302, 50.40090322529538], [-125.755006673823161, 50.295018215529367], [-125.415001587558791, 49.950000515332604], [-124.920768189119315, 49.47527497008339], [-123.92250870832099, 49.062483628935794], [-123.510001587551116, 48.51001089130343]]], [[[-56.134035814017111, 50.687009792679298], [-56.795881720595261, 49.812308661490945], [-56.143105027884289, 50.15011749938283], [-55.471492275602934, 49.935815334668447], [-55.822401089080913, 49.587128607779093], [-54.93514258484565, 49.313010972686833], [-54.473775397343772, 49.556691189159167], [-53.47654944519131, 49.24913890237405], [-53.786013759971233, 48.516780503933617], [-53.086133999226249, 48.687803656603528], [-52.95864824076223, 48.157164211614472], [-52.648098720904173, 47.53554840757549], [-53.069158291218336, 46.655498765644936], [-53.521456264853029, 46.618291734394823], [-54.178935512902527, 46.807065741556997], [-53.961868659060471, 47.625207017601909], [-54.240482143762122, 47.752279364607617], [-55.400773078011483, 46.88499380145312], [-55.997480841685835, 46.919720363953289], [-55.291219041552765, 47.389562486350982], [-56.250798712780508, 47.632545070987383], [-57.325229254777085, 47.572807115257987], [-59.26601518414676, 47.603347886742498], [-59.41949418805369, 47.89945384377485], [-58.796586473207398, 48.251525376979473], [-59.23162451845652, 48.523188381537793], [-58.391804979065213, 49.125580552764163], [-57.358689744686025, 50.718274034215845], [-56.738650071831998, 51.287438259478527], [-55.87097693543528, 51.632094224649187], [-55.406974249886602, 51.588272610065722], [-55.600218268442077, 51.317074693397913], [-56.134035814017111, 50.687009792679298]]], [[[-133.180004041711669, 54.169975490935308], [-132.710007884431292, 54.040009315423518], [-131.749989584003259, 54.120004380909208], [-132.049480347350965, 52.984621487024519], [-131.179042521826574, 52.18043284769827], [-131.577829549822894, 52.182370713909236], [-132.180428426778519, 52.639707139692391], [-132.549992432313843, 53.100014960332132], [-133.054611178755493, 53.411468817755363], [-133.239664482792676, 53.851080227262386], [-133.180004041711669, 54.169975490935308]]], [[[-79.26582, 62.158675], [-79.65752, 61.63308], [-80.09956, 61.7181], [-80.36215, 62.01649], [-80.315395, 62.085565], [-79.92939, 62.3856], [-79.52002, 62.36371], [-79.26582, 62.158675]]], [[[-81.89825, 62.7108], [-83.06857, 62.15922], [-83.77462, 62.18231], [-83.99367, 62.4528], [-83.25048, 62.91409], [-81.87699, 62.90458], [-81.89825, 62.7108]]], [[[-85.161307949549851, 65.657284654392797], [-84.975763719405933, 65.217518215588981], [-84.464012010419495, 65.371772365980163], [-83.88262630891974, 65.109617824963536], [-82.78757687043877, 64.766693020274673], [-81.642013719392509, 64.455135809986942], [-81.553440314444245, 63.979609280037131], [-80.817361212878851, 64.057485663500998], [-80.103451300766594, 63.725981350348597], [-80.991019863595653, 63.41124603947496], [-82.547178107416997, 63.651722317145229], [-83.108797573565042, 64.101875718839707], [-84.100416632813847, 63.569711819098004], [-85.523404710618991, 63.052379055424076], [-85.866768764982339, 63.637252916103542], [-87.221983201836721, 63.541238104905212], [-86.352759772471259, 64.035833238370699], [-86.224886440765133, 64.822916978608262], [-85.883847825854858, 65.738778388117041], [-85.161307949549851, 65.657284654392797]]], [[[-75.86588, 67.14886], [-76.98687, 67.09873], [-77.2364, 67.58809], [-76.81166, 68.14856], [-75.89521, 68.28721], [-75.1145, 68.01036], [-75.10333, 67.58202], [-75.21597, 67.44425], [-75.86588, 67.14886]]], [[[-95.647681203800488, 69.107690358321761], [-96.269521203800579, 68.757040358321731], [-97.61740120380054, 69.060030358321782], [-98.431801203800504, 68.950700358321768], [-99.797401203800504, 69.400030358321786], [-98.917401203800523, 69.710030358321788], [-98.218261203800466, 70.143540358321744], [-97.157401203800532, 69.860030358321794], [-96.557401203800524, 69.680030358321758], [-96.257401203800498, 69.490030358321761], [-95.647681203800488, 69.107690358321761]]], [[[-90.5471, 69.49766], [-90.55151, 68.47499], [-89.21515, 69.25873], [-88.01966, 68.61508], [-88.31749, 67.87338], [-87.35017, 67.19872], [-86.30607, 67.92146], [-85.57664, 68.78456], [-85.52197, 69.88211], [-84.10081, 69.80539], [-82.62258, 69.65826], [-81.28043, 69.16202], [-81.2202, 68.66567], [-81.96436, 68.13253], [-81.25928, 67.59716], [-81.38653, 67.11078], [-83.34456, 66.41154], [-84.73542, 66.2573], [-85.76943, 66.55833], [-86.0676, 66.05625], [-87.03143, 65.21297], [-87.32324, 64.77563], [-88.48296, 64.09897], [-89.91444, 64.03273], [-90.70398, 63.61017], [-90.77004, 62.96021], [-91.93342, 62.83508], [-93.15698, 62.02469], [-94.24153, 60.89865], [-94.62931, 60.11021], [-94.6846, 58.94882], [-93.21502, 58.78212], [-92.76462, 57.84571], [-92.297029999999893, 57.08709], [-90.89769, 57.28468], [-89.03953, 56.85172], [-88.03978, 56.47162], [-87.32421, 55.99914], [-86.07121, 55.72383], [-85.01181, 55.3026], [-83.36055, 55.24489], [-82.27285, 55.14832], [-82.4362, 54.28227], [-82.12502, 53.27703], [-81.40075, 52.15788], [-79.91289, 51.20842], [-79.14301, 51.53393], [-78.60191, 52.56208], [-79.12421, 54.14145], [-79.82958, 54.66772], [-78.22874, 55.13645], [-77.0956, 55.83741], [-76.54137, 56.53423], [-76.62319, 57.20263], [-77.30226, 58.05209], [-78.51688, 58.80458], [-77.33676, 59.85261], [-77.77272, 60.75788], [-78.10687, 62.31964], [-77.41067, 62.55053], [-75.69621, 62.2784], [-74.6682, 62.18111], [-73.83988, 62.4438], [-72.90853, 62.10507], [-71.67708, 61.52535], [-71.37369, 61.13717], [-69.59042, 61.06141], [-69.62033, 60.22125], [-69.2879, 58.95736], [-68.37455, 58.80106], [-67.64976, 58.21206], [-66.20178, 58.76731], [-65.24517, 59.87071], [-64.58352, 60.33558], [-63.80475, 59.4426], [-62.50236, 58.16708], [-61.39655, 56.96745], [-61.79866, 56.33945], [-60.46853, 55.77548], [-59.56962, 55.20407], [-57.97508, 54.94549], [-57.3332, 54.6265], [-56.93689, 53.78032], [-56.15811, 53.64749], [-55.75632, 53.27036], [-55.68338, 52.14664], [-56.40916, 51.7707], [-57.12691, 51.41972], [-58.77482, 51.0643], [-60.03309, 50.24277], [-61.72366, 50.08046], [-63.86251, 50.29099], [-65.36331, 50.2982], [-66.39905, 50.22897], [-67.23631, 49.51156], [-68.51114, 49.06836], [-69.95362, 47.74488], [-71.10458, 46.82171], [-70.25522, 46.98606], [-68.65, 48.3], [-66.55243, 49.1331], [-65.05626, 49.23278], [-64.17099, 48.74248], [-65.11545, 48.07085], [-64.79854, 46.99297], [-64.47219, 46.23849], [-63.17329, 45.73902], [-61.52072, 45.88377], [-60.51815, 47.00793], [-60.4486, 46.28264], [-59.80287, 45.9204], [-61.03988, 45.26525], [-63.25471, 44.67014], [-64.24656, 44.26553], [-65.36406, 43.54523], [-66.1234, 43.61867], [-66.16173, 44.46512], [-64.42549, 45.29204], [-66.02605, 45.25931], [-67.13741, 45.13753], [-67.79134, 45.70281], [-67.79046, 47.06636], [-68.23444, 47.35486], [-68.905, 47.185], [-69.237216, 47.447781], [-69.99997, 46.69307], [-70.305, 45.915], [-70.66, 45.46], [-71.08482, 45.30524], [-71.405, 45.255], [-71.50506, 45.0082], [-73.34783, 45.00738], [-74.867, 45.00048], [-75.31821, 44.81645], [-76.375, 44.09631], [-76.5, 44.018458893758712], [-76.820034145805565, 43.628784288093748], [-77.737885097957687, 43.62905558936329], [-78.720279914042365, 43.625089423184868], [-79.171673550111862, 43.466339423184216], [-79.01, 43.27], [-78.92, 42.965], [-78.939362148743683, 42.863611355148031], [-80.247447679347928, 42.366199856122584], [-81.277746548167144, 42.209025987306845], [-82.439277716791608, 41.675105088867149], [-82.690089280920162, 41.675105088867149], [-83.029810146806909, 41.832795722005834], [-83.141999681312555, 41.975681057292825], [-83.12, 42.08], [-82.9, 42.43], [-82.43, 42.98], [-82.137642381503881, 43.571087551439909], [-82.337763125431053, 44.44], [-82.550924648758169, 45.347516587905368], [-83.592850714843067, 45.816893622412373], [-83.469550747394621, 45.994686387712584], [-83.616130947590563, 46.116926988299056], [-83.890765347005726, 46.116926988299056], [-84.091851264161463, 46.27541860613816], [-84.14211951367335, 46.512225857115723], [-84.3367, 46.40877], [-84.6049, 46.4396], [-84.543748745445853, 46.538684190449132], [-84.779238247399888, 46.637101955749038], [-84.876079881514855, 46.900083319682366], [-85.652363247403414, 47.220218817730498], [-86.461990831228249, 47.553338019392037], [-87.439792623300207, 47.94], [-88.378114183286698, 48.302917588893727], [-89.272917446636654, 48.019808254582657], [-89.6, 48.01], [-90.83, 48.27], [-91.64, 48.14], [-92.61, 48.45], [-93.63087, 48.60926], [-94.32914, 48.67074], [-94.64, 48.84], [-94.81758, 49.38905], [-95.15609, 49.38425], [-95.159069509172014, 49.0], [-97.228720000004799, 49.0007], [-100.65, 49.0], [-104.04826, 48.99986], [-107.05, 49.0], [-110.05, 49.0], [-113.0, 49.0], [-116.04818, 49.0], [-117.03121, 49.0], [-120.0, 49.0], [-122.84, 49.0], [-122.97421, 49.002537777777789], [-124.91024, 49.98456], [-125.62461, 50.41656], [-127.43561, 50.83061], [-127.99276, 51.71583], [-127.85032, 52.32961], [-129.12979, 52.75538], [-129.30523, 53.56159], [-130.51497, 54.28757], [-130.53611, 54.80278], [-129.98, 55.285], [-130.00778, 55.91583], [-131.70781, 56.55212], [-132.73042, 57.69289], [-133.35556, 58.41028], [-134.27111, 58.86111], [-134.945, 59.27056], [-135.47583, 59.78778], [-136.47972, 59.46389], [-137.4525, 58.905], [-138.34089, 59.56211], [-139.039, 60.0], [-140.013, 60.27682], [-140.99778, 60.30639], [-140.9925, 66.00003], [-140.986, 69.712], [-139.12052, 69.47102], [-137.54636, 68.99002], [-136.50358, 68.89804], [-135.62576, 69.31512], [-134.41464, 69.62743], [-132.92925, 69.50534], [-131.43136, 69.94451], [-129.79471, 70.19369], [-129.10773, 69.77927], [-128.36156, 70.01286], [-128.13817, 70.48384], [-127.44712, 70.37721], [-125.75632, 69.48058], [-124.42483, 70.1584], [-124.28968, 69.39969], [-123.06108, 69.56372], [-122.6835, 69.85553], [-121.47226, 69.79778], [-119.94288, 69.37786], [-117.60268, 69.01128], [-116.22643, 68.84151], [-115.2469, 68.90591], [-113.89794, 68.3989], [-115.30489, 67.90261], [-113.49727, 67.68815], [-110.798, 67.80612], [-109.94619, 67.98104], [-108.8802, 67.38144], [-107.79239, 67.88736], [-108.81299, 68.31164], [-108.16721, 68.65392], [-106.95, 68.7], [-106.15, 68.8], [-105.34282, 68.56122], [-104.33791, 68.018], [-103.22115, 68.09775], [-101.45433, 67.64689], [-99.90195, 67.80566], [-98.4432, 67.78165], [-98.5586, 68.40394], [-97.66948, 68.57864], [-96.11991, 68.23939], [-96.12588, 67.29338], [-95.48943, 68.0907], [-94.685, 68.06383], [-94.23282, 69.06903], [-95.30408, 69.68571], [-96.47131, 70.08976], [-96.39115, 71.19482], [-95.2088, 71.92053], [-93.88997, 71.76015], [-92.87818, 71.31869], [-91.51964, 70.19129], [-92.40692, 69.69997], [-90.5471, 69.49766]]], [[[-114.167169999999871, 73.12145], [-114.66634, 72.65277], [-112.441019999999867, 72.9554], [-111.05039, 72.4504], [-109.920349999999857, 72.96113], [-109.00654, 72.63335], [-108.188349999999886, 71.65089], [-107.68599, 72.06548], [-108.39639, 73.08953], [-107.51645, 73.23598], [-106.522589999999866, 73.07601], [-105.402459999999877, 72.67259], [-104.77484, 71.6984], [-104.464759999999814, 70.99297], [-102.78537, 70.49776], [-100.980779999999868, 70.02432], [-101.089289999999892, 69.58447000000011], [-102.731159999999875, 69.50402], [-102.09329, 69.11962], [-102.43024, 68.75282], [-104.24, 68.91], [-105.96, 69.180000000000135], [-107.12254, 69.11922], [-108.999999999999872, 68.78], [-111.534148875200117, 68.630059156817921], [-113.3132, 68.53554], [-113.854959999999807, 69.007440000000102], [-115.22, 69.28], [-116.10794, 69.16821], [-117.34, 69.960000000000107], [-116.674729999999869, 70.06655], [-115.13112, 70.2373], [-113.72141, 70.19237], [-112.4161, 70.36638], [-114.35, 70.6], [-116.48684, 70.52045], [-117.9048, 70.540560000000127], [-118.43238, 70.9092], [-116.11311, 71.30918], [-117.65568, 71.2952], [-119.40199, 71.55859], [-118.56267, 72.30785], [-117.866419999999877, 72.70594], [-115.18909, 73.314590000000109], [-114.167169999999871, 73.12145]]], [[[-104.5, 73.42], [-105.38, 72.76], [-106.94, 73.46], [-106.6, 73.6], [-105.26, 73.64], [-104.5, 73.42]]], [[[-76.34, 73.102684989953005], [-76.251403808593736, 72.826385498046861], [-77.314437866210895, 72.85554504394527], [-78.391670227050795, 72.876655578613253], [-79.486251831054645, 72.742202758789062], [-79.775833129882827, 72.80290222167973], [-80.876098632812514, 73.333183288574205], [-80.833885192871051, 73.693183898925767], [-80.353057861328111, 73.75971984863277], [-78.064437866210923, 73.651931762695327], [-76.34, 73.102684989953005]]], [[[-86.562178514334107, 73.157447007938444], [-85.774371304044521, 72.534125881633798], [-84.850112474288224, 73.34027822538711], [-82.315590176100969, 73.750950832810574], [-80.600087653307611, 72.716543687624181], [-80.748941616524391, 72.061906643350753], [-78.770638597310764, 72.352173163534147], [-77.824623989559569, 72.749616604291035], [-75.605844692675717, 72.243678493937381], [-74.228616095664975, 71.767144273557889], [-74.099140794557698, 71.330840155717638], [-72.242225714797641, 71.556924546994495], [-71.200015428335192, 70.920012518997211], [-68.78605424668487, 70.525023708774242], [-67.914970465756923, 70.121947536897594], [-66.969033372654152, 69.18608734809186], [-68.805122850200533, 68.720198472764409], [-66.449866095633851, 68.067163397892003], [-64.862314419195215, 67.847538560651614], [-63.424934454996745, 66.928473212340649], [-61.851981370680569, 66.862120673277829], [-62.163176845942296, 66.160251369889593], [-63.91844438338417, 64.998668524832837], [-65.148860236253611, 65.426032619886669], [-66.72121904159853, 66.388041083432185], [-68.015016038673949, 66.262725735124391], [-68.141287400979152, 65.689789130304362], [-67.089646165623392, 65.108455105236985], [-65.732080451099748, 64.64840566675862], [-65.320167609301265, 64.382737128346051], [-64.669406297449669, 63.392926744227474], [-65.013803880458894, 62.674185085695974], [-66.275044725190455, 62.945098781986069], [-68.783186204692711, 63.745670071051805], [-67.369680752213029, 62.883965562584869], [-66.328297288667201, 62.28007477482204], [-66.165568203380147, 61.930897121825879], [-68.877366502544632, 62.330149237712803], [-71.023437059193824, 62.910708116295829], [-72.23537858751898, 63.397836005295154], [-71.886278449171286, 63.679989325608837], [-73.37830624051837, 64.193963121183813], [-74.834418911422588, 64.679075629323776], [-74.818502570276706, 64.389093329517962], [-77.709979824520019, 64.229542344816778], [-78.55594885935416, 64.572906399180127], [-77.897281053361908, 65.309192206474776], [-76.018274298797181, 65.326968899183143], [-73.95979529488271, 65.454764716240888], [-74.293883429649625, 65.81177134872938], [-73.94491248238262, 66.310578111426722], [-72.65116716173938, 67.284575507263853], [-72.926059943316076, 67.726925767682374], [-73.311617804645721, 68.069437160912898], [-74.8433072577768, 68.554627183701271], [-76.869100918266739, 68.894735622830254], [-76.228649054657339, 69.147769273547411], [-77.28736996123709, 69.769540106883269], [-78.168633999326588, 69.826487535268896], [-78.95724219431672, 70.166880194775402], [-79.492455003563649, 69.871807766388898], [-81.305470954091732, 69.743185126414332], [-84.944706183598456, 69.966634019644388], [-87.060003424817864, 70.260001125765356], [-88.681713223001495, 70.410741278760796], [-89.513419562523012, 70.762037665480975], [-88.467721116880753, 71.218185533321318], [-89.888151211287465, 71.222552191849942], [-90.205160285181989, 72.235074367960792], [-89.43657670770493, 73.129464219852352], [-88.408241543312784, 73.537888902471209], [-85.826151089200906, 73.803815823045213], [-86.562178514334107, 73.157447007938444]]], [[[-100.35642, 73.84389], [-99.16387, 73.63339], [-97.38, 73.76], [-97.12, 73.47], [-98.05359, 72.99052], [-96.54, 72.56], [-96.72, 71.66], [-98.35966, 71.27285], [-99.32286, 71.35639], [-100.01482, 71.73827], [-102.5, 72.51], [-102.48, 72.83], [-100.43836, 72.70588], [-101.54, 73.36], [-100.35642, 73.84389]]], [[[-93.196295539100205, 72.771992499473342], [-94.26904659704725, 72.024596259235949], [-95.409855516322637, 72.061880805134578], [-96.033745083382428, 72.940276801231789], [-96.01826799191096, 73.437429918095788], [-95.495793423224001, 73.862416897264154], [-94.503657599652328, 74.134906724739196], [-92.420012173211745, 74.100025132942179], [-90.509792853542578, 73.85673248971203], [-92.003965216829869, 72.966244208458477], [-93.196295539100205, 72.771992499473342]]], [[[-120.46, 71.383601793087578], [-123.09219, 70.90164], [-123.62, 71.34], [-125.92894873747332, 71.868688463011395], [-125.499999999999872, 72.292260811795003], [-124.80729, 73.02256], [-123.94, 73.680000000000135], [-124.917749999999899, 74.292750000000112], [-121.53788, 74.44893], [-120.10978, 74.24135], [-117.55564, 74.18577], [-116.58442, 73.89607], [-115.51081, 73.47519], [-116.767939999999882, 73.22292], [-119.22, 72.52], [-120.46, 71.82], [-120.46, 71.383601793087578]]], [[[-93.612755906940464, 74.979997260224437], [-94.156908738973812, 74.59234650338685], [-95.60868058956558, 74.666863918751758], [-96.820932176484561, 74.927623196096576], [-96.288587409229791, 75.377828274223333], [-94.850819871789113, 75.647217515760886], [-93.977746548217908, 75.296489569795952], [-93.612755906940464, 74.979997260224437]]], [[[-98.5, 76.72], [-97.735585, 76.25656], [-97.704415, 75.74344], [-98.16, 75.0], [-99.80874, 74.89744], [-100.88366, 75.05736], [-100.86292, 75.64075], [-102.50209, 75.5638], [-102.56552, 76.3366], [-101.48973, 76.30537], [-99.98349, 76.64634], [-98.57699, 76.58859], [-98.5, 76.72]]], [[[-108.21141, 76.20168], [-107.81943, 75.84552], [-106.92893, 76.01282], [-105.881, 75.9694], [-105.70498, 75.47951], [-106.31347, 75.00527], [-109.7, 74.85], [-112.22307, 74.41696], [-113.74381, 74.39427], [-113.87135, 74.72029], [-111.79421, 75.1625], [-116.31221, 75.04343], [-117.7104, 75.2222], [-116.34602, 76.19903], [-115.40487, 76.47887], [-112.59056, 76.14134], [-110.81422, 75.54919], [-109.0671, 75.47321], [-110.49726, 76.42982], [-109.5811, 76.79417], [-108.54859, 76.67832], [-108.21141, 76.20168]]], [[[-94.684085862999439, 77.097878323058367], [-93.573921068073105, 76.776295884906062], [-91.605023159536586, 76.778517971494594], [-90.741845872749209, 76.449597479956807], [-90.969661424507976, 76.074013170059445], [-89.822237921899244, 75.847773749485626], [-89.187082892599776, 75.610165513807615], [-87.838276333349611, 75.566188869927217], [-86.379192267588664, 75.482421373182163], [-84.789625210290595, 75.699204006646497], [-82.753444586910049, 75.784315090631225], [-81.12853084992436, 75.713983466282016], [-80.05751095245914, 75.336848863415867], [-79.833932868148324, 74.923127346487192], [-80.457770758775823, 74.657303778777774], [-81.948842536125511, 74.442459011524321], [-83.2288936022114, 74.564027818490928], [-86.097452358733292, 74.410032050261137], [-88.150350307960196, 74.392307033984977], [-89.764722052758358, 74.515555325001117], [-92.422440965529418, 74.837757880340973], [-92.768285488642789, 75.38681997344213], [-92.889905972041717, 75.882655341282629], [-93.893824022175977, 76.319243679500516], [-95.962457445035795, 76.44138092722244], [-97.121378953829463, 76.751077785947587], [-96.745122850312342, 77.161388658345132], [-94.684085862999439, 77.097878323058367]]], [[[-116.198586595507322, 77.645286770326194], [-116.335813361458349, 76.876961575010554], [-117.106050584768766, 76.530031846819114], [-118.040412157038119, 76.481171780087081], [-119.899317586885687, 76.053213406061971], [-121.499995077126471, 75.900018622532784], [-122.85492448615895, 76.116542873835684], [-122.854925293603188, 76.116542873835684], [-121.157535360328239, 76.864507554828336], [-119.103938971821023, 77.512219957174608], [-117.570130784965954, 77.498318996888102], [-116.198586595507322, 77.645286770326194]]], [[[-93.840003017943971, 77.51999726023449], [-94.295608283245244, 77.491342678528682], [-96.169654100310055, 77.55511139597688], [-96.436304490936109, 77.83462921824362], [-94.422577277386353, 77.820004787904978], [-93.720656297565867, 77.634331366680314], [-93.840003017943971, 77.51999726023449]]], [[[-110.186938035912945, 77.697014879050286], [-112.051191169058455, 77.409228827616843], [-113.534278937619035, 77.732206529441143], [-112.724586758253835, 78.051050116681935], [-111.264443325630822, 78.152956041161545], [-109.854451870547067, 77.996324774884812], [-110.186938035912945, 77.697014879050286]]], [[[-109.663145718202557, 78.601972561345676], [-110.88131425661885, 78.406919867659994], [-112.542091437615142, 78.407901719873493], [-112.525890876091566, 78.550554511215225], [-111.500010342233367, 78.849993598130538], [-110.96366065147599, 78.804440823065207], [-109.663145718202557, 78.601972561345676]]], [[[-95.830294969449312, 78.056941229963243], [-97.309842902397975, 77.85059723582178], [-98.124289313533964, 78.082856960757567], [-98.55286780474664, 78.458105373845086], [-98.631984422585504, 78.871930243638374], [-97.337231411512604, 78.831984361476756], [-96.754398769908761, 78.765812689926989], [-95.559277920294562, 78.41831452098026], [-95.830294969449312, 78.056941229963243]]], [[[-100.060191820052111, 78.324754340315891], [-99.670939093813601, 77.907544664207393], [-101.303940192452984, 78.018984890444798], [-102.949808722733025, 78.343228664860206], [-105.176132778731514, 78.38033234324574], [-104.210429450277147, 78.677420152491777], [-105.419580451258511, 78.918335679836431], [-105.492289191493128, 79.301593939929177], [-103.529282396237917, 79.16534902619162], [-100.8251580472688, 78.80046173777869], [-100.060191820052111, 78.324754340315891]]], [[[-87.02, 79.66], [-85.81435, 79.3369], [-87.18756, 79.0393], [-89.03535, 78.28723], [-90.80436, 78.21533], [-92.87669, 78.34333], [-93.95116, 78.75099], [-93.93574, 79.11373], [-93.14524, 79.3801], [-94.974, 79.37248], [-96.07614, 79.70502], [-96.70972, 80.15777], [-96.01644, 80.60233], [-95.32345, 80.90729], [-94.29843, 80.97727], [-94.73542, 81.20646], [-92.40984, 81.25739], [-91.13289, 80.72345], [-89.45, 80.509322033898258], [-87.81, 80.32], [-87.02, 79.66]]], [[[-68.5, 83.106321516765732], [-65.82735, 83.02801], [-63.68, 82.9], [-61.85, 82.6286], [-61.89388, 82.36165], [-64.334, 81.92775], [-66.75342, 81.72527], [-67.65755, 81.50141], [-65.48031, 81.50657], [-67.84, 80.9], [-69.4697, 80.61683], [-71.18, 79.8], [-73.2428, 79.63415], [-73.88, 79.430162204802073], [-76.90773, 79.32309], [-75.52924, 79.19766], [-76.22046, 79.01907], [-75.39345, 78.52581], [-76.34354, 78.18296], [-77.88851, 77.89991], [-78.36269, 77.50859], [-79.75951, 77.20968], [-79.61965, 76.98336], [-77.91089, 77.022045], [-77.88911, 76.777955], [-80.56125, 76.17812], [-83.17439, 76.45403], [-86.11184, 76.29901], [-87.6, 76.42], [-89.49068, 76.47239], [-89.6161, 76.95213], [-87.76739, 77.17833], [-88.26, 77.9], [-87.65, 77.970222222222205], [-84.97634, 77.53873], [-86.34, 78.18], [-87.96192, 78.37181], [-87.15198, 78.75867], [-85.37868, 78.9969], [-85.09495, 79.34543], [-86.50734, 79.73624], [-86.93179, 80.25145], [-84.19844, 80.20836], [-83.408695652173819, 80.1], [-81.84823, 80.46442], [-84.1, 80.58], [-87.59895, 80.51627], [-89.36663, 80.85569], [-90.2, 81.26], [-91.36786, 81.5531], [-91.58702, 81.89429], [-90.1, 82.085], [-88.93227, 82.11751], [-86.97024, 82.27961], [-85.5, 82.652273458057024], [-84.260005, 82.6], [-83.18, 82.32], [-82.42, 82.86], [-81.1, 83.02], [-79.30664, 83.13056], [-76.25, 83.172058823529369], [-75.71878, 83.06404], [-72.83153, 83.23324], [-70.665765, 83.169780758382828], [-68.5, 83.106321516765732]]]] } }, + { "type": "Feature", "properties": { "admin": "Switzerland", "name": "Switzerland", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[9.594226108446346, 47.525058091820256], [9.632931756232974, 47.347601223329974], [9.479969516649019, 47.102809963563367], [9.932448357796657, 46.920728054382948], [10.442701450246627, 46.893546250997424], [10.36337812667861, 46.483571275409851], [9.922836541390378, 46.314899400409182], [9.182881707403054, 46.440214748716976], [8.966305779667804, 46.036931871111186], [8.489952426801322, 46.005150865251672], [8.316629672894377, 46.163642483090847], [7.755992058959832, 45.824490057959302], [7.273850945676655, 45.776947740250769], [6.843592970414504, 45.991146552100595], [6.500099724970424, 46.429672756529428], [6.022609490593537, 46.272989813820466], [6.037388950229, 46.725778713561859], [6.768713820023605, 47.287708238303686], [6.736571079138058, 47.541801255882838], [7.192202182655505, 47.449765529971003], [7.466759067422228, 47.620581976911794], [8.31730146651415, 47.613579820336255], [8.522611932009765, 47.830827541691285], [9.594226108446346, 47.525058091820256]]] } }, + { "type": "Feature", "properties": { "admin": "Chile", "name": "Chile", "continent": "South America" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[-68.634010227583147, -52.636370458874353], [-68.633349999999879, -54.8695], [-67.56244, -54.87001], [-66.95992, -54.89681], [-67.291029999999878, -55.30124], [-68.148629999999841, -55.61183], [-68.639990810811796, -55.580017999086877], [-69.2321, -55.49906], [-69.95809, -55.19843], [-71.00568, -55.05383], [-72.2639, -54.49514], [-73.2852, -53.957519999999874], [-74.66253, -52.83749], [-73.8381, -53.04743], [-72.43418, -53.7154], [-71.10773, -54.07433], [-70.591779999999787, -53.61583], [-70.26748, -52.93123], [-69.345649999999878, -52.5183], [-68.634010227583147, -52.636370458874353]]], [[[-68.219913092711224, -21.49434661223183], [-67.828179897722634, -22.872918796482178], [-67.106673550063604, -22.735924574476392], [-66.985233934177629, -22.986348565362825], [-67.328442959244128, -24.025303236590908], [-68.417652960876111, -24.518554782816874], [-68.386001146097342, -26.185016371365229], [-68.594799770772667, -26.50690886811126], [-68.295541551370391, -26.899339694935787], [-69.001234910748266, -27.521213881136127], [-69.656130337183143, -28.459141127233686], [-70.013550381129861, -29.367922865518544], [-69.919008348251921, -30.336339206668306], [-70.535068935819439, -31.365010267870279], [-70.074399380153622, -33.09120981214803], [-69.814776984319209, -33.273886000299839], [-69.817309129501453, -34.193571465798279], [-70.388049485949082, -35.169687595359441], [-70.364769253201658, -36.005088799789931], [-71.121880662709771, -36.65812387466233], [-71.118625047475419, -37.576827487947192], [-70.814664272734703, -38.552995293940732], [-71.413516608349042, -38.916022230791107], [-71.680761277946445, -39.808164157878061], [-71.915734015577542, -40.832339369470716], [-71.746803758415453, -42.051386407235988], [-72.148898078078517, -42.254888197601375], [-71.915423956983901, -43.408564548517404], [-71.464056159130493, -43.787611179378324], [-71.793622606071935, -44.207172133156099], [-71.329800788036195, -44.407521661151677], [-71.222778896759721, -44.784242852559409], [-71.659315558545316, -44.973688653341434], [-71.552009446891233, -45.560732924177117], [-71.917258470330196, -46.884838148791786], [-72.44735531278026, -47.738532810253517], [-72.331160854771937, -48.244238376661819], [-72.648247443314929, -48.878618259476774], [-73.415435757120022, -49.318436374712952], [-73.328050910114456, -50.378785088909865], [-72.975746832964617, -50.741450290734299], [-72.309973517532342, -50.677009779666342], [-72.329403856074023, -51.425956312872394], [-71.914803839796321, -52.009022305865912], [-69.498362189396076, -52.142760912637236], [-68.571545376241332, -52.299443855346247], [-69.461284349226617, -52.291950772663924], [-69.94277950710611, -52.537930590373243], [-70.8451016913545, -52.899200528525711], [-71.006332160105217, -53.833252042201345], [-71.429794684520928, -53.856454760300373], [-72.557942877884855, -53.531410001184447], [-73.702756720662862, -52.835069268607249], [-73.702756720662862, -52.835070076051487], [-74.946763475225154, -52.262753588419017], [-75.260026007778507, -51.62935475037321], [-74.976632453089806, -51.043395684615675], [-75.47975419788348, -50.378371677451547], [-75.608015102831942, -48.673772881871784], [-75.182769741502128, -47.711919447623153], [-74.126580980104677, -46.939253431995084], [-75.644395311165439, -46.647643324572016], [-74.69215369332305, -45.76397633238097], [-74.351709357384252, -44.10304412208788], [-73.240356004515192, -44.454960625995611], [-72.717803921179765, -42.383355808278985], [-73.388899909138232, -42.117532240569567], [-73.701335618774834, -43.365776462579738], [-74.33194312203257, -43.224958184584395], [-74.017957119427152, -41.794812920906828], [-73.677099372029943, -39.942212823243111], [-73.217592536090663, -39.258688653318508], [-73.505559455037044, -38.282882582351064], [-73.588060879191076, -37.156284681956016], [-73.166717088499283, -37.123780206044351], [-72.553136969681717, -35.508840020491022], [-71.861732143832555, -33.909092706031522], [-71.438450486929895, -32.418899428030819], [-71.668720669222424, -30.920644626592516], [-71.370082567007714, -30.095682061484997], [-71.48989437527645, -28.861442152625909], [-70.905123867461569, -27.640379734001193], [-70.724953986275963, -25.705924167587209], [-70.403965827095035, -23.628996677344542], [-70.091245897080668, -21.393319187101223], [-70.164419725205974, -19.756468194256183], [-70.372572394477714, -18.347975355708879], [-69.858443569605797, -18.092693780187027], [-69.590423753523979, -17.580011895419286], [-69.100246955019401, -18.260125420812653], [-68.966818406841824, -18.981683444904089], [-68.442225104430918, -19.405068454671419], [-68.757167121033703, -20.37265797290447], [-68.219913092711224, -21.49434661223183]]]] } }, + { "type": "Feature", "properties": { "admin": "China", "name": "China", "continent": "Asia" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[110.339187860151526, 18.678395087147603], [109.475209588663702, 18.19770091396861], [108.655207961056135, 18.507681993071397], [108.626217482540426, 19.367887885001974], [109.119055617308007, 19.821038519769385], [110.211598748822837, 20.101253973872073], [110.786550734502228, 20.077534491450077], [111.01005130416462, 19.695929877190732], [110.570646600386794, 19.255879218009305], [110.339187860151526, 18.678395087147603]]], [[[127.657407261262378, 49.760270494172929], [129.397817824420429, 49.440600084015429], [130.58229332898236, 48.729687404976112], [130.987281528853828, 47.790132351261391], [132.506671991099495, 47.788969631534876], [133.373595819228001, 48.183441677434914], [135.026311476786702, 48.478229885443902], [134.500813836810607, 47.578439846377833], [134.112362095272601, 47.212467352886719], [133.76964399631288, 46.116926988299056], [133.097126906466428, 45.14406647397216], [131.883454217659562, 45.32116160743643], [131.025212030156069, 44.967953192721573], [131.288555129115537, 44.111519680348252], [131.144687941614848, 42.929989732426932], [130.633866408409801, 42.903014634770543], [130.640015903852429, 42.39500946712527], [129.994267205933227, 42.985386867843793], [129.596668735879462, 42.424981797854592], [128.05221520397231, 41.994284572917984], [128.208433058790717, 41.466771552082534], [127.343782993683021, 41.503151760415953], [126.869083286649854, 41.816569322266155], [126.18204511932943, 41.107336127276362], [125.079941847840587, 40.569823716792449], [124.265624627785314, 39.928493353834135], [122.86757042856101, 39.637787583976255], [122.131387974130917, 39.170451768544623], [121.054554478032856, 38.89747101496291], [121.585994907722466, 39.360853583324136], [121.376757033372641, 39.750261338859524], [122.168595005381007, 40.422442531896046], [121.640358514493528, 40.946389878903304], [120.768628778161954, 40.593388169917596], [119.639602085449056, 39.898055935214209], [119.023463983233015, 39.252333075511096], [118.042748651197897, 39.204273993479674], [117.532702264477052, 38.73763580988409], [118.05969852098967, 38.061475531561051], [118.878149855628351, 37.897325344385898], [118.911636183753501, 37.448463853498723], [119.702802362142037, 37.156388658185072], [120.823457472823648, 37.870427761377968], [121.711258579597938, 37.481123358707165], [122.357937453298462, 37.454484157860684], [122.519994744965814, 36.930614325501828], [121.104163853033029, 36.651329047180432], [120.63700890511457, 36.111439520811125], [119.66456180224607, 35.609790554337728], [119.151208123858567, 34.909859117160458], [120.227524855633717, 34.360331936168613], [120.620369093916565, 33.37672272392512], [121.229014113450219, 32.460318711877186], [121.908145786630044, 31.692174384074683], [121.891919386890336, 30.949351508095098], [121.264257440273298, 30.676267401648712], [121.503519321784722, 30.14291494396425], [122.092113885589086, 29.832520453403156], [121.93842817595305, 29.018022365834803], [121.684438511238469, 28.225512600206677], [121.125661248866436, 28.135673122667178], [120.395473260582307, 27.053206895449385], [119.585496860839555, 25.740780544532605], [118.656871372554519, 24.547390855400234], [117.281606479970833, 23.624501451099714], [115.890735304835118, 22.782873236578094], [114.763827345846209, 22.668074042241663], [114.152546828265656, 22.223760077396204], [113.806779819800752, 22.548339748621423], [113.241077915501592, 22.051367499270462], [111.843592157032447, 21.550493679281512], [110.78546552942413, 21.39714386645533], [110.444039341271662, 20.34103261970639], [109.88986128137357, 20.282457383703441], [109.627655063924635, 21.008227037026725], [109.864488153118316, 21.395050970947516], [108.522812941524421, 21.715212307211821], [108.050180291782979, 21.552379869060101], [107.043420037872636, 21.8118989120299], [106.567273390735352, 22.21820486092474], [106.725403273548466, 22.794267889898375], [105.811247186305209, 22.976892401617899], [105.329209425886631, 23.352063300056976], [104.476858351664475, 22.819150092046918], [103.504514601660503, 22.703756618739217], [102.706992222100155, 22.708795070887696], [102.170435825613552, 22.464753119389336], [101.652017856861576, 22.318198757409554], [101.803119744882906, 21.174366766845051], [101.27002566936001, 21.201651923095167], [101.180005324307558, 21.436572984294052], [101.150032993578236, 21.849984442629015], [100.416537713627349, 21.558839423096654], [99.983489211021549, 21.742936713136451], [99.240898878987196, 22.118314317304559], [99.53199222208741, 22.949038804612591], [98.898749220782804, 23.142722072842581], [98.66026248575578, 24.063286037690002], [97.604719679762027, 23.897404690033049], [97.724609002679131, 25.083637193293036], [98.671838006589212, 25.91870250091349], [98.712093947344556, 26.743535874940243], [98.682690057370507, 27.508812160750658], [98.246230910233351, 27.747221381129172], [97.91198774616943, 28.335945136014367], [97.327113885490007, 28.261582749946339], [96.248833449287829, 28.411030992134467], [96.586590610747521, 28.830979519154361], [96.117678664131006, 29.452802028922513], [95.404802280664626, 29.031716620392157], [94.565990431702929, 29.27743805593996], [93.413347609432662, 28.640629380807233], [92.503118931043616, 27.896876329046442], [91.696656528696693, 27.771741848251615], [91.258853794319876, 28.040614325466343], [90.730513950567797, 28.064953925075738], [90.015828891971182, 28.296438503527177], [89.475810174521158, 28.042758897406365], [88.814248488320573, 27.299315904239389], [88.730325962278528, 28.086864732367552], [88.120440708369941, 27.876541652939572], [86.954517043000635, 27.974261786403524], [85.823319940131526, 28.203575954698742], [85.011638218123053, 28.642773952747369], [84.23457970575015, 28.839893703724691], [83.89899295444674, 29.320226141877633], [83.337115106137176, 29.463731594352193], [82.327512648450877, 30.115268052688204], [81.525804477874786, 30.422716986608659], [81.111256138029276, 30.183480943313402], [79.721366815107118, 30.882714748654728], [78.738894484374001, 31.515906073527045], [78.458446486326025, 32.61816437431272], [79.176128777995544, 32.483779812137747], [79.208891636068543, 32.994394639613738], [78.811086460285722, 33.506198025032397], [78.912268914713209, 34.321936346975768], [77.83745079947461, 35.494009507787794], [76.192848341785705, 35.89840342868785], [75.896897414050173, 36.666806138651872], [75.158027785140987, 37.133030910789152], [74.980002475895404, 37.419990139305888], [74.829985792952144, 37.990007025701445], [74.864815708316783, 38.378846340481587], [74.25751427602269, 38.606506862943476], [73.928852166646394, 38.505815334622717], [73.675379266254836, 39.431236884105566], [73.960013055318427, 39.660008449861714], [73.822243686828315, 39.893973497063136], [74.776862420556043, 40.366425279291619], [75.467827996730719, 40.56207225194867], [76.526368035797432, 40.427946071935132], [76.90448449087711, 41.066485907549648], [78.187196893226044, 41.185315863604799], [78.543660923175253, 41.582242540038713], [80.119430373051401, 42.12394074153822], [80.259990268885318, 42.34999929459908], [80.180150180994374, 42.920067857426844], [80.866206496101213, 43.180362046881008], [79.966106398441426, 44.917516994804622], [81.947070753918084, 45.317027492853143], [82.458925815769035, 45.539649563166499], [83.180483839860543, 47.330031236350735], [85.164290399113213, 47.000955715516099], [85.720483839870667, 47.452969468773077], [85.76823286330837, 48.455750637396896], [86.59877648310335, 48.549181626980605], [87.359970330762692, 49.214980780629148], [87.751264276076668, 49.297197984405464], [88.013832228551678, 48.599462795600594], [88.854297723346747, 48.069081732773007], [90.280825636763893, 47.693549099307901], [90.970809360724957, 46.88814606382293], [90.585768263718307, 45.719716091487491], [90.945539585334316, 45.286073309910243], [92.133890822318222, 45.115075995456429], [93.480733677141316, 44.97547211362], [94.688928664125356, 44.352331854828456], [95.306875441471504, 44.241330878265458], [95.762454868556688, 43.319449164394619], [96.349395786527808, 42.725635280928643], [97.451757440177971, 42.74888967546007], [99.515817498779995, 42.524691473961688], [100.845865513108279, 42.663804429691417], [101.833040399179936, 42.51487295182627], [103.312278273534787, 41.907468166667613], [104.522281935649005, 41.90834666601662], [104.964993931093431, 41.597409572916334], [106.129315627061658, 42.134327704428891], [107.744772576937976, 42.481515814781908], [109.243595819131428, 42.519446316084149], [110.412103306115299, 42.871233628911014], [111.129682244920218, 43.406834011400171], [111.82958784388137, 43.743118394539486], [111.667737257943202, 44.073175767587706], [111.348376906379428, 44.457441718110047], [111.87330610560025, 45.102079372735112], [112.436062453258842, 45.01164561622425], [113.463906691544196, 44.808893134127111], [114.46033165899604, 45.339816799493875], [115.985096470200133, 45.727235012386004], [116.717868280098855, 46.38820241961524], [117.421701287914246, 46.67273285581421], [118.874325799638711, 46.805412095723646], [119.663269891438745, 46.692679958678944], [119.772823927897562, 47.048058783550132], [118.866574334794947, 47.747060044946195], [118.064142694166719, 48.06673045510373], [117.295507440257438, 47.697709052107385], [116.308952671373234, 47.853410142602812], [115.742837355615734, 47.726544501326273], [115.485282017073018, 48.135382595403442], [116.191802199367601, 49.134598090199056], [116.67880089728618, 49.888531399121398], [117.879244419426371, 49.510983384796944], [119.288460728025839, 50.142882798862033], [119.279365675942358, 50.582907619827282], [120.182049595216924, 51.64356639261802], [120.738191359541972, 51.964115302124547], [120.725789015791975, 52.516226304730814], [120.177088657716865, 52.753886216841195], [121.003084751470226, 53.251401068731226], [122.245747918792858, 53.431725979213681], [123.571506789240843, 53.458804429734627], [125.068211297710434, 53.161044826868832], [125.946348911646169, 52.792798570356936], [126.564399041856959, 51.784255479532689], [126.939156528837657, 51.353894151405896], [127.287455682484904, 50.739797268265434], [127.657407261262378, 49.760270494172929]]]] } }, + { "type": "Feature", "properties": { "admin": "Ivory Coast", "name": "C�te d'Ivoire", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[-2.856125047202397, 4.994475816259508], [-3.311084357100071, 4.984295559098014], [-4.008819545904941, 5.179813340674314], [-4.64991736491791, 5.168263658057084], [-5.834496222344525, 4.993700669775135], [-6.528769090185845, 4.705087795425015], [-7.518941209330434, 4.338288479017307], [-7.712159389669749, 4.364565944837721], [-7.63536821128403, 5.188159084489455], [-7.53971513511176, 5.313345241716517], [-7.570152553731686, 5.707352199725903], [-7.993692592795879, 6.126189683451541], [-8.311347622094017, 6.193033148621081], [-8.602880214868618, 6.467564195171659], [-8.385451626000572, 6.911800645368742], [-8.485445522485348, 7.395207831243068], [-8.439298468448696, 7.686042792181736], [-8.280703497744936, 7.687179673692156], [-8.221792364932197, 8.123328762235571], [-8.299048631208562, 8.316443589710302], [-8.203498907900878, 8.455453192575446], [-7.832100389019186, 8.575704250518625], [-8.079113735374348, 9.376223863152033], [-8.309616461612249, 9.789531968622439], [-8.22933712404682, 10.129020290563897], [-8.029943610048617, 10.206534939001711], [-7.89958980959237, 10.297382106970824], [-7.622759161804808, 10.147236232946792], [-6.850506557635057, 10.138993841996237], [-6.666460944027547, 10.430810655148447], [-6.493965013037267, 10.411302801958268], [-6.205222947606429, 10.524060777219132], [-6.050452032892266, 10.096360785355442], [-5.816926235365286, 10.222554633012191], [-5.404341599946973, 10.370736802609144], [-4.954653286143098, 10.152713934769732], [-4.779883592131966, 9.821984768101741], [-4.330246954760383, 9.610834865757139], [-3.980449184576684, 9.862344061721698], [-3.511898972986272, 9.900326239456216], [-2.827496303712706, 9.642460842319775], [-2.56218950032624, 8.219627793811481], [-2.983584967450326, 7.379704901555511], [-3.244370083011261, 6.2504715031135], [-2.810701463217839, 5.389051215024109], [-2.856125047202397, 4.994475816259508]]] } }, + { "type": "Feature", "properties": { "admin": "Cameroon", "name": "Cameroon", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[13.07582238124675, 2.267097072759014], [12.951333855855605, 2.321615708826939], [12.359380323952218, 2.19281220133945], [11.751665480199787, 2.326757513839993], [11.276449008843711, 2.261050930180871], [9.649158155972627, 2.283866075037735], [9.795195753629455, 3.073404445809117], [9.404366896205998, 3.734526882335202], [8.948115675501068, 3.904128933117135], [8.744923943729416, 4.352215277519959], [8.488815545290889, 4.495617377129917], [8.500287713259693, 4.771982937026847], [8.757532993208626, 5.47966583904791], [9.233162876023043, 6.444490668153334], [9.522705926154398, 6.453482367372116], [10.118276808318255, 7.038769639509879], [10.497375115611417, 7.055357774275562], [11.058787876030349, 6.644426784690593], [11.745774366918509, 6.981382961449753], [11.839308709366801, 7.397042344589434], [12.063946160539556, 7.799808457872301], [12.218872104550597, 8.305824082874322], [12.753671502339214, 8.717762762888993], [12.955467970438971, 9.417771714714702], [13.1675997249971, 9.64062632897341], [13.308676385153914, 10.160362046748926], [13.572949659894558, 10.798565985553564], [14.415378859116682, 11.572368882692071], [14.468192172918974, 11.90475169519341], [14.57717776862253, 12.085360826053501], [14.181336297266792, 12.483656927943112], [14.213530714584634, 12.802035427293344], [14.495787387762842, 12.859396267137326], [14.893385857816522, 12.219047756392582], [14.960151808337598, 11.555574042197222], [14.923564894274955, 10.891325181517471], [15.467872755605269, 9.982336737503429], [14.909353875394713, 9.99212942142273], [14.627200555081057, 9.920919297724536], [14.171466098699025, 10.021378282099928], [13.954218377344002, 9.549494940626685], [14.544466586981766, 8.965861314322266], [14.979995558337688, 8.796104234243471], [15.120865512765331, 8.382150173369423], [15.436091749745765, 7.692812404811971], [15.279460483469107, 7.421924546737968], [14.776545444404572, 6.408498033062044], [14.536560092841111, 6.22695872642069], [14.459407179429345, 5.451760565610299], [14.558935988023501, 5.03059764243153], [14.478372430080466, 4.732605495620446], [14.950953403389658, 4.21038930909492], [15.036219516671249, 3.851367295747123], [15.405395948964379, 3.335300604664339], [15.862732374747479, 3.013537298998982], [15.907380812247649, 2.557389431158612], [16.01285241055535, 2.267639675298084], [15.940918816805061, 1.727672634280295], [15.14634199388524, 1.964014797367184], [14.337812534246577, 2.22787466064949], [13.07582238124675, 2.267097072759014]]] } }, + { "type": "Feature", "properties": { "admin": "Democratic Republic of the Congo", "name": "Dem. Rep. Congo", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[30.833859897593801, 3.50916596111034], [30.773346795380036, 2.339883327642127], [31.174149204235807, 2.204465236821263], [30.852670118948048, 1.849396470543809], [30.468507521290292, 1.58380544677972], [30.086153598762703, 1.062312730306288], [29.875778842902488, 0.597379868976304], [29.819503208136634, -0.205310153813372], [29.587837762172164, -0.58740569417948], [29.579466180140876, -1.341313164885626], [29.29188683443661, -1.620055840667987], [29.254834832483336, -2.215109958508911], [29.117478875451546, -2.292211195488384], [29.02492638521678, -2.839257907730157], [29.276383904749046, -3.293907159034063], [29.339997592900342, -4.499983412294092], [29.519986606572925, -5.419978936386313], [29.41999271008816, -5.939998874539432], [29.620032179490003, -6.520015150583424], [30.199996779101692, -7.079980970898161], [30.740015496551781, -8.340007419470913], [30.34608605319081, -8.238256524288216], [29.002912225060467, -8.40703175215347], [28.734866570762495, -8.526559340044576], [28.449871046672818, -9.164918308146083], [28.673681674928922, -9.605924981324931], [28.496069777141763, -10.789883721564044], [28.372253045370421, -11.793646742401389], [28.642417433392346, -11.971568698782312], [29.341547885869087, -12.36074391037241], [29.616001417771223, -12.178894545137307], [29.699613885219485, -13.257226657771827], [28.934285922976834, -13.248958428605132], [28.52356163912102, -12.698604424696679], [28.15510867687998, -12.272480564017894], [27.38879886242378, -12.132747491100663], [27.164419793412456, -11.608748467661071], [26.55308759939961, -11.924439792532125], [25.752309604604726, -11.784965101776356], [25.418118116973197, -11.330935967659958], [24.783169793402948, -11.238693536018962], [24.314516228947948, -11.262826429899269], [24.257155389103982, -10.951992689663655], [23.912215203555714, -10.926826267137512], [23.456790805767433, -10.867863457892481], [22.837345411884733, -11.017621758674329], [22.402798292742371, -10.99307545333569], [22.155268182064304, -11.084801120653768], [22.208753289486388, -9.894796237836507], [21.87518191904234, -9.523707777548564], [21.801801385187897, -8.908706556842978], [21.949130893652036, -8.305900974158275], [21.746455926203303, -7.920084730667147], [21.728110792739695, -7.2908724910813], [20.514748162526498, -7.299605808138629], [20.601822950938292, -6.93931772219968], [20.091621534920645, -6.943090101756993], [20.037723016040214, -7.116361179231644], [19.417502475673157, -7.155428562044297], [19.166613396896107, -7.738183688999753], [19.016751743249664, -7.988245944860132], [18.464175652752683, -7.847014255406442], [18.134221632569048, -7.98767750410492], [17.472970004962232, -8.068551120641699], [17.089995965247166, -7.545688978712525], [16.860190870845198, -7.222297865429984], [16.573179965896141, -6.622644545115087], [16.326528354567042, -5.877470391466267], [13.375597364971892, -5.864241224799548], [13.02486941900696, -5.984388929878157], [12.735171339578695, -5.965682061388497], [12.322431674863507, -6.100092461779658], [12.182336866920249, -5.789930515163837], [12.436688266660866, -5.684303887559245], [12.468004184629734, -5.248361504745003], [12.631611769265788, -4.991271254092935], [12.995517205465173, -4.781103203961883], [13.258240187237044, -4.882957452009165], [13.600234816144676, -4.500138441590969], [14.144956088933295, -4.510008640158715], [14.209034864975219, -4.793092136253597], [14.582603794013179, -4.970238946150139], [15.170991652088441, -4.3435071753143], [15.753540073314749, -3.855164890156096], [16.006289503654298, -3.535132744972528], [15.972803175529149, -2.712392266453612], [16.407091912510051, -1.740927015798682], [16.86530683764212, -1.225816338713287], [17.523716261472853, -0.743830254726987], [17.638644646889983, -0.424831638189246], [17.663552687254676, -0.058083998213817], [17.826540154703245, 0.288923244626105], [17.774191928791563, 0.855658677571085], [17.89883548347958, 1.741831976728278], [18.09427575040743, 2.365721543788055], [18.39379235197114, 2.90044342692822], [18.453065219809925, 3.504385891123348], [18.542982211997778, 4.201785183118317], [18.932312452884755, 4.709506130385973], [19.467783644293146, 5.031527818212779], [20.290679152108932, 4.691677761245287], [20.927591180106273, 4.322785549329736], [21.659122755630019, 4.224341945813719], [22.405123732195531, 4.02916006104732], [22.704123569436284, 4.633050848810156], [22.841479526468103, 4.710126247573483], [23.297213982850135, 4.609693101414221], [24.41053104014625, 5.108784084489129], [24.805028924262409, 4.897246608902349], [25.128833449003274, 4.927244777847789], [25.278798455514302, 5.170408229997191], [25.650455356557465, 5.256087754737123], [26.402760857862535, 5.150874538590869], [27.044065382604703, 5.127852688004835], [27.374226108517483, 5.233944403500059], [27.979977247842807, 4.408413397637373], [28.428993768026906, 4.287154649264493], [28.696677687298795, 4.455077215996936], [29.159078403446497, 4.38926727947323], [29.715995314256013, 4.600804755060024], [29.953500197069467, 4.173699042167683], [30.833859897593801, 3.50916596111034]]] } }, + { "type": "Feature", "properties": { "admin": "Republic of Congo", "name": "Congo", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[12.995517205465173, -4.781103203961883], [12.620759718484491, -4.438023369976135], [12.318607618873923, -4.606230157086187], [11.914963006242086, -5.037986748884789], [11.093772820691923, -3.978826592630546], [11.855121697648114, -3.42687061932105], [11.478038771214299, -2.765618991714241], [11.820963575903189, -2.514161472181982], [12.495702752338159, -2.391688327650242], [12.575284458067639, -1.948511244315134], [13.109618767965626, -2.428740329603513], [13.992407260807706, -2.470804945489099], [14.299210239324564, -1.998275648612213], [14.425455763413593, -1.333406670744971], [14.316418491277741, -0.552627455247048], [13.843320753645653, 0.038757635901149], [14.276265903386953, 1.196929836426619], [14.026668735417214, 1.395677395021153], [13.282631463278816, 1.31418366129688], [13.003113641012074, 1.830896307783319], [13.07582238124675, 2.267097072759014], [14.337812534246577, 2.22787466064949], [15.14634199388524, 1.964014797367184], [15.940918816805061, 1.727672634280295], [16.01285241055535, 2.267639675298084], [16.537058139724135, 3.198254706226278], [17.133042433346297, 3.728196519379451], [17.809900343505259, 3.560196437998569], [18.453065219809925, 3.504385891123348], [18.39379235197114, 2.90044342692822], [18.09427575040743, 2.365721543788055], [17.89883548347958, 1.741831976728278], [17.774191928791563, 0.855658677571085], [17.826540154703245, 0.288923244626105], [17.663552687254676, -0.058083998213817], [17.638644646889983, -0.424831638189246], [17.523716261472853, -0.743830254726987], [16.86530683764212, -1.225816338713287], [16.407091912510051, -1.740927015798682], [15.972803175529149, -2.712392266453612], [16.006289503654298, -3.535132744972528], [15.753540073314749, -3.855164890156096], [15.170991652088441, -4.3435071753143], [14.582603794013179, -4.970238946150139], [14.209034864975219, -4.793092136253597], [14.144956088933295, -4.510008640158715], [13.600234816144676, -4.500138441590969], [13.258240187237044, -4.882957452009165], [12.995517205465173, -4.781103203961883]]] } }, + { "type": "Feature", "properties": { "admin": "Colombia", "name": "Colombia", "continent": "South America" }, "geometry": { "type": "Polygon", "coordinates": [[[-75.373223232713841, -0.15203175212045], [-75.801465827116587, 0.084801337073202], [-76.292314419240938, 0.416047268064119], [-76.576379767549383, 0.256935533037435], [-77.424984300430367, 0.395686753741117], [-77.668612840470416, 0.825893052570961], [-77.855061408179509, 0.809925034992773], [-78.855258755188686, 1.380923773601822], [-78.990935228171026, 1.691369940595251], [-78.617831387023699, 1.766404120283056], [-78.662118089497838, 2.267355454920476], [-78.427610439757302, 2.629555568854215], [-77.931542527971473, 2.696605739752925], [-77.510431281224996, 3.325016994638246], [-77.127689785455246, 3.849636135265356], [-77.496271938776999, 4.087606105969427], [-77.307601284479375, 4.667984117039452], [-77.533220587865713, 5.582811997902496], [-77.318815070286718, 5.845354112161359], [-77.476660732722266, 6.691116441266301], [-77.881571417945239, 7.223771267114783], [-77.75341386586139, 7.709839789252141], [-77.431107957656977, 7.638061224798733], [-77.242566494440069, 7.935278225125442], [-77.474722866511314, 8.524286200388216], [-77.353360765273848, 8.670504665558068], [-76.836673957003541, 8.638749497914715], [-76.086383836557843, 9.336820583529486], [-75.674600185840035, 9.443248195834597], [-75.664704149056149, 9.774003200718736], [-75.480425991503338, 10.618990383339305], [-74.906895107711975, 11.08304474532032], [-74.276752692344871, 11.102035834187586], [-74.197222663047683, 11.310472723836865], [-73.414763963500278, 11.227015285685479], [-72.62783525255962, 11.731971543825519], [-72.238194953078903, 11.955549628136325], [-71.754090135368628, 12.437303168177305], [-71.399822353791691, 12.376040757695289], [-71.137461107045866, 12.112981879113503], [-71.331583624950284, 11.776284084515805], [-71.973921678338272, 11.608671576377116], [-72.227575446242923, 11.108702093953237], [-72.614657762325194, 10.821975409381777], [-72.905286017534692, 10.45034434655477], [-73.027604132769554, 9.736770331252441], [-73.304951544880026, 9.151999823437604], [-72.788729824500379, 9.085027167187331], [-72.660494757768092, 8.62528778730268], [-72.439862230097944, 8.405275376820027], [-72.360900641555958, 8.002638454617893], [-72.479678921178831, 7.632506008327352], [-72.444487270788059, 7.42378489830048], [-72.19835242378187, 7.340430813013682], [-71.960175747348629, 6.991614895043538], [-70.674233567981503, 7.087784735538717], [-70.093312954372408, 6.960376491723109], [-69.389479946557103, 6.099860541198835], [-68.985318569602327, 6.206804917826856], [-68.265052456318216, 6.153268133972473], [-67.695087246355001, 6.267318020040645], [-67.34143958196556, 6.095468044454021], [-67.521531948502741, 5.556870428891968], [-67.744696621355203, 5.221128648291667], [-67.823012254493534, 4.503937282728898], [-67.621835903581271, 3.839481716319994], [-67.33756384954367, 3.542342230641721], [-67.303173183853417, 3.31845408773718], [-67.809938117123693, 2.820655015469569], [-67.447092047786299, 2.600280869960869], [-67.181294318293041, 2.250638129074062], [-66.876325853122566, 1.253360500489336], [-67.065048183852483, 1.130112209473225], [-67.25999752467358, 1.719998684084956], [-67.537810024674684, 2.037162787276329], [-67.868565029558823, 1.692455145673392], [-69.816973232691609, 1.714805202639624], [-69.804596727157701, 1.089081122233466], [-69.218637661400166, 0.985676581217433], [-69.252434048119042, 0.602650865070075], [-69.452396002872447, 0.706158758950693], [-70.015565761989293, 0.541414292804205], [-70.02065589057004, -0.185156345219539], [-69.577065395776586, -0.549991957200163], [-69.420485805932216, -1.122618503426409], [-69.444101935489599, -1.556287123219817], [-69.893635219996611, -4.298186944194326], [-70.394043952094975, -3.766591485207825], [-70.692682054309699, -3.742872002785858], [-70.047708502874841, -2.725156345229699], [-70.813475714791949, -2.256864515800742], [-71.413645799429773, -2.342802422702128], [-71.774760708285385, -2.169789727388937], [-72.325786505813639, -2.434218031426453], [-73.070392218707212, -2.308954359550952], [-73.659503546834586, -1.260491224781134], [-74.122395189089048, -1.002832533373848], [-74.441600511355958, -0.530820000819887], [-75.106624518520064, -0.05720549886486], [-75.373223232713841, -0.15203175212045]]] } }, + { "type": "Feature", "properties": { "admin": "Costa Rica", "name": "Costa Rica", "continent": "North America" }, "geometry": { "type": "Polygon", "coordinates": [[[-82.965783047197348, 8.225027980985983], [-83.508437262694287, 8.446926581247281], [-83.711473965169063, 8.656836249216864], [-83.596313035806631, 8.830443223501417], [-83.632641567707822, 9.051385809765319], [-83.909885626953724, 9.290802720573579], [-84.303401658856345, 9.487354030795712], [-84.64764421256865, 9.615537421095707], [-84.713350796227743, 9.908051866083849], [-84.975660366541319, 10.086723130733004], [-84.911374884770211, 9.795991522658921], [-85.110923428065291, 9.557039699741308], [-85.339488288092255, 9.834542141148658], [-85.660786505866966, 9.93334747969072], [-85.797444831062819, 10.134885565629032], [-85.791708747078417, 10.439337266476612], [-85.65931372754666, 10.754330959511718], [-85.941725430021748, 10.895278428587799], [-85.712540452807289, 11.088444932494822], [-85.561851976244171, 11.217119248901593], [-84.903003302738924, 10.952303371621895], [-84.673069017256239, 11.082657172078139], [-84.355930752281026, 10.999225572142901], [-84.190178595704822, 10.793450018756671], [-83.895054490885926, 10.726839097532444], [-83.655611741861563, 10.938764146361418], [-83.402319708982944, 10.39543813724465], [-83.015676642575158, 9.992982082555553], [-82.546196255203469, 9.566134751824674], [-82.932890998043561, 9.476812038608172], [-82.927154914059145, 9.074330145702914], [-82.719183112300513, 8.925708726431493], [-82.868657192704759, 8.807266343618521], [-82.829770677405151, 8.626295477732368], [-82.9131764391242, 8.423517157419068], [-82.965783047197348, 8.225027980985983]]] } }, + { "type": "Feature", "properties": { "admin": "Cuba", "name": "Cuba", "continent": "North America" }, "geometry": { "type": "Polygon", "coordinates": [[[-82.268151211257035, 23.188610744717703], [-81.404457160146819, 23.117271429938775], [-80.61876868358118, 23.105980129482994], [-79.679523688460222, 22.765303249598823], [-79.281485968732071, 22.399201565027049], [-78.347434455056472, 22.512166246017085], [-77.993295864560253, 22.277193508385928], [-77.146422492161037, 21.657851467367831], [-76.523824835908528, 21.20681956632437], [-76.194620123993175, 21.220565497314006], [-75.598222418912655, 21.01662445727413], [-75.671060350228032, 20.735091254147999], [-74.933896043584483, 20.693905137611381], [-74.178024868451246, 20.284627793859737], [-74.296648118777242, 20.050378526280678], [-74.961594611292924, 19.923435370355687], [-75.634680141894577, 19.873774318923193], [-76.323656175425981, 19.952890936762056], [-77.755480923153044, 19.855480861891873], [-77.085108405246729, 20.413353786698789], [-77.492654588516601, 20.673105373613886], [-78.137292243141573, 20.739948838783427], [-78.482826707661161, 21.028613389565848], [-78.719866502583997, 21.598113511638431], [-79.284999966127913, 21.559175319906497], [-80.217475348618635, 21.827324327069032], [-80.517534552721401, 22.037078965741756], [-81.820943366203167, 22.192056586185068], [-82.169991828118611, 22.387109279870746], [-81.79500179719264, 22.636964830001951], [-82.775897996740838, 22.688150336187057], [-83.494458787759328, 22.168517971276124], [-83.908800421875611, 22.154565334557329], [-84.052150845053248, 21.910575059491251], [-84.547030198896351, 21.801227728761639], [-84.974911058273079, 21.896028143801082], [-84.44706214062775, 22.204949856041903], [-84.23035702181177, 22.56575470630376], [-83.778239915690165, 22.78811839445569], [-83.267547573565736, 22.983041897060641], [-82.510436164057495, 23.078746649665181], [-82.268151211257035, 23.188610744717703]]] } }, + { "type": "Feature", "properties": { "admin": "Northern Cyprus", "name": "N. Cyprus", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[32.731780226377445, 35.14002594658843], [32.802473585752743, 35.145503648411363], [32.946960890440799, 35.38670339613369], [33.667227003724939, 35.373215847305509], [34.576473829900458, 35.671595567358786], [33.900804477684197, 35.245755927057608], [33.973616570783456, 35.058506374647997], [33.866439650210104, 35.093594672174177], [33.675391880027057, 35.017862860650446], [33.525685255677494, 35.038688462864066], [33.475817498515845, 35.000344550103499], [33.45592207208346, 35.101423651666401], [33.383833449036295, 35.162711900364563], [33.190977003723042, 35.173124701471373], [32.919572381326127, 35.087832749973636], [32.731780226377445, 35.14002594658843]]] } }, + { "type": "Feature", "properties": { "admin": "Cyprus", "name": "Cyprus", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[33.973616570783456, 35.058506374647997], [34.004880812320032, 34.978097846001852], [32.97982710137844, 34.571869411755436], [32.490296258277532, 34.701654771456468], [32.256667107885953, 35.103232326796622], [32.731780226377445, 35.14002594658843], [32.919572381326127, 35.087832749973636], [33.190977003723042, 35.173124701471373], [33.383833449036295, 35.162711900364563], [33.45592207208346, 35.101423651666401], [33.475817498515845, 35.000344550103499], [33.525685255677494, 35.038688462864066], [33.675391880027057, 35.017862860650446], [33.866439650210104, 35.093594672174177], [33.973616570783456, 35.058506374647997]]] } }, + { "type": "Feature", "properties": { "admin": "Czech Republic", "name": "Czech Rep.", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[16.960288120194573, 48.596982326850593], [16.49928266771877, 48.785808010445095], [16.029647251050218, 48.733899034207916], [15.253415561593979, 49.039074205107575], [14.901447381254055, 48.964401760445817], [14.33889773932472, 48.555305284207193], [13.595945672264433, 48.877171942737135], [13.031328973043427, 49.307068182973232], [12.52102420416119, 49.54741526956272], [12.415190870827441, 49.96912079528056], [12.240111118222556, 50.266337795607271], [12.96683678554319, 50.484076443069071], [13.338131951560282, 50.733234361364346], [14.05622765468817, 50.926917629594286], [14.307013380600633, 51.117267767941399], [14.570718214586062, 51.002339382524262], [15.016995883858666, 51.106674099321566], [15.490972120839725, 50.7847299261432], [16.238626743238566, 50.697732652379827], [16.176253289462263, 50.4226073268579], [16.719475945714429, 50.215746568393527], [16.868769158605655, 50.473973700556016], [17.554567091551117, 50.36214590107641], [17.649445021238986, 50.049038397819942], [18.392913852622168, 49.988628648470737], [18.85314415861361, 49.496229763377634], [18.554971144289478, 49.495015367218777], [18.399993523846174, 49.315000515330034], [18.170498488037961, 49.271514797556421], [18.104972771891848, 49.043983466175298], [17.913511590250462, 48.996492824899072], [17.886484816161808, 48.903475246773695], [17.545006951577101, 48.800019029325362], [17.101984897538895, 48.8169688991171], [16.960288120194573, 48.596982326850593]]] } }, + { "type": "Feature", "properties": { "admin": "Germany", "name": "Germany", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[9.92190636560923, 54.983104153048025], [9.939579705452898, 54.596641954153242], [10.950112338920517, 54.363607082733147], [10.939466993868447, 54.008693345752583], [11.95625247564328, 54.196485500701144], [12.518440382546711, 54.470370591847988], [13.647467075259495, 54.075510972705885], [14.119686313542555, 53.757029120491026], [14.353315463934164, 53.248171291713092], [14.074521111719431, 52.981262518925334], [14.437599725002197, 52.62485016540829], [14.685026482815713, 52.089947414755208], [14.607098422919645, 51.745188096719964], [15.016995883858781, 51.106674099321701], [14.570718214586119, 51.002339382524369], [14.307013380600662, 51.117267767941364], [14.05622765468831, 50.92691762959435], [13.338131951560397, 50.733234361364268], [12.966836785543249, 50.484076443069164], [12.240111118222668, 50.266337795607214], [12.41519087082747, 49.969120795280602], [12.521024204161332, 49.547415269562741], [13.031328973043513, 49.307068182973232], [13.595945672264575, 48.877171942737156], [13.243357374737112, 48.416114813829026], [12.884102817443873, 48.289145819687846], [13.025851271220514, 47.637583523135945], [12.93262698736606, 47.467645575543983], [12.620759718484519, 47.672387600284409], [12.141357456112869, 47.703083401065768], [11.426414015354847, 47.523766181013045], [10.544504021861597, 47.566399237653783], [10.402083774465321, 47.302487697939164], [9.896068149463188, 47.58019684507569], [9.594226108446376, 47.525058091820185], [8.522611932009793, 47.830827541691342], [8.317301466514092, 47.613579820336263], [7.466759067422286, 47.620581976911907], [7.59367638513106, 48.333019110703724], [8.099278598674855, 49.017783515003423], [6.658229607783709, 49.201958319691627], [6.186320428094176, 49.4638028021145], [6.242751092156992, 49.90222565367872], [6.043073357781109, 50.128051662794221], [6.156658155958779, 50.803721015010574], [5.988658074577812, 51.85161570902504], [6.589396599970825, 51.85202912048338], [6.842869500362381, 52.228440253297542], [7.092053256873895, 53.14404328064488], [6.905139601274128, 53.482162177130633], [7.100424838905268, 53.693932196662658], [7.936239454793961, 53.748295803433777], [8.121706170289483, 53.527792466844275], [8.800734490604667, 54.02078563090889], [8.572117954145368, 54.395646470754045], [8.526229282270206, 54.962743638725144], [9.282048780971136, 54.830865383516297], [9.92190636560923, 54.983104153048025]]] } }, + { "type": "Feature", "properties": { "admin": "Djibouti", "name": "Djibouti", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[43.081226027200152, 12.699638576707112], [43.317852410664663, 12.390148423711022], [43.286381463398911, 11.974928290245883], [42.715873650896519, 11.735640570518338], [43.145304803242126, 11.462039699748853], [42.776851841000948, 10.926878566934416], [42.55493000000012, 11.105110000000193], [42.314140000000116, 11.0342], [41.755570000000191, 11.05091], [41.739590000000177, 11.355110000000137], [41.661760000000122, 11.6312], [42.000000000000107, 12.100000000000133], [42.351560000000106, 12.54223000000013], [42.779642368344739, 12.455415757695672], [43.081226027200152, 12.699638576707112]]] } }, + { "type": "Feature", "properties": { "admin": "Denmark", "name": "Denmark", "continent": "Europe" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[12.690006137755629, 55.60999095318077], [12.089991082414738, 54.800014553437919], [11.043543328504226, 55.36486379660424], [10.90391360845163, 55.779954738988735], [12.370904168353288, 56.111407375708822], [12.690006137755629, 55.60999095318077]]], [[[10.912181837618359, 56.4586213242779], [10.667803989309986, 56.081383368547208], [10.369992710011983, 56.190007229224719], [9.649984978889306, 55.469999498102041], [9.921906365609173, 54.983104153048046], [9.282048780971136, 54.830865383516155], [8.526229282270235, 54.962743638724973], [8.120310906617588, 55.517722683323612], [8.089976840862247, 56.540011705137587], [8.256581658571262, 56.809969387430286], [8.543437534223385, 57.110002753316891], [9.424469028367609, 57.172066148499468], [9.775558709358561, 57.447940782289649], [10.580005730846151, 57.730016587954843], [10.54610599126269, 57.21573273378614], [10.250000034230222, 56.890016181050456], [10.369992710011983, 56.60998159446082], [10.912181837618359, 56.4586213242779]]]] } }, + { "type": "Feature", "properties": { "admin": "Dominican Republic", "name": "Dominican Rep.", "continent": "North America" }, "geometry": { "type": "Polygon", "coordinates": [[[-71.71236141629295, 19.714455878167353], [-71.587304450146604, 19.884910590082093], [-70.806706102161726, 19.880285549391981], [-70.214364997016119, 19.622885240146157], [-69.950815192327568, 19.647999986240002], [-69.769250047470067, 19.293267116772437], [-69.222125820579862, 19.313214219637096], [-69.254346076113819, 19.015196234609871], [-68.809411994080818, 18.979074408437846], [-68.317943284768958, 18.612197577381689], [-68.689315965434503, 18.205142320218609], [-69.164945848248905, 18.422648423735108], [-69.623987596297624, 18.380712998930246], [-69.952933926051529, 18.428306993071057], [-70.133232998317879, 18.245915025296892], [-70.517137213814195, 18.184290879788829], [-70.669298468697619, 18.42688589118303], [-70.999950120717173, 18.283328762276206], [-71.400209927033885, 17.598564357976596], [-71.657661912712001, 17.757572740138695], [-71.708304816358037, 18.044997056546091], [-71.687737596305865, 18.316660061104468], [-71.945112067335543, 18.616900132720257], [-71.701302659782485, 18.785416978424049], [-71.624873216422813, 19.169837958243303], [-71.71236141629295, 19.714455878167353]]] } }, + { "type": "Feature", "properties": { "admin": "Algeria", "name": "Algeria", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[11.99950564947161, 23.471668402596443], [8.572893100629782, 21.565660712159136], [5.677565952180684, 19.601206976799713], [4.267419467800038, 19.155265204336995], [3.158133172222704, 19.057364203360034], [3.146661004253899, 19.693578599521441], [2.683588494486428, 19.856230170160114], [2.060990838233919, 20.142233384679482], [1.823227573259032, 20.61080943448604], [-1.550054897457613, 22.792665920497377], [-4.92333736817423, 24.974574082940993], [-8.684399786809051, 27.395744126895998], [-8.66512447756419, 27.58947907155822], [-8.665589565454805, 27.656425889592349], [-8.674116176782972, 28.841288967396572], [-7.059227667661928, 29.579228420524522], [-6.060632290053772, 29.731699734001687], [-5.242129278982786, 30.000443020135581], [-4.859646165374469, 30.501187649043839], [-3.690441046554695, 30.896951605751152], [-3.647497931320145, 31.637294012980668], [-3.068980271812647, 31.724497992473207], [-2.616604783529567, 32.094346218386143], [-1.30789913573787, 32.262888902306095], [-1.124551153966308, 32.651521511357124], [-1.388049282222567, 32.864015000941301], [-1.733454555661467, 33.91971283623198], [-1.792985805661686, 34.527918606091198], [-2.169913702798624, 35.168396307916673], [-1.208602871089056, 35.71484874118709], [-0.127454392894606, 35.888662421200799], [0.503876580415209, 36.301272894835272], [1.466918572606545, 36.605647081034398], [3.161698846050824, 36.783904934225205], [4.815758090849129, 36.865036932923452], [5.320120070017792, 36.716518866516616], [6.261819695672611, 37.110655015606731], [7.330384962603969, 37.118380642234364], [7.737078484741003, 36.885707505840209], [8.420964389691674, 36.946427313783154], [8.217824334352313, 36.433176988260271], [8.376367628623766, 35.479876003555937], [8.140981479534302, 34.655145982393783], [7.524481642292242, 34.097376410451453], [7.612641635782181, 33.344114895148955], [8.430472853233367, 32.748337307255944], [8.439102817426116, 32.506284898400814], [9.055602654668148, 32.102691962201284], [9.482139926805273, 30.307556057246181], [9.805634392952411, 29.424638373323383], [9.859997999723443, 28.959989732371007], [9.683884718472765, 28.144173895779193], [9.756128370816779, 27.688258571884141], [9.629056023811073, 27.140953477480913], [9.716285841519747, 26.512206325785691], [9.319410841518161, 26.094324856057447], [9.910692579801774, 25.365454616796733], [9.948261346077969, 24.93695364023251], [10.30384687667836, 24.37931325937091], [10.771363559622925, 24.562532050061744], [11.560669386449002, 24.097909247325511], [11.99950564947161, 23.471668402596443]]] } }, + { "type": "Feature", "properties": { "admin": "Ecuador", "name": "Ecuador", "continent": "South America" }, "geometry": { "type": "Polygon", "coordinates": [[[-80.302560594387188, -3.404856459164712], [-79.770293341780913, -2.65751189535964], [-79.986559210922394, -2.220794366061014], [-80.368783942369234, -2.685158786635788], [-80.967765469064332, -2.246942640800703], [-80.764806281238023, -1.965047702648532], [-80.933659023751702, -1.057454522306358], [-80.583370327461239, -0.906662692878683], [-80.39932471385373, -0.283703301600141], [-80.020898200180355, 0.360340074053468], [-80.090609707342097, 0.768428859862396], [-79.542762010399784, 0.982937730305963], [-78.855258755188686, 1.380923773601822], [-77.855061408179509, 0.809925034992773], [-77.668612840470416, 0.825893052570961], [-77.424984300430367, 0.395686753741117], [-76.576379767549383, 0.256935533037435], [-76.292314419240938, 0.416047268064119], [-75.801465827116587, 0.084801337073202], [-75.373223232713841, -0.15203175212045], [-75.233722703741932, -0.911416924649529], [-75.544995693652027, -1.56160979574588], [-76.635394253226707, -2.608677666843817], [-77.83790483265858, -3.003020521663103], [-78.450683966775628, -3.873096612161375], [-78.639897223612323, -4.547784112164072], [-79.205289069317715, -4.959128513207388], [-79.62497921417615, -4.454198093283494], [-80.028908047185581, -4.346090996928893], [-80.442241990872134, -4.425724379090673], [-80.46929460317692, -4.059286797708999], [-80.184014858709645, -3.821161797708043], [-80.302560594387188, -3.404856459164712]]] } }, + { "type": "Feature", "properties": { "admin": "Egypt", "name": "Egypt", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[34.9226, 29.50133], [34.64174, 29.09942], [34.42655, 28.34399], [34.15451, 27.8233], [33.92136, 27.6487], [33.58811, 27.97136], [33.13676, 28.41765], [32.42323, 29.85108], [32.32046, 29.76043], [32.73482, 28.70523], [33.34876, 27.69989], [34.10455, 26.14227], [34.47387, 25.59856], [34.79507, 25.03375], [35.69241, 23.92671], [35.49372, 23.75237], [35.52598, 23.10244], [36.69069, 22.20485], [36.86623, 22.0], [32.9, 22.0], [29.02, 22.0], [25.0, 22.0], [25.0, 25.682499996360992], [25.0, 29.238654529533452], [24.70007, 30.04419], [24.95762, 30.6616], [24.80287, 31.08929], [25.16482, 31.56915], [26.49533, 31.58568], [27.45762, 31.32126], [28.45048, 31.02577], [28.91353, 30.87005], [29.68342, 31.18686], [30.09503, 31.4734], [30.97693, 31.55586], [31.68796, 31.4296], [31.96041, 30.9336], [32.19247, 31.26034], [32.99392, 31.02407], [33.7734, 30.96746], [34.26544, 31.21936], [34.9226, 29.50133]]] } }, + { "type": "Feature", "properties": { "admin": "Eritrea", "name": "Eritrea", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[42.351560000000106, 12.54223000000013], [42.00975, 12.86582], [41.59856, 13.452090000000108], [41.15519371924983, 13.773319810435224], [40.8966, 14.118640000000138], [40.026218702969167, 14.519579169162281], [39.34061, 14.53155], [39.0994, 14.74064], [38.51295, 14.50547], [37.90607, 14.959430000000165], [37.59377, 14.2131], [36.42951, 14.42211], [36.323188917798113, 14.822480577041057], [36.753860304518575, 16.291874091044289], [36.852530000000108, 16.95655], [37.16747, 17.263140000000128], [37.904000000000103, 17.42754], [38.410089959473218, 17.998307399970312], [38.990622999839999, 16.84062612555169], [39.266110060388016, 15.922723496967246], [39.814293654140208, 15.435647284400314], [41.179274936697645, 14.491079616753209], [41.734951613132345, 13.921036892141554], [42.276830682144848, 13.34399201095442], [42.589576450375255, 13.000421250861901], [43.081226027200152, 12.699638576707112], [42.779642368344739, 12.455415757695672], [42.351560000000106, 12.54223000000013]]] } }, + { "type": "Feature", "properties": { "admin": "Spain", "name": "Spain", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[-9.034817674180244, 41.880570583659669], [-8.98443315269567, 42.592775173506261], [-9.392883673530644, 43.026624660812686], [-7.978189663108308, 43.748337714200979], [-6.754491746436754, 43.567909450853918], [-5.411886359061596, 43.574239813809669], [-4.347842779955783, 43.403449205085025], [-3.51753170410609, 43.455900783861296], [-1.901351284177764, 43.422802028978332], [-1.502770961910528, 43.034014390630425], [0.338046909190581, 42.579546006839543], [0.701590610363894, 42.795734361332599], [1.826793247087153, 42.343384711265678], [2.985998976258457, 42.473015041669854], [3.039484083680548, 41.892120266276891], [2.091841668312184, 41.226088568683082], [0.810524529635188, 41.014731960609332], [0.721331007499401, 40.678318386389229], [0.106691521819869, 40.123933620762003], [-0.278711310212941, 39.309978135732713], [0.111290724293838, 38.738514309233032], [-0.467123582349103, 38.292365831041138], [-0.683389451490598, 37.642353827457811], [-1.438382127274849, 37.443063666324214], [-2.146452602538119, 36.674144192037282], [-3.415780808923386, 36.658899644511173], [-4.368900926114718, 36.677839056946141], [-4.995219285492211, 36.32470815687963], [-5.377159796561457, 35.946850083961458], [-5.866432257500902, 36.02981659600605], [-6.236693894872174, 36.367677110330327], [-6.520190802425402, 36.942913316387312], [-7.45372555177809, 37.097787583966053], [-7.537105475281022, 37.428904323876232], [-7.166507941099863, 37.803894354802217], [-7.029281175148794, 38.075764065089757], [-7.374092169616317, 38.373058580064914], [-7.098036668313126, 39.03007274022378], [-7.498632371439724, 39.629571031241802], [-7.066591559263527, 39.711891587882768], [-7.026413133156593, 40.184524237624238], [-6.864019944679383, 40.330871893874821], [-6.851126674822551, 41.111082668617513], [-6.389087693700914, 41.381815497394641], [-6.668605515967655, 41.883386949219577], [-7.251308966490822, 41.91834605566504], [-7.422512986673794, 41.792074693359822], [-8.01317460776991, 41.790886135417118], [-8.26385698081779, 42.280468654950326], [-8.671945766626719, 42.134689439454952], [-9.034817674180244, 41.880570583659669]]] } }, + { "type": "Feature", "properties": { "admin": "Estonia", "name": "Estonia", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[24.312862583114615, 57.793423570376966], [24.428927850042154, 58.383413397853275], [24.061198357853179, 58.257374579493394], [23.426560092876681, 58.612753404364618], [23.339795363058641, 59.187240302153363], [24.604214308376182, 59.465853786855007], [25.864189080516631, 59.611090399811324], [26.949135776484518, 59.445803331125767], [27.981114129353237, 59.47538808861286], [28.131699253051742, 59.300825100330904], [27.420166456824941, 58.724581203844224], [27.716685825315714, 57.791899115624354], [27.288184848751509, 57.474528306703817], [26.46353234223778, 57.476388658266316], [25.602809685984365, 57.847528794986559], [25.164593540149262, 57.970156968815175], [24.312862583114615, 57.793423570376966]]] } }, + { "type": "Feature", "properties": { "admin": "Ethiopia", "name": "Ethiopia", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[37.90607, 14.959430000000165], [38.51295, 14.50547], [39.0994, 14.74064], [39.34061, 14.53155], [40.026250000000111, 14.51959], [40.8966, 14.118640000000138], [41.1552, 13.77333], [41.59856, 13.452090000000108], [42.00975, 12.86582], [42.351560000000106, 12.54223000000013], [42.000000000000107, 12.100000000000133], [41.661760000000122, 11.6312], [41.739590000000177, 11.355110000000137], [41.755570000000191, 11.05091], [42.314140000000116, 11.0342], [42.55493000000012, 11.105110000000193], [42.776851841000948, 10.926878566934416], [42.55876, 10.572580000000126], [42.92812, 10.021940000000139], [43.29699, 9.540480000000169], [43.67875, 9.183580000000116], [46.94834, 7.99688], [47.78942, 8.003], [44.9636, 5.001620000000115], [43.66087, 4.95755], [42.769670000000119, 4.252590000000223], [42.12861, 4.234130000000163], [41.855083092644108, 3.918911920483764], [41.171800000000125, 3.91909], [40.768480000000118, 4.257020000000124], [39.854940000000106, 3.83879000000013], [39.559384258765917, 3.422060000000215], [38.89251, 3.50074], [38.67114, 3.61607], [38.436970000000137, 3.58851], [38.120915000000132, 3.598605], [36.85509323800823, 4.447864127672857], [36.159078632855646, 4.447864127672857], [35.817447662353622, 4.776965663462021], [35.817447662353622, 5.338232082790852], [35.298007118233095, 5.506], [34.70702, 6.59422000000012], [34.25032, 6.82607], [34.075100000000184, 7.22595], [33.56829, 7.71334], [32.954180000000228, 7.7849700000001], [33.294800000000116, 8.35458], [33.82550000000014, 8.37916], [33.97498, 8.684560000000145], [33.96162, 9.58358], [34.25745, 10.63009], [34.73115000000012, 10.910170000000106], [34.831630000000125, 11.318960000000116], [35.26049, 12.08286], [35.863630000000164, 12.57828], [36.27022, 13.563330000000118], [36.42951, 14.42211], [37.59377, 14.2131], [37.90607, 14.959430000000165]]] } }, + { "type": "Feature", "properties": { "admin": "Finland", "name": "Finland", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[28.591929559043187, 69.064776923286644], [28.445943637818651, 68.36461294216403], [29.9774263852206, 67.698297024192641], [29.054588657352319, 66.944286200621917], [30.21765, 65.80598], [29.544429559046982, 64.948671576590471], [30.444684686003704, 64.204453436939076], [30.035872430142714, 63.552813625738544], [31.516092156711117, 62.867687486412869], [31.139991082490891, 62.357692776124395], [30.211107212044443, 61.780027777749673], [28.06999759289527, 60.503516547275829], [26.25517296723697, 60.423960679762487], [24.496623976344516, 60.057316392651636], [22.869694858499454, 59.846373196036211], [22.290763787533589, 60.391921291741525], [21.322244093519313, 60.720169989659503], [21.544866163832687, 61.705329494871783], [21.059211053153682, 62.607393296958726], [21.536029493910799, 63.189735012455863], [22.442744174903986, 63.817810370531276], [24.730511508897528, 64.902343655040823], [25.398067661243939, 65.111426500093728], [25.2940430030404, 65.53434642197044], [23.903378533633795, 66.006927395279604], [23.565879754335576, 66.396050930437411], [23.539473097434435, 67.936008612735236], [21.978534783626113, 68.616845608180682], [20.645592889089521, 69.106247260200846], [21.244936150810666, 69.370443020293067], [22.356237827247405, 68.841741441514898], [23.662049594830751, 68.891247463650529], [24.735679152126721, 68.649556789821446], [25.689212680776361, 69.092113755969024], [26.179622023226241, 69.825298977326113], [27.732292107867856, 70.164193020296239], [29.015572950971968, 69.766491197377974], [28.591929559043187, 69.064776923286644]]] } }, + { "type": "Feature", "properties": { "admin": "Fiji", "name": "Fiji", "continent": "Oceania" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[178.3736, -17.33992], [178.71806, -17.62846], [178.55271, -18.15059], [177.93266, -18.28799], [177.38146, -18.16432], [177.28504, -17.72465], [177.67087, -17.38114], [178.12557, -17.50481], [178.3736, -17.33992]]], [[[179.364142661964223, -16.801354076946847], [178.725059362997058, -17.012041674368017], [178.596838595117021, -16.63915], [179.096609362997128, -16.43398427754742], [179.413509362997075, -16.379054277547393], [180.000000000000114, -16.067132663642436], [180.000000000000114, -16.555216566639157], [179.364142661964223, -16.801354076946847]]], [[[-179.917369384765237, -16.501783135649358], [-180.0, -16.555216566639157], [-180.0, -16.067132663642436], [-179.793320109048551, -16.020882256741228], [-179.917369384765237, -16.501783135649358]]]] } }, + { "type": "Feature", "properties": { "admin": "Falkland Islands", "name": "Falkland Is.", "continent": "South America" }, "geometry": { "type": "Polygon", "coordinates": [[[-61.2, -51.85], [-60.0, -51.25], [-59.15, -51.5], [-58.55, -51.1], [-57.75, -51.55], [-58.05, -51.9], [-59.4, -52.2], [-59.85, -51.85], [-60.7, -52.3], [-61.2, -51.85]]] } }, + { "type": "Feature", "properties": { "admin": "France", "name": "France", "continent": "Europe" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[-52.556424730018378, 2.504705308437053], [-52.939657151894963, 2.124857692875622], [-53.41846513529525, 2.053389187016037], [-53.554839240113481, 2.334896551925964], [-53.778520677288881, 2.376702785650053], [-54.088062506717264, 2.105556545414629], [-54.524754197799737, 2.311848863123785], [-54.271229620975781, 2.738747870286942], [-54.184284023644743, 3.194172268075234], [-54.011503872276812, 3.622569891774857], [-54.3995422023565, 4.212611395683481], [-54.478632981979203, 4.896755682795642], [-53.958044603070917, 5.756548163267808], [-53.618452928264837, 5.646529038918401], [-52.882141282754063, 5.409850979021598], [-51.823342861525916, 4.565768133966144], [-51.657797410678874, 4.156232408053028], [-52.249337531123977, 3.241094468596287], [-52.556424730018378, 2.504705308437053]]], [[[9.560016310269132, 42.152491970379558], [9.229752231491771, 41.380006822264441], [8.77572309737536, 41.583611965494427], [8.544212680707828, 42.256516628583078], [8.746009148807586, 42.628121853193946], [9.390000848028901, 43.009984849614725], [9.560016310269132, 42.152491970379558]]], [[[3.588184441755714, 50.378992418003563], [4.28602298342514, 49.90749664977254], [4.799221632515752, 49.985373033236314], [5.674051954784885, 49.529483547557433], [5.897759230176375, 49.442667141307155], [6.186320428094204, 49.463802802114444], [6.658229607783538, 49.201958319691549], [8.09927859867477, 49.017783515003366], [7.59367638513106, 48.333019110703724], [7.466759067422228, 47.620581976911851], [7.192202182655533, 47.449765529970982], [6.736571079138086, 47.541801255882874], [6.768713820023634, 47.287708238303672], [6.037388950228971, 46.725778713561894], [6.022609490593566, 46.272989813820502], [6.500099724970453, 46.429672756529428], [6.84359297041456, 45.991146552100659], [6.80235517744566, 45.708579820328673], [7.096652459347835, 45.333098863295859], [6.749955275101711, 45.028517971367584], [7.007562290076661, 44.254766750661382], [7.549596388386161, 44.127901109384808], [7.435184767291841, 43.693844916349164], [6.529245232783068, 43.12889232031835], [4.556962517931395, 43.399650987311581], [3.100410597352719, 43.075200507167118], [2.985998976258486, 42.473015041669882], [1.826793247087181, 42.343384711265649], [0.701590610363922, 42.795734361332642], [0.338046909190581, 42.57954600683955], [-1.502770961910471, 43.034014390630482], [-1.901351284177735, 43.422802028978332], [-1.384225226232956, 44.022610378590166], [-1.193797573237361, 46.014917710954862], [-2.225724249673788, 47.064362697938201], [-2.963276129559573, 47.570326646507958], [-4.491554938159481, 47.95495433205641], [-4.592349819344746, 48.68416046812694], [-3.295813971357745, 48.901692409859628], [-1.616510789384932, 48.644421291694577], [-1.933494025063254, 49.776341864615759], [-0.98946895995536, 49.347375800160869], [1.338761020522753, 50.127173163445256], [1.6390010921385, 50.9466063502975], [2.51357303224617, 51.14850617126185], [2.65842207196033, 50.796848049515646], [3.123251580425716, 50.780363267614504], [3.588184441755714, 50.378992418003563]]]] } }, + { "type": "Feature", "properties": { "admin": "Gabon", "name": "Gabon", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[11.093772820691923, -3.978826592630546], [10.066135288135738, -2.969482517105681], [9.405245395554969, -2.144313246269042], [8.797995639693168, -1.111301364754496], [8.830086704146423, -0.779073581550037], [9.048419630579586, -0.459351494960217], [9.291350538783687, 0.268666083167687], [9.492888624721981, 1.010119533691494], [9.83028405115564, 1.067893784993799], [11.285078973036461, 1.057661851400013], [11.276449008843711, 2.261050930180871], [11.751665480199787, 2.326757513839993], [12.359380323952218, 2.19281220133945], [12.951333855855605, 2.321615708826939], [13.07582238124675, 2.267097072759014], [13.003113641012074, 1.830896307783319], [13.282631463278816, 1.31418366129688], [14.026668735417214, 1.395677395021153], [14.276265903386953, 1.196929836426619], [13.843320753645653, 0.038757635901149], [14.316418491277741, -0.552627455247048], [14.425455763413593, -1.333406670744971], [14.299210239324564, -1.998275648612213], [13.992407260807706, -2.470804945489099], [13.109618767965626, -2.428740329603513], [12.575284458067639, -1.948511244315134], [12.495702752338159, -2.391688327650242], [11.820963575903189, -2.514161472181982], [11.478038771214299, -2.765618991714241], [11.855121697648114, -3.42687061932105], [11.093772820691923, -3.978826592630546]]] } }, + { "type": "Feature", "properties": { "admin": "United Kingdom", "name": "United Kingdom", "continent": "Europe" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[-5.661948614921896, 54.554603176483838], [-6.197884894220976, 53.867565009163329], [-6.953730231137994, 54.073702297575622], [-7.572167934591078, 54.059956366585979], [-7.366030646178785, 54.595840969452688], [-7.572167934591078, 55.131622219454883], [-6.733847011736144, 55.172860012423783], [-5.661948614921896, 54.554603176483838]]], [[[-3.00500484863528, 58.635000108466322], [-4.073828497728015, 57.55302480735525], [-3.055001796877661, 57.690019029360933], [-1.959280564776918, 57.684799709699512], [-2.219988165689301, 56.870017401753515], [-3.119003058271118, 55.97379303651546], [-2.085009324543023, 55.909998480851264], [-2.005675679673856, 55.804902850350217], [-1.11499101399221, 54.624986477265388], [-0.4304849918542, 54.464376125702145], [0.184981316742039, 53.325014146531018], [0.469976840831777, 52.929999498091959], [1.681530795914739, 52.739520168663987], [1.559987827164377, 52.099998480836], [1.050561557630914, 51.806760565795678], [1.4498653499503, 51.289427802121949], [0.550333693045502, 50.765738837275862], [-0.787517462558639, 50.774988918656206], [-2.489997524414377, 50.500018622431227], [-2.956273972984035, 50.696879991247002], [-3.617448085942327, 50.228355617872708], [-4.542507900399243, 50.341837063185658], [-5.245023159191134, 49.959999904981082], [-5.776566941745299, 50.159677639356815], [-4.309989793301837, 51.210001125689146], [-3.414850633142122, 51.426008612669236], [-3.422719467108322, 51.426848167406078], [-4.984367234710873, 51.593466091510962], [-5.267295701508885, 51.991400458374571], [-4.222346564134852, 52.30135569926135], [-4.770013393564112, 52.840004991255611], [-4.579999152026914, 53.495003770555165], [-3.093830673788658, 53.404547400669671], [-3.092079637047106, 53.404440822963544], [-2.945008510744343, 53.98499970154667], [-3.614700825433033, 54.60093677329256], [-3.63000545898933, 54.615012925833], [-4.844169073903003, 54.790971177786837], [-5.082526617849224, 55.061600653699358], [-4.719112107756643, 55.508472601943467], [-5.047980922862108, 55.783985500707516], [-5.586397670911139, 55.311146145236805], [-5.64499874513018, 56.275014960344791], [-6.149980841486352, 56.785009670633528], [-5.78682471355529, 57.818848375064633], [-5.009998745127574, 58.630013332750039], [-4.211494513353555, 58.550845038479153], [-3.00500484863528, 58.635000108466322]]]] } }, + { "type": "Feature", "properties": { "admin": "Georgia", "name": "Georgia", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[41.55408410011065, 41.535656236327561], [41.703170607272703, 41.962942816732912], [41.453470086438379, 42.645123399417926], [40.875469191253785, 43.013628038091277], [40.321394484220313, 43.128633938156831], [39.955008579270917, 43.434997666999216], [40.07696495947976, 43.553104153002309], [40.922184686045618, 43.38215851498078], [42.394394565608806, 43.220307929042619], [43.756016880067378, 42.74082815202248], [43.931199985536828, 42.554973863284758], [44.537622918481979, 42.71199270280362], [45.470279168485703, 42.502780666669963], [45.776410353382758, 42.09244395605635], [46.404950799348818, 41.860675157227298], [46.145431756379004, 41.722802435872573], [46.637908156120574, 41.181672675128219], [46.501637404166921, 41.064444688474104], [45.962600538930381, 41.123872585609767], [45.217426385281577, 41.411451931314041], [44.972480096218071, 41.248128567055588], [43.582745802592726, 41.09214325618256], [42.619548781104484, 41.583172715819934], [41.55408410011065, 41.535656236327561]]] } }, + { "type": "Feature", "properties": { "admin": "Ghana", "name": "Ghana", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[1.060121697604927, 5.928837388528875], [-0.507637905265938, 5.343472601742675], [-1.063624640294193, 5.000547797053811], [-1.964706590167594, 4.71046214438337], [-2.856125047202397, 4.994475816259508], [-2.810701463217839, 5.389051215024109], [-3.244370083011261, 6.2504715031135], [-2.983584967450326, 7.379704901555511], [-2.56218950032624, 8.219627793811481], [-2.827496303712706, 9.642460842319775], [-2.963896246747111, 10.395334784380081], [-2.94040930827046, 10.962690334512557], [-1.203357713211431, 11.009819240762736], [-0.761575893548183, 10.936929633015053], [-0.438701544588582, 11.09834096927872], [0.023802524423701, 11.018681748900802], [-0.049784715159944, 10.706917832883928], [0.367579990245389, 10.191212876827176], [0.365900506195885, 9.46500397382948], [0.461191847342121, 8.677222601756013], [0.712029249686878, 8.312464504423827], [0.490957472342245, 7.411744289576474], [0.570384148774849, 6.914358628767188], [0.836931186536333, 6.279978745952147], [1.060121697604927, 5.928837388528875]]] } }, + { "type": "Feature", "properties": { "admin": "Guinea", "name": "Guinea", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[-8.439298468448696, 7.686042792181736], [-8.722123582382123, 7.711674302598509], [-8.926064622422002, 7.309037380396375], [-9.208786383490844, 7.313920803247952], [-9.403348151069748, 7.526905218938906], [-9.33727983238458, 7.928534450711351], [-9.755342169625832, 8.541055202666923], [-10.016566534861253, 8.42850393313523], [-10.230093553091276, 8.406205552601291], [-10.505477260774667, 8.348896389189603], [-10.494315151399629, 8.715540676300433], [-10.65477047366589, 8.977178452994194], [-10.622395188835037, 9.267910061068276], [-10.839151984083299, 9.688246161330367], [-11.117481248407328, 10.045872911006283], [-11.917277390988655, 10.046983954300556], [-12.150338100625003, 9.858571682164378], [-12.425928514037562, 9.835834051955953], [-12.596719122762206, 9.620188300001969], [-12.711957566773076, 9.342711696810765], [-13.246550258832512, 8.903048610871506], [-13.685153977909788, 9.494743760613458], [-14.074044969122278, 9.886166897008248], [-14.330075852912367, 10.015719712763966], [-14.579698859098254, 10.214467271358513], [-14.693231980843501, 10.65630076745404], [-14.83955379887794, 10.876571560098139], [-15.130311245168167, 11.040411688679525], [-14.685687221728896, 11.527823798056485], [-14.382191534878727, 11.509271958863691], [-14.121406419317776, 11.677117010947693], [-13.900799729863772, 11.678718980348744], [-13.743160773157411, 11.811269029177408], [-13.828271857142122, 12.142644151249041], [-13.718743658899511, 12.247185573775507], [-13.700476040084322, 12.586182969610192], [-13.217818162478235, 12.575873521367964], [-12.499050665730561, 12.332089952031053], [-12.278599005573438, 12.354440008997285], [-12.20356482588563, 12.465647691289401], [-11.658300950557928, 12.386582749882834], [-11.513942836950587, 12.442987575729415], [-11.456168585648269, 12.076834214725336], [-11.297573614944508, 12.077971096235768], [-11.036555955438256, 12.211244615116513], [-10.870829637078211, 12.177887478072106], [-10.593223842806278, 11.923975328005977], [-10.165213792348835, 11.844083563682743], [-9.890992804392011, 12.060478623904968], [-9.567911749703212, 12.194243068892472], [-9.327616339546008, 12.334286200403451], [-9.127473517279581, 12.308060411015331], [-8.905264858424529, 12.088358059126433], [-8.786099005559462, 11.812560939984705], [-8.376304897484911, 11.393645941610627], [-8.581305304386772, 11.136245632364801], [-8.620321010767126, 10.810890814655181], [-8.407310756860026, 10.90925690352276], [-8.282357143578279, 10.792597357623842], [-8.335377163109738, 10.494811916541932], [-8.029943610048617, 10.206534939001711], [-8.22933712404682, 10.129020290563897], [-8.309616461612249, 9.789531968622439], [-8.079113735374348, 9.376223863152033], [-7.832100389019186, 8.575704250518625], [-8.203498907900878, 8.455453192575446], [-8.299048631208562, 8.316443589710302], [-8.221792364932197, 8.123328762235571], [-8.280703497744936, 7.687179673692156], [-8.439298468448696, 7.686042792181736]]] } }, + { "type": "Feature", "properties": { "admin": "Gambia", "name": "Gambia", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[-16.84152462408127, 13.151393947802557], [-16.713728807023468, 13.594958604379853], [-15.624596320039936, 13.623587347869556], [-15.398770310924457, 13.860368760630916], [-15.081735398813816, 13.876491807505982], [-14.687030808968483, 13.63035696049978], [-14.376713833055785, 13.625680243377371], [-14.046992356817478, 13.794067898000446], [-13.844963344772404, 13.505041612191999], [-14.277701788784553, 13.28058502853224], [-14.712197231494626, 13.298206691943774], [-15.141163295949463, 13.509511623585235], [-15.511812506562931, 13.278569647672864], [-15.691000535534991, 13.270353094938455], [-15.931295945692208, 13.130284125211331], [-16.84152462408127, 13.151393947802557]]] } }, + { "type": "Feature", "properties": { "admin": "Guinea Bissau", "name": "Guinea-Bissau", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[-15.130311245168167, 11.040411688679525], [-15.664180467175523, 11.458474025920792], [-16.085214199273562, 11.524594021038236], [-16.314786749730199, 11.806514797406548], [-16.308947312881227, 11.958701890506116], [-16.613838263403277, 12.170911159712698], [-16.67745195155457, 12.38485158940105], [-16.147716844130581, 12.547761542201185], [-15.816574266004251, 12.515567124883345], [-15.548476935274005, 12.628170070847343], [-13.700476040084322, 12.586182969610192], [-13.718743658899511, 12.247185573775507], [-13.828271857142122, 12.142644151249041], [-13.743160773157411, 11.811269029177408], [-13.900799729863772, 11.678718980348744], [-14.121406419317776, 11.677117010947693], [-14.382191534878727, 11.509271958863691], [-14.685687221728896, 11.527823798056485], [-15.130311245168167, 11.040411688679525]]] } }, + { "type": "Feature", "properties": { "admin": "Equatorial Guinea", "name": "Eq. Guinea", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[9.492888624721981, 1.010119533691494], [9.305613234096255, 1.160911363119183], [9.649158155972627, 2.283866075037735], [11.276449008843711, 2.261050930180871], [11.285078973036461, 1.057661851400013], [9.83028405115564, 1.067893784993799], [9.492888624721981, 1.010119533691494]]] } }, + { "type": "Feature", "properties": { "admin": "Greece", "name": "Greece", "continent": "Europe" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[23.699980096133, 35.705004380835526], [24.246665073348673, 35.368022365860149], [25.025015496528873, 35.424995632461979], [25.769207797964182, 35.354018052709073], [25.745023227651579, 35.179997666966209], [26.290002882601719, 35.299990342747911], [26.164997592887651, 35.004995429009789], [24.724982130642299, 34.919987697889603], [24.735007358506941, 35.084990546197581], [23.514978468528106, 35.27999156345097], [23.699980096133, 35.705004380835526]]], [[[26.604195590936282, 41.562114569661098], [26.294602085075777, 40.936261298174244], [26.056942172965499, 40.824123440100827], [25.44767703624418, 40.852545477861455], [24.925848422960932, 40.947061672523226], [23.714811232200809, 40.687129218095116], [24.407998894964063, 40.124992987624083], [23.89996788910258, 39.962005520175573], [23.342999301860797, 39.960997829745786], [22.813987664488959, 40.476005153966547], [22.626298862404777, 40.256561184239175], [22.849747755634805, 39.659310818025759], [23.350027296652595, 39.190011298167256], [22.97309939951554, 38.97090322524965], [23.53001631032495, 38.51000112563846], [24.025024855248937, 38.219992987616443], [24.040011020613601, 37.655014553369419], [23.115002882589145, 37.920011298162215], [23.409971958111065, 37.409990749657389], [22.77497195810863, 37.305010077456551], [23.154225294698612, 36.422505804992042], [22.4900281104511, 36.410000108377446], [21.670026482843692, 36.84498647719419], [21.295010613701574, 37.644989325504689], [21.120034213961329, 38.31032339126272], [20.730032179454579, 38.769985256498778], [20.217712029712853, 39.340234686839629], [20.150015903410516, 39.624997666984022], [20.615000441172779, 40.110006822259422], [20.67499677906363, 40.434999904943048], [20.999989861747274, 40.580003973953964], [21.020040317476422, 40.842726955725873], [21.674160597426969, 40.931274522457976], [22.055377638444266, 41.149865831052686], [22.597308383889008, 41.130487168943198], [22.76177, 41.3048], [22.952377150166562, 41.337993882811212], [23.692073601992455, 41.309080918943849], [24.492644891058031, 41.583896185872035], [25.19720136892553, 41.234485988930651], [26.106138136507177, 41.328898830727823], [26.11704186372091, 41.826904608724725], [26.604195590936282, 41.562114569661098]]]] } }, + { "type": "Feature", "properties": { "admin": "Greenland", "name": "Greenland", "continent": "North America" }, "geometry": { "type": "Polygon", "coordinates": [[[-46.76379, 82.62796], [-43.40644, 83.22516], [-39.89753, 83.18018], [-38.62214, 83.54905], [-35.08787, 83.64513], [-27.10046, 83.51966], [-20.84539, 82.72669], [-22.69182, 82.34165], [-26.51753, 82.29765], [-31.9, 82.2], [-31.39646, 82.02154], [-27.85666, 82.13178], [-24.84448, 81.78697], [-22.90328, 82.09317], [-22.07175, 81.73449], [-23.16961, 81.15271], [-20.62363, 81.52462], [-15.76818, 81.91245], [-12.77018, 81.71885], [-12.20855, 81.29154], [-16.28533, 80.58004], [-16.85, 80.35], [-20.04624, 80.17708], [-17.73035, 80.12912], [-18.9, 79.4], [-19.70499, 78.75128], [-19.67353, 77.63859], [-18.47285, 76.98565], [-20.03503, 76.94434], [-21.67944, 76.62795], [-19.83407, 76.09808], [-19.59896, 75.24838], [-20.66818, 75.15585], [-19.37281, 74.29561], [-21.59422, 74.22382], [-20.43454, 73.81713], [-20.76234, 73.46436], [-22.17221, 73.30955], [-23.56593, 73.30663], [-22.31311, 72.62928], [-22.29954, 72.18409], [-24.27834, 72.59788], [-24.79296, 72.3302], [-23.44296, 72.08016], [-22.13281, 71.46898], [-21.75356, 70.66369], [-23.53603, 70.471], [-24.30702, 70.85649], [-25.54341, 71.43094], [-25.20135, 70.75226], [-26.36276, 70.22646], [-23.72742, 70.18401], [-22.34902, 70.12946], [-25.02927, 69.2588], [-27.74737, 68.47046], [-30.67371, 68.12503], [-31.77665, 68.12078], [-32.81105, 67.73547], [-34.20196, 66.67974], [-36.35284, 65.9789], [-37.04378, 65.93768], [-38.37505, 65.69213], [-39.81222, 65.45848], [-40.66899, 64.83997], [-40.68281, 64.13902], [-41.1887, 63.48246], [-42.81938, 62.68233], [-42.41666, 61.90093], [-42.86619, 61.07404], [-43.3784, 60.09772], [-44.7875, 60.03676], [-46.26364, 60.85328], [-48.26294, 60.85843], [-49.23308, 61.40681], [-49.90039, 62.38336], [-51.63325, 63.62691], [-52.14014, 64.27842], [-52.27659, 65.1767], [-53.66166, 66.09957], [-53.30161, 66.8365], [-53.96911, 67.18899], [-52.9804, 68.35759], [-51.47536, 68.72958], [-51.08041, 69.14781], [-50.87122, 69.9291], [-52.013585, 69.574925], [-52.55792, 69.42616], [-53.45629, 69.283625], [-54.68336, 69.61003], [-54.75001, 70.28932], [-54.35884, 70.821315], [-53.431315, 70.835755], [-51.39014, 70.56978], [-53.10937, 71.20485], [-54.00422, 71.54719], [-55.0, 71.406536967272558], [-55.83468, 71.65444], [-54.71819, 72.58625], [-55.32634, 72.95861], [-56.12003, 73.64977], [-57.32363, 74.71026], [-58.59679, 75.09861], [-58.58516, 75.51727], [-61.26861, 76.10238], [-63.39165, 76.1752], [-66.06427, 76.13486], [-68.50438, 76.06141], [-69.66485, 76.37975], [-71.40257, 77.00857], [-68.77671, 77.32312], [-66.76397, 77.37595], [-71.04293, 77.63595], [-73.297, 78.04419], [-73.15938, 78.43271], [-69.37345, 78.91388], [-65.7107, 79.39436], [-65.3239, 79.75814], [-68.02298, 80.11721], [-67.15129, 80.51582], [-63.68925, 81.21396], [-62.23444, 81.3211], [-62.65116, 81.77042], [-60.28249, 82.03363], [-57.20744, 82.19074], [-54.13442, 82.19962], [-53.04328, 81.88833], [-50.39061, 82.43883], [-48.00386, 82.06481], [-46.59984, 81.985945], [-44.523, 81.6607], [-46.9007, 82.19979], [-46.76379, 82.62796]]] } }, + { "type": "Feature", "properties": { "admin": "Guatemala", "name": "Guatemala", "continent": "North America" }, "geometry": { "type": "Polygon", "coordinates": [[[-90.095554572290951, 13.73533763270073], [-90.608624030300817, 13.909771429901948], [-91.232410244496037, 13.927832342987953], [-91.689746670279106, 14.126218166556452], [-92.227750006869812, 14.538828640190925], [-92.203229539747298, 14.830102850804066], [-92.087215949252041, 15.064584662328436], [-92.229248623406249, 15.251446641495857], [-91.747960171255912, 16.066564846251719], [-90.464472622422647, 16.069562079324651], [-90.438866950222021, 16.410109768128091], [-90.600846727240906, 16.470777899638758], [-90.711821865587694, 16.687483018454724], [-91.081670091500641, 16.918476670799404], [-91.453921271515128, 17.252177232324168], [-91.002269253284197, 17.254657701074176], [-91.001519945015943, 17.817594916245707], [-90.067933519230948, 17.819326076727474], [-89.143080410503302, 17.808318996649316], [-89.15080603713092, 17.015576687075832], [-89.229121670269265, 15.886937567605166], [-88.930612759135244, 15.887273464415072], [-88.604586147805833, 15.706380113177358], [-88.518364020526846, 15.855389105690971], [-88.22502275262201, 15.727722479713901], [-88.680679694355618, 15.346247056535301], [-89.15481096063354, 15.066419175674806], [-89.225220099631244, 14.874286200413618], [-89.145535041037149, 14.67801911056908], [-89.353325975282772, 14.424132798719112], [-89.587342698916544, 14.362586167859485], [-89.5342193265205, 14.244815578666302], [-89.7219339668207, 14.134228013561694], [-90.064677903996568, 13.881969509328924], [-90.095554572290951, 13.73533763270073]]] } }, + { "type": "Feature", "properties": { "admin": "Guyana", "name": "Guyana", "continent": "South America" }, "geometry": { "type": "Polygon", "coordinates": [[[-59.758284878159181, 8.367034816924045], [-59.10168412945864, 7.99920197187049], [-58.482962205628041, 7.347691351750696], [-58.454876064677414, 6.832787380394463], [-58.078103196837361, 6.809093736188641], [-57.542218593970631, 6.321268215353355], [-57.147436489476874, 5.973149929219161], [-57.307245856339492, 5.073566595882225], [-57.914288906472123, 4.812626451024413], [-57.860209520078691, 4.576801052260449], [-58.044694383360664, 4.060863552258382], [-57.601568976457848, 3.334654649260684], [-57.281433478409703, 3.333491929534119], [-57.150097825739898, 2.768926906745406], [-56.53938574891454, 1.89952260986692], [-56.782704230360814, 1.863710842288653], [-57.33582292339689, 1.948537705895759], [-57.660971035377358, 1.682584947105638], [-58.113449876525003, 1.507195135907025], [-58.429477098205957, 1.46394196207872], [-58.540012986878288, 1.26808828369252], [-59.030861579002639, 1.317697658692722], [-59.646043667221242, 1.786893825686789], [-59.718545701726732, 2.249630438644359], [-59.974524909084543, 2.755232652188055], [-59.815413174057852, 3.606498521332085], [-59.538039923731219, 3.958802598481937], [-59.767405768458701, 4.423502915866606], [-60.111002366767373, 4.574966538914082], [-59.980958624904865, 5.014061184098138], [-60.213683437731319, 5.2444863956876], [-60.733574184803707, 5.2002772078619], [-61.410302903881941, 5.959068101419616], [-61.139415045807937, 6.234296779806142], [-61.159336310456467, 6.696077378766317], [-60.543999192940966, 6.856584377464881], [-60.295668097562377, 7.043911444522918], [-60.637972785063752, 7.414999904810853], [-60.550587938058186, 7.779602972846178], [-59.758284878159181, 8.367034816924045]]] } }, + { "type": "Feature", "properties": { "admin": "Honduras", "name": "Honduras", "continent": "North America" }, "geometry": { "type": "Polygon", "coordinates": [[[-87.316654425795463, 12.984685777229], [-87.48940873894712, 13.29753489832393], [-87.793111131526501, 13.384480495655165], [-87.723502977229288, 13.785050360565602], [-87.859515347021599, 13.893312486217097], [-88.065342576840109, 13.964625962779788], [-88.503997972349609, 13.845485948130939], [-88.541230841815931, 13.98015473068352], [-88.843072882832743, 14.140506700085208], [-89.058511929057644, 14.340029405164213], [-89.353325975282786, 14.424132798719084], [-89.145535041037164, 14.678019110569149], [-89.22522009963123, 14.874286200413675], [-89.154810960633526, 15.066419175674863], [-88.680679694355575, 15.346247056535386], [-88.225022752621925, 15.727722479714027], [-88.121153123715359, 15.688655096901355], [-87.901812506852394, 15.864458319558194], [-87.615680101252309, 15.878798529519198], [-87.522920905288444, 15.797278957578779], [-87.367762417332116, 15.846940009011286], [-86.903191291028165, 15.756712958229565], [-86.440945604177372, 15.782835394753189], [-86.119233974944322, 15.893448798073958], [-86.00195431185783, 16.005405788634388], [-85.68331743034625, 15.953651841693949], [-85.444003872402547, 15.885749009662444], [-85.182443610357183, 15.909158433490628], [-84.98372188997881, 15.995923163308698], [-84.526979743167118, 15.857223619037423], [-84.36825558138257, 15.835157782448729], [-84.063054572266807, 15.648244126849132], [-83.773976610026111, 15.42407176356687], [-83.410381232420363, 15.27090281825377], [-83.147219000974104, 14.995829169164207], [-83.489988776366005, 15.01626719813566], [-83.628584967772866, 14.880073960830368], [-83.975721401693576, 14.749435939996483], [-84.228341640952394, 14.748764146376626], [-84.449335903648588, 14.62161428472251], [-84.64958207877963, 14.666805324761865], [-84.820036790694289, 14.819586696832628], [-84.924500698572302, 14.790492865452332], [-85.052787441736868, 14.551541042534719], [-85.148750576502877, 14.560196844943615], [-85.165364549484806, 14.354369615125048], [-85.514413011400265, 14.079011745657905], [-85.698665330736944, 13.960078436737998], [-85.801294725268505, 13.8360549992376], [-86.096263800790595, 14.03818736414723], [-86.312142096689826, 13.771356106008223], [-86.520708177419891, 13.778487453664464], [-86.755086636079596, 13.754845485890936], [-86.733821784191463, 13.263092556201398], [-86.880557013684353, 13.254204209847213], [-87.005769009127434, 13.025794379117254], [-87.316654425795463, 12.984685777229]]] } }, + { "type": "Feature", "properties": { "admin": "Croatia", "name": "Croatia", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[18.829838087650039, 45.908877671891837], [19.072768995854172, 45.521511135432078], [19.390475701584588, 45.236515611342369], [19.005486281010118, 44.860233669609144], [18.553214145591646, 45.08158966733145], [17.861783481526398, 45.067740383477137], [17.00214603035101, 45.233776760430935], [16.534939406000202, 45.211607570977705], [16.318156772535868, 45.004126695325901], [15.959367303133373, 45.233776760430935], [15.750026075918978, 44.81871165626255], [16.239660271884528, 44.351143296885695], [16.456442905348862, 44.041239732431265], [16.916156447017325, 43.667722479825663], [17.297373488034449, 43.446340643887353], [17.674921502358981, 43.028562527023603], [18.56, 42.65], [18.450016310304814, 42.47999136002931], [17.509970330483323, 42.84999461523914], [16.930005730871638, 43.209998480800373], [16.015384555737679, 43.507215481127204], [15.174453973052094, 44.243191229827907], [15.376250441151793, 44.317915350922064], [14.920309279040504, 44.73848399512945], [14.901602410550874, 45.076060289076104], [14.258747592839992, 45.233776760430935], [13.952254672917032, 44.802123521496853], [13.65697553880119, 45.136935126315947], [13.679403110415816, 45.484149074884996], [13.715059848697248, 45.500323798192419], [14.411968214585496, 45.466165676447403], [14.595109490627916, 45.63494090431282], [14.935243767972961, 45.471695054702757], [15.327674594797424, 45.452316392593325], [15.323953891672428, 45.731782538427687], [15.671529575267638, 45.8341535507979], [15.768732944408608, 46.23810822202352], [16.564808383864939, 46.503750922219794], [16.882515089595412, 46.380631822284428], [17.630066359129554, 45.951769110694087], [18.456062452882858, 45.759481106136143], [18.829838087650039, 45.908877671891837]]] } }, + { "type": "Feature", "properties": { "admin": "Haiti", "name": "Haiti", "continent": "North America" }, "geometry": { "type": "Polygon", "coordinates": [[[-73.189790615517595, 19.915683905511909], [-72.579672817663607, 19.871500555902351], [-71.71236141629295, 19.714455878167353], [-71.624873216422813, 19.169837958243303], [-71.701302659782485, 18.785416978424049], [-71.945112067335543, 18.616900132720257], [-71.687737596305865, 18.316660061104468], [-71.708304816358037, 18.044997056546091], [-72.372476162389333, 18.214960842354053], [-72.844411180294856, 18.145611070218362], [-73.454554816365018, 18.217906398994696], [-73.922433234335642, 18.030992743395], [-74.458033616824764, 18.342549953682703], [-74.369925299767118, 18.664907538319408], [-73.449542202432696, 18.526052964751141], [-72.694937099890623, 18.445799465401858], [-72.334881557896992, 18.66842153571525], [-72.791649542924873, 19.101625067618027], [-72.784104783810264, 19.483591416903405], [-73.41502234566174, 19.639550889560276], [-73.189790615517595, 19.915683905511909]]] } }, + { "type": "Feature", "properties": { "admin": "Hungary", "name": "Hungary", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[16.202298211337361, 46.852385972676949], [16.534267612380372, 47.496170966169103], [16.340584344150411, 47.712901923201215], [16.903754103267257, 47.714865627628321], [16.979666782304033, 48.123497015976298], [17.488472934649813, 47.867466132186209], [17.857132602620023, 47.758428860050365], [18.696512892336923, 47.88095368101439], [18.777024773847668, 48.081768296900627], [19.174364861739885, 48.111378892603859], [19.66136355965849, 48.266614895208647], [19.769470656013109, 48.2026911484636], [20.239054396249344, 48.327567247096916], [20.473562045989862, 48.562850043321809], [20.801293979584919, 48.62385407164237], [21.872236362401729, 48.319970811550007], [22.085608351334848, 48.422264309271782], [22.640819939878746, 48.150239569687351], [22.710531447040488, 47.882193915389394], [22.09976769378283, 47.672439276716695], [21.626514926853869, 46.994237779318148], [21.021952345471245, 46.316087958351886], [20.220192498462833, 46.127468980486547], [19.596044549241579, 46.171729844744533], [18.829838087649957, 45.908877671891915], [18.456062452882858, 45.759481106136121], [17.630066359129554, 45.95176911069418], [16.882515089595298, 46.380631822284428], [16.564808383864854, 46.503750922219822], [16.370504998447412, 46.841327216166498], [16.202298211337361, 46.852385972676949]]] } }, + { "type": "Feature", "properties": { "admin": "Indonesia", "name": "Indonesia", "continent": "Asia" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[120.715608758630438, -10.239581394087862], [120.295014276206871, -10.258649997603525], [118.967808465654684, -9.55796925215803], [119.900309686361609, -9.361340427287514], [120.425755649905398, -9.665921319215796], [120.775501743656719, -9.969675388227456], [120.715608758630438, -10.239581394087862]]], [[[124.435950148619384, -10.14000090906144], [123.579981724136701, -10.359987481327961], [123.459989048354998, -10.239994805546171], [123.55000939340745, -9.900015557497978], [123.980008986508096, -9.290026950724693], [124.96868248911619, -8.892790215697046], [125.070019972840612, -9.089987481322835], [125.088520135601073, -9.393173109579321], [124.435950148619384, -10.14000090906144]]], [[[117.900018345207741, -8.095681247594923], [118.260616489740471, -8.362383314653327], [118.87845991422212, -8.280682875199828], [119.126506789223086, -8.705824883665072], [117.97040164598927, -8.906639499551257], [117.277730747549015, -9.040894870645557], [116.74014082241662, -9.032936700072637], [117.083737420725313, -8.457157891476539], [117.632024367342126, -8.44930307376819], [117.900018345207741, -8.095681247594923]]], [[[122.903537225436082, -8.094234307490735], [122.756982863456287, -8.649807631060638], [121.2544905945701, -8.933666273639941], [119.924390903809567, -8.810417982623873], [119.920928582846102, -8.44485890059107], [120.715091994307542, -8.236964613480863], [121.341668735846554, -8.53673959720602], [122.007364536630405, -8.46062021244016], [122.903537225436082, -8.094234307490735]]], [[[108.623478631628927, -6.777673841990675], [110.539227329553285, -6.877357679881682], [110.759575636845909, -6.465186455921751], [112.614811232556349, -6.946035658397589], [112.978768345188087, -7.594213148634578], [114.478935174621142, -7.776527601760277], [115.705526971501058, -8.370806573116864], [114.564511346496488, -8.75181690840483], [113.464733514460875, -8.348947442257424], [112.559672479301028, -8.376180922075163], [111.522061395312448, -8.302128594600957], [110.586149530074294, -8.122604668819021], [109.427667270955183, -7.740664157749761], [108.693655226681301, -7.641600437046219], [108.277763299596302, -7.766657403192579], [106.454102004016136, -7.354899590690947], [106.280624220812285, -6.924899997590201], [105.365486281355516, -6.851416110871169], [106.051645949327053, -5.895918877794499], [107.265008579540165, -5.954985039904058], [108.072091099074683, -6.345762220895237], [108.486846144649235, -6.421984958525768], [108.623478631628927, -6.777673841990675]]], [[[134.724624465066654, -6.214400730009286], [134.210133905168902, -6.895237725454704], [134.112775506730998, -6.142467136259014], [134.290335728085779, -5.783057549669038], [134.499625278867882, -5.445042006047898], [134.727001580952106, -5.737582289252158], [134.724624465066654, -6.214400730009286]]], [[[127.249215122588893, -3.459065036638889], [126.874922723498855, -3.790982761249579], [126.183802118027302, -3.607376397316556], [125.989033644719257, -3.177273451351325], [127.00065148326496, -3.12931772218441], [127.249215122588893, -3.459065036638889]]], [[[130.471344028851775, -3.09376433676762], [130.834836053592767, -3.858472181822761], [129.990546502808115, -3.446300957862817], [129.155248651242403, -3.362636813982248], [128.590683628453633, -3.428679294451256], [127.898891229362334, -3.393435967628192], [128.135879347852779, -2.843650404474914], [129.370997756060888, -2.802154229344551], [130.471344028851775, -3.09376433676762]]], [[[134.143367954647772, -1.151867364103594], [134.422627394753022, -2.769184665542383], [135.457602980694674, -3.367752780779113], [136.293314243718754, -2.30704233155609], [137.4407377463275, -1.703513278819372], [138.329727411044757, -1.70268645590265], [139.18492068904294, -2.051295668143637], [139.926684198160387, -2.409051608900284], [141.000210402591847, -2.600151055515624], [141.017056919519007, -5.85902190513802], [141.033851760013874, -9.117892754760417], [140.143415155192542, -8.297167657100955], [139.127766554928087, -8.096042982620942], [138.881476678624949, -8.380935153846094], [137.614473911692812, -8.41168263105976], [138.039099155835174, -7.597882175327354], [138.668621454014783, -7.320224704623072], [138.407913853102343, -6.232849216337483], [137.927839797110835, -5.393365573755998], [135.989250116113453, -4.546543877789047], [135.164597609599667, -4.462931410340771], [133.662880487197867, -3.538853448097526], [133.367704705946778, -4.024818617370314], [132.983955519747326, -4.112978610860281], [132.75694095268895, -3.746282647317129], [132.753788690319197, -3.311787204607071], [131.989804315316178, -2.820551039240455], [133.066844517143466, -2.460417982598443], [133.780030959203486, -2.479848321140209], [133.69621178602614, -2.214541517753687], [132.232373488494204, -2.212526136894325], [131.836221958544684, -1.617161960459597], [130.942839797082797, -1.432522067880796], [130.519558140180038, -0.937720228686075], [131.867537876513609, -0.695461114101818], [132.380116408416768, -0.369537855636977], [133.985548130428384, -0.780210463060442], [134.143367954647772, -1.151867364103594]]], [[[125.240500522971573, 1.419836127117605], [124.43703535369734, 0.427881171058971], [123.685504998876695, 0.235593166500877], [122.723083123872854, 0.431136786293337], [121.056724888189081, 0.381217352699451], [120.18308312386273, 0.23724681233422], [120.040869582195455, -0.519657891444851], [120.935905389490699, -1.408905938323372], [121.475820754076167, -0.955962009285116], [123.34056481332847, -0.615672702643081], [123.258399285984481, -1.076213067228337], [122.822715285331597, -0.930950616055881], [122.388529901215364, -1.516858005381124], [121.508273553555455, -1.904482924002422], [122.454572381684272, -3.186058444840881], [122.271896193532541, -3.529500013852696], [123.170962762546537, -4.683693129091707], [123.162332798353759, -5.34060393638596], [122.628515252778683, -5.634591159694494], [122.236394484548057, -5.282933037948281], [122.71956912647704, -4.46417164471579], [121.738233677254357, -4.851331475446499], [121.48946333220124, -4.574552504091215], [121.619171177253861, -4.188477878438674], [120.898181593917684, -3.602105401222828], [120.972388950688767, -2.627642917494909], [120.305452915529884, -2.931603692235725], [120.39004723519173, -4.097579034037223], [120.430716587405371, -5.528241062037778], [119.796543410319487, -5.67340016034565], [119.36690555224493, -5.379878024927804], [119.653606398600104, -4.459417412944958], [119.498835483885969, -3.49441171632651], [119.078344354326987, -3.487021986508764], [118.767768996252869, -2.801999200047688], [119.180973748858662, -2.147103773612798], [119.323393996255049, -1.35314706788047], [119.825998976725828, 0.154254462073496], [120.035701938966341, 0.566477362465804], [120.885779250167687, 1.309222723796835], [121.666816847826965, 1.013943589681076], [122.927566766451818, 0.875192368977465], [124.077522414242836, 0.917101955566139], [125.065989211121803, 1.643259182131558], [125.240500522971573, 1.419836127117605]]], [[[128.688248732620707, 1.132385972494106], [128.635952183141342, 0.258485826006179], [128.120169712436166, 0.356412665199286], [127.968034295768845, -0.252077325037533], [128.379998813999691, -0.780003757331286], [128.100015903842291, -0.899996433112974], [127.69647464407501, -0.266598402511505], [127.399490187693743, 1.011721503092573], [127.600511509309044, 1.81069082275718], [127.932377557487484, 2.174596258956555], [128.004156121940809, 1.628531398928331], [128.594559360875451, 1.540810655112864], [128.688248732620707, 1.132385972494106]]], [[[117.875627069166001, 1.827640692548911], [118.996747267738158, 0.902219143066048], [117.811858351717788, 0.784241848143722], [117.478338657706047, 0.102474676917026], [117.521643507966587, -0.803723239753211], [116.560048455879496, -1.487660821136231], [116.533796828275158, -2.483517347832901], [116.148083937648607, -4.012726332214014], [116.000857782049067, -3.657037448749008], [114.864803094544513, -4.106984144714416], [114.468651564595064, -3.49570362713382], [113.755671828264099, -3.439169610206519], [113.256994256647545, -3.118775729996854], [112.068126255340644, -3.478392022316071], [111.703290643359992, -2.994442233902631], [111.04824018762821, -3.049425957861188], [110.223846063275971, -2.934032484553483], [110.070935500124335, -1.592874037282414], [109.571947869914041, -1.314906507984489], [109.091873813922518, -0.459506524257051], [108.952657505328162, 0.415375474444346], [109.069136183714036, 1.341933905437642], [109.663260125773718, 2.006466986494984], [109.830226678508836, 1.338135687664191], [110.514060907027101, 0.773131415200993], [111.159137811326559, 0.976478176269509], [111.797548455860408, 0.904441229654651], [112.380251906383648, 1.410120957846757], [112.859809198052176, 1.497790025229946], [113.805849644019531, 1.217548732911041], [114.621355422017473, 1.430688177898886], [115.134037306785231, 2.821481838386219], [115.51907840379198, 3.169238389494395], [115.86551720587677, 4.306559149590156], [117.01521447150634, 4.306094061699468], [117.882034946770162, 4.137551377779487], [117.313232456533513, 3.234428208830578], [118.048329705885351, 2.287690131027361], [117.875627069166001, 1.827640692548911]]], [[[105.817655063909356, -5.852355645372411], [104.710384149191498, -5.873284600450644], [103.868213332130736, -5.037314955264974], [102.584260695406897, -4.220258884298203], [102.156173130300999, -3.614146009946765], [101.399113397225051, -2.799777113459171], [100.902502882900137, -2.05026213949786], [100.141980828860596, -0.650347588710957], [99.26373986206022, 0.183141587724663], [98.970011020913319, 1.042882391764536], [98.601351352943084, 1.823506577965616], [97.699597609449881, 2.453183905442116], [97.17694217324987, 3.30879059489861], [96.424016554757316, 3.86885976807791], [95.380876092513475, 4.970782172053673], [95.293026157617305, 5.479820868344816], [95.936862827541745, 5.439513251157108], [97.484882033277088, 5.24632090903401], [98.369169142655679, 4.268370266126366], [99.142558628335792, 3.590349636240915], [99.693997837322399, 3.174328518075156], [100.641433546961665, 2.099381211755798], [101.658012323007313, 2.083697414555189], [102.498271112073212, 1.398700466310217], [103.076840448013002, 0.561361395668854], [103.838396030698348, 0.104541734208666], [103.437645298274973, -0.711945896002845], [104.010788608824001, -1.059211521004229], [104.369991489684878, -1.084843031421016], [104.539490187602155, -1.782371514496716], [104.887892694113987, -2.340425306816655], [105.622111444116982, -2.42884368246807], [106.10859337771268, -3.06177662517895], [105.857445916774111, -4.305524997579723], [105.817655063909356, -5.852355645372411]]]] } }, + { "type": "Feature", "properties": { "admin": "India", "name": "India", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[77.837450799474553, 35.494009507787759], [78.912268914713209, 34.321936346975782], [78.811086460285722, 33.506198025032404], [79.208891636068572, 32.994394639613709], [79.176128777995501, 32.483779812137705], [78.458446486325997, 32.61816437431272], [78.738894484374001, 31.515906073527056], [79.721366815107089, 30.882714748654724], [81.11125613802929, 30.183480943313398], [80.476721225917373, 29.729865220655334], [80.088424513676259, 28.794470119740136], [81.057202589851997, 28.416095282499036], [81.999987420584958, 27.925479234319987], [83.304248895199535, 27.364505723575554], [84.675017938173767, 27.234901231387528], [85.25177859898335, 26.726198431906337], [86.024392938179147, 26.630984605408567], [87.22747195836628, 26.39789805755607], [88.060237664749806, 26.414615383402484], [88.174804315140904, 26.810405178325944], [88.043132765661198, 27.445818589786818], [88.120440708369841, 27.876541652939586], [88.730325962278528, 28.086864732367509], [88.814248488320544, 27.299315904239361], [88.835642531289366, 27.098966376243755], [89.744527622438838, 26.71940298105995], [90.37327477413406, 26.875724188742872], [91.217512648486405, 26.808648179628019], [92.033483514375078, 26.838310451763554], [92.10371178585973, 27.4526140406332], [91.69665652869665, 27.771741848251661], [92.503118931043616, 27.896876329046442], [93.413347609432662, 28.640629380807219], [94.565990431702929, 29.277438055939978], [95.404802280664612, 29.031716620392125], [96.117678664131006, 29.452802028922459], [96.586590610747479, 28.830979519154337], [96.248833449287758, 28.411030992134435], [97.327113885490007, 28.261582749946331], [97.402561476636123, 27.88253611908544], [97.051988559968066, 27.699058946233144], [97.133999058015277, 27.08377350514996], [96.419365675850941, 27.264589341739221], [95.124767694074933, 26.573572089132295], [95.155153436262566, 26.001307277932078], [94.603249139385355, 25.162495428970399], [94.552657912171611, 24.675238348890328], [94.106741977925054, 23.850740871673477], [93.325187615942767, 24.078556423432197], [93.286326938859247, 23.043658352138998], [93.060294224014598, 22.703110663335565], [93.166127557348361, 22.278459580977099], [92.672720981825549, 22.041238918541247], [92.146034783906799, 23.62749868417259], [91.869927606171302, 23.62434642180278], [91.706475050832083, 22.985263983649183], [91.158963250699713, 23.503526923104381], [91.467729933643668, 24.072639471934789], [91.915092807994398, 24.130413723237108], [92.376201613334786, 24.976692816664961], [91.799595981822065, 25.14743174895731], [90.872210727912105, 25.13260061288954], [89.920692580121838, 25.269749864192171], [89.832480910199592, 25.965082098895476], [89.355094028687276, 26.014407253518065], [88.56304935094974, 26.446525580342716], [88.209789259802477, 25.768065700782707], [88.931553989623069, 25.238692328384769], [88.30637251175601, 24.866079413344199], [88.084422235062405, 24.501657212821918], [88.699940220090895, 24.233714911388557], [88.529769728553759, 23.631141872649163], [88.876311883503064, 22.879146429937826], [89.031961297566198, 22.055708319582973], [88.888765903685396, 21.690588487224741], [88.208497348995209, 21.703171698487804], [86.975704380240259, 21.495561631755201], [87.033168572948853, 20.743307806882406], [86.499351027373777, 20.151638495356604], [85.060265740909671, 19.478578802971096], [83.941005893899998, 18.302009792549722], [83.189217156917834, 17.671221421778977], [82.192792189465905, 17.016636053937813], [82.191241896497175, 16.556664130107844], [81.692719354177456, 16.3102192245079], [80.791999139330116, 15.951972357644488], [80.324895867843864, 15.899184882058346], [80.025069207686428, 15.136414903214144], [80.23327355339039, 13.835770778859978], [80.286293572921849, 13.006260687710832], [79.862546828128487, 12.056215318240886], [79.85799930208681, 10.357275091997108], [79.340511509115984, 10.308854274939618], [78.885345493489169, 9.54613597252772], [79.189719679688281, 9.216543687370146], [78.27794070833049, 8.933046779816932], [77.94116539908434, 8.25295909263974], [77.539897902337927, 7.965534776232331], [76.592978957021657, 8.899276231314188], [76.130061476551063, 10.299630031775518], [75.746467319648488, 11.308250637248303], [75.396101108709573, 11.781245022015822], [74.864815708316812, 12.741935736537895], [74.616717156883524, 13.992582912649677], [74.443859490867197, 14.617221787977693], [73.534199253233368, 15.990652167214957], [73.119909295549419, 17.928570054592495], [72.820909458308634, 19.208233547436162], [72.824475132136783, 20.41950328214153], [72.630533481745388, 21.356009426351001], [71.175273471973938, 20.757441311114228], [70.470458611945091, 20.877330634031381], [69.164130080038817, 22.089298000572697], [69.644927606082391, 22.450774644454334], [69.349596795534325, 22.843179633062686], [68.176645135373377, 23.691965033456704], [68.842599318318761, 24.359133612560932], [71.0432401874682, 24.356523952730193], [70.844699334602822, 25.215102037043511], [70.282873162725579, 25.722228705339823], [70.168926629522005, 26.491871649678835], [69.514392938113119, 26.940965684511365], [70.61649620960192, 27.989196275335861], [71.777665643200308, 27.913180243434521], [72.823751662084689, 28.961591701772047], [73.450638462217412, 29.976413479119863], [74.421380242820263, 30.97981476493117], [74.405928989564998, 31.692639471965272], [75.258641798813187, 32.271105455040491], [74.451559279278698, 32.764899603805489], [74.104293654277328, 33.441473293586846], [73.749948358051952, 34.317698879527846], [74.240202671204955, 34.748887030571247], [75.757060988268321, 34.504922593721311], [76.871721632804011, 34.653544012992732], [77.837450799474553, 35.494009507787759]]] } }, + { "type": "Feature", "properties": { "admin": "Ireland", "name": "Ireland", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[-6.197884894220989, 53.86756500916335], [-6.032985398777609, 53.153164170944336], [-6.788856573910847, 52.260117906292322], [-8.561616583683557, 51.669301255899349], [-9.977085740590267, 51.820454820353071], [-9.16628251793078, 52.864628811242667], [-9.688524542672452, 53.881362616585285], [-8.327987433292007, 54.664518947968624], [-7.572167934591064, 55.131622219454854], [-7.366030646178785, 54.595840969452709], [-7.572167934591064, 54.059956366585986], [-6.953730231138065, 54.073702297575622], [-6.197884894220989, 53.86756500916335]]] } }, + { "type": "Feature", "properties": { "admin": "Iran", "name": "Iran", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[53.921597934795543, 37.198918361961255], [54.800303989486558, 37.392420762678178], [55.511578403551894, 37.964117133123153], [56.180374790273319, 37.935126654607423], [56.619366082592805, 38.121394354803478], [57.330433790928964, 38.029229437810933], [58.436154412678192, 37.522309475243794], [59.234761997316795, 37.412987982730336], [60.377637973883864, 36.52738312432836], [61.123070509694131, 36.491597194966239], [61.21081709172573, 35.650072333309218], [60.80319339380744, 34.404101874319856], [60.528429803311575, 33.676446031217999], [60.963700392505991, 33.528832302376252], [60.536077915290761, 32.981268825811561], [60.863654819588952, 32.182919623334421], [60.941944614511115, 31.548074652628745], [61.699314406180811, 31.379506130492661], [61.78122155136343, 30.735850328081231], [60.874248488208778, 29.829238999952604], [61.369308709564926, 29.303276272085917], [61.771868117118615, 28.699333807890792], [62.727830438085974, 28.259644883735383], [62.755425652929851, 27.378923448184985], [63.23389773952028, 27.217047024030702], [63.316631707619578, 26.756532497661659], [61.874187453056535, 26.239974880472097], [61.497362908784183, 25.078237006118492], [59.616134067630831, 25.380156561783775], [58.525761346272297, 25.609961656185725], [57.39725141788238, 25.739902045183634], [56.97076582217754, 26.966106268821356], [56.492138706290199, 27.14330475515019], [55.723710158110059, 26.964633490501036], [54.715089552637252, 26.480657863871507], [53.493096958231334, 26.812368882753042], [52.483597853409599, 27.580849107365488], [51.520762566947404, 27.865689602158291], [50.852948032439528, 28.814520575469377], [50.115008579311571, 30.14777252859971], [49.576850213423988, 29.9857152369324], [48.941333449098536, 30.31709035900403], [48.567971225789748, 29.926778265903515], [48.014568312376085, 30.452456773392594], [48.00469811380831, 30.985137437457237], [47.685286085812258, 30.984853217079621], [47.849203729042095, 31.709175930298663], [47.334661492711895, 32.469155381799105], [46.109361606639304, 33.017287299118998], [45.416690708199035, 33.967797756479577], [45.648459507028079, 34.748137722303007], [46.15178795755093, 35.093258775364284], [46.076340366404786, 35.67738332777548], [45.420618117053202, 35.977545884742817], [44.77267, 37.17045], [44.225755649600522, 37.971584377589345], [44.421402622257538, 38.281281236314534], [44.109225294782334, 39.428136298168091], [44.793989699081934, 39.713002631177041], [44.9526880226503, 39.335764675446363], [45.457721795438765, 38.874139105783051], [46.143623081248812, 38.74120148371221], [46.505719842317966, 38.770605373686287], [47.685079380083081, 39.508363959301207], [48.060095249225235, 39.582235419262453], [48.355529412637871, 39.2887649602769], [48.010744256386474, 38.794014797514514], [48.634375441284803, 38.27037750910096], [48.883249139202483, 38.32024526626261], [49.199612257693332, 37.582874253889877], [50.147771437384606, 37.37456655532133], [50.842354363819695, 36.872814235983384], [52.26402469260141, 36.700421657857696], [53.825789829326411, 36.965030829408228], [53.921597934795543, 37.198918361961255]]] } }, + { "type": "Feature", "properties": { "admin": "Iraq", "name": "Iraq", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[45.420618117053202, 35.977545884742817], [46.076340366404786, 35.67738332777548], [46.15178795755093, 35.093258775364284], [45.648459507028079, 34.748137722303007], [45.416690708199035, 33.967797756479577], [46.109361606639304, 33.017287299118998], [47.334661492711895, 32.469155381799105], [47.849203729042095, 31.709175930298663], [47.685286085812258, 30.984853217079621], [48.00469811380831, 30.985137437457237], [48.014568312376085, 30.452456773392594], [48.567971225789748, 29.926778265903515], [47.974519077349889, 29.975819200148493], [47.302622104690947, 30.059069932570711], [46.568713413281742, 29.099025173452283], [44.709498732284736, 29.178891099559376], [41.889980910007829, 31.190008653278362], [40.399994337736238, 31.889991766887931], [39.195468377444961, 32.16100881604266], [38.792340529136077, 33.378686428352218], [41.00615888851992, 34.419372260062111], [41.383965285005807, 35.628316555314349], [41.289707472505448, 36.358814602192261], [41.837064243340954, 36.605853786763568], [42.349591098811764, 37.22987254490409], [42.779125604021822, 37.385263576805741], [43.942258742047287, 37.256227525372942], [44.293451775902852, 37.001514390606289], [44.772699008977689, 37.170444647768427], [45.420618117053202, 35.977545884742817]]] } }, + { "type": "Feature", "properties": { "admin": "Iceland", "name": "Iceland", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[-14.508695441129232, 66.455892239031414], [-14.739637417041605, 65.808748277440287], [-13.609732224979807, 65.126671047619851], [-14.9098337467949, 64.36408193628867], [-17.794438035543418, 63.67874909123384], [-18.656245896874989, 63.496382961675806], [-19.972754685942757, 63.643634955491514], [-22.762971971110154, 63.960178941495371], [-21.778484259517676, 64.402115790455497], [-23.955043911219104, 64.891129869233481], [-22.184402635170354, 65.084968166760291], [-22.227423265053329, 65.378593655042721], [-24.326184047939332, 65.611189276788451], [-23.650514695723082, 66.262519029395207], [-22.134922451250883, 66.410468655046856], [-20.576283738679543, 65.732112128351417], [-19.056841600001587, 66.276600857194751], [-17.798623826559048, 65.993853257909763], [-16.167818976292121, 66.526792304135853], [-14.508695441129232, 66.455892239031414]]] } }, + { "type": "Feature", "properties": { "admin": "Israel", "name": "Israel", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[35.719918247222743, 32.709192409794859], [35.545665317534535, 32.393992011030569], [35.183930291491428, 32.532510687788935], [34.974640740709319, 31.866582343059715], [35.225891554512422, 31.754341132121759], [34.970506626125989, 31.616778469360803], [34.927408481594554, 31.35343537040141], [35.397560662586038, 31.489086005167572], [35.420918409981958, 31.100065822874349], [34.922602573391423, 29.501326198844517], [34.26543338393568, 31.219360866820146], [34.556371697738903, 31.548823960896989], [34.48810713068135, 31.605538845337314], [34.752587111151165, 32.07292633720116], [34.955417107896771, 32.827376410446369], [35.098457472480668, 33.080539252244257], [35.126052687324538, 33.090900376918775], [35.460709262846699, 33.089040025356276], [35.552796665190805, 33.264274807258012], [35.821100701650231, 33.277426459276292], [35.836396925608618, 32.868123277308506], [35.700797967274745, 32.716013698857374], [35.719918247222743, 32.709192409794859]]] } }, + { "type": "Feature", "properties": { "admin": "Italy", "name": "Italy", "continent": "Europe" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[15.52037601081383, 38.231155096991465], [15.160242954171732, 37.444045518537813], [15.309897902089002, 37.134219468731793], [15.099988234119445, 36.61998729099539], [14.335228712632013, 36.996630967754747], [13.826732618879927, 37.104531358380186], [12.431003859108809, 37.612949937483812], [12.570943637755132, 38.126381130519682], [13.741156447004581, 38.03496552179535], [14.761249220446157, 38.143873602850498], [15.52037601081383, 38.231155096991465]]], [[[9.210011834356264, 41.209991360024212], [9.809975213264973, 40.500008856766094], [9.669518670295671, 39.177376410471787], [9.214817742559486, 39.240473334300127], [8.806935662479729, 38.906617743478471], [8.428302443077113, 39.171847032216611], [8.388253208050939, 40.378310858718798], [8.159998406617659, 40.950007229163774], [8.709990675500107, 40.899984442705225], [9.210011834356264, 41.209991360024212]]], [[[12.376485223040842, 46.767559109069872], [13.806475457421552, 46.50930613869118], [13.698109978905475, 46.016778062517368], [13.937630242578335, 45.59101593686465], [13.141606479554294, 45.736691799495411], [12.328581170306304, 45.38177806251484], [12.383874952858601, 44.885374253919075], [12.261453484759157, 44.600482082694008], [12.589237094786482, 44.091365871754462], [13.526905958722491, 43.587727362637899], [14.029820997787024, 42.761007798832473], [15.142569614327952, 41.955139675456891], [15.926191033601892, 41.961315009115729], [16.169897088290409, 41.740294908203417], [15.889345737377793, 41.541082261718195], [16.785001661860573, 41.179605617836579], [17.519168735431204, 40.877143459632229], [18.376687452882575, 40.355624904942651], [18.4802470231954, 40.168866278639818], [18.293385044028096, 39.810774441073235], [17.738380161213279, 40.277671006830289], [16.869595981522334, 40.442234605463838], [16.448743116937319, 39.795400702466473], [17.171489698971495, 39.424699815420716], [17.052840610429339, 38.902871202137291], [16.635088331781841, 38.843572496082395], [16.100960727613053, 37.985898749334176], [15.684086948314498, 37.908849188787023], [15.687962680736318, 38.214592800441849], [15.891981235424705, 38.750942491199218], [16.109332309644312, 38.964547024077682], [15.718813510814638, 39.544072374014938], [15.413612501698818, 40.048356838535163], [14.998495721098234, 40.172948716790913], [14.703268263414767, 40.604550279292617], [14.06067182786526, 40.786347968095434], [13.627985060285393, 41.188287258461649], [12.888081902730418, 41.253089504555604], [12.106682570044907, 41.7045348170574], [11.191906365614184, 42.355425319989671], [10.511947869517794, 42.93146251074721], [10.200028924204046, 43.920006822274608], [9.702488234097812, 44.036278794931313], [8.888946160526869, 44.366336167979533], [8.428560825238575, 44.23122813575241], [7.8507666357832, 43.767147935555236], [7.435184767291841, 43.693844916349164], [7.549596388386161, 44.127901109384808], [7.007562290076661, 44.254766750661382], [6.749955275101711, 45.028517971367584], [7.096652459347835, 45.333098863295859], [6.80235517744566, 45.708579820328673], [6.84359297041456, 45.991146552100659], [7.273850945676683, 45.776947740250748], [7.755992058959832, 45.824490057959267], [8.316629672894377, 46.16364248309084], [8.489952426801294, 46.005150865251736], [8.966305779667833, 46.03693187111115], [9.18288170740311, 46.440214748716976], [9.92283654139035, 46.314899400409182], [10.363378126678665, 46.48357127540983], [10.4427014502466, 46.893546250997431], [11.048555942436504, 46.751358547546396], [11.164827915093325, 46.941579494812729], [12.153088006243079, 47.115393174826423], [12.376485223040842, 46.767559109069872]]]] } }, + { "type": "Feature", "properties": { "admin": "Jamaica", "name": "Jamaica", "continent": "North America" }, "geometry": { "type": "Polygon", "coordinates": [[[-77.569600796199197, 18.490525417550483], [-76.896618618462114, 18.400866807524078], [-76.365359056285527, 18.16070058844759], [-76.19965857614163, 17.886867173732963], [-76.902561408175671, 17.868237819891743], [-77.206341315403449, 17.701116237859818], [-77.766022915340599, 17.861597398342237], [-78.337719285785596, 18.225967922432226], [-78.217726610003865, 18.454532782459193], [-77.797364671525614, 18.524218451404774], [-77.569600796199197, 18.490525417550483]]] } }, + { "type": "Feature", "properties": { "admin": "Jordan", "name": "Jordan", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[35.545665317534535, 32.393992011030569], [35.719918247222743, 32.709192409794859], [36.834062127435537, 32.312937526980768], [38.792340529136077, 33.378686428352218], [39.195468377444961, 32.16100881604266], [39.004885695152545, 32.010216986614971], [37.002165561681004, 31.508412990844736], [37.998848911294367, 30.508499864213128], [37.668119744626374, 30.338665269485894], [37.503581984209028, 30.003776150018396], [36.740527784987243, 29.865283311476183], [36.501214227043583, 29.505253607698702], [36.068940870922049, 29.19749461518445], [34.956037225084252, 29.356554673778835], [34.922602573391423, 29.501326198844517], [35.420918409981958, 31.100065822874349], [35.397560662586038, 31.489086005167572], [35.545251906076196, 31.782504787720832], [35.545665317534535, 32.393992011030569]]] } }, + { "type": "Feature", "properties": { "admin": "Japan", "name": "Japan", "continent": "Asia" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[134.638428176003856, 34.149233710256418], [134.766379022358478, 33.806334743783673], [134.20341596897083, 33.201177883429622], [133.792950067276479, 33.521985175097583], [133.280268182508848, 33.289570420864941], [133.014858026257855, 32.704567369104772], [132.363114862192674, 32.989382025681373], [132.371176385630179, 33.463642483040068], [132.924372593314786, 34.060298570282036], [133.492968377822194, 33.944620876596694], [133.904106073136347, 34.364931138642611], [134.638428176003856, 34.149233710256418]]], [[[140.976387567305267, 37.142074286440156], [140.599769728762084, 36.343983466124534], [140.774074334882641, 35.842877102190229], [140.253279250245072, 35.138113918593653], [138.975527785396196, 34.667600002576101], [137.217598911691198, 34.606285915661843], [135.792983026268871, 33.46480520276662], [135.120982700745401, 33.849071153289053], [135.07943484918269, 34.596544908174813], [133.340316196831964, 34.375938218720755], [132.156770868051296, 33.904933376596503], [130.986144647343451, 33.885761420216276], [132.000036248910021, 33.149992377244608], [131.33279015515734, 31.450354519164836], [130.68631798718593, 31.029579169228235], [130.202419875204953, 31.418237616495411], [130.447676222862128, 32.319474595665717], [129.81469160371887, 32.610309556604385], [129.408463169472554, 33.296055813117583], [130.353935174684636, 33.604150702441693], [130.878450962447118, 34.232742824840031], [131.884229364143891, 34.749713853487911], [132.617672967662486, 35.433393052709413], [134.608300815977771, 35.731617743465812], [135.677537876528902, 35.527134100886819], [136.723830601142424, 37.304984239240376], [137.390611607004473, 36.827390651998819], [138.857602166906247, 37.827484646143454], [139.426404657142882, 38.215962225897634], [140.054790073812057, 39.438807481436378], [139.883379347899847, 40.563312486323682], [140.305782505453664, 41.195005194659551], [141.368973423426667, 41.378559882160282], [141.914263136970476, 39.991616115878678], [141.884600864834965, 39.18086456965149], [140.959489373945729, 38.174000962876583], [140.976387567305267, 37.142074286440156]]], [[[143.910161981379474, 44.174099839853724], [144.613426548439634, 43.960882880217511], [145.320825230083074, 44.384732977875437], [145.543137241802754, 43.262088324550596], [144.059661899999867, 42.988358262700551], [143.183849725517291, 41.995214748699183], [141.611490920172457, 42.678790595056071], [141.067286411706618, 41.58459381770799], [139.95510623592105, 41.56955597591103], [139.817543573159924, 42.563758856774392], [140.312087030193169, 43.333272610032644], [141.380548944259999, 43.388824774746489], [141.671952345953912, 44.772125352551477], [141.967644891527982, 45.551483466161343], [143.142870314709796, 44.510358384776957], [143.910161981379474, 44.174099839853724]]]] } }, + { "type": "Feature", "properties": { "admin": "Kazakhstan", "name": "Kazakhstan", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[70.962314894499272, 42.26615428320553], [70.388964878220776, 42.081307684897517], [69.070027296835221, 41.384244289712335], [68.632482944620037, 40.668680731766855], [68.259895867795635, 40.662324530594894], [67.985855747351806, 41.135990708982199], [66.714047072216587, 41.168443508461557], [66.510648634715707, 41.987644151368549], [66.023391554635609, 41.994646307944031], [66.098012322865188, 42.997660020513074], [64.90082441595932, 43.728080552742647], [63.18578698105658, 43.650074978197999], [62.013300408786264, 43.504476630215649], [61.05831994003249, 44.405816962250576], [60.239971958258472, 44.784036770194739], [58.689989048095796, 45.500013739598721], [58.503127068928428, 45.58680430763296], [55.928917270741167, 44.995858466159163], [55.968191359283011, 41.30864166926937], [55.455251092353805, 41.259859117185826], [54.755345493392653, 42.04397146256661], [54.079417759014959, 42.324109402020831], [52.944293247291725, 42.116034247397572], [52.502459751196277, 41.783315538086462], [52.446339145727208, 42.027150783855561], [52.692112257707251, 42.443895372073364], [52.501426222550315, 42.792297878585188], [51.342427199108201, 43.132974758469338], [50.891291945200223, 44.031033637053774], [50.339129266161358, 44.284015611338468], [50.305642938036257, 44.609835516938908], [51.278503452363211, 44.514854234386448], [51.316899041556034, 45.245998236667894], [52.167389764215713, 45.408391425145098], [53.040876499245194, 45.259046535821753], [53.220865512917712, 46.23464590105992], [53.042736850807771, 46.853006089864486], [52.042022739475598, 46.804636949239232], [51.191945428274252, 47.048704738953909], [50.034083286342465, 46.608989976582208], [49.10116, 46.39933000000012], [48.593241001180495, 46.561034247415471], [48.694733514201729, 47.075628160177921], [48.057253045449258, 47.743752753279516], [47.315231154170242, 47.715847479841948], [46.466445753776256, 48.394152330104923], [47.043671502476506, 49.1520388860976], [46.751596307162728, 49.35600576435376], [47.549480421749301, 50.454698391311119], [48.577841424357523, 49.874759629915658], [48.702381626181008, 50.605128485712825], [50.766648390512145, 51.692762356159889], [52.328723585830957, 51.71865224873811], [54.53287845237621, 51.026239732459302], [55.716940545479801, 50.62171662047853], [56.777961053296551, 51.043551337277037], [58.363290643146733, 51.063653469438563], [59.642282342370599, 50.545442206415707], [59.932807244715484, 50.842194118851857], [61.337424350840919, 50.799070136104248], [61.588003371024158, 51.2726587998432], [59.967533807215531, 51.960420437215696], [60.927268507740258, 52.447548326215028], [60.739993117114572, 52.719986477257734], [61.699986199800584, 52.979996446334255], [60.978066440683151, 53.664993394579128], [61.436591424409052, 54.006264553434775], [65.178533563095911, 54.354227810272093], [65.66687584825398, 54.601266994843449], [68.169100376258811, 54.970391750704309], [69.068166945272864, 55.385250149143516], [70.865266554655122, 55.169733588270091], [71.180131056609397, 54.133285224008247], [72.224150018202167, 54.376655381886728], [73.508516066384388, 54.035616766976588], [73.425678745420427, 53.489810289109741], [74.384845005190044, 53.546861070360066], [76.891100294913414, 54.490524400441913], [76.525179477854735, 54.177003485727127], [77.800915561844221, 53.404414984747561], [80.035559523441663, 50.864750881547238], [80.568446893235475, 51.388336493528456], [81.945985548839914, 50.812195949906354], [83.383003778012366, 51.069182847693909], [83.935114780618832, 50.889245510453563], [84.416377394553052, 50.311399644565817], [85.115559523462011, 50.117302964877631], [85.541269972682457, 49.69285858824815], [86.829356723989619, 49.826674709668154], [87.359970330762664, 49.214980780629148], [86.598776483103379, 48.549181626980605], [85.768232863308285, 48.455750637396974], [85.72048383987071, 47.452969468773112], [85.164290399113355, 47.000955715516099], [83.180483839860443, 47.330031236350848], [82.458925815769106, 45.539649563166499], [81.947070753918112, 45.317027492853235], [79.966106398441397, 44.917516994804643], [80.866206496101356, 43.180362046881037], [80.180150180994289, 42.920067857426936], [80.259990268885332, 42.349999294599101], [79.643645460940135, 42.496682847659649], [79.142177361979776, 42.856092434249589], [77.658391961583206, 42.960685533208327], [76.000353631498555, 42.988022365890622], [75.636964959622091, 42.877899888676765], [74.212865838522575, 43.298339341803505], [73.645303582660901, 43.091271877609863], [73.489757521462337, 42.500894476891276], [71.844638299450637, 42.845395412765178], [71.186280552052253, 42.704292914392219], [70.962314894499272, 42.26615428320553]]] } }, + { "type": "Feature", "properties": { "admin": "Kenya", "name": "Kenya", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[40.993, -0.85829], [41.58513, -1.68325], [40.88477, -2.08255], [40.63785, -2.49979], [40.26304, -2.57309], [40.12119, -3.27768], [39.80006, -3.68116], [39.60489, -4.34653], [39.20222, -4.67677], [37.7669, -3.67712], [37.69869, -3.09699], [34.07262, -1.05982], [33.903711197104521, -0.95], [33.893568969666937, 0.109813537861896], [34.18, 0.515], [34.6721, 1.17694], [35.03599, 1.90584], [34.59607, 3.05374], [34.47913, 3.5556], [34.005, 4.249884947362047], [34.620196267853871, 4.847122742081987], [35.298007118232974, 5.506], [35.817447662353501, 5.338232082790795], [35.817447662353501, 4.776965663461889], [36.159078632855639, 4.447864127672768], [36.855093238008116, 4.447864127672768], [38.120915, 3.598605], [38.43697, 3.58851], [38.67114, 3.61607], [38.89251, 3.50074], [39.559384258765846, 3.42206], [39.85494, 3.83879], [40.76848, 4.25702], [41.1718, 3.91909], [41.855083092643966, 3.918911920483726], [40.98105, 2.78452], [40.993, -0.85829]]] } }, + { "type": "Feature", "properties": { "admin": "Kyrgyzstan", "name": "Kyrgyzstan", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[70.96231489449913, 42.266154283205481], [71.186280552052111, 42.704292914392127], [71.84463829945058, 42.845395412765093], [73.489757521462337, 42.500894476891311], [73.645303582660901, 43.09127187760982], [74.212865838522546, 43.298339341803363], [75.636964959622006, 42.877899888676673], [76.000353631498442, 42.988022365890664], [77.658391961583206, 42.960685533208256], [79.142177361979762, 42.856092434249511], [79.643645460940107, 42.496682847659514], [80.259990268885289, 42.349999294599044], [80.119430373051358, 42.123940741538235], [78.543660923175295, 41.582242540038685], [78.187196893225959, 41.185315863604792], [76.904484490877067, 41.066485907549634], [76.526368035797432, 40.427946071935111], [75.467827996730691, 40.562072251948663], [74.776862420556043, 40.366425279291619], [73.822243686828287, 39.893973497063179], [73.960013055318413, 39.660008449861721], [73.67537926625478, 39.431236884105594], [71.784693637991992, 39.279463202464363], [70.549161818325601, 39.604197902986492], [69.464886915977516, 39.526683254548693], [69.559609816368507, 40.103211371412968], [70.648018833299957, 39.935753892571157], [71.014198032520156, 40.244365546218226], [71.774875115856545, 40.145844428053763], [73.055417108049156, 40.86603302668945], [71.870114780570447, 41.392900092121259], [71.157858514291576, 41.143587144529107], [70.420022414028196, 41.519998277343134], [71.259247674448218, 42.167710679689456], [70.96231489449913, 42.266154283205481]]] } }, + { "type": "Feature", "properties": { "admin": "Cambodia", "name": "Cambodia", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[103.497279901139677, 10.632555446815926], [103.090689731867229, 11.153660590047162], [102.58493248902667, 12.186594956913279], [102.348099399833004, 13.39424734135822], [102.988422072361601, 14.225721136934464], [104.281418084736586, 14.416743068901363], [105.218776890078871, 14.27321177821069], [106.04394616091551, 13.881091009979952], [106.496373325630856, 14.57058380783428], [107.382727492301058, 14.202440904186968], [107.614547967562402, 13.535530707244202], [107.491403029410861, 12.337205918827944], [105.810523716253101, 11.567614650921225], [106.249670037869436, 10.961811835163585], [105.199914992292321, 10.889309800658094], [104.334334751403446, 10.486543687375228], [103.497279901139677, 10.632555446815926]]] } }, + { "type": "Feature", "properties": { "admin": "South Korea", "name": "Korea", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[128.349716424676586, 38.612242946927843], [129.212919549680038, 37.432392483055942], [129.460449660358137, 36.784189154602821], [129.468304478066472, 35.632140611303939], [129.091376580929563, 35.08248423923142], [128.18585045787907, 34.890377102186385], [127.386519403188373, 34.475673733044111], [126.485747511908713, 34.390045884736473], [126.3739197124291, 34.934560451795939], [126.559231398627773, 35.684540513647896], [126.117397902532261, 36.725484727519252], [126.860143263863364, 36.893924058574612], [126.174758742376213, 37.749685777328033], [126.237338901881742, 37.840377916000271], [126.683719924018888, 37.804772854151174], [127.073308547067342, 38.256114813788393], [127.780035435090966, 38.304535630845884], [128.205745884311426, 38.370397243801882], [128.349716424676586, 38.612242946927843]]] } }, + { "type": "Feature", "properties": { "admin": "Kosovo", "name": "Kosovo", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[20.76216, 42.05186], [20.717310000000108, 41.84711], [20.59023, 41.85541], [20.52295, 42.21787], [20.28374, 42.32025], [20.0707, 42.58863], [20.25758, 42.81275], [20.49679, 42.88469], [20.63508, 43.21671], [20.81448, 43.27205], [20.95651, 43.13094], [21.143395, 43.068685000000123], [21.27421, 42.90959], [21.43866, 42.86255], [21.63302, 42.67717], [21.77505, 42.6827], [21.66292, 42.43922], [21.54332, 42.32025], [21.576635989402117, 42.245224397061847], [21.352700000000134, 42.2068], [20.76216, 42.05186]]] } }, + { "type": "Feature", "properties": { "admin": "Kuwait", "name": "Kuwait", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[47.974519077349889, 29.975819200148493], [48.183188510944483, 29.534476630159759], [48.09394331237641, 29.306299343374999], [48.416094191283939, 28.552004299426663], [47.708850538937376, 28.526062730416136], [47.459821811722819, 29.002519436147217], [46.568713413281742, 29.099025173452283], [47.302622104690947, 30.059069932570711], [47.974519077349889, 29.975819200148493]]] } }, + { "type": "Feature", "properties": { "admin": "Laos", "name": "Lao PDR", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[105.218776890078871, 14.27321177821069], [105.544338413517664, 14.723933620660414], [105.589038527450128, 15.570316066952856], [104.779320509868768, 16.441864935771445], [104.716947056092465, 17.428858954330078], [103.956476678485288, 18.240954087796872], [103.200192091893726, 18.309632066312769], [102.998705682387694, 17.961694647691598], [102.413004998791592, 17.932781683824281], [102.113591750092453, 18.109101670804161], [101.059547560635139, 17.512497259994486], [101.035931431077742, 18.408928330961611], [101.282014601651667, 19.462584947176762], [100.606293573003128, 19.508344427971217], [100.548881056726856, 20.109237982661124], [100.115987583417819, 20.41784963630818], [100.329101190189519, 20.786121731036229], [101.180005324307515, 21.436572984294024], [101.270025669359939, 21.201651923095177], [101.803119744882906, 21.174366766845065], [101.652017856861491, 22.318198757409544], [102.170435825613552, 22.464753119389297], [102.754896274834636, 21.675137233969462], [103.203861118586431, 20.766562201413745], [104.435000441508024, 20.758733221921528], [104.822573683697073, 19.886641750563879], [104.183387892678908, 19.624668077060214], [103.896532017026701, 19.265180975821799], [105.094598423281496, 18.666974595611073], [105.925762160264, 17.485315456608955], [106.55600792849566, 16.604283962464802], [107.312705926545576, 15.908538316303177], [107.564525181103875, 15.202173163305554], [107.382727492301058, 14.202440904186968], [106.496373325630856, 14.57058380783428], [106.04394616091551, 13.881091009979952], [105.218776890078871, 14.27321177821069]]] } }, + { "type": "Feature", "properties": { "admin": "Lebanon", "name": "Lebanon", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[35.821100701650231, 33.277426459276292], [35.552796665190805, 33.264274807258012], [35.460709262846699, 33.089040025356276], [35.126052687324538, 33.090900376918775], [35.48220665868012, 33.905450140919434], [35.979592319489392, 34.610058295219126], [35.998402540843628, 34.644914048799997], [36.448194207512095, 34.59393524834406], [36.611750115715886, 34.201788641897174], [36.066460402172048, 33.824912421192543], [35.821100701650231, 33.277426459276292]]] } }, + { "type": "Feature", "properties": { "admin": "Liberia", "name": "Liberia", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[-7.712159389669749, 4.364565944837721], [-7.974107224957249, 4.355755113131961], [-9.004793667018673, 4.832418524592199], [-9.913420376006682, 5.593560695819205], [-10.765383876986643, 6.140710760925556], [-11.438779466182053, 6.785916856305746], [-11.199801805048278, 7.105845648624735], [-11.14670427086838, 7.396706447779534], [-10.695594855176477, 7.939464016141085], [-10.230093553091276, 8.406205552601291], [-10.016566534861253, 8.42850393313523], [-9.755342169625832, 8.541055202666923], [-9.33727983238458, 7.928534450711351], [-9.403348151069748, 7.526905218938906], [-9.208786383490844, 7.313920803247952], [-8.926064622422002, 7.309037380396375], [-8.722123582382123, 7.711674302598509], [-8.439298468448696, 7.686042792181736], [-8.485445522485348, 7.395207831243068], [-8.385451626000572, 6.911800645368742], [-8.602880214868618, 6.467564195171659], [-8.311347622094017, 6.193033148621081], [-7.993692592795879, 6.126189683451541], [-7.570152553731686, 5.707352199725903], [-7.53971513511176, 5.313345241716517], [-7.63536821128403, 5.188159084489455], [-7.712159389669749, 4.364565944837721]]] } }, + { "type": "Feature", "properties": { "admin": "Libya", "name": "Libya", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[14.8513, 22.862950000000119], [14.143870883855239, 22.491288967371126], [13.581424594790459, 23.040506089769274], [11.999505649471697, 23.471668402596432], [11.560669386449032, 24.09790924732561], [10.771363559622952, 24.562532050061741], [10.303846876678445, 24.379313259370967], [9.948261346078024, 24.936953640232613], [9.910692579801774, 25.365454616796789], [9.319410841518218, 26.094324856057476], [9.716285841519662, 26.512206325785652], [9.629056023811073, 27.140953477481041], [9.756128370816779, 27.688258571884198], [9.68388471847288, 28.144173895779311], [9.859997999723472, 28.959989732371064], [9.805634392952353, 29.424638373323369], [9.482139926805415, 30.307556057246181], [9.970017124072966, 30.539324856075375], [10.056575148161697, 30.961831366493517], [9.950225050505194, 31.376069647745275], [10.636901482799484, 31.761420803345679], [10.944789666394511, 32.081814683555358], [11.43225345220378, 32.368903103152824], [11.488787469131008, 33.136995754523234], [12.66331, 32.79278], [13.08326, 32.87882], [13.91868, 32.71196], [15.24563, 32.26508], [15.71394, 31.37626], [16.61162, 31.18218], [18.02109, 30.76357], [19.08641, 30.26639], [19.57404, 30.52582], [20.05335, 30.98576], [19.82033, 31.751790000000135], [20.13397, 32.2382], [20.85452, 32.7068], [21.54298, 32.8432], [22.89576, 32.63858], [23.2368, 32.19149], [23.6091300000001, 32.18726], [23.9275, 32.01667], [24.92114, 31.89936], [25.16482, 31.56915], [24.80287, 31.08929], [24.95762, 30.6616], [24.70007, 30.04419], [25.00000000000011, 29.238654529533552], [25.00000000000011, 25.682499996360995], [25.00000000000011, 22.0], [25.00000000000011, 20.00304], [23.850000000000129, 20.0], [23.837660000000135, 19.580470000000101], [19.84926, 21.49509], [15.86085, 23.40972], [14.8513, 22.862950000000119]]] } }, + { "type": "Feature", "properties": { "admin": "Sri Lanka", "name": "Sri Lanka", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[81.787959018891371, 7.523055324733162], [81.637322218760573, 6.481775214051921], [81.218019647144317, 6.197141424988287], [80.348356968104397, 5.968369859232154], [79.872468703128519, 6.763463446474928], [79.6951668639351, 8.200843410673384], [80.147800734379629, 9.824077663609554], [80.838817986986541, 9.268426825391186], [81.304319289071756, 8.564206244333688], [81.787959018891371, 7.523055324733162]]] } }, + { "type": "Feature", "properties": { "admin": "Lesotho", "name": "Lesotho", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[28.978262566857236, -28.955596612261708], [29.325166456832587, -29.257386976846245], [29.018415154748016, -29.743765557577362], [28.848399692507734, -30.070050551068245], [28.291069370239903, -30.226216729454293], [28.107204624145421, -30.545732110314944], [27.749397006956478, -30.645105889612214], [26.999261915807629, -29.875953871379977], [27.532511020627471, -29.242710870075353], [28.07433841320778, -28.851468601193581], [28.541700066855491, -28.647501722937562], [28.978262566857236, -28.955596612261708]]] } }, + { "type": "Feature", "properties": { "admin": "Lithuania", "name": "Lithuania", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[22.731098667092649, 54.327536932993311], [22.651051873472536, 54.582740993866729], [22.757763706155256, 54.856574408581366], [22.31572350433057, 55.01529857036585], [21.26844892750346, 55.190481675835301], [21.05580040862241, 56.031076361711051], [22.201156853939491, 56.337801825579483], [23.878263787539957, 56.273671373105259], [24.860684441840753, 56.372528388079616], [25.000934279080887, 56.164530748104831], [25.533046502390327, 56.100296942766029], [26.494331495883749, 55.61510691997762], [26.588279249790386, 55.167175604871659], [25.768432651479792, 54.846962592175082], [25.536353794056989, 54.282423407602515], [24.45068362803703, 53.905702216194747], [23.484127638449841, 53.912497667041123], [23.243987257589506, 54.220566718149129], [22.731098667092649, 54.327536932993311]]] } }, + { "type": "Feature", "properties": { "admin": "Luxembourg", "name": "Luxembourg", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[6.043073357781109, 50.128051662794221], [6.242751092156992, 49.90222565367872], [6.186320428094176, 49.4638028021145], [5.897759230176403, 49.442667141307012], [5.674051954784828, 49.52948354755749], [5.782417433300905, 50.090327867221205], [6.043073357781109, 50.128051662794221]]] } }, + { "type": "Feature", "properties": { "admin": "Latvia", "name": "Latvia", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[21.05580040862241, 56.031076361711051], [21.090423618257965, 56.783872789122924], [21.581866489353668, 57.411870632549913], [22.524341261492872, 57.753374335350756], [23.31845299652209, 57.006236477274854], [24.120729607853423, 57.025692654032753], [24.312862583114615, 57.793423570376966], [25.164593540149262, 57.970156968815175], [25.602809685984365, 57.847528794986559], [26.46353234223778, 57.476388658266316], [27.288184848751509, 57.474528306703817], [27.770015903440925, 57.244258124411218], [27.855282016722519, 56.759326483784278], [28.17670942557799, 56.169129950578807], [27.102459751094525, 55.783313707087672], [26.494331495883749, 55.61510691997762], [25.533046502390327, 56.100296942766029], [25.000934279080887, 56.164530748104831], [24.860684441840753, 56.372528388079616], [23.878263787539957, 56.273671373105259], [22.201156853939491, 56.337801825579483], [21.05580040862241, 56.031076361711051]]] } }, + { "type": "Feature", "properties": { "admin": "Morocco", "name": "Morocco", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[-5.193863491222031, 35.755182196590845], [-4.591006232105143, 35.330711981745644], [-3.640056525070007, 35.39985504815197], [-2.604305792644111, 35.17909332940112], [-2.169913702798624, 35.168396307916694], [-1.792985805661658, 34.527918606091298], [-1.73345455566141, 33.919712836232115], [-1.388049282222596, 32.864015000941372], [-1.124551153966195, 32.651521511357195], [-1.30789913573787, 32.262888902306024], [-2.616604783529567, 32.094346218386157], [-3.068980271812648, 31.724497992473285], [-3.647497931320145, 31.637294012980814], [-3.690441046554666, 30.896951605751152], [-4.859646165374442, 30.501187649043874], [-5.242129278982786, 30.00044302013557], [-6.060632290053745, 29.731699734001801], [-7.059227667661899, 29.57922842052465], [-8.67411617678283, 28.841288967396643], [-8.665589565454836, 27.656425889592462], [-8.817809007940523, 27.656425889592462], [-8.817828334986642, 27.656425889592462], [-8.794883999049032, 27.120696316022553], [-9.413037482124507, 27.088476060488539], [-9.735343390328749, 26.860944729107409], [-10.189424200877452, 26.860944729107409], [-10.551262579785258, 26.990807603456879], [-11.392554897496948, 26.883423977154386], [-11.718219773800339, 26.104091701760801], [-12.030758836301654, 26.030866197203121], [-12.500962693725368, 24.770116278578136], [-13.891110398809044, 23.691009019459383], [-14.22116777185715, 22.310163072188338], [-14.630832688850942, 21.860939846274867], [-14.750954555713404, 21.500600083903802], [-17.002961798561071, 21.42073415779668], [-17.020428432675768, 21.422310288981631], [-16.973247849993182, 21.88574453377495], [-16.589136928767626, 22.158234361250091], [-16.26192175949566, 22.679339504481273], [-16.326413946995896, 23.017768459560894], [-15.982610642958059, 23.723358466074096], [-15.426003790742183, 24.359133612561035], [-15.089331834360729, 24.520260728446964], [-14.824645148161689, 25.103532619725307], [-14.800925665739666, 25.636264960222285], [-14.439939947964827, 26.254418443297645], [-13.773804897506462, 26.618892320252279], [-13.13994177901429, 27.640147813420491], [-13.121613369914709, 27.654147671719805], [-12.61883663578311, 28.038185533148656], [-11.688919236690761, 28.148643907172577], [-10.9009569971044, 28.832142238880913], [-10.39959225100864, 29.09858592377778], [-9.564811163765624, 29.933573716749855], [-9.814718390329174, 31.177735500609053], [-9.434793260119362, 32.038096421836478], [-9.300692918321827, 32.564679266890629], [-8.657476365585039, 33.24024526624239], [-7.654178432638217, 33.697064927702506], [-6.912544114601358, 34.11047638603744], [-6.24434200685141, 35.145865383437517], [-5.929994269219832, 35.759988104793983], [-5.193863491222031, 35.755182196590845]]] } }, + { "type": "Feature", "properties": { "admin": "Moldova", "name": "Moldova", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[26.619336785597788, 48.220726223333457], [26.857823520624798, 48.368210761094488], [27.52253746919515, 48.467119452501102], [28.259546746541837, 48.155562242213406], [28.670891147585163, 48.118148505234089], [29.122698195113024, 47.849095160506458], [29.050867954227321, 47.510226955752493], [29.415135125452732, 47.346645209332571], [29.559674106573105, 46.928582872091312], [29.908851759569295, 46.67436066343145], [29.838210076626289, 46.525325832701675], [30.024658644335364, 46.423936672545032], [29.759971958136383, 46.349987697935354], [29.170653924279879, 46.379262396828693], [29.072106967899288, 46.517677720722482], [28.862972446414055, 46.437889309263824], [28.933717482221621, 46.258830471372491], [28.659987420371575, 45.939986884131628], [28.48526940279276, 45.596907050145887], [28.233553501099035, 45.488283189468369], [28.054442986775392, 45.944586086605618], [28.160017937947707, 46.371562608417207], [28.128030226359037, 46.81047638608824], [27.551166212684841, 47.405117092470817], [27.233872918412736, 47.826770941756365], [26.924176059687561, 48.123264472030982], [26.619336785597788, 48.220726223333457]]] } }, + { "type": "Feature", "properties": { "admin": "Madagascar", "name": "Madagascar", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[49.543518914595737, -12.469832858940553], [49.80898074727908, -12.895284925999551], [50.05651085795715, -13.555761407121981], [50.217431268114055, -14.758788750876795], [50.476536899625515, -15.226512139550541], [50.377111443895942, -15.706069431219122], [50.200274692593169, -16.000263360256763], [49.860605503138665, -15.414252618066913], [49.672606642460849, -15.710203545802477], [49.863344354050142, -16.451036879138773], [49.774564243372694, -16.875042006093597], [49.49861209493411, -17.10603565843827], [49.435618523970298, -17.953064060134363], [49.04179243347393, -19.118781019774442], [48.548540887247995, -20.496888116134119], [47.930749139198653, -22.391501153251077], [47.547723423051295, -23.781958916928513], [47.095761346226588, -24.941629733990446], [46.282477654817079, -25.178462823184102], [45.409507684110444, -25.601434421493082], [44.833573846217547, -25.346101169538933], [44.039720493349755, -24.9883452287823], [43.763768344911156, -24.460677178649988], [43.697777540874441, -23.574116306250595], [43.345654331237611, -22.77690398528387], [43.254187046080986, -22.057413018484116], [43.433297560404633, -21.336475111580185], [43.893682895692919, -21.163307386970121], [43.89637007017209, -20.830459486578167], [44.374325392439644, -20.072366224856385], [44.464397413924374, -19.435454196859045], [44.23242190936616, -18.961994724200899], [44.042976108584149, -18.331387220943167], [43.963084344260899, -17.409944756746778], [44.312468702986273, -16.850495700754951], [44.446517368351387, -16.216219170804504], [44.944936557806521, -16.179373874580396], [45.502731967964976, -15.974373467678538], [45.872993605336255, -15.793454278224681], [46.312243279817203, -15.780018405828795], [46.882182651564271, -15.210182386946309], [47.70512983581235, -14.594302666891762], [48.005214878131241, -14.091232598530372], [47.869047479042152, -13.663868503476582], [48.29382775248137, -13.784067884987483], [48.845060255738773, -13.08917489995866], [48.863508742066976, -12.487867933810417], [49.194651320193302, -12.040556735891967], [49.543518914595737, -12.469832858940553]]] } }, + { "type": "Feature", "properties": { "admin": "Mexico", "name": "Mexico", "continent": "North America" }, "geometry": { "type": "Polygon", "coordinates": [[[-97.140008307670684, 25.869997463478395], [-97.528072475966539, 24.992144069920297], [-97.702945522842214, 24.272343044526728], [-97.776041836319024, 22.932579860927653], [-97.872366706111094, 22.444211737553356], [-97.699043952204164, 21.898689480064256], [-97.388959520236739, 21.411018988525818], [-97.189333462293277, 20.635433254473124], [-96.525575527720306, 19.890930894444061], [-96.292127244841737, 19.32037140550954], [-95.90088497595994, 18.828024196848727], [-94.8390634834427, 18.562717393462204], [-94.425729539756205, 18.144370835843343], [-93.548651292682365, 18.423836981677933], [-92.786113857783477, 18.524838568592255], [-92.037348192090391, 18.704569200103432], [-91.407903408559235, 18.876083278880227], [-90.771869879910852, 19.284120388256778], [-90.533589850613026, 19.867418117751292], [-90.451475999701231, 20.707521877520428], [-90.278618333684889, 20.999855454995547], [-89.601321173851474, 21.261725775634485], [-88.543866339862845, 21.493675441976613], [-87.658416510757704, 21.458845526611977], [-87.051890224948053, 21.543543199138295], [-86.811982388032931, 21.331514797444747], [-86.845907965832595, 20.849864610268348], [-87.383291185235848, 20.255404771398727], [-87.621054450210721, 19.646553046135917], [-87.436750454441764, 19.472403469312265], [-87.586560431655911, 19.040130113190738], [-87.837191128271485, 18.259815985583426], [-88.090664028663156, 18.516647854074048], [-88.300031094093626, 18.499982204659997], [-88.490122850279278, 18.486830552641717], [-88.84834387892657, 17.883198147040329], [-89.029857347351737, 18.001511338772556], [-89.150909389995462, 17.955467637600403], [-89.143080410503316, 17.808318996649401], [-90.067933519230891, 17.819326076727517], [-91.001519945015943, 17.817594916245692], [-91.002269253284155, 17.254657701074272], [-91.453921271515114, 17.252177232324183], [-91.08167009150057, 16.918476670799517], [-90.711821865587623, 16.687483018454767], [-90.600846727240921, 16.470777899638787], [-90.438866950221993, 16.410109768128105], [-90.464472622422633, 16.069562079324722], [-91.747960171255926, 16.066564846251762], [-92.229248623406278, 15.251446641495871], [-92.087215949252013, 15.06458466232851], [-92.203229539747255, 14.830102850804108], [-92.227750006869812, 14.538828640190953], [-93.359463874061746, 15.61542959234367], [-93.875168830118511, 15.94016429286591], [-94.691656460330108, 16.20097524664288], [-95.250227016973014, 16.128318182840641], [-96.053382127653293, 15.752087917539592], [-96.557434048228274, 15.653515122942787], [-97.263592495496624, 15.917064927631312], [-98.013029954809596, 16.107311713113912], [-98.947675747456486, 16.566043402568763], [-99.697397427147024, 16.706164048728166], [-100.829498867581293, 17.171071071842047], [-101.666088629954444, 17.649026394109622], [-101.918528001700196, 17.916090196193974], [-102.478132086988907, 17.975750637275095], [-103.500989549558057, 18.292294623278845], [-103.917527432046811, 18.748571682200005], [-104.992009650475467, 19.316133938061679], [-105.493038499761411, 19.946767279535429], [-105.731396043707633, 20.434101874264108], [-105.397772996831321, 20.531718654863422], [-105.500660773524402, 20.816895046466122], [-105.27075232625792, 21.076284898355137], [-105.265817226974022, 21.422103583252348], [-105.603160976975374, 21.871145941652568], [-105.693413865973113, 22.269080308516148], [-106.028716396898943, 22.77375234627862], [-106.909980434988341, 23.767774359628895], [-107.91544877809136, 24.548915310152946], [-108.401904873470954, 25.172313951105931], [-109.260198737406625, 25.580609442644054], [-109.444089321717314, 25.824883938087673], [-109.291643846456267, 26.44293406829842], [-109.801457689231796, 26.676175645447923], [-110.391731737085692, 27.162114976504533], [-110.641018846461606, 27.859876003525521], [-111.178918830187826, 27.941240546169062], [-111.759606899851619, 28.467952582303944], [-112.228234626090369, 28.954408677683482], [-112.27182369672866, 29.266844387320074], [-112.80959448937395, 30.021113593052341], [-113.163810594518651, 30.786880804969424], [-113.148669399857141, 31.170965887978912], [-113.871881069781836, 31.56760834403519], [-114.205736660603506, 31.524045111613123], [-114.776451178835003, 31.79953217216114], [-114.936699795372121, 31.393484605427595], [-114.771231859173483, 30.91361725516526], [-114.673899298951739, 30.162681179315985], [-114.330974494262918, 29.750432440707407], [-113.588875088335413, 29.061611436473008], [-113.424053107540516, 28.826173610951223], [-113.271969367305502, 28.754782619739892], [-113.140039435664363, 28.411289374295954], [-112.962298346796473, 28.425190334582503], [-112.761587083774856, 27.78021678314752], [-112.457910529411635, 27.525813706974752], [-112.24495195193677, 27.171726792910754], [-111.616489020619184, 26.662817287700474], [-111.284674648872993, 25.732589830014426], [-110.987819383572386, 25.294606228124557], [-110.71000688357131, 24.826004340101854], [-110.655048997828871, 24.298594672131113], [-110.17285620811343, 24.265547593680417], [-109.771847093528521, 23.811182562754194], [-109.409104377055698, 23.364672349536242], [-109.433392300232896, 23.185587673428696], [-109.85421932660168, 22.818271592698061], [-110.031391974714424, 22.823077500901199], [-110.295070970483636, 23.430973212166684], [-110.949501309028022, 24.000964260345988], [-111.670568407012681, 24.484423122652508], [-112.182035895621468, 24.73841278736716], [-112.148988817170817, 25.470125230404044], [-112.300710822379671, 26.012004299416613], [-112.777296719191526, 26.321959540303162], [-113.464670783321907, 26.768185533143416], [-113.596729906043805, 26.639459540304465], [-113.848936733844241, 26.900063788352437], [-114.465746629680027, 27.142090358991361], [-115.055142178184965, 27.722726752222904], [-114.982252570437382, 27.798200181585109], [-114.570365566854917, 27.741485297144884], [-114.199328782999231, 28.115002549750553], [-114.162018398884612, 28.566111965442296], [-114.931842210736605, 29.279479275015483], [-115.518653937626965, 29.556361599235395], [-115.887365282029563, 30.180793768834171], [-116.2583503894529, 30.836464341753572], [-116.721526252084956, 31.635743720012037], [-117.127759999999839, 32.53534], [-115.99135, 32.612390000000111], [-114.72139, 32.72083], [-114.815, 32.52528], [-113.30498, 32.03914], [-111.02361, 31.33472], [-109.035, 31.341940000000129], [-108.24194, 31.34222], [-108.24, 31.754853718166366], [-106.507589999999851, 31.75452], [-106.1429, 31.39995], [-105.63159, 31.08383], [-105.03737, 30.64402], [-104.70575, 30.12173], [-104.456969999999885, 29.57196], [-103.94, 29.27], [-103.11, 28.97], [-102.48, 29.76], [-101.6624, 29.7793], [-100.9576, 29.380710000000125], [-100.45584, 28.696120000000118], [-100.11, 28.11000000000012], [-99.52, 27.54], [-99.3, 26.84], [-99.019999999999897, 26.37], [-98.24, 26.06], [-97.529999999999887, 25.84], [-97.140008307670684, 25.869997463478395]]] } }, + { "type": "Feature", "properties": { "admin": "Macedonia", "name": "Macedonia", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[20.59023, 41.85541], [20.717310000000108, 41.84711], [20.76216, 42.05186], [21.352700000000134, 42.2068], [21.576635989402117, 42.245224397061847], [21.917080000000105, 42.30364], [22.380525750424674, 42.320259507815074], [22.881373732197339, 41.999297186850349], [22.952377150166505, 41.337993882811176], [22.76177, 41.3048], [22.597308383889008, 41.130487168943198], [22.055377638444266, 41.149865831052686], [21.674160597426969, 40.93127452245794], [21.020040317476397, 40.842726955725873], [20.60518, 41.08622], [20.46315, 41.51509], [20.59023, 41.85541]]] } }, + { "type": "Feature", "properties": { "admin": "Mali", "name": "Mali", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[-12.170750291380299, 14.616834214735503], [-11.834207526079465, 14.799096991428936], [-11.666078253617853, 15.388208319556295], [-11.349095017939502, 15.411256008358475], [-10.650791388379414, 15.132745876521422], [-10.086846482778212, 15.330485744686269], [-9.700255092802703, 15.264107367407359], [-9.550238409859388, 15.486496893775435], [-5.537744309908446, 15.501689764869253], [-5.315277268891931, 16.201853745991837], [-5.488522508150438, 16.325102037007962], [-5.971128709324247, 20.640833441647626], [-6.453786586930334, 24.956590684503418], [-4.92333736817423, 24.974574082940993], [-1.550054897457613, 22.792665920497377], [1.823227573259032, 20.61080943448604], [2.060990838233919, 20.142233384679482], [2.683588494486428, 19.856230170160114], [3.146661004253899, 19.693578599521441], [3.158133172222704, 19.057364203360034], [4.267419467800038, 19.155265204336995], [4.270209995143801, 16.852227484601212], [3.723421665063482, 16.184283759012612], [3.638258904646476, 15.568119818580453], [2.749992709981483, 15.409524847876693], [1.385528191746857, 15.323561102759168], [1.01578331869851, 14.968182277887944], [0.374892205414682, 14.928908189346128], [-0.26625729003058, 14.924308986872147], [-0.515854458000348, 15.116157741755725], [-1.066363491205663, 14.973815009007764], [-2.001035122068771, 14.559008287000887], [-2.191824510090384, 14.246417548067352], [-2.967694464520576, 13.798150336151506], [-3.103706834312759, 13.54126679122859], [-3.52280270019986, 13.337661647998612], [-4.006390753587225, 13.472485459848112], [-4.280405035814879, 13.228443508349738], [-4.427166103523802, 12.542645575404292], [-5.220941941743119, 11.713858954307224], [-5.197842576508648, 11.375145778850136], [-5.470564947929004, 10.951269842976044], [-5.404341599946973, 10.370736802609144], [-5.816926235365286, 10.222554633012191], [-6.050452032892266, 10.096360785355442], [-6.205222947606429, 10.524060777219132], [-6.493965013037267, 10.411302801958268], [-6.666460944027547, 10.430810655148447], [-6.850506557635057, 10.138993841996237], [-7.622759161804808, 10.147236232946792], [-7.89958980959237, 10.297382106970824], [-8.029943610048617, 10.206534939001711], [-8.335377163109738, 10.494811916541932], [-8.282357143578279, 10.792597357623842], [-8.407310756860026, 10.90925690352276], [-8.620321010767126, 10.810890814655181], [-8.581305304386772, 11.136245632364801], [-8.376304897484911, 11.393645941610627], [-8.786099005559462, 11.812560939984705], [-8.905264858424529, 12.088358059126433], [-9.127473517279581, 12.308060411015331], [-9.327616339546008, 12.334286200403451], [-9.567911749703212, 12.194243068892472], [-9.890992804392011, 12.060478623904968], [-10.165213792348835, 11.844083563682743], [-10.593223842806278, 11.923975328005977], [-10.870829637078211, 12.177887478072106], [-11.036555955438256, 12.211244615116513], [-11.297573614944508, 12.077971096235768], [-11.456168585648269, 12.076834214725336], [-11.513942836950587, 12.442987575729415], [-11.467899135778522, 12.754518947800973], [-11.553397793005427, 13.141213690641063], [-11.927716030311613, 13.422075100147392], [-12.124887457721256, 13.994727484589784], [-12.170750291380299, 14.616834214735503]]] } }, + { "type": "Feature", "properties": { "admin": "Myanmar", "name": "Myanmar", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[99.543309360759281, 20.186597601802056], [98.959675734454848, 19.752980658440944], [98.253723992915582, 19.708203029860041], [97.797782830804394, 18.627080389881751], [97.375896437573516, 18.445437730375811], [97.859122755934848, 17.567946071843657], [98.493761020911322, 16.837835598207928], [98.90334842325673, 16.177824204976115], [98.537375929765687, 15.308497422746081], [98.192074009191373, 15.123702500870349], [98.430819126379859, 14.622027696180831], [99.097755161538728, 13.827502549693275], [99.212011753336071, 13.269293728076462], [99.196353794351637, 12.804748439988666], [99.587286004639694, 11.892762762901695], [99.038120558673953, 10.960545762572435], [98.553550653073017, 9.932959906448543], [98.457174106848697, 10.675266018105146], [98.764545526120756, 11.441291612183745], [98.428338657629823, 12.032986761925681], [98.509574009192661, 13.122377631070675], [98.103603957107666, 13.64045970301285], [97.777732375075161, 14.837285874892638], [97.597071567782749, 16.100567938699765], [97.164539829499773, 16.928734442609336], [96.505768670642965, 16.427240505432845], [95.369352248112378, 15.714389960182599], [94.808404575584092, 15.803454291237637], [94.188804152404515, 16.037936102762014], [94.533485955791321, 17.277240301985724], [94.324816522196741, 18.213513902249893], [93.540988397193615, 19.366492621330021], [93.663254835996199, 19.726961574781992], [93.078277622452163, 19.855144965081973], [92.368553501355606, 20.670883287025344], [92.30323449093865, 21.475485337809815], [92.652257114637976, 21.324047552978481], [92.672720981825549, 22.041238918541247], [93.166127557348361, 22.278459580977099], [93.060294224014598, 22.703110663335565], [93.286326938859247, 23.043658352138998], [93.325187615942767, 24.078556423432197], [94.106741977925054, 23.850740871673477], [94.552657912171611, 24.675238348890328], [94.603249139385355, 25.162495428970399], [95.155153436262566, 26.001307277932078], [95.124767694074933, 26.573572089132295], [96.419365675850941, 27.264589341739221], [97.133999058015277, 27.08377350514996], [97.051988559968066, 27.699058946233144], [97.402561476636123, 27.88253611908544], [97.327113885490007, 28.261582749946331], [97.91198774616943, 28.335945136014338], [98.24623091023328, 27.747221381129172], [98.682690057370451, 27.508812160750612], [98.712093947344499, 26.74353587494026], [98.671838006589127, 25.918702500913518], [97.724609002679117, 25.083637193292994], [97.604719679761956, 23.897404690033039], [98.660262485755737, 24.063286037689959], [98.898749220782747, 23.142722072842524], [99.531992222087382, 22.949038804612574], [99.240898878987224, 22.118314317304577], [99.983489211021464, 21.742936713136398], [100.416537713627349, 21.558839423096607], [101.150032993578222, 21.849984442629015], [101.180005324307515, 21.436572984294024], [100.329101190189519, 20.786121731036229], [100.115987583417819, 20.41784963630818], [99.543309360759281, 20.186597601802056]]] } }, + { "type": "Feature", "properties": { "admin": "Montenegro", "name": "Montenegro", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[19.801613396898681, 42.500093492190835], [19.738051385179627, 42.688247382165564], [19.30449, 42.19574], [19.371770000000136, 41.87755], [19.16246, 41.95502], [18.88214, 42.28151], [18.45, 42.48], [18.56, 42.65], [18.70648, 43.20011], [19.03165, 43.43253], [19.21852, 43.52384], [19.48389, 43.35229], [19.63, 43.213779970270522], [19.95857, 43.10604], [20.3398, 42.89852], [20.25758, 42.81275], [20.0707, 42.58863], [19.801613396898681, 42.500093492190835]]] } }, + { "type": "Feature", "properties": { "admin": "Mongolia", "name": "Mongolia", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[87.751264276076697, 49.297197984405479], [88.805566847695488, 49.470520738312409], [90.713667433640666, 50.331811835321076], [92.234711541719662, 50.802170722041716], [93.104219191462661, 50.495290228876414], [94.147566359435615, 50.480536607457083], [94.815949334698701, 50.013433335970838], [95.814027947983973, 49.977466539095708], [97.259727817781396, 49.726060695995727], [98.231761509191543, 50.422400621128737], [97.825739780674283, 51.010995184933165], [98.861490513100307, 52.047366034546684], [99.981732212323507, 51.634006252643978], [100.889480421962588, 51.516855780638316], [102.065222609467298, 51.25992055928311], [102.255908644624299, 50.510560614618669], [103.676545444760194, 50.089966132195109], [104.621552362081687, 50.275329494826067], [105.886591424586726, 50.406019192092209], [106.888804152455336, 50.274295966180219], [107.868175897250936, 49.793705145865808], [108.475167270951275, 49.282547715850725], [109.402449171996636, 49.292960516957535], [110.662010532678764, 49.130128078805861], [111.581230910286607, 49.377968248077678], [112.897739699354361, 49.543565375356984], [114.362456496235239, 50.248302720737399], [114.962109816550154, 50.140247300815112], [115.485695428531386, 49.805177313834591], [116.678800897286152, 49.888531399121376], [116.191802199367544, 49.134598090199091], [115.485282017073018, 48.135382595403428], [115.742837355615748, 47.726544501326273], [116.308952671373206, 47.853410142602826], [117.295507440257396, 47.69770905210742], [118.064142694166691, 48.066730455103674], [118.866574334794933, 47.747060044946153], [119.772823927897477, 47.048058783550125], [119.66326989143873, 46.692679958678909], [118.874325799638711, 46.805412095723646], [117.421701287914175, 46.672732855814253], [116.717868280098841, 46.388202419615205], [115.985096470200062, 45.727235012385989], [114.46033165899604, 45.339816799493811], [113.463906691544139, 44.808893134127111], [112.436062453258785, 45.011645616224278], [111.873306105600278, 45.102079372735055], [111.348376906379428, 44.457441718110083], [111.667737257943202, 44.073175767587706], [111.829587843881342, 43.743118394539515], [111.129682244920218, 43.406834011400136], [110.412103306115256, 42.871233628911014], [109.243595819131428, 42.519446316084093], [107.744772576937933, 42.481515814781865], [106.129315627061658, 42.134327704428898], [104.964993931093446, 41.597409572916334], [104.522281935648977, 41.908346666016541], [103.312278273534787, 41.907468166667591], [101.833040399179922, 42.51487295182627], [100.845865513108237, 42.663804429691439], [99.515817498780009, 42.524691473961717], [97.451757440177985, 42.748889675460013], [96.349395786527793, 42.725635280928678], [95.762454868556674, 43.319449164394598], [95.306875441471504, 44.241330878265458], [94.688928664125299, 44.352331854828414], [93.480733677141274, 44.975472113619951], [92.133890822318193, 45.115075995456444], [90.945539585334288, 45.286073309910265], [90.585768263718265, 45.719716091487513], [90.970809360724985, 46.888146063822923], [90.280825636763893, 47.693549099307923], [88.854297723346733, 48.06908173277295], [88.013832228551721, 48.599462795600601], [87.751264276076697, 49.297197984405479]]] } }, + { "type": "Feature", "properties": { "admin": "Mozambique", "name": "Mozambique", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[34.559989047999345, -11.520020033415923], [35.312397902169032, -11.439146416879145], [36.514081658684248, -11.720938002166733], [36.775150994622791, -11.594537448780804], [37.471284214026596, -11.568750909067157], [37.827644891111383, -11.268769219612834], [38.427556593587745, -11.285202325081654], [39.521029900883768, -10.896853936408224], [40.316588576017182, -10.317096042525696], [40.478387485523022, -10.765440769089992], [40.437253045418672, -11.761710707245014], [40.560811395028558, -12.639176527561023], [40.599620395679743, -14.201975192931858], [40.775475294768988, -14.691764418194239], [40.477250604012596, -15.406294447493968], [40.089263950365208, -16.100774021064456], [39.452558628097044, -16.720891208566936], [38.53835086442151, -17.101023044505954], [37.411132846838875, -17.586368096591233], [36.281279331209348, -18.659687595293445], [35.896496616364054, -18.842260430580634], [35.198399692533137, -19.552811374593887], [34.786383497870041, -19.784011732667732], [34.701892531072836, -20.497043145431007], [35.176127150215358, -21.254361260668407], [35.373427768705731, -21.840837090748874], [35.385848253705397, -22.14], [35.562545536369079, -22.09], [35.533934767404297, -23.070787855727751], [35.371774122872374, -23.535358982031692], [35.607470330555621, -23.706563002214676], [35.458745558419615, -24.122609958596545], [35.040734897610655, -24.478350518493798], [34.215824008935463, -24.816314385682652], [33.013210076639005, -25.357573337507731], [32.574632195777859, -25.727318210556088], [32.660363396950082, -26.148584486599443], [32.915955031065685, -26.215867201443459], [32.830120477028878, -26.74219166433619], [32.071665480281062, -26.733820082304902], [31.985779249811962, -26.29177988048022], [31.837777947728057, -25.843331801051342], [31.752408481581874, -25.484283949487406], [31.930588820124242, -24.369416599222532], [31.670397983534645, -23.658969008073861], [31.191409132621278, -22.251509698172395], [32.244988234188007, -21.116488539313689], [32.508693068173436, -20.395292250248303], [32.659743279762573, -20.30429005298231], [32.772707960752619, -19.715592136313294], [32.611994256324884, -19.419382826416268], [32.654885695127142, -18.672089939043492], [32.849860874164385, -17.979057305577175], [32.847638787575839, -16.713398125884613], [32.328238966610222, -16.392074069893749], [31.852040643040592, -16.319417006091374], [31.636498243951188, -16.071990248277881], [31.173063999157673, -15.860943698797868], [30.338954705534537, -15.880839125230242], [30.274255812305103, -15.507786960515208], [30.179481235481827, -14.796099134991525], [33.214024692525207, -13.97186003993615], [33.789700148256678, -14.451830743063068], [34.064825473778619, -14.359950046448118], [34.459633416488536, -14.613009535381421], [34.517666049952304, -15.013708591372609], [34.307291294092089, -15.478641452702592], [34.381291945134045, -16.183559665596039], [35.033810255683527, -16.801299737213089], [35.339062941231639, -16.107440280830108], [35.771904738108347, -15.896858819240721], [35.686845330555926, -14.611045830954328], [35.267956170398001, -13.887834161029563], [34.907151320136158, -13.565424899960565], [34.559989047999345, -13.579997653866872], [34.280006137841973, -12.280025323132504], [34.559989047999345, -11.520020033415923]]] } }, + { "type": "Feature", "properties": { "admin": "Mauritania", "name": "Mauritania", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[-12.170750291380299, 14.616834214735503], [-12.830658331747513, 15.303691514542942], [-13.43573767745306, 16.039383042866188], [-14.099521450242175, 16.304302273010489], [-14.577347581428977, 16.598263658102805], [-15.135737270558813, 16.587282416240779], [-15.623666144258689, 16.369337063049809], [-16.120690070041928, 16.45566254319338], [-16.463098110407881, 16.135036119038457], [-16.549707810929061, 16.673892116761959], [-16.270551723688353, 17.166962795474866], [-16.146347418674846, 18.108481553616652], [-16.256883307347163, 19.096715806550304], [-16.377651129613266, 19.593817246981981], [-16.277838100641514, 20.092520656814695], [-16.536323614965465, 20.567866319251486], [-17.063423224342568, 20.99975210213082], [-16.845193650773989, 21.333323472574875], [-12.929101935263528, 21.327070624267559], [-13.118754441774708, 22.771220201096249], [-12.874221564169574, 23.284832261645171], [-11.93722449385332, 23.374594224536164], [-11.969418911171159, 25.933352769468261], [-8.687293667017398, 25.881056219988899], [-8.684399786809051, 27.395744126895998], [-4.92333736817423, 24.974574082940993], [-6.453786586930334, 24.956590684503418], [-5.971128709324247, 20.640833441647626], [-5.488522508150438, 16.325102037007962], [-5.315277268891931, 16.201853745991837], [-5.537744309908446, 15.501689764869253], [-9.550238409859388, 15.486496893775435], [-9.700255092802703, 15.264107367407359], [-10.086846482778212, 15.330485744686269], [-10.650791388379414, 15.132745876521422], [-11.349095017939502, 15.411256008358475], [-11.666078253617853, 15.388208319556295], [-11.834207526079465, 14.799096991428936], [-12.170750291380299, 14.616834214735503]]] } }, + { "type": "Feature", "properties": { "admin": "Malawi", "name": "Malawi", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[34.559989047999345, -11.520020033415923], [34.280006137841973, -12.280025323132504], [34.559989047999345, -13.579997653866872], [34.907151320136158, -13.565424899960565], [35.267956170398001, -13.887834161029563], [35.686845330555926, -14.611045830954328], [35.771904738108347, -15.896858819240721], [35.339062941231639, -16.107440280830108], [35.033810255683527, -16.801299737213089], [34.381291945134045, -16.183559665596039], [34.307291294092089, -15.478641452702592], [34.517666049952304, -15.013708591372609], [34.459633416488536, -14.613009535381421], [34.064825473778619, -14.359950046448118], [33.789700148256678, -14.451830743063068], [33.214024692525207, -13.97186003993615], [32.688165317523122, -13.712857761289273], [32.991764357237876, -12.783870537978272], [33.306422153463068, -12.435778090060214], [33.114289178201908, -11.607198174692311], [33.315310499817279, -10.796549981329695], [33.485687697083584, -10.525558770391111], [33.231387973775291, -9.676721693564799], [32.759375441221316, -9.230599053589058], [33.739729038230443, -9.417150974162722], [33.940837724096532, -9.693673841980292], [34.280006137841973, -10.159999688358402], [34.559989047999345, -11.520020033415923]]] } }, + { "type": "Feature", "properties": { "admin": "Malaysia", "name": "Malaysia", "continent": "Asia" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[101.075515578213299, 6.204867051615891], [101.154218784593809, 5.691384182147713], [101.814281854258013, 5.810808417174228], [102.141186964936423, 6.221636053894655], [102.371147088635212, 6.12820506431096], [102.961705356866673, 5.524495144061077], [103.381214634212142, 4.855001125503746], [103.438575474056165, 4.181605536308381], [103.332122023534851, 3.72669790284297], [103.42942874554052, 3.382868760589019], [103.502447544368877, 2.791018581550204], [103.854674106870334, 2.515454006353763], [104.247931756611479, 1.631141058759055], [104.228811476663523, 1.293048000489534], [103.519707472754433, 1.226333726400682], [102.573615350354771, 1.967115383304744], [101.39063846232915, 2.760813706875623], [101.273539666755838, 3.27029165284118], [100.69543541870668, 3.939139715994869], [100.557407668055092, 4.767280381688279], [100.19670617065772, 5.312492580583678], [100.306260207116509, 6.040561835143875], [100.085756870527078, 6.46448944745029], [100.259596388756918, 6.64282481528957], [101.075515578213299, 6.204867051615891]]], [[[118.618320754064825, 4.47820241944754], [117.882034946770162, 4.137551377779487], [117.01521447150634, 4.306094061699468], [115.86551720587677, 4.306559149590156], [115.51907840379198, 3.169238389494395], [115.134037306785231, 2.821481838386219], [114.621355422017473, 1.430688177898886], [113.805849644019531, 1.217548732911041], [112.859809198052176, 1.497790025229946], [112.380251906383648, 1.410120957846757], [111.797548455860408, 0.904441229654651], [111.159137811326559, 0.976478176269509], [110.514060907027101, 0.773131415200993], [109.830226678508836, 1.338135687664191], [109.663260125773718, 2.006466986494984], [110.396135288537039, 1.663774725751395], [111.168852980597478, 1.850636704918784], [111.370081007942076, 2.697303371588872], [111.796928338672842, 2.885896511238073], [112.995614862115247, 3.102394924324869], [113.712935418758718, 3.893509426281127], [114.204016554828399, 4.525873928236819], [114.659595981913526, 4.00763682699781], [114.869557326315373, 4.348313706881952], [115.347460972150671, 4.316636053887009], [115.405700311343594, 4.955227565933824], [115.450710483869798, 5.447729803891561], [116.220741001450961, 6.143191229675621], [116.725102980619752, 6.924771429873998], [117.129626092600461, 6.928052883324566], [117.643393182446303, 6.422166449403305], [117.689075148592337, 5.98749013918018], [118.347691278152197, 5.708695786965462], [119.181903924639926, 5.407835598162249], [119.110693800941718, 5.016128241389864], [118.439727004064082, 4.966518866389619], [118.618320754064825, 4.47820241944754]]]] } }, + { "type": "Feature", "properties": { "admin": "Namibia", "name": "Namibia", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[16.344976840895239, -28.576705010697697], [15.601818068105812, -27.821247247022797], [15.210472446359457, -27.09095590587404], [14.989710727608548, -26.117371921495153], [14.74321414557633, -25.392920017195376], [14.40814415859583, -23.85301401132984], [14.385716586981145, -22.656652927340687], [14.257714064194172, -22.111208184499951], [13.868642205468657, -21.699036960539974], [13.352497999737437, -20.872834161057497], [12.82684533046449, -19.673165785401661], [12.608564080463617, -19.045348809487695], [11.794918654028063, -18.069129327061912], [11.734198846085118, -17.30188933682447], [12.215461460019352, -17.11166838955808], [12.814081251688405, -16.941342868724067], [13.462362094789963, -16.971211846588769], [14.058501417709007, -17.42338062914266], [14.209706658595021, -17.353100681225715], [18.26330936043416, -17.309950860262003], [18.956186964603599, -17.789094740472255], [21.377176141045563, -17.930636488519688], [23.215048455506057, -17.52311614346598], [24.033861525170771, -17.29584319424632], [24.6823490740015, -17.35341073981947], [25.076950310982255, -17.578823337476617], [25.084443393664564, -17.661815687737366], [24.520705193792534, -17.887124932529932], [24.217364536239209, -17.889347019118485], [23.579005568137713, -18.281261081620055], [23.196858351339298, -17.869038181227783], [21.655040317478971, -18.219146010005222], [20.910641310314531, -18.252218926672018], [20.881134067475866, -21.814327080983144], [19.895457797940672, -21.849156996347865], [19.895767856534427, -24.767790215760588], [19.89473432788861, -28.461104831660769], [19.002127312911082, -28.972443129188857], [18.464899122804745, -29.045461928017271], [17.836151971109526, -28.856377862261311], [17.387497185951499, -28.783514092729774], [17.218928663815401, -28.355943291946804], [16.824017368240899, -28.082161553664466], [16.344976840895239, -28.576705010697697]]] } }, + { "type": "Feature", "properties": { "admin": "New Caledonia", "name": "New Caledonia", "continent": "Oceania" }, "geometry": { "type": "Polygon", "coordinates": [[[165.779989862326346, -21.080004978115621], [166.599991489933814, -21.700018812753523], [167.120011428086883, -22.159990736583488], [166.74003462144475, -22.399976088146943], [166.189732293968632, -22.129708347260447], [165.474375441752159, -21.679606621998229], [164.829815301775653, -21.149819838141948], [164.16799523341362, -20.444746595951624], [164.029605747735957, -20.105645847252347], [164.459967075862664, -20.120011895429492], [165.020036249041993, -20.459991143477726], [165.460009393575064, -20.800022067958253], [165.779989862326346, -21.080004978115621]]] } }, + { "type": "Feature", "properties": { "admin": "Niger", "name": "Niger", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[2.154473504249949, 11.940150051313422], [2.177107781593917, 12.625017808477534], [1.024103224297619, 12.851825669806598], [0.993045688490156, 13.335749620003865], [0.429927605805517, 13.988733018443893], [0.295646396495215, 14.444234930880663], [0.374892205414767, 14.928908189346144], [1.015783318698481, 14.968182277887989], [1.385528191746971, 15.323561102759237], [2.74999270998154, 15.409524847876751], [3.63825890464659, 15.56811981858044], [3.723421665063596, 16.184283759012654], [4.270209995143886, 16.852227484601311], [4.267419467800095, 19.155265204337123], [5.677565952180712, 19.601206976799794], [8.572893100629868, 21.565660712159225], [11.999505649471697, 23.471668402596432], [13.581424594790459, 23.040506089769274], [14.143870883855239, 22.491288967371126], [14.8513, 22.862950000000119], [15.096887648181847, 21.308518785074902], [15.471076694407314, 21.048457139565979], [15.487148064850143, 20.730414537025634], [15.90324669766431, 20.387618923417499], [15.68574059414777, 19.957180080642384], [15.300441114979716, 17.927949937405], [15.247731154041842, 16.627305813050778], [13.972201775781681, 15.684365953021139], [13.540393507550785, 14.36713369390122], [13.956698846094124, 13.996691189016925], [13.954476759505607, 13.353448798063765], [14.595781284247604, 13.330426947477859], [14.495787387762899, 12.859396267137353], [14.213530714584746, 12.80203542729333], [14.181336297266906, 12.483656927943169], [13.995352817448289, 12.4615652531383], [13.318701613018558, 13.55635630945795], [13.083987257548809, 13.596147162322492], [12.302071160540546, 13.037189032437535], [11.527803175511504, 13.328980007373556], [10.989593133191532, 13.387322699431191], [10.701031935273816, 13.246917832894038], [10.114814487354748, 13.277251898649464], [9.524928012743088, 12.85110219975456], [9.014933302454436, 12.826659247280414], [7.804671258178869, 13.343526923063731], [7.330746697630046, 13.098038031461213], [6.82044192874781, 13.115091254117598], [6.445426059605721, 13.492768459522718], [5.443058302440135, 13.865923977102225], [4.368343540066006, 13.747481594289408], [4.107945997747378, 13.531215725147941], [3.967282749048933, 12.956108710171574], [3.680633579125924, 12.552903347214167], [3.611180454125587, 11.660167141155965], [2.848643019226585, 12.235635891158207], [2.490163608418015, 12.233052069543588], [2.154473504249949, 11.940150051313422]]] } }, + { "type": "Feature", "properties": { "admin": "Nigeria", "name": "Nigeria", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[8.500287713259693, 4.771982937026847], [7.462108188515939, 4.41210826254624], [7.082596469764438, 4.464689032403228], [6.698072137080598, 4.240594183769516], [5.898172641634686, 4.262453314628984], [5.362804803090881, 4.887970689305957], [5.033574252959368, 5.611802476418233], [4.325607130560683, 6.270651149923466], [3.574180128604552, 6.258300482605717], [2.691701694356254, 6.258817246928628], [2.74906253420022, 7.870734361192886], [2.723792758809509, 8.506845404489708], [2.912308383810255, 9.13760793704432], [3.220351596702101, 9.4441525333997], [3.705438266625918, 10.063210354040207], [3.600070021182801, 10.332186184119406], [3.797112257511713, 10.734745591673104], [3.572216424177469, 11.327939357951516], [3.611180454125558, 11.660167141155966], [3.68063357912581, 12.552903347214222], [3.967282749048848, 12.956108710171572], [4.107945997747321, 13.531215725147829], [4.368343540066063, 13.747481594289324], [5.443058302440163, 13.865923977102295], [6.445426059605636, 13.492768459522676], [6.820441928747753, 13.115091254117514], [7.330746697630017, 13.098038031461199], [7.804671258178784, 13.343526923063745], [9.014933302454462, 12.826659247280427], [9.524928012742945, 12.851102199754477], [10.114814487354689, 13.277251898649409], [10.701031935273702, 13.246917832894081], [10.989593133191532, 13.387322699431108], [11.527803175511393, 13.328980007373584], [12.302071160540521, 13.037189032437521], [13.083987257548866, 13.596147162322563], [13.318701613018558, 13.556356309457824], [13.995352817448346, 12.461565253138343], [14.181336297266792, 12.483656927943112], [14.57717776862253, 12.085360826053501], [14.468192172918974, 11.90475169519341], [14.415378859116682, 11.572368882692071], [13.572949659894558, 10.798565985553564], [13.308676385153914, 10.160362046748926], [13.1675997249971, 9.64062632897341], [12.955467970438971, 9.417771714714702], [12.753671502339214, 8.717762762888993], [12.218872104550597, 8.305824082874322], [12.063946160539556, 7.799808457872301], [11.839308709366801, 7.397042344589434], [11.745774366918509, 6.981382961449753], [11.058787876030349, 6.644426784690593], [10.497375115611417, 7.055357774275562], [10.118276808318255, 7.038769639509879], [9.522705926154398, 6.453482367372116], [9.233162876023043, 6.444490668153334], [8.757532993208626, 5.47966583904791], [8.500287713259693, 4.771982937026847]]] } }, + { "type": "Feature", "properties": { "admin": "Nicaragua", "name": "Nicaragua", "continent": "North America" }, "geometry": { "type": "Polygon", "coordinates": [[[-85.712540452807289, 11.088444932494822], [-86.058488328785245, 11.40343862552994], [-86.525849982432931, 11.806876532432593], [-86.7459915839963, 12.143961900272483], [-87.167516242201131, 12.458257961471656], [-87.668493415054698, 12.909909979702629], [-87.557466600275603, 13.064551703336061], [-87.392386237319201, 12.914018256069836], [-87.316654425795463, 12.984685777228972], [-87.005769009127562, 13.025794379117157], [-86.880557013684339, 13.254204209847241], [-86.733821784191576, 13.263092556201441], [-86.755086636079696, 13.754845485890909], [-86.520708177419877, 13.778487453664436], [-86.312142096689911, 13.771356106008167], [-86.096263800790581, 14.038187364147245], [-85.801294725268576, 13.836054999237586], [-85.698665330736901, 13.960078436738083], [-85.514413011400222, 14.079011745657834], [-85.165364549484792, 14.354369615125076], [-85.148750576502948, 14.560196844943615], [-85.052787441736925, 14.551541042534719], [-84.924500698572388, 14.790492865452348], [-84.820036790694346, 14.819586696832669], [-84.649582078779602, 14.66680532476175], [-84.449335903648588, 14.621614284722494], [-84.228341640952394, 14.748764146376654], [-83.975721401693576, 14.749435939996458], [-83.628584967772895, 14.880073960830298], [-83.489988776366104, 15.016267198135534], [-83.147219000974104, 14.995829169164109], [-83.233234422523907, 14.8998660343981], [-83.28416154654758, 14.676623846897197], [-83.182126430987267, 14.310703029838447], [-83.412499966144424, 13.970077826386554], [-83.519831916014667, 13.56769928634588], [-83.55220720084553, 13.127054348193084], [-83.498515387694255, 12.869292303921226], [-83.473323126951968, 12.419087225794424], [-83.626104499022887, 12.320850328007563], [-83.719613003255034, 11.893124497927724], [-83.650857510090702, 11.629032090700116], [-83.855470343750369, 11.373311265503785], [-83.808935716471538, 11.103043524617274], [-83.655611741861563, 10.938764146361418], [-83.895054490885926, 10.726839097532444], [-84.190178595704822, 10.793450018756671], [-84.355930752281026, 10.999225572142901], [-84.673069017256239, 11.082657172078139], [-84.903003302738924, 10.952303371621895], [-85.561851976244171, 11.217119248901593], [-85.712540452807289, 11.088444932494822]]] } }, + { "type": "Feature", "properties": { "admin": "Netherlands", "name": "Netherlands", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[6.074182570020922, 53.51040334737813], [6.905139601274128, 53.482162177130633], [7.092053256873895, 53.14404328064488], [6.842869500362381, 52.228440253297542], [6.589396599970825, 51.85202912048338], [5.988658074577812, 51.85161570902504], [6.156658155958779, 50.803721015010574], [5.60697594567, 51.037298488969768], [4.973991326526913, 51.475023708698124], [4.047071160507527, 51.267258612668556], [3.314971144228536, 51.345755113319903], [3.830288527043137, 51.620544542031936], [4.705997348661184, 53.091798407597757], [6.074182570020922, 53.51040334737813]]] } }, + { "type": "Feature", "properties": { "admin": "Norway", "name": "Norway", "continent": "Europe" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[28.165547316202911, 71.185474351680497], [31.293418409965472, 70.453787746859902], [30.005435011522785, 70.186258856884876], [31.101078728975118, 69.558080145944857], [29.399580519332879, 69.156916002063056], [28.591929559043187, 69.064776923286686], [29.015572950971968, 69.76649119737796], [27.732292107867885, 70.164193020296281], [26.179622023226298, 69.825298977326142], [25.689212680776389, 69.092113755968995], [24.735679152126714, 68.649556789821432], [23.662049594830759, 68.891247463650515], [22.356237827247405, 68.841741441514941], [21.244936150810723, 69.370443020293109], [20.645592889089581, 69.106247260200846], [20.02526899585791, 69.065138658312705], [19.878559604581248, 68.407194322372604], [17.993868442464386, 68.567391262477329], [17.729181756265344, 68.01055186631622], [16.768878614985535, 68.013936672631374], [16.108712192456832, 67.302455552836889], [15.108411492583055, 66.193866889095418], [13.555689731509087, 64.787027696381458], [13.919905226302202, 64.445420640716108], [13.571916131248766, 64.049114081469654], [12.57993533697393, 64.066218980558332], [11.930569288794228, 63.128317572676977], [11.992064243221531, 61.800362453856557], [12.63114668137524, 61.293571682370079], [12.300365838274896, 60.117932847730046], [11.468271925511173, 59.432393296945989], [11.027368605196925, 58.856149400459394], [10.356556837616095, 59.469807033925363], [8.382000359743641, 58.313288479233265], [7.048748406613297, 58.078884182357271], [5.665835402050418, 58.588155422593658], [5.308234490590733, 59.663231919993805], [4.992078077829005, 61.97099803328426], [5.912900424837885, 62.614472968182682], [8.553411085655766, 63.454008287196459], [10.527709181366784, 64.486038316497471], [12.358346795306371, 65.879725857193151], [14.7611458675816, 67.810641587995121], [16.435927361728968, 68.563205471461671], [19.184028354578512, 69.817444159617807], [21.378416375420606, 70.255169379346043], [23.02374230316158, 70.202071845166259], [24.546543409938515, 71.030496731237221], [26.370049676221807, 70.986261705195361], [28.165547316202911, 71.185474351680497]]], [[[24.72412, 77.85385], [22.49032, 77.44493], [20.72601, 77.67704], [21.41611, 77.93504], [20.8119, 78.25463], [22.88426, 78.45494], [23.28134, 78.07954], [24.72412, 77.85385]]], [[[18.25183, 79.70175], [21.54383, 78.95611], [19.02737, 78.5626], [18.47172, 77.82669], [17.59441, 77.63796], [17.1182, 76.80941], [15.91315, 76.77045], [13.76259, 77.38035], [14.66956, 77.73565], [13.1706, 78.02493], [11.22231, 78.8693], [10.44453, 79.65239], [13.17077, 80.01046], [13.71852, 79.66039], [15.14282, 79.67431], [15.52255, 80.01608], [16.99085, 80.05086], [18.25183, 79.70175]]], [[[25.447625359811887, 80.407340399894494], [27.407505730913492, 80.056405748200447], [25.924650506298171, 79.517833970854539], [23.024465773213613, 79.40001170522909], [20.075188429451877, 79.566823228667232], [19.897266473070907, 79.842361965647498], [18.46226362475792, 79.859880276194403], [17.368015170977454, 80.318896186027004], [20.455992059010693, 80.598155626132225], [21.907944777115397, 80.357679348462071], [22.919252557067431, 80.657144273593488], [25.447625359811887, 80.407340399894494]]]] } }, + { "type": "Feature", "properties": { "admin": "Nepal", "name": "Nepal", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[88.120440708369841, 27.876541652939586], [88.043132765661198, 27.445818589786818], [88.174804315140904, 26.810405178325944], [88.060237664749806, 26.414615383402484], [87.22747195836628, 26.39789805755607], [86.024392938179147, 26.630984605408567], [85.25177859898335, 26.726198431906337], [84.675017938173767, 27.234901231387528], [83.304248895199535, 27.364505723575554], [81.999987420584958, 27.925479234319987], [81.057202589851997, 28.416095282499036], [80.088424513676259, 28.794470119740136], [80.476721225917373, 29.729865220655334], [81.11125613802929, 30.183480943313398], [81.525804477874729, 30.422716986608627], [82.327512648450863, 30.115268052688126], [83.337115106137176, 29.463731594352193], [83.898992954446712, 29.320226141877654], [84.234579705750136, 28.839893703724691], [85.011638218123025, 28.642773952747337], [85.823319940131498, 28.203575954698699], [86.954517043000592, 27.97426178640351], [88.120440708369841, 27.876541652939586]]] } }, + { "type": "Feature", "properties": { "admin": "New Zealand", "name": "New Zealand", "continent": "Oceania" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[173.020374790740703, -40.919052422856417], [173.247234328502003, -41.331998793300777], [173.958405389702875, -40.926700534835604], [174.2475867048081, -41.349155368821663], [174.248516880589449, -41.770008233406749], [173.876446568087886, -42.233184096038819], [173.222739699595621, -42.970038344088557], [172.711246372770717, -43.372287693048492], [173.080112746470206, -43.853343601253577], [172.308583612352464, -43.865694268571332], [171.452925246463622, -44.24251881284372], [171.185137974327233, -44.897104180684885], [170.616697219116588, -45.908928724959701], [169.83142215400926, -46.355774834987585], [169.332331170934253, -46.641235446967848], [168.411353794628525, -46.619944756863582], [167.763744745146823, -46.290197442409195], [166.676886021184202, -46.219917494492236], [166.509144321964669, -45.852704766626204], [167.046424188503238, -45.110941257508664], [168.303763462596862, -44.12397307716612], [168.949408807651508, -43.93581918719142], [169.667814569373149, -43.555325616226334], [170.524919875366152, -43.031688327812823], [171.125089960004004, -42.512753594737781], [171.569713983443194, -41.767424411792128], [171.948708937871885, -41.514416599291145], [172.097227004278722, -40.956104424809674], [172.798579543343948, -40.493962090823466], [173.020374790740703, -40.919052422856417]]], [[[174.612008905330526, -36.156397393540537], [175.336615838927173, -37.209097995758263], [175.3575964704375, -36.52619394302112], [175.808886753642469, -36.798942152657681], [175.958490025127475, -37.555381768546063], [176.763195428776555, -37.881253350578696], [177.438813104560495, -37.961248467766488], [178.010354445708657, -37.579824721020124], [178.517093540762801, -37.695373223624792], [178.274731073313802, -38.582812595373092], [177.970460239979332, -39.166342868812968], [177.206992629299123, -39.145775648760839], [176.939980503647007, -39.449736423501562], [177.032946405340113, -39.879942722331471], [176.8858236026052, -40.06597787858216], [176.508017206119348, -40.60480803808958], [176.012440220440283, -41.289624118821493], [175.239567499082966, -41.688307793953236], [175.067898391009408, -41.425894870775075], [174.650972935278418, -41.281820977545443], [175.227630243223615, -40.459235528323397], [174.900156691789959, -39.908933200847216], [173.824046665743992, -39.508854262043506], [173.852261997775315, -39.146602471677461], [174.57480187408035, -38.797683200842748], [174.743473749081033, -38.027807712558378], [174.69701663645057, -37.381128838857954], [174.292028436579187, -36.71109221776144], [174.319003534235549, -36.534823907213884], [173.840996535535766, -36.121980889634109], [173.05417117745958, -35.237125339500331], [172.636005487353714, -34.529106540669382], [173.007042271209457, -34.450661716450334], [173.551298456107475, -35.006183363587958], [174.329390497126241, -35.265495700828616], [174.612008905330526, -36.156397393540537]]]] } }, + { "type": "Feature", "properties": { "admin": "Oman", "name": "Oman", "continent": "Asia" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[58.861141391846573, 21.114034532144299], [58.487985874266961, 20.428985907467101], [58.03431847517659, 20.481437486243347], [57.826372511634098, 20.24300242764863], [57.66576216007094, 19.736004950433109], [57.788700392493368, 19.067570298737646], [57.694390903560667, 18.944709580963799], [57.2342639504338, 18.947991034414255], [56.609650913321971, 18.574267076079476], [56.512189162019482, 18.087113348863934], [56.283520949128011, 17.876066799383945], [55.661491733630683, 17.884128322821535], [55.269939406155189, 17.632309068263194], [55.274900343655091, 17.228354397037659], [54.791002231674113, 16.950696926333357], [54.239252964093751, 17.04498057704998], [53.57050825380459, 16.707662665264674], [53.108572625547502, 16.651051133688977], [52.782184279192066, 17.349742336491229], [52.000009800022227, 19.000003363516068], [54.999981723862405, 19.999994004796118], [55.666659376859869, 22.000001125572307], [55.208341098863187, 22.708329982997007], [55.234489373602869, 23.110992743415348], [55.52584109886449, 23.524869289640911], [55.528631626208288, 23.933604030853498], [55.981213820220503, 24.130542914317854], [55.80411868675624, 24.269604193615287], [55.88623253766805, 24.920830593357486], [56.396847365143984, 24.924732163995508], [56.845140415276049, 24.241673081961487], [57.403452589757428, 23.878594468678834], [58.136947869708322, 23.747930609628835], [58.729211460205427, 23.565667832935414], [59.180501743410346, 22.992395331305456], [59.450097690677033, 22.660270900965592], [59.80806033716285, 22.533611965418199], [59.806148309168087, 22.31052480721419], [59.442191196536399, 21.71454051359208], [59.282407667889871, 21.433885809814875], [58.861141391846573, 21.114034532144299]]], [[[56.391421339753393, 25.895990708921254], [56.261041701080913, 25.714606431576748], [56.070820753814544, 26.055464178973946], [56.362017449779344, 26.395934353128947], [56.485679152253809, 26.309117946878665], [56.391421339753393, 25.895990708921254]]]] } }, + { "type": "Feature", "properties": { "admin": "Pakistan", "name": "Pakistan", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[75.158027785140902, 37.13303091078911], [75.896897414050116, 36.666806138651829], [76.192848341785677, 35.898403428687821], [77.837450799474553, 35.494009507787759], [76.871721632804011, 34.653544012992732], [75.757060988268321, 34.504922593721311], [74.240202671204955, 34.748887030571247], [73.749948358051952, 34.317698879527846], [74.104293654277328, 33.441473293586846], [74.451559279278698, 32.764899603805489], [75.258641798813187, 32.271105455040491], [74.405928989564998, 31.692639471965272], [74.421380242820263, 30.97981476493117], [73.450638462217412, 29.976413479119863], [72.823751662084689, 28.961591701772047], [71.777665643200308, 27.913180243434521], [70.61649620960192, 27.989196275335861], [69.514392938113119, 26.940965684511365], [70.168926629522005, 26.491871649678835], [70.282873162725579, 25.722228705339823], [70.844699334602822, 25.215102037043511], [71.0432401874682, 24.356523952730193], [68.842599318318761, 24.359133612560932], [68.176645135373377, 23.691965033456704], [67.443666619745457, 23.944843654876983], [67.145441928989058, 24.663611151624639], [66.37282758979326, 25.425140896093847], [64.530407749291115, 25.237038682551425], [62.905700718034595, 25.218409328710202], [61.497362908784183, 25.078237006118492], [61.874187453056535, 26.239974880472097], [63.316631707619578, 26.756532497661659], [63.23389773952028, 27.217047024030702], [62.755425652929851, 27.378923448184985], [62.727830438085974, 28.259644883735383], [61.771868117118615, 28.699333807890792], [61.369308709564926, 29.303276272085917], [60.874248488208778, 29.829238999952604], [62.549856805272775, 29.318572496044304], [63.550260858011164, 29.468330796826162], [64.148002150331237, 29.340819200145965], [64.350418735618504, 29.560030625928089], [65.046862013616092, 29.472180691031902], [66.346472609324408, 29.88794342703617], [66.38145755398601, 30.738899237586448], [66.938891229118454, 31.304911200479346], [67.683393589147457, 31.303154201781414], [67.792689243444769, 31.582930406209623], [68.556932000609308, 31.713310044882011], [68.926676873657655, 31.620189113892064], [69.317764113242546, 31.901412258424436], [69.262522007122541, 32.501944078088293], [69.687147251264847, 33.105498969041228], [70.323594191371583, 33.358532619758385], [69.93054324735958, 34.020120144175102], [70.881803012988385, 33.988855902638512], [71.156773309213449, 34.348911444632144], [71.115018751921625, 34.733125718722228], [71.613076206350698, 35.153203436822857], [71.498767938121077, 35.650563259415996], [71.262348260385735, 36.074387518857797], [71.846291945283909, 36.509942328429851], [72.920024855444453, 36.720007025696312], [74.067551710917812, 36.836175645488446], [74.575892775372964, 37.02084137628345], [75.158027785140902, 37.13303091078911]]] } }, + { "type": "Feature", "properties": { "admin": "Panama", "name": "Panama", "continent": "North America" }, "geometry": { "type": "Polygon", "coordinates": [[[-77.881571417945239, 7.223771267114783], [-78.214936082660103, 7.512254950384159], [-78.429160732726061, 8.052041123888925], [-78.182095709938608, 8.319182440621772], [-78.43546525746568, 8.387705389840788], [-78.622120530903928, 8.718124497915026], [-79.120307176413732, 8.996092027213022], [-79.557877366845176, 8.932374986197145], [-79.760578172510037, 8.584515082224398], [-80.164481167303322, 8.333315944853593], [-80.382659064439608, 8.29840851484043], [-80.480689256497286, 8.090307522001067], [-80.003689948227148, 7.54752411542337], [-80.276670701808982, 7.419754136581713], [-80.421158006497066, 7.271571966984763], [-80.886400926420791, 7.220541490096535], [-81.059542812814698, 7.817921047390596], [-81.189715745757937, 7.647905585150339], [-81.519514736644666, 7.706610012233908], [-81.721311204744453, 8.108962714058434], [-82.131441209628889, 8.175392767769635], [-82.390934414382542, 8.292362372262287], [-82.820081346350406, 8.290863755725821], [-82.850958014644803, 8.073822740099954], [-82.965783047197348, 8.225027980985983], [-82.9131764391242, 8.423517157419068], [-82.829770677405151, 8.626295477732368], [-82.868657192704759, 8.807266343618521], [-82.719183112300513, 8.925708726431493], [-82.927154914059145, 9.074330145702914], [-82.932890998043561, 9.476812038608172], [-82.546196255203469, 9.566134751824674], [-82.187122565423394, 9.207448635286779], [-82.207586432610952, 8.995575262890098], [-81.808566860669259, 8.95061676679617], [-81.714154018872023, 9.031955471223581], [-81.43928707551153, 8.786234035675715], [-80.947301601876745, 8.858503526235905], [-80.521901211250054, 9.11107208906243], [-79.914599778955974, 9.312765204297618], [-79.573302781884294, 9.611610012241526], [-79.021191779277913, 9.552931423374103], [-79.058450486960353, 9.454565334506523], [-78.500887620747164, 9.420458889193879], [-78.055927700497989, 9.247730414258296], [-77.729513515926399, 8.946844387238867], [-77.353360765273848, 8.670504665558068], [-77.474722866511314, 8.524286200388216], [-77.242566494440069, 7.935278225125442], [-77.431107957656977, 7.638061224798733], [-77.75341386586139, 7.709839789252141], [-77.881571417945239, 7.223771267114783]]] } }, + { "type": "Feature", "properties": { "admin": "Peru", "name": "Peru", "continent": "South America" }, "geometry": { "type": "Polygon", "coordinates": [[[-69.590423753524036, -17.580011895419329], [-69.858443569605839, -18.092693780187009], [-70.3725723944777, -18.347975355708861], [-71.375250210236914, -17.77379851651385], [-71.462040778271117, -17.363487644116379], [-73.444529588500401, -16.359362888252992], [-75.23788265654143, -15.26568287522778], [-76.009205084929931, -14.649286390850317], [-76.423469204397733, -13.823186944232431], [-76.259241502574156, -13.535039157772939], [-77.10619238962181, -12.222716159720816], [-78.092152879534623, -10.377712497604062], [-79.036953091126918, -8.38656788496589], [-79.445920376284832, -7.930833428583859], [-79.760578172510037, -7.194340915560081], [-80.537481655586049, -6.541667575713715], [-81.249996304026411, -6.136834405139182], [-80.926346808582423, -5.690556735866563], [-81.410942552399433, -4.736764825055459], [-81.099669562489353, -4.036394138203696], [-80.302560594387188, -3.404856459164712], [-80.184014858709645, -3.821161797708043], [-80.46929460317692, -4.059286797708999], [-80.442241990872134, -4.425724379090673], [-80.028908047185581, -4.346090996928893], [-79.62497921417615, -4.454198093283494], [-79.205289069317715, -4.959128513207388], [-78.639897223612323, -4.547784112164072], [-78.450683966775628, -3.873096612161375], [-77.83790483265858, -3.003020521663103], [-76.635394253226707, -2.608677666843817], [-75.544995693652027, -1.56160979574588], [-75.233722703741932, -0.911416924649529], [-75.373223232713841, -0.15203175212045], [-75.106624518520064, -0.05720549886486], [-74.441600511355958, -0.530820000819887], [-74.122395189089048, -1.002832533373848], [-73.659503546834586, -1.260491224781134], [-73.070392218707212, -2.308954359550952], [-72.325786505813639, -2.434218031426453], [-71.774760708285385, -2.169789727388937], [-71.413645799429773, -2.342802422702128], [-70.813475714791949, -2.256864515800742], [-70.047708502874841, -2.725156345229699], [-70.692682054309699, -3.742872002785858], [-70.394043952094975, -3.766591485207825], [-69.893635219996611, -4.298186944194326], [-70.79476884630229, -4.251264743673302], [-70.928843349883564, -4.401591485210367], [-71.748405727816532, -4.59398284263301], [-72.891927659787243, -5.274561455916979], [-72.964507208941185, -5.741251315944892], [-73.219711269814596, -6.089188734566076], [-73.120027431923575, -6.629930922068238], [-73.724486660441627, -6.918595472850638], [-73.723401455363486, -7.340998630404412], [-73.987235480429646, -7.523829847853063], [-73.571059332967053, -8.424446709835832], [-73.015382656532537, -9.03283334720806], [-73.226713426390148, -9.462212823121233], [-72.563033006465631, -9.520193780152715], [-72.184890713169821, -10.05359791426943], [-71.302412278921523, -10.079436130415372], [-70.481893886991159, -9.490118096558842], [-70.548685675728393, -11.009146823778462], [-70.093752204046879, -11.123971856331011], [-69.52967810736493, -10.951734307502193], [-68.665079718689611, -12.561300144097171], [-68.880079515239956, -12.89972909917665], [-68.929223802349526, -13.602683607643007], [-68.94888668483658, -14.45363941819328], [-69.339534674747, -14.953195489158828], [-69.160346645774936, -15.323973890853015], [-69.389764166934697, -15.66012908291165], [-68.959635382753291, -16.500697930571267], [-69.590423753524036, -17.580011895419329]]] } }, + { "type": "Feature", "properties": { "admin": "Philippines", "name": "Philippines", "continent": "Asia" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[126.376813592637447, 8.414706325713352], [126.478512811387873, 7.750354112168976], [126.537423944200611, 7.189380601424572], [126.19677290253253, 6.274294338400038], [125.831420526229081, 7.293715318221855], [125.363852166852283, 6.78648529706099], [125.683160841983707, 6.049656887227257], [125.396511672060626, 5.581003322772288], [124.219787632342332, 6.16135549562618], [123.938719517106918, 6.88513560630612], [124.243662144061318, 7.360610459823659], [123.610212437027542, 7.833527329942753], [123.29607140512519, 7.418875637232786], [122.825505812675388, 7.457374579290216], [122.085499302255769, 6.899424139834847], [121.919928013192603, 7.192119452336072], [122.312358840017112, 8.034962063016506], [122.94239790251963, 8.316236883981174], [123.487687616063511, 8.693009751821192], [123.841154412939815, 8.240324204944384], [124.6014697612502, 8.514157619659015], [124.764612257995623, 8.960409450715458], [125.471390822451539, 8.986996975129641], [125.412117954612754, 9.760334784377545], [126.222714471543156, 9.28607432701885], [126.306636997585073, 8.782487494334573], [126.376813592637447, 8.414706325713352]]], [[[123.982437778825798, 10.278778591345811], [123.62318322153277, 9.950090643753297], [123.309920688979332, 9.318268744336676], [122.995883009941636, 9.022188625520398], [122.380054966319463, 9.713360907424201], [122.586088901867072, 9.981044826696104], [122.837081333508706, 10.261156927934234], [122.947410516451896, 10.881868394408029], [123.498849725438447, 10.940624497923945], [123.337774285984722, 10.267383938025445], [124.077935825701218, 11.232725531453706], [123.982437778825798, 10.278778591345811]]], [[[118.504580926590336, 9.316382554558087], [117.174274530100675, 8.367499904814663], [117.664477166821371, 9.066888739452933], [118.386913690261736, 9.684499619989223], [118.98734215706105, 10.376292019080507], [119.511496209797528, 11.36966807702721], [119.689676548339889, 10.554291490109872], [119.029458449378978, 10.003653265823869], [118.504580926590336, 9.316382554558087]]], [[[121.883547804859106, 11.891755072471977], [122.483821242361458, 11.582187404827506], [123.120216506035959, 11.583660183147867], [123.100837843926442, 11.165933742716486], [122.637713657726692, 10.741308498574226], [122.002610304859559, 10.441016750526087], [121.967366978036523, 10.905691229694622], [122.038370396005519, 11.415840969280039], [121.883547804859106, 11.891755072471977]]], [[[125.502551711123488, 12.162694606978347], [125.783464797062152, 11.046121934447767], [125.01188398651226, 11.311454576050377], [125.032761265158115, 10.975816148314703], [125.277449172060244, 10.358722032101308], [124.801819289245714, 10.134678859899889], [124.760168084818474, 10.8379951033923], [124.459101190286049, 10.889929917845633], [124.302521600441722, 11.495370998577227], [124.891012811381572, 11.415582587118589], [124.877990350443952, 11.794189968304988], [124.266761509295705, 12.557760931849682], [125.22711632700782, 12.53572093347719], [125.502551711123488, 12.162694606978347]]], [[[121.527393833503481, 13.069590155484516], [121.262190382981544, 12.2055602075644], [120.833896112146533, 12.704496161342416], [120.323436313967477, 13.466413479053866], [121.18012820850214, 13.429697373910439], [121.527393833503481, 13.069590155484516]]], [[[121.321308221523566, 18.504064642811013], [121.937601353036371, 18.21855235439838], [122.246006300954264, 18.478949896717094], [122.336956821787965, 18.224882717354173], [122.174279412933174, 17.810282701076371], [122.51565392465335, 17.09350474697197], [122.252310825693883, 16.262444362854122], [121.662786086108255, 15.931017564350125], [121.505069614753367, 15.124813544164621], [121.728828566577249, 14.328376369682244], [122.258925409027313, 14.218202216035973], [122.701275669445636, 14.336541245984417], [123.950295037940236, 13.782130642141066], [123.855107049658599, 13.237771104378464], [124.181288690284873, 12.997527370653469], [124.077419061378222, 12.536676947474573], [123.298035109552245, 13.027525539598981], [122.928651971529902, 13.552919826710404], [122.671355015148663, 13.185836289925131], [122.034649692880521, 13.784481919810343], [121.126384718918587, 13.636687323455559], [120.628637323083296, 13.857655747935649], [120.679383579593832, 14.271015529838319], [120.99181928923052, 14.525392767795079], [120.693336216312687, 14.756670640517282], [120.564145135582976, 14.396279201713821], [120.070428501466367, 14.970869452367094], [119.920928582846102, 15.406346747290735], [119.883773228028247, 16.363704331929963], [120.286487664878791, 16.034628811095327], [120.39004723519173, 17.599081122299506], [120.7158671407919, 18.505227362537536], [121.321308221523566, 18.504064642811013]]]] } }, + { "type": "Feature", "properties": { "admin": "Papua New Guinea", "name": "Papua New Guinea", "continent": "Oceania" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[155.880025669578401, -6.819996840037758], [155.599991082988765, -6.919990736522491], [155.166994256815087, -6.535931491729299], [154.729191522438327, -5.900828138862208], [154.514114211239644, -5.139117526880012], [154.652503696917336, -5.042430922061839], [154.759990676084357, -5.339983819198493], [155.062917922179338, -5.566791680527486], [155.547746209941693, -6.200654799019658], [156.019965448224752, -6.540013929880386], [155.880025669578401, -6.819996840037758]]], [[[151.982795851854462, -5.478063246282344], [151.459106887008659, -5.560280450058739], [151.301390415653884, -5.840728448106701], [150.754447056276661, -6.083762709175387], [150.241196730753813, -6.317753594592984], [149.709963006793316, -6.316513360218051], [148.890064732050462, -6.026040134305432], [148.318936802360696, -5.74714242922613], [148.401825799756864, -5.437755629094722], [149.298411900020824, -5.583741550319216], [149.845561965127217, -5.505503431829339], [149.996250441690279, -5.026101169457674], [150.139755894164921, -5.001348158389788], [150.236907586873485, -5.53222014732428], [150.807467075808063, -5.455842380396886], [151.089672072553981, -5.113692722192368], [151.647880894170811, -4.757073662946168], [151.537861769821518, -4.167807305521889], [152.136791620084352, -4.148790378438519], [152.338743117480988, -4.31296640382976], [152.318692661751754, -4.867661228050748], [151.982795851854462, -5.478063246282344]]], [[[147.191873814074938, -7.388024183789978], [148.084635858349372, -8.044108168167609], [148.734105259393573, -9.104663588093755], [149.306835158484432, -9.071435642130067], [149.266630894161324, -9.514406019736027], [150.038728469034311, -9.684318129111698], [149.738798456012262, -9.872937106977002], [150.801627638959133, -10.29368661869742], [150.690574985963849, -10.582712904505865], [150.028393182575826, -10.652476088099929], [149.782310012001972, -10.393267103723941], [148.923137648717216, -10.28092253992136], [147.913018426707993, -10.130440769087469], [147.135443150012236, -9.492443536012017], [146.567880894150619, -8.942554619994153], [146.048481073184917, -8.067414239131308], [144.74416792213799, -7.630128269077473], [143.897087844009661, -7.915330498896279], [143.286375767184268, -8.245491224809056], [143.413913202080664, -8.983068942910945], [142.628431431244223, -9.326820570516501], [142.068258905200196, -9.159595635620034], [141.033851760013874, -9.117892754760417], [141.017056919519007, -5.85902190513802], [141.000210402591847, -2.600151055515624], [142.735246616791443, -3.289152927263216], [144.583970982033236, -3.861417738463401], [145.27317955950997, -4.373737888205027], [145.829786411725649, -4.876497897972683], [145.981921828392956, -5.465609226100012], [147.648073358347574, -6.083659356310803], [147.891107619416175, -6.614014580922315], [146.970905389594861, -6.721656589386255], [147.191873814074938, -7.388024183789978]]], [[[153.14003787659874, -4.499983412294113], [152.827292108368255, -4.766427097190998], [152.63867313050298, -4.176127211120927], [152.406025832324929, -3.789742526874561], [151.953236932583536, -3.462062269711821], [151.384279413050024, -3.035421644710111], [150.6620495953388, -2.741486097833956], [150.939965448204532, -2.500002129734028], [151.479984165654514, -2.779985039891386], [151.820015090135087, -2.999971612157907], [152.239989455371074, -3.24000864015366], [152.640016717742526, -3.659983005389647], [153.019993524384631, -3.980015150573293], [153.14003787659874, -4.499983412294113]]]] } }, + { "type": "Feature", "properties": { "admin": "Poland", "name": "Poland", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[15.016995883858666, 51.106674099321566], [14.607098422919531, 51.745188096719964], [14.685026482815685, 52.089947414755187], [14.437599725002197, 52.624850165408382], [14.074521111719488, 52.981262518925426], [14.353315463934136, 53.248171291712957], [14.119686313542584, 53.757029120491026], [14.802900424873455, 54.050706285205735], [16.363477003655728, 54.513158677785711], [17.622831658608671, 54.851535956432897], [18.620858595461637, 54.682605699270766], [18.696254510175461, 54.438718777069276], [19.6606400896064, 54.426083889373913], [20.89224450041862, 54.312524929412518], [22.731098667092649, 54.327536932993311], [23.243987257589506, 54.220566718149129], [23.484127638449841, 53.912497667041123], [23.527535841574995, 53.47012156840654], [23.804934930117774, 53.08973135030606], [23.799198846133375, 52.691099351606553], [23.19949384938618, 52.486977444053664], [23.508002150168689, 52.023646552124717], [23.52707075368437, 51.578454087930233], [24.029985792748899, 50.705406602575174], [23.922757195743259, 50.424881089878738], [23.426508416444388, 50.308505764357449], [22.518450148211596, 49.476773586619736], [22.776418898212619, 49.027395331409608], [22.558137648211751, 49.08573802346713], [21.607808058364206, 49.470107326854077], [20.887955356538406, 49.328772284535823], [20.415839471119849, 49.431453355499755], [19.825022820726865, 49.217125352569219], [19.320712517990469, 49.571574001659179], [18.909574822676316, 49.435845852244562], [18.85314415861361, 49.496229763377634], [18.392913852622168, 49.988628648470737], [17.649445021238986, 50.049038397819942], [17.554567091551117, 50.36214590107641], [16.868769158605655, 50.473973700556016], [16.719475945714429, 50.215746568393527], [16.176253289462263, 50.4226073268579], [16.238626743238566, 50.697732652379827], [15.490972120839725, 50.7847299261432], [15.016995883858666, 51.106674099321566]]] } }, + { "type": "Feature", "properties": { "admin": "Puerto Rico", "name": "Puerto Rico", "continent": "North America" }, "geometry": { "type": "Polygon", "coordinates": [[[-66.2824344550082, 18.51476166429536], [-65.771302863209286, 18.426679185453875], [-65.591003790942935, 18.228034979723912], [-65.847163865813755, 17.975905666571855], [-66.599934455009475, 17.98182261806927], [-67.184162360285256, 17.946553453030074], [-67.24242753769434, 18.374460150622934], [-67.100679083917726, 18.520601101144347], [-66.2824344550082, 18.51476166429536]]] } }, + { "type": "Feature", "properties": { "admin": "North Korea", "name": "Dem. Rep. Korea", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[130.640015903852401, 42.39500946712527], [130.780007358931101, 42.220007229168843], [130.400030552288996, 42.280003567059701], [129.965948521037234, 41.941367906251052], [129.667362095254788, 41.601104437825221], [129.705189243692445, 40.882827867184318], [129.188114862179958, 40.661807766271984], [129.010399611528186, 40.485436102859801], [128.633368361526692, 40.189846910150301], [127.967414178581322, 40.025412502597547], [127.533435500194145, 39.756850083976694], [127.502119582225276, 39.323930772451526], [127.385434198110261, 39.213472398427648], [127.783342726757709, 39.050898342437414], [128.349716424676586, 38.612242946927843], [128.205745884311426, 38.370397243801882], [127.780035435090966, 38.304535630845884], [127.073308547067342, 38.256114813788393], [126.683719924018888, 37.804772854151174], [126.237338901881742, 37.840377916000271], [126.174758742376213, 37.749685777328033], [125.689103631697165, 37.940010077459014], [125.568439162295675, 37.752088731429616], [125.275330438336184, 37.66907054295271], [125.24008711151312, 37.857224432927424], [124.981033156433952, 37.948820909164773], [124.712160679219352, 38.108346055649783], [124.985994093933954, 38.548474229479673], [125.221948683778677, 38.665857245430665], [125.13285851450749, 38.848559271798578], [125.386589797060566, 39.387957872061158], [125.321115757346774, 39.551384589184202], [124.737482131042384, 39.660344346671614], [124.265624627785286, 39.928493353834149], [125.079941847840615, 40.569823716792442], [126.182045119329402, 41.107336127276362], [126.86908328664984, 41.816569322266176], [127.343782993682993, 41.50315176041596], [128.208433058790632, 41.466771552082477], [128.052215203972281, 41.994284572917934], [129.59666873587949, 42.424981797854542], [129.994267205933198, 42.985386867843779], [130.640015903852401, 42.39500946712527]]] } }, + { "type": "Feature", "properties": { "admin": "Portugal", "name": "Portugal", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[-9.034817674180244, 41.880570583659669], [-8.671945766626719, 42.134689439454952], [-8.26385698081779, 42.280468654950326], [-8.01317460776991, 41.790886135417118], [-7.422512986673794, 41.792074693359822], [-7.251308966490822, 41.91834605566504], [-6.668605515967655, 41.883386949219577], [-6.389087693700914, 41.381815497394641], [-6.851126674822551, 41.111082668617513], [-6.864019944679383, 40.330871893874821], [-7.026413133156593, 40.184524237624238], [-7.066591559263527, 39.711891587882768], [-7.498632371439724, 39.629571031241802], [-7.098036668313126, 39.03007274022378], [-7.374092169616317, 38.373058580064914], [-7.029281175148794, 38.075764065089757], [-7.166507941099863, 37.803894354802217], [-7.537105475281022, 37.428904323876232], [-7.45372555177809, 37.097787583966053], [-7.855613165711985, 36.838268540996253], [-8.382816127953687, 36.978880113262449], [-8.898856980820325, 36.868809312480771], [-8.746101446965552, 37.6513455266766], [-8.839997524439879, 38.266243394517609], [-9.287463751655221, 38.358485826158592], [-9.526570603869713, 38.737429104154906], [-9.44698889814023, 39.392066148428363], [-9.048305223008425, 39.755093085278766], [-8.977353481471679, 40.159306138665798], [-8.7686840478771, 40.76063894303018], [-8.790853237330309, 41.18433401139125], [-8.990789353867568, 41.543459377603625], [-9.034817674180244, 41.880570583659669]]] } }, + { "type": "Feature", "properties": { "admin": "Paraguay", "name": "Paraguay", "continent": "South America" }, "geometry": { "type": "Polygon", "coordinates": [[[-62.685057135657871, -22.24902922942238], [-62.291179368729203, -21.051634616787389], [-62.265961269770784, -20.513734633061272], [-61.786326463453761, -19.633736667562957], [-60.043564622626477, -19.342746677327419], [-59.11504248720609, -19.356906019775398], [-58.183471442280492, -19.868399346600359], [-58.166392381408038, -20.176700941653674], [-57.870673997617786, -20.732687676681948], [-57.937155727761287, -22.090175876557169], [-56.881509568902885, -22.282153822521476], [-56.473317430229379, -22.086300144135279], [-55.797958136606894, -22.356929620047815], [-55.61068274598113, -22.655619398694839], [-55.517639329639621, -23.57199757252663], [-55.400747239795407, -23.956935316668797], [-55.027901780809543, -24.001273695575225], [-54.652834235235119, -23.839578138933955], [-54.292959560754511, -24.021014092710722], [-54.293476325077435, -24.570799655863958], [-54.428946092330577, -25.162184747012162], [-54.625290696823562, -25.739255466415507], [-54.788794928595038, -26.621785577096126], [-55.695845506398143, -27.387837009390857], [-56.486701626192989, -27.548499037386286], [-57.609759690976134, -27.395898532828383], [-58.618173590719735, -27.123718763947089], [-57.633660040911117, -25.603656508081638], [-57.777217169817924, -25.162339776309032], [-58.807128465394968, -24.771459242453307], [-60.028966030504016, -24.032796319273267], [-60.846564704009907, -23.880712579038288], [-62.685057135657871, -22.24902922942238]]] } }, + { "type": "Feature", "properties": { "admin": "Palestine", "name": "Palestine", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[35.545665317534535, 32.393992011030569], [35.545251906076196, 31.782504787720832], [35.397560662586038, 31.489086005167572], [34.927408481594554, 31.35343537040141], [34.970506626125989, 31.616778469360803], [35.225891554512422, 31.754341132121759], [34.974640740709319, 31.866582343059715], [35.183930291491428, 32.532510687788935], [35.545665317534535, 32.393992011030569]]] } }, + { "type": "Feature", "properties": { "admin": "Qatar", "name": "Qatar", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[50.810108270069563, 24.754742539971371], [50.743910760303677, 25.482424221289389], [51.01335167827348, 26.006991685484191], [51.286461622936045, 26.114582017515865], [51.589078810437243, 25.801112779233375], [51.606700473848804, 25.215670477798735], [51.389607781790623, 24.627385972588051], [51.112415398977006, 24.556330878186721], [50.810108270069563, 24.754742539971371]]] } }, + { "type": "Feature", "properties": { "admin": "Romania", "name": "Romania", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[22.710531447040488, 47.882193915389394], [23.142236362406798, 48.096341050806942], [23.760958286237404, 47.985598456405448], [24.402056105250374, 47.981877753280422], [24.866317172960571, 47.737525743188307], [25.207743361112986, 47.891056423527459], [25.945941196402394, 47.987148749374207], [26.197450392366925, 48.220881252630342], [26.619336785597788, 48.220726223333457], [26.924176059687561, 48.123264472030982], [27.233872918412736, 47.826770941756365], [27.551166212684841, 47.405117092470817], [28.128030226359037, 46.81047638608824], [28.160017937947707, 46.371562608417207], [28.054442986775392, 45.944586086605618], [28.233553501099035, 45.488283189468369], [28.679779493939371, 45.30403087013169], [29.149724969201646, 45.464925442072442], [29.603289015427425, 45.293308010431119], [29.62654340995876, 45.035390936862392], [29.141611769331831, 44.820210272799038], [28.837857700320196, 44.913873806328041], [28.55808149589199, 43.707461656258118], [27.970107049275068, 43.812468166675202], [27.242399529740904, 44.175986029632398], [26.065158725699739, 43.943493760751259], [25.569271681426923, 43.688444729174712], [24.100679152124169, 43.741051337247846], [23.332302280376322, 43.897010809904707], [22.94483239105184, 43.823785305347123], [22.657149692482985, 44.234923000661276], [22.474008416440594, 44.409227606781762], [22.705725538837349, 44.578002834647016], [22.459022251075933, 44.702517198254291], [22.145087924902807, 44.478422349620573], [21.562022739353605, 44.768947251965486], [21.483526238702233, 45.181170152357772], [20.874312778413351, 45.416375433934228], [20.76217492033998, 45.734573065771428], [20.220192498462833, 46.127468980486547], [21.021952345471245, 46.316087958351886], [21.626514926853869, 46.994237779318148], [22.09976769378283, 47.672439276716695], [22.710531447040488, 47.882193915389394]]] } }, + { "type": "Feature", "properties": { "admin": "Russia", "name": "Russia", "continent": "Europe" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[143.648007440362846, 50.747600409541512], [144.65414757708561, 48.976390692737581], [143.173927850517174, 49.306551418650365], [142.558668247650076, 47.861575018904908], [143.533492466404027, 46.836728013692479], [143.505277134372591, 46.137907619809475], [142.747700636973889, 46.740764878926562], [142.092030064054484, 45.966755276058777], [141.906925083585008, 46.805928860046535], [142.018442824470867, 47.780132961612921], [141.904444614835029, 48.859188544299563], [142.135800002205656, 49.615163072297449], [142.179983351815281, 50.952342434281903], [141.594075962490024, 51.935434882202529], [141.682546014573632, 53.301966457728767], [142.606934035410745, 53.762145087287891], [142.209748976815376, 54.225475979216853], [142.654786411712934, 54.365880845753864], [142.914615513276544, 53.704577541714734], [143.260847609632037, 52.740760403039033], [143.235267775647628, 51.756660264688733], [143.648007440362846, 50.747600409541512]]], [[[22.731098667092649, 54.327536932993311], [20.892244500418652, 54.312524929412568], [19.6606400896064, 54.42608388937397], [19.88848147958134, 54.866160386771483], [21.268448927503492, 55.190481675835279], [22.315723504330599, 55.015298570365886], [22.757763706155281, 54.856574408581416], [22.651051873472564, 54.582740993866693], [22.731098667092649, 54.327536932993311]]], [[[180.000000000000114, 70.832199208546669], [178.903425, 70.78114], [178.7253, 71.0988], [180.000000000000114, 71.515714336428246], [180.000000000000114, 70.832199208546669]]], [[[143.60385, 73.21244], [142.08763, 73.20544], [140.038155, 73.31692], [139.86312, 73.36983], [140.81171, 73.76506], [142.06207, 73.85758], [143.48283, 73.47525], [143.60385, 73.21244]]], [[[150.73167, 75.08406], [149.575925, 74.68892], [147.977465, 74.778355], [146.11919, 75.17298], [146.358485, 75.49682], [148.22223, 75.345845], [150.73167, 75.08406]]], [[[145.086285, 75.562625], [144.3, 74.82], [140.61381, 74.84768], [138.95544, 74.61148], [136.97439, 75.26167], [137.51176, 75.94917], [138.831075, 76.13676], [141.471615, 76.09289], [145.086285, 75.562625]]], [[[57.535692579992386, 70.720463975702145], [56.944979282463933, 70.63274323188665], [53.677375115784187, 70.762657782668455], [53.412016635965372, 71.206661688920192], [51.601894565645708, 71.474759019650477], [51.455753615124209, 72.014881089965129], [52.478275180883564, 72.229441636840946], [52.444168735570841, 72.77473135038484], [54.427613559797649, 73.627547512497571], [53.508289829325136, 73.749813951300141], [55.902458937407644, 74.627486477345329], [55.631932814359701, 75.081412258597155], [57.868643833248839, 75.609390367323186], [61.170044386647497, 76.251883450008123], [64.498368361270209, 76.439055487769267], [66.210977003855092, 76.809782213031227], [68.157059767534818, 76.939696763812904], [68.852211134725124, 76.544811306454605], [68.180572544227644, 76.233641669409096], [64.637326287703004, 75.737754625136219], [61.583507521414752, 75.260884507946784], [58.477082147053366, 74.309056301562819], [56.986785516187993, 73.333043524866227], [55.41933597191094, 72.371267605265956], [55.622837762276291, 71.540594794390316], [57.535692579992386, 70.720463975702145]]], [[[106.970130000000111, 76.97419], [107.240000000000123, 76.48], [108.1538, 76.723350000000138], [111.077260000000138, 76.71], [113.33151, 76.22224], [114.13417, 75.84764], [113.88539, 75.327790000000121], [112.77918, 75.03186], [110.151250000000175, 74.47673], [109.4, 74.18], [110.64, 74.04], [112.11919, 73.787740000000113], [113.019540000000234, 73.976930000000138], [113.529580000000294, 73.33505], [113.96881, 73.59488], [115.56782, 73.75285], [118.776330000000215, 73.58772], [119.02, 73.12], [123.20066, 72.97122], [123.257770000000178, 73.73503], [125.380000000000166, 73.56], [126.97644, 73.56549], [128.59126, 73.03871], [129.05157, 72.39872], [128.46, 71.98], [129.715990000000204, 71.19304], [131.288580000000252, 70.786990000000102], [132.253500000000145, 71.8363], [133.857660000000294, 71.386420000000143], [135.56193, 71.655250000000123], [137.49755, 71.34763], [138.234090000000123, 71.62803], [139.86983, 71.487830000000116], [139.14791, 72.4161900000001], [140.46817, 72.849410000000134], [149.5, 72.2], [150.35118000000017, 71.60643], [152.96890000000019, 70.84222], [157.00688, 71.03141], [158.99779, 70.86672], [159.830310000000225, 70.45324], [159.70866, 69.72198], [160.94053000000028, 69.43728], [162.279070000000104, 69.64204], [164.05248, 69.66823], [165.940370000000172, 69.47199], [167.83567, 69.58269], [169.57763000000017, 68.6938], [170.816880000000253, 69.01363], [170.008200000000159, 69.65276], [170.453450000000259, 70.09703], [173.643910000000204, 69.81743], [175.72403000000017, 69.877250000000217], [178.6, 69.4], [180.000000000000114, 68.963636363636553], [180.000000000000114, 64.979708702198465], [179.99281, 64.97433], [178.707200000000199, 64.53493], [177.411280000000147, 64.60821], [178.313000000000187, 64.07593], [178.90825000000018, 63.251970000000128], [179.37034, 62.98262], [179.48636, 62.56894], [179.228250000000116, 62.304100000000133], [177.3643, 62.5219], [174.569290000000194, 61.76915], [173.68013, 61.65261], [172.15, 60.95], [170.6985, 60.33618], [170.330850000000282, 59.88177], [168.90046, 60.57355], [166.294980000000265, 59.7885500000002], [165.840000000000202, 60.16], [164.87674, 59.7316], [163.539290000000108, 59.86871], [163.217110000000218, 59.21101], [162.01733, 58.24328], [162.05297, 57.83912], [163.19191, 57.61503], [163.057940000000144, 56.159240000000111], [162.129580000000203, 56.12219], [161.70146, 55.285680000000148], [162.117490000000117, 54.85514], [160.368770000000325, 54.34433], [160.021730000000218, 53.20257], [158.530940000000157, 52.958680000000236], [158.23118, 51.94269], [156.789790000000266, 51.01105], [156.42000000000013, 51.7], [155.99182, 53.15895], [155.43366, 55.381030000000109], [155.914420000000291, 56.767920000000132], [156.75815, 57.3647], [156.81035, 57.83204], [158.364330000000166, 58.05575], [160.150640000000124, 59.314770000000109], [161.87204, 60.343000000000117], [163.66969, 61.1409], [164.473550000000103, 62.55061], [163.258420000000172, 62.46627], [162.65791, 61.6425], [160.12148, 60.54423], [159.30232, 61.77396], [156.72068, 61.43442], [154.218060000000293, 59.758180000000117], [155.04375, 59.14495], [152.81185, 58.88385], [151.265730000000246, 58.78089], [151.33815, 59.50396], [149.78371, 59.655730000000126], [148.54481, 59.16448], [145.48722, 59.33637], [142.197820000000121, 59.03998], [138.958480000000293, 57.08805], [135.12619, 54.72959], [136.70171, 54.603550000000112], [137.19342, 53.97732], [138.1647, 53.755010000000247], [138.80463, 54.25455], [139.90151, 54.189680000000166], [141.34531, 53.089570000000109], [141.37923, 52.23877], [140.59742000000017, 51.23967], [140.51308, 50.045530000000113], [140.061930000000189, 48.446710000000152], [138.554720000000202, 46.99965], [138.21971, 46.30795], [136.86232, 45.143500000000174], [135.515350000000183, 43.989], [134.869390000000237, 43.39821], [133.536870000000249, 42.81147], [132.90627, 42.79849], [132.278070000000241, 43.284560000000106], [130.935870000000136, 42.55274], [130.78, 42.220000000000191], [130.640000000000157, 42.395], [130.633866408409801, 42.903014634770543], [131.144687941614961, 42.929989732426932], [131.288555129115593, 44.111519680348252], [131.025190000000237, 44.96796], [131.883454217659562, 45.321161607436508], [133.097120000000189, 45.14409], [133.769643996313164, 46.116926988299149], [134.112350000000163, 47.212480000000127], [134.50081, 47.578450000000139], [135.026311476786759, 48.478229885443902], [133.373595819228001, 48.183441677434836], [132.506690000000106, 47.78896], [130.987260000000106, 47.79013], [130.582293328982644, 48.72968740497619], [129.397817824420486, 49.4406000840156], [127.657400000000351, 49.76027], [127.287455682484904, 50.739797268265434], [126.939156528837827, 51.353894151405896], [126.564399041856959, 51.784255479532689], [125.946348911646439, 52.792798570356936], [125.068211297710434, 53.161044826868924], [123.57147, 53.4588], [122.245747918793043, 53.431725979213681], [121.003084751470354, 53.251401068731226], [120.177088657716865, 52.753886216841195], [120.725789015791975, 52.516226304730893], [120.7382, 51.96411], [120.182080000000155, 51.64355], [119.27939, 50.58292], [119.288460728025839, 50.142882798861947], [117.87924441942647, 49.510983384797036], [116.67880089728618, 49.888531399121398], [115.485695428531415, 49.805177313834733], [114.962109816550353, 50.140247300815119], [114.362456496235325, 50.24830272073747], [112.897739699354361, 49.543565375356984], [111.581230910286649, 49.377968248077671], [110.662010532678835, 49.130128078805846], [109.402449171996707, 49.292960516957685], [108.475167270951275, 49.282547715850704], [107.868175897251092, 49.793705145865871], [106.888804152455293, 50.274295966180276], [105.886591424586868, 50.40601919209216], [104.62158, 50.275320000000157], [103.676545444760336, 50.08996613219513], [102.25589, 50.510560000000105], [102.06521, 51.25991], [100.889480421962631, 51.516855780638409], [99.981732212323564, 51.63400625264395], [98.861490513100492, 52.047366034546698], [97.82573978067451, 51.010995184933236], [98.231761509191699, 50.422400621128716], [97.259760000000199, 49.72605], [95.814020000000156, 49.977460000000114], [94.815949334698757, 50.01343333597088], [94.147566359435601, 50.480536607457161], [93.10421, 50.49529], [92.234711541719676, 50.802170722041737], [90.713667433640765, 50.331811835321098], [88.805566847695573, 49.470520738312459], [87.751264276076824, 49.297197984405543], [87.359970330762692, 49.214980780629148], [86.829356723989648, 49.826674709668133], [85.541269972682485, 49.69285858824815], [85.115559523462082, 50.117302964877631], [84.416377394553038, 50.311399644565817], [83.935114780618903, 50.889245510453563], [83.383003778012451, 51.069182847693881], [81.945985548839943, 50.812195949906325], [80.568446893235446, 51.388336493528435], [80.035559523441705, 50.864750881547209], [77.80091556184432, 53.404414984747532], [76.525179477854749, 54.177003485727127], [76.891100294913443, 54.490524400441913], [74.384820000000119, 53.546850000000113], [73.425678745420512, 53.489810289109741], [73.50851606638436, 54.035616766976588], [72.224150018202195, 54.376655381886778], [71.180131056609468, 54.133285224008247], [70.86526655465515, 55.169733588270091], [69.068166945272893, 55.385250149143488], [68.169100376258896, 54.970391750704366], [65.66687, 54.601250000000149], [65.178533563095939, 54.354227810272064], [61.436600000000126, 54.00625], [60.978066440683236, 53.664993394579128], [61.69998619980062, 52.979996446334255], [60.73999311711453, 52.719986477257734], [60.927268507740237, 52.447548326214999], [59.967533807215567, 51.96042043721566], [61.588003371024136, 51.272658799843171], [61.337424350840998, 50.799070136104248], [59.932807244715555, 50.842194118851822], [59.642282342370564, 50.545442206415707], [58.363320000000122, 51.06364], [56.77798, 51.04355], [55.71694, 50.621710000000142], [54.532878452376181, 51.026239732459359], [52.328723585831042, 51.718652248738088], [50.766648390512174, 51.692762356159861], [48.702381626181044, 50.605128485712825], [48.577841424357601, 49.87475962991563], [47.549480421749379, 50.454698391311119], [46.751596307162764, 49.356005764353725], [47.043671502476585, 49.152038886097571], [46.466445753776291, 48.394152330104923], [47.315240000000152, 47.71585], [48.05725, 47.74377], [48.694733514201872, 47.075628160177885], [48.59325000000014, 46.56104], [49.101160000000121, 46.39933], [48.645410000000105, 45.80629], [47.67591, 45.641490000000111], [46.68201, 44.6092], [47.59094, 43.660160000000118], [47.49252, 42.98658], [48.58437000000017, 41.80888], [47.987283156126033, 41.405819200194387], [47.815665724484653, 41.151416124021338], [47.373315464066387, 41.219732367511135], [46.686070591016708, 41.827137152669899], [46.404950799348924, 41.860675157227426], [45.7764, 42.092440000000224], [45.470279168485909, 42.502780666670041], [44.537622918482057, 42.711992702803677], [43.93121, 42.554960000000101], [43.755990000000182, 42.74083], [42.394400000000154, 43.2203], [40.922190000000128, 43.382150000000131], [40.076964959479838, 43.553104153002486], [39.95500857927108, 43.434997666999287], [38.68, 44.28], [37.539120000000104, 44.65721], [36.675460000000122, 45.24469], [37.40317, 45.40451], [38.23295, 46.24087], [37.67372, 46.63657], [39.14767, 47.044750000000128], [39.121200000000123, 47.26336], [38.22353803889947, 47.102189846375971], [38.2551123390298, 47.546400458356956], [38.77057, 47.825620000000228], [39.738277622238982, 47.898937079452068], [39.895620000000136, 48.23241], [39.67465, 48.783820000000127], [40.080789015469477, 49.307429917999364], [40.069040000000108, 49.60105], [38.594988234213552, 49.926461900423718], [38.010631137857068, 49.915661526074715], [37.393459506995228, 50.383953355503664], [36.626167840325387, 50.225590928745127], [35.35611616388811, 50.577197374059139], [35.37791, 50.77394], [35.02218305841793, 51.207572333371495], [34.224815708154402, 51.255993150428921], [34.141978387190612, 51.56641347920619], [34.391730584457228, 51.768881740925892], [33.75269982273587, 52.335074571331646], [32.715760532367163, 52.238465481162159], [32.412058139787767, 52.288694973349763], [32.15944000000021, 52.061250000000101], [31.78597, 52.10168], [31.540018344862254, 52.742052313846429], [31.305200636527978, 53.073995876673301], [31.49764, 53.167430000000124], [32.304519484188368, 53.132726141972839], [32.693643019346119, 53.351420803432141], [32.405598585751157, 53.618045355842], [31.731272820774585, 53.794029446012011], [31.791424187962399, 53.974638576872181], [31.384472283663818, 54.157056382862365], [30.757533807098774, 54.811770941784388], [30.971835971813245, 55.08154775656412], [30.873909132620064, 55.55097646750351], [29.896294386522435, 55.789463202530484], [29.371571893030783, 55.670090643936263], [29.229513380660389, 55.918344224666399], [28.176709425577933, 56.169129950578778], [27.855282016722519, 56.759326483784363], [27.770015903440985, 57.244258124411189], [27.288184848751648, 57.474528306703903], [27.716685825315771, 57.791899115624439], [27.420150000000202, 58.724570000000128], [28.131699253051856, 59.300825100330982], [27.98112, 59.47537], [29.1177, 60.028050000000107], [28.07, 60.503520000000137], [30.211107212044645, 61.780027777749673], [31.139991082491029, 62.357692776124431], [31.516092156711263, 62.867687486412898], [30.035872430142796, 63.552813625738551], [30.444684686003736, 64.204453436939062], [29.544429559047014, 64.948671576590542], [30.21765, 65.80598], [29.054588657352376, 66.944286200622017], [29.977426385220689, 67.69829702419274], [28.445943637818765, 68.364612942163987], [28.591929559043358, 69.064776923286686], [29.39955, 69.15692000000017], [31.101080000000103, 69.55811], [32.132720000000255, 69.905950000000232], [33.77547, 69.301420000000107], [36.51396, 69.06342], [40.292340000000159, 67.9324], [41.059870000000124, 67.457130000000106], [41.125950000000174, 66.79158000000011], [40.01583, 66.266180000000119], [38.38295, 65.99953], [33.918710000000168, 66.75961], [33.18444, 66.63253], [34.81477, 65.900150000000124], [34.87857425307876, 65.436212877048192], [34.943910000000152, 64.414370000000147], [36.23129, 64.10945], [37.012730000000111, 63.84983], [37.141970000000143, 64.33471], [36.539579035089801, 64.76446], [37.176040000000135, 65.143220000000113], [39.59345, 64.520790000000162], [40.4356, 64.76446], [39.762600000000148, 65.49682], [42.09309, 66.47623], [43.01604000000011, 66.41858], [43.94975000000013, 66.06908], [44.53226, 66.756340000000122], [43.69839, 67.35245], [44.187950000000136, 67.95051], [43.45282, 68.57079], [46.250000000000135, 68.25], [46.821340000000156, 67.68997], [45.55517, 67.56652], [45.56202, 67.010050000000192], [46.349150000000137, 66.66767], [47.894160000000248, 66.884550000000146], [48.13876, 67.52238], [50.227660000000142, 67.998670000000132], [53.717430000000164, 68.85738], [54.47171, 68.80815], [53.485820000000118, 68.20131], [54.72628, 68.09702], [55.442680000000124, 68.43866], [57.317020000000149, 68.46628], [58.802000000000206, 68.88082], [59.941420000000178, 68.27844], [61.077840000000165, 68.94069], [60.03, 69.52], [60.55, 69.85], [63.504000000000147, 69.54739], [64.888115, 69.234835000000132], [68.512160000000108, 68.09233000000016], [69.18068, 68.61563000000011], [68.16444, 69.14436], [68.13522, 69.35649], [66.930080000000103, 69.454610000000102], [67.25976, 69.92873], [66.724920000000125, 70.708890000000125], [66.69466, 71.028970000000228], [68.540060000000111, 71.934500000000227], [69.19636, 72.843360000000146], [69.94, 73.04000000000012], [72.58754, 72.77629], [72.79603, 72.22006], [71.84811, 71.40898], [72.47011, 71.09019], [72.79188, 70.39114], [72.564700000000201, 69.02085], [73.66787, 68.4079], [73.2387, 67.7404], [71.280000000000101, 66.320000000000149], [72.423010000000147, 66.172670000000167], [72.82077, 66.53267], [73.920990000000131, 66.789460000000119], [74.186510000000183, 67.28429], [75.052, 67.760470000000154], [74.469260000000148, 68.32899], [74.93584, 68.98918], [73.84236, 69.07146], [73.601870000000204, 69.62763], [74.3998, 70.63175], [73.1011, 71.447170000000241], [74.890820000000204, 72.12119], [74.65926, 72.83227], [75.158010000000175, 72.854970000000108], [75.68351, 72.300560000000118], [75.288980000000109, 71.33556], [76.35911, 71.152870000000135], [75.903130000000161, 71.87401], [77.5766500000001, 72.26717], [79.652020000000107, 72.32011], [81.5, 71.75], [80.61071, 72.582850000000107], [80.51109, 73.6482], [82.25, 73.85], [84.65526, 73.805910000000154], [86.822300000000226, 73.93688], [86.00956, 74.459670000000145], [87.166820000000143, 75.11643], [88.31571, 75.14393], [90.26, 75.64], [92.90058, 75.77333], [93.234210000000132, 76.0472], [95.860000000000127, 76.14], [96.67821, 75.91548], [98.922540000000197, 76.44689], [100.759670000000199, 76.43028], [101.03532, 76.86189], [101.990840000000105, 77.287540000000192], [104.3516, 77.69792], [106.066640000000135, 77.37389], [104.705000000000211, 77.1274], [106.970130000000111, 76.97419]]], [[[105.07547, 78.30689], [99.43814, 77.921], [101.2649, 79.23399], [102.08635, 79.34641], [102.837815, 79.28129], [105.37243, 78.71334], [105.07547, 78.30689]]], [[[51.136186557831266, 80.54728017854093], [49.793684523320692, 80.415427761548202], [48.894411248577526, 80.33956675894369], [48.75493655782175, 80.175468248200829], [47.586119012244147, 80.010181179515328], [46.502825962109647, 80.247246812654339], [47.072455275262897, 80.559424140129451], [44.846958042181107, 80.589809882317169], [46.799138624871226, 80.771917629713627], [48.31847741068465, 80.784009914869927], [48.52280602396668, 80.514568996900138], [49.097189568890897, 80.753985907708412], [50.039767693894603, 80.918885403151791], [51.522932977103679, 80.699725653801906], [51.136186557831266, 80.54728017854093]]], [[[99.93976, 78.88094], [97.75794, 78.7562], [94.97259, 79.044745], [93.31288, 79.4265], [92.5454, 80.14379], [91.18107, 80.34146], [93.77766, 81.0246], [95.940895, 81.2504], [97.88385, 80.746975], [100.186655, 79.780135], [99.93976, 78.88094]]]] } }, + { "type": "Feature", "properties": { "admin": "Rwanda", "name": "Rwanda", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[30.419104852019235, -1.134659112150416], [30.816134881317705, -1.698914076345388], [30.758308953583104, -2.287250257988368], [30.469696079232978, -2.413857517103458], [29.938359002407935, -2.348486830254238], [29.632176141078585, -2.917857761246096], [29.02492638521678, -2.839257907730157], [29.117478875451546, -2.292211195488384], [29.254834832483336, -2.215109958508911], [29.29188683443661, -1.620055840667987], [29.579466180140876, -1.341313164885626], [29.821518588996003, -1.443322442229785], [30.419104852019235, -1.134659112150416]]] } }, + { "type": "Feature", "properties": { "admin": "Western Sahara", "name": "W. Sahara", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[-8.794883999049075, 27.120696316022503], [-8.81782833498667, 27.656425889592349], [-8.665589565454805, 27.656425889592349], [-8.66512447756419, 27.58947907155822], [-8.684399786809051, 27.395744126895998], [-8.687293667017398, 25.881056219988899], [-11.969418911171159, 25.933352769468261], [-11.93722449385332, 23.374594224536164], [-12.874221564169574, 23.284832261645171], [-13.118754441774708, 22.771220201096249], [-12.929101935263528, 21.327070624267559], [-16.845193650773989, 21.333323472574875], [-17.063423224342568, 20.99975210213082], [-17.020428432675736, 21.422310288981475], [-17.002961798561085, 21.420734157796574], [-14.750954555713532, 21.50060008390366], [-14.630832688851068, 21.860939846274899], [-14.221167771857251, 22.310163072188153], [-13.891110398809044, 23.691009019459297], [-12.500962693725368, 24.770116278578193], [-12.030758836301613, 26.030866197203036], [-11.718219773800353, 26.104091701760616], [-11.392554897496977, 26.883423977154358], [-10.551262579785272, 26.990807603456879], [-10.18942420087758, 26.860944729107398], [-9.735343390328877, 26.860944729107398], [-9.413037482124464, 27.088476060488514], [-8.794883999049075, 27.120696316022503]]] } }, + { "type": "Feature", "properties": { "admin": "Saudi Arabia", "name": "Saudi Arabia", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[42.779332309750963, 16.34789134364868], [42.64957278826607, 16.77463532151496], [42.347989129410706, 17.075805568911996], [42.270887892431219, 17.474721787989122], [41.754381951673949, 17.833046169500971], [41.221391229015573, 18.671599636301206], [40.939341261566533, 19.486485297111752], [40.247652215339819, 20.174634507726488], [39.801684604660934, 20.338862209550054], [39.139399448408277, 21.29190481209293], [39.023695916506782, 21.986875311770191], [39.066328973147577, 22.579655666590263], [38.492772251140075, 23.688451036060851], [38.023860304523616, 24.078685614512928], [37.483634881344379, 24.285494696545008], [37.154817742671177, 24.858482977797301], [37.209491408035994, 25.084541530858104], [36.931627231602583, 25.602959499610172], [36.639603712721218, 25.826227525327219], [36.249136590323808, 26.570135606384873], [35.640181512196385, 27.376520494083415], [35.130186801907875, 28.063351955674712], [34.632336053207972, 28.058546047471559], [34.787778761541936, 28.607427273059692], [34.832220493312938, 28.957483425404838], [34.956037225084252, 29.356554673778835], [36.068940870922049, 29.19749461518445], [36.501214227043583, 29.505253607698702], [36.740527784987243, 29.865283311476183], [37.503581984209028, 30.003776150018396], [37.668119744626374, 30.338665269485894], [37.998848911294367, 30.508499864213128], [37.002165561681004, 31.508412990844736], [39.004885695152545, 32.010216986614971], [39.195468377444961, 32.16100881604266], [40.399994337736238, 31.889991766887931], [41.889980910007829, 31.190008653278362], [44.709498732284736, 29.178891099559376], [46.568713413281742, 29.099025173452283], [47.459821811722819, 29.002519436147217], [47.708850538937376, 28.526062730416136], [48.416094191283939, 28.552004299426663], [48.807594842327163, 27.689627997339876], [49.299554477745815, 27.461218166609804], [49.470913527225647, 27.109999294538078], [50.152422316290874, 26.689663194275994], [50.212935418504671, 26.277026882425371], [50.113303257045928, 25.943972276304248], [50.23985883972874, 25.608049628190923], [50.527386509000728, 25.327808335872099], [50.660556675016885, 24.999895534764018], [50.810108270069563, 24.754742539971371], [51.112415398977006, 24.556330878186721], [51.389607781790623, 24.627385972588051], [51.579518670463258, 24.245497137951102], [51.617707553926969, 24.014219265228824], [52.000733270074321, 23.001154486578937], [55.006803012924898, 22.496947536707129], [55.208341098863187, 22.708329982997039], [55.666659376859812, 22.000001125572336], [54.999981723862355, 19.999994004796104], [52.000009800022227, 19.000003363516054], [49.116671583864857, 18.616667588774941], [48.183343540241324, 18.166669216377311], [47.466694777217626, 17.116681626854877], [47.000004917189749, 16.949999294497438], [46.749994337761642, 17.283338120996174], [46.366658563020529, 17.233315334537632], [45.399999220568752, 17.333335069238554], [45.216651238797184, 17.43332896572333], [44.062613152855072, 17.410358791569589], [43.791518589051904, 17.319976711491105], [43.380794305196098, 17.579986680567668], [43.115797560403351, 17.088440456607369], [43.218375278502734, 16.666889960186406], [42.779332309750963, 16.34789134364868]]] } }, + { "type": "Feature", "properties": { "admin": "Sudan", "name": "Sudan", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[33.963392794971178, 9.464285229420623], [33.824963480907506, 9.48406084571536], [33.842130853028145, 9.981914637215992], [33.721959248183097, 10.325262079630191], [33.206938084561777, 10.720111638406591], [33.086766479716729, 11.441141267476493], [33.206938084561777, 12.179338268667093], [32.743419037302537, 12.24800775714999], [32.674749548819641, 12.024831919580716], [32.073891524594778, 11.973329803218517], [32.314234734284746, 11.681484477166519], [32.400071594888338, 11.080626452941486], [31.850715687025509, 10.531270545078822], [31.352861895524875, 9.810240916008693], [30.837840731903377, 9.707236683284519], [29.996639497988546, 10.290927335388684], [29.618957311332842, 10.084918869940223], [29.515953078608607, 9.793073543888053], [29.000931914987166, 9.604232450560287], [28.966597170745779, 9.398223985111654], [27.970889587744345, 9.398223985111654], [27.833550610778783, 9.604232450560287], [27.112520981708876, 9.638567194801622], [26.752006167173811, 9.466893473594492], [26.477328213242508, 9.552730334198086], [25.96230704962101, 10.136420986302422], [25.790633328413943, 10.411098940233726], [25.069603699343979, 10.27375996326799], [24.79492574541268, 9.810240916008693], [24.537415163602017, 8.917537565731719], [24.194067721187643, 8.728696472403895], [23.886979580860665, 8.619729712933063], [23.805813429466745, 8.666318874542522], [23.459012892355979, 8.954285793489019], [23.394779087017291, 9.26506785729225], [23.557249790142915, 9.681218166538766], [23.554304233502187, 10.089255275915319], [22.977543572692749, 10.714462591998538], [22.864165480244246, 11.142395127807616], [22.87622, 11.384610000000119], [22.50869, 11.67936], [22.49762, 12.26024], [22.28801, 12.64605], [21.93681, 12.588180000000133], [22.03759, 12.95546], [22.29658, 13.37232], [22.18329, 13.78648], [22.51202, 14.09318], [22.30351, 14.32682], [22.567950000000106, 14.944290000000134], [23.02459, 15.68072], [23.886890000000101, 15.61084], [23.837660000000135, 19.580470000000101], [23.850000000000129, 20.0], [25.00000000000011, 20.00304], [25.00000000000011, 22.0], [29.02, 22.0], [32.9, 22.0], [36.86623, 22.0], [37.18872, 21.01885], [36.96941, 20.837440000000125], [37.114700000000134, 19.80796], [37.48179, 18.61409], [37.86276, 18.36786], [38.410089959473218, 17.998307399970312], [37.904000000000103, 17.42754], [37.16747, 17.263140000000128], [36.852530000000108, 16.95655], [36.75389, 16.29186], [36.32322, 14.82249], [36.42951, 14.42211], [36.27022, 13.563330000000118], [35.86363, 12.57828], [35.26049, 12.08286], [34.831630000000125, 11.318960000000116], [34.73115000000012, 10.910170000000106], [34.25745, 10.63009], [33.96162, 9.58358], [33.963392794971178, 9.464285229420623]]] } }, + { "type": "Feature", "properties": { "admin": "South Sudan", "name": "S. Sudan", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[33.963392794971178, 9.464285229420623], [33.97498, 8.68456], [33.82550000000014, 8.37916], [33.294800000000116, 8.35458], [32.95418, 7.7849700000001], [33.56829, 7.71334], [34.0751, 7.22595], [34.25032, 6.82607], [34.70702, 6.59422000000012], [35.298007118233095, 5.506], [34.620196267853935, 4.847122742082034], [34.005, 4.249884947362147], [33.39, 3.79], [32.68642, 3.79232], [31.881450000000136, 3.55827], [31.24556, 3.7819], [30.83385, 3.50917], [29.95349, 4.1737], [29.715995314256013, 4.600804755060152], [29.159078403446635, 4.389267279473244], [28.696677687298795, 4.455077215996993], [28.428993768026992, 4.287154649264607], [27.979977247842946, 4.408413397637388], [27.374226108517625, 5.233944403500173], [27.213409051225248, 5.550953477394613], [26.465909458123289, 5.946717434101855], [26.213418409945113, 6.546603298362127], [25.796647983511257, 6.979315904158169], [25.124130893664805, 7.500085150579422], [25.114932488716867, 7.825104071479244], [24.567369012152191, 8.229187933785452], [23.886979580860665, 8.619729712933063], [24.194067721187643, 8.728696472403895], [24.537415163602017, 8.917537565731719], [24.79492574541268, 9.810240916008693], [25.069603699343979, 10.27375996326799], [25.790633328413943, 10.411098940233726], [25.96230704962101, 10.136420986302422], [26.477328213242508, 9.552730334198086], [26.752006167173811, 9.466893473594492], [27.112520981708876, 9.638567194801622], [27.833550610778783, 9.604232450560287], [27.970889587744345, 9.398223985111654], [28.966597170745779, 9.398223985111654], [29.000931914987166, 9.604232450560287], [29.515953078608607, 9.793073543888053], [29.618957311332842, 10.084918869940223], [29.996639497988546, 10.290927335388684], [30.837840731903377, 9.707236683284519], [31.352861895524875, 9.810240916008693], [31.850715687025509, 10.531270545078822], [32.400071594888338, 11.080626452941486], [32.314234734284746, 11.681484477166519], [32.073891524594778, 11.973329803218517], [32.674749548819641, 12.024831919580716], [32.743419037302537, 12.24800775714999], [33.206938084561777, 12.179338268667093], [33.086766479716729, 11.441141267476493], [33.206938084561777, 10.720111638406591], [33.721959248183097, 10.325262079630191], [33.842130853028145, 9.981914637215992], [33.824963480907506, 9.48406084571536], [33.963392794971178, 9.464285229420623]]] } }, + { "type": "Feature", "properties": { "admin": "Senegal", "name": "Senegal", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[-16.713728807023468, 13.594958604379853], [-17.126106736712611, 14.373515733289221], [-17.625042690490655, 14.72954051356407], [-17.185172898822227, 14.91947724045286], [-16.700706346085919, 15.621527411354107], [-16.463098110407881, 16.135036119038457], [-16.120690070041928, 16.45566254319338], [-15.623666144258689, 16.369337063049809], [-15.135737270558813, 16.587282416240779], [-14.577347581428977, 16.598263658102805], [-14.099521450242175, 16.304302273010489], [-13.43573767745306, 16.039383042866188], [-12.830658331747513, 15.303691514542942], [-12.170750291380299, 14.616834214735503], [-12.124887457721256, 13.994727484589784], [-11.927716030311613, 13.422075100147392], [-11.553397793005427, 13.141213690641063], [-11.467899135778522, 12.754518947800973], [-11.513942836950587, 12.442987575729415], [-11.658300950557928, 12.386582749882834], [-12.20356482588563, 12.465647691289401], [-12.278599005573438, 12.354440008997285], [-12.499050665730561, 12.332089952031053], [-13.217818162478235, 12.575873521367964], [-13.700476040084322, 12.586182969610192], [-15.548476935274005, 12.628170070847343], [-15.816574266004251, 12.515567124883345], [-16.147716844130581, 12.547761542201185], [-16.67745195155457, 12.38485158940105], [-16.84152462408127, 13.151393947802557], [-15.931295945692208, 13.130284125211331], [-15.691000535534991, 13.270353094938455], [-15.511812506562931, 13.278569647672864], [-15.141163295949463, 13.509511623585235], [-14.712197231494626, 13.298206691943774], [-14.277701788784553, 13.28058502853224], [-13.844963344772404, 13.505041612191999], [-14.046992356817478, 13.794067898000446], [-14.376713833055785, 13.625680243377371], [-14.687030808968483, 13.63035696049978], [-15.081735398813816, 13.876491807505982], [-15.398770310924457, 13.860368760630916], [-15.624596320039936, 13.623587347869556], [-16.713728807023468, 13.594958604379853]]] } }, + { "type": "Feature", "properties": { "admin": "Solomon Islands", "name": "Solomon Is.", "continent": "Oceania" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[162.119024693040842, -10.482719008021133], [162.398645868172196, -10.826367282762119], [161.700032180018354, -10.820011081590222], [161.319796991214702, -10.204751478723123], [161.917383254237933, -10.446700534713653], [162.119024693040842, -10.482719008021133]]], [[[160.852228631837903, -9.872937106977002], [160.462588332357228, -9.89520964929484], [159.849447463214176, -9.794027194867367], [159.640002883135139, -9.639979750205269], [159.70294477766663, -9.242949720906777], [160.362956170898428, -9.400304457235533], [160.688517694337179, -9.610162448772808], [160.852228631837903, -9.872937106977002]]], [[[161.679981724289121, -9.599982191611373], [161.52939660059053, -9.784312025596433], [160.788253208660507, -8.917543226764918], [160.579997186524338, -8.320008640173965], [160.92002811100491, -8.320008640173965], [161.280006138349961, -9.120011488484449], [161.679981724289121, -9.599982191611373]]], [[[159.875027297198585, -8.337320244991714], [159.917401971677975, -8.538289890174864], [159.133677199539335, -8.114181410355398], [158.586113722974687, -7.754823500197713], [158.211149530264834, -7.421872246941147], [158.359977655265425, -7.320017998893915], [158.820001255527671, -7.56000335045739], [159.640002883135139, -8.020026950719567], [159.875027297198585, -8.337320244991714]]], [[[157.53842573468927, -7.347819919466928], [157.339419793933217, -7.404767347852554], [156.902030471014768, -7.176874281445391], [156.491357863591304, -6.765943291860394], [156.542827590153934, -6.599338474151478], [157.140000441718882, -7.021638278840653], [157.53842573468927, -7.347819919466928]]]] } }, + { "type": "Feature", "properties": { "admin": "Sierra Leone", "name": "Sierra Leone", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[-11.438779466182053, 6.785916856305746], [-11.708194545935736, 6.860098374860724], [-12.428098924193815, 7.262942002792029], [-12.949049038128193, 7.798645738145736], [-13.124025437868479, 8.163946438016977], [-13.246550258832512, 8.903048610871506], [-12.711957566773076, 9.342711696810765], [-12.596719122762206, 9.620188300001969], [-12.425928514037562, 9.835834051955953], [-12.150338100625003, 9.858571682164378], [-11.917277390988655, 10.046983954300556], [-11.117481248407328, 10.045872911006283], [-10.839151984083299, 9.688246161330367], [-10.622395188835037, 9.267910061068276], [-10.65477047366589, 8.977178452994194], [-10.494315151399629, 8.715540676300433], [-10.505477260774667, 8.348896389189603], [-10.230093553091276, 8.406205552601291], [-10.695594855176477, 7.939464016141085], [-11.14670427086838, 7.396706447779534], [-11.199801805048278, 7.105845648624735], [-11.438779466182053, 6.785916856305746]]] } }, + { "type": "Feature", "properties": { "admin": "El Salvador", "name": "El Salvador", "continent": "North America" }, "geometry": { "type": "Polygon", "coordinates": [[[-87.793111131526558, 13.384480495655051], [-87.904112108089507, 13.149016831917134], [-88.483301561216791, 13.163951320849488], [-88.843227912129692, 13.259733588102474], [-89.256742723329282, 13.4585328231293], [-89.812393561547637, 13.520622056527994], [-90.095554572290951, 13.73533763270073], [-90.064677903996568, 13.881969509328924], [-89.7219339668207, 14.134228013561694], [-89.5342193265205, 14.244815578666302], [-89.587342698916544, 14.362586167859485], [-89.353325975282772, 14.424132798719112], [-89.058511929057644, 14.340029405164085], [-88.843072882832814, 14.140506700085169], [-88.541230841815974, 13.980154730683475], [-88.50399797234968, 13.845485948130854], [-88.065342576840123, 13.964625962779774], [-87.859515347021585, 13.893312486216979], [-87.723502977229387, 13.785050360565503], [-87.793111131526558, 13.384480495655051]]] } }, + { "type": "Feature", "properties": { "admin": "Somaliland", "name": "Somaliland", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[48.938129510296491, 9.451748968946672], [48.486735874226994, 8.837626247589979], [47.78942, 8.003], [46.948328484897942, 7.996876532417386], [43.67875, 9.183580000000116], [43.296975132018744, 9.540477403191742], [42.92812, 10.021940000000139], [42.55876, 10.572580000000126], [42.776851841000948, 10.926878566934416], [43.145304803242126, 11.462039699748853], [43.470659620951658, 11.27770986576388], [43.666668328634834, 10.864169216348158], [44.117803582542805, 10.445538438351603], [44.614259067570849, 10.442205308468941], [45.556940545439133, 10.698029486529775], [46.645401238802997, 10.816549383991171], [47.525657586462778, 11.127228094929986], [48.021596307167769, 11.193063869669741], [48.378783807169263, 11.375481675660122], [48.948206414593457, 11.410621649618516], [48.942005242718423, 11.394266058798163], [48.938491245322595, 10.982327378783451], [48.938232863161076, 9.973500067581481], [48.938129510296491, 9.451748968946672]]] } }, + { "type": "Feature", "properties": { "admin": "Somalia", "name": "Somalia", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[49.72862, 11.5789], [50.25878, 11.67957], [50.73202, 12.0219], [51.1112, 12.02464], [51.13387, 11.74815], [51.04153, 11.16651], [51.04531, 10.6409], [50.83418, 10.27972], [50.55239, 9.19874], [50.07092, 8.08173], [49.4527, 6.80466], [48.59455, 5.33911], [47.74079, 4.2194], [46.56476, 2.85529], [45.56399, 2.04576], [44.06815, 1.05283], [43.13597, 0.2922], [42.04157, -0.91916], [41.81095, -1.44647], [41.58513, -1.68325], [40.993, -0.85829], [40.98105, 2.78452], [41.855083092643966, 3.918911920483726], [42.12861, 4.23413], [42.76967, 4.25259], [43.66087, 4.95755], [44.9636, 5.00162], [47.78942, 8.003], [48.486735874226937, 8.837626247589993], [48.938129510296442, 9.451748968946616], [48.938232863161026, 9.973500067581508], [48.938491245322481, 10.982327378783465], [48.942005242718345, 11.394266058798136], [48.948204758509732, 11.410617281697961], [49.26776, 11.43033], [49.72862, 11.5789]]] } }, + { "type": "Feature", "properties": { "admin": "Republic of Serbia", "name": "Serbia", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[20.874312778413408, 45.416375433934306], [21.483526238702204, 45.181170152357865], [21.562022739353718, 44.768947251965635], [22.145087924902892, 44.478422349620573], [22.459022251075961, 44.702517198254426], [22.705725538837434, 44.578002834647002], [22.47400841644065, 44.409227606781762], [22.657149692483067, 44.234923000661347], [22.410446404721593, 44.008063462900047], [22.500156691180219, 43.642814439460999], [22.986018507588479, 43.211161200527094], [22.604801466571352, 42.898518785161109], [22.43659467946139, 42.580321153323943], [22.545011834409642, 42.461362006188025], [22.380525750424674, 42.320259507815074], [21.917080000000105, 42.30364], [21.576635989402117, 42.245224397061847], [21.54332, 42.32025], [21.66292, 42.43922], [21.77505, 42.6827], [21.63302, 42.67717], [21.43866, 42.86255], [21.27421, 42.90959], [21.143395, 43.068685000000123], [20.95651, 43.13094], [20.81448, 43.27205], [20.63508, 43.21671], [20.49679, 42.88469], [20.25758, 42.81275], [20.3398, 42.89852], [19.95857, 43.10604], [19.63, 43.213779970270522], [19.48389, 43.35229], [19.21852, 43.52384], [19.454, 43.568100000000115], [19.59976, 44.03847], [19.11761, 44.42307], [19.36803, 44.863], [19.00548, 44.86023], [19.390475701584588, 45.236515611342369], [19.072768995854172, 45.521511135432078], [18.82982, 45.90888], [19.596044549241636, 46.171729844744547], [20.22019249846289, 46.127468980486569], [20.76217492033998, 45.734573065771478], [20.874312778413408, 45.416375433934306]]] } }, + { "type": "Feature", "properties": { "admin": "Suriname", "name": "Suriname", "continent": "South America" }, "geometry": { "type": "Polygon", "coordinates": [[[-57.147436489476874, 5.973149929219161], [-55.949318406789786, 5.772877915872], [-55.841779751190408, 5.953125311706059], [-55.033250291551759, 6.025291449401662], [-53.958044603070888, 5.756548163267764], [-54.478632981979224, 4.896755682795585], [-54.3995422023565, 4.212611395683466], [-54.006930508018996, 3.620037746592558], [-54.181726040246261, 3.189779771330421], [-54.269705166223183, 2.732391669115046], [-54.524754197799709, 2.311848863123785], [-55.097587449755125, 2.523748073736612], [-55.569755011605984, 2.42150625244713], [-55.973322109589361, 2.510363877773016], [-56.073341844290283, 2.220794989425499], [-55.905600145070871, 2.021995754398659], [-55.995698004771739, 1.817667141116601], [-56.53938574891454, 1.89952260986692], [-57.150097825739898, 2.768926906745406], [-57.281433478409703, 3.333491929534119], [-57.601568976457848, 3.334654649260684], [-58.044694383360664, 4.060863552258382], [-57.860209520078691, 4.576801052260449], [-57.914288906472123, 4.812626451024413], [-57.307245856339492, 5.073566595882225], [-57.147436489476874, 5.973149929219161]]] } }, + { "type": "Feature", "properties": { "admin": "Slovakia", "name": "Slovakia", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[18.85314415861361, 49.496229763377634], [18.909574822676316, 49.435845852244562], [19.320712517990469, 49.571574001659179], [19.825022820726865, 49.217125352569219], [20.415839471119849, 49.431453355499755], [20.887955356538406, 49.328772284535823], [21.607808058364206, 49.470107326854077], [22.558137648211751, 49.08573802346713], [22.280841912533553, 48.825392157580659], [22.085608351334848, 48.422264309271782], [21.872236362401729, 48.319970811550007], [20.801293979584919, 48.62385407164237], [20.473562045989862, 48.562850043321809], [20.239054396249344, 48.327567247096916], [19.769470656013109, 48.2026911484636], [19.66136355965849, 48.266614895208647], [19.174364861739885, 48.111378892603859], [18.777024773847668, 48.081768296900627], [18.696512892336923, 47.88095368101439], [17.857132602620023, 47.758428860050365], [17.488472934649813, 47.867466132186209], [16.979666782304033, 48.123497015976298], [16.879982944412998, 48.470013332709463], [16.960288120194573, 48.596982326850593], [17.101984897538895, 48.8169688991171], [17.545006951577101, 48.800019029325362], [17.886484816161808, 48.903475246773695], [17.913511590250462, 48.996492824899072], [18.104972771891848, 49.043983466175298], [18.170498488037961, 49.271514797556421], [18.399993523846174, 49.315000515330034], [18.554971144289478, 49.495015367218777], [18.85314415861361, 49.496229763377634]]] } }, + { "type": "Feature", "properties": { "admin": "Slovenia", "name": "Slovenia", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[13.806475457421524, 46.509306138691201], [14.632471551174827, 46.431817328469535], [15.137091912504982, 46.658702704447016], [16.011663852612653, 46.683610744811688], [16.202298211337361, 46.852385972676949], [16.370504998447412, 46.841327216166498], [16.564808383864854, 46.503750922219822], [15.768732944408548, 46.238108222023442], [15.671529575267552, 45.834153550797865], [15.323953891672403, 45.731782538427673], [15.327674594797424, 45.452316392593218], [14.935243767972931, 45.471695054702671], [14.595109490627804, 45.6349409043127], [14.411968214585411, 45.466165676447446], [13.715059848697221, 45.500323798192369], [13.937630242578305, 45.591015936864608], [13.698109978905475, 46.016778062517339], [13.806475457421524, 46.509306138691201]]] } }, + { "type": "Feature", "properties": { "admin": "Sweden", "name": "Sweden", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[22.183173455501922, 65.723740546320158], [21.213516879977213, 65.02600535751526], [21.369631381930954, 64.413587958424273], [19.778875766690216, 63.609554348395022], [17.847779168375208, 62.749400132896803], [17.11955488451812, 61.341165676510954], [17.831346062906388, 60.636583360427394], [18.787721795332086, 60.081914374422581], [17.869224887776337, 58.95376618105869], [16.829185011470084, 58.719826972073385], [16.44770958829147, 57.041118069071871], [15.87978559740378, 56.104301866268649], [14.666681349352071, 56.20088511822216], [14.100721062891461, 55.407781073622637], [12.942910597392054, 55.361737372450563], [12.625100538797025, 56.307080186581956], [11.787942335668671, 57.441817125063061], [11.027368605196866, 58.856149400459344], [11.468271925511145, 59.432393296946024], [12.300365838274896, 60.117932847730025], [12.631146681375181, 61.293571682370121], [11.992064243221559, 61.800362453856543], [11.930569288794228, 63.128317572676963], [12.57993533697393, 64.066218980558318], [13.571916131248711, 64.049114081469696], [13.9199052263022, 64.445420640716065], [13.555689731509087, 64.7870276963815], [15.108411492582999, 66.19386688909546], [16.108712192456775, 67.302455552836875], [16.768878614985478, 68.013936672631388], [17.729181756265344, 68.010551866316263], [17.993868442464329, 68.567391262477344], [19.878559604581248, 68.407194322372561], [20.025268995857882, 69.065138658312691], [20.645592889089521, 69.106247260200846], [21.978534783626113, 68.616845608180682], [23.539473097434435, 67.936008612735236], [23.565879754335576, 66.396050930437411], [23.903378533633795, 66.006927395279604], [22.183173455501922, 65.723740546320158]]] } }, + { "type": "Feature", "properties": { "admin": "Swaziland", "name": "Swaziland", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[32.071665480281062, -26.733820082304902], [31.868060337051073, -27.17792734142127], [31.282773064913325, -27.285879408478991], [30.685961948374477, -26.743845310169526], [30.676608514129633, -26.398078301704604], [30.949666782359905, -26.022649021104144], [31.044079624157146, -25.731452325139436], [31.333157586397899, -25.660190525008943], [31.837777947728057, -25.843331801051342], [31.985779249811962, -26.29177988048022], [32.071665480281062, -26.733820082304902]]] } }, + { "type": "Feature", "properties": { "admin": "Syria", "name": "Syria", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[38.792340529136077, 33.378686428352218], [36.834062127435537, 32.312937526980768], [35.719918247222743, 32.709192409794859], [35.700797967274745, 32.716013698857374], [35.836396925608618, 32.868123277308506], [35.821100701650231, 33.277426459276292], [36.066460402172048, 33.824912421192543], [36.611750115715886, 34.201788641897174], [36.448194207512095, 34.59393524834406], [35.998402540843628, 34.644914048799997], [35.905023227692219, 35.410009467097318], [36.149762811026527, 35.821534735653664], [36.417550083163029, 36.040616970355053], [36.685389031731795, 36.259699205056457], [36.739494256341395, 36.817520453431079], [37.066761102045824, 36.623036200500614], [38.167727492024191, 36.901210435527766], [38.699891391765895, 36.712927354472335], [39.522580193852541, 36.716053778625984], [40.673259311695681, 37.091276353497285], [41.212089471203043, 37.074352321921687], [42.349591098811764, 37.22987254490409], [41.837064243340954, 36.605853786763568], [41.289707472505448, 36.358814602192261], [41.383965285005807, 35.628316555314349], [41.00615888851992, 34.419372260062111], [38.792340529136077, 33.378686428352218]]] } }, + { "type": "Feature", "properties": { "admin": "Chad", "name": "Chad", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[14.495787387762899, 12.859396267137353], [14.595781284247604, 13.330426947477859], [13.954476759505607, 13.353448798063765], [13.956698846094124, 13.996691189016925], [13.540393507550785, 14.36713369390122], [13.97217, 15.68437], [15.247731154041842, 16.627305813050778], [15.300441114979716, 17.927949937405], [15.68574059414777, 19.957180080642384], [15.90324669766431, 20.387618923417499], [15.487148064850143, 20.730414537025634], [15.47106, 21.04845], [15.096887648181847, 21.308518785074902], [14.8513, 22.862950000000119], [15.86085, 23.40972], [19.84926, 21.49509], [23.837660000000135, 19.580470000000101], [23.886890000000101, 15.61084], [23.02459, 15.68072], [22.567950000000106, 14.944290000000134], [22.30351, 14.32682], [22.51202, 14.09318], [22.18329, 13.78648], [22.29658, 13.37232], [22.03759, 12.95546], [21.93681, 12.588180000000133], [22.28801, 12.64605], [22.49762, 12.26024], [22.50869, 11.67936], [22.87622, 11.384610000000119], [22.864165480244246, 11.142395127807616], [22.231129184668756, 10.971888739460608], [21.723821648859538, 10.567055568885959], [21.000868361096305, 9.475985215691479], [20.059685499764267, 9.012706000194838], [19.094008009526071, 9.074846910025768], [18.81200971850927, 8.982914536978623], [18.911021762780589, 8.630894680206435], [18.389554884523303, 8.281303615751879], [17.964929640380884, 7.890914008002992], [16.705988396886365, 7.508327541529978], [16.4561845231874, 7.734773667832938], [16.290561557691884, 7.754307359239417], [16.106231723706738, 7.497087917506461], [15.279460483469164, 7.42192454673801], [15.436091749745737, 7.692812404811887], [15.120865512765302, 8.382150173369437], [14.979995558337688, 8.796104234243442], [14.544466586981851, 8.965861314322238], [13.954218377344088, 9.549494940626685], [14.17146609869911, 10.021378282100043], [14.627200555081057, 9.920919297724591], [14.909353875394796, 9.992129421422758], [15.46787275560524, 9.982336737503543], [14.923564894275042, 10.891325181517514], [14.960151808337679, 11.555574042197234], [14.89336, 12.21905], [14.495787387762899, 12.859396267137353]]] } }, + { "type": "Feature", "properties": { "admin": "Togo", "name": "Togo", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[1.865240512712318, 6.14215770102973], [1.060121697604927, 5.928837388528875], [0.836931186536333, 6.279978745952147], [0.570384148774849, 6.914358628767188], [0.490957472342245, 7.411744289576474], [0.712029249686878, 8.312464504423827], [0.461191847342121, 8.677222601756013], [0.365900506195885, 9.46500397382948], [0.367579990245389, 10.191212876827176], [-0.049784715159944, 10.706917832883928], [0.023802524423701, 11.018681748900802], [0.899563022474069, 10.997339382364258], [0.772335646171484, 10.470808213742357], [1.077795037448737, 10.175606594275022], [1.425060662450136, 9.825395412632998], [1.46304284018467, 9.334624335157086], [1.664477573258381, 9.128590399609378], [1.618950636409238, 6.832038072126236], [1.865240512712318, 6.14215770102973]]] } }, + { "type": "Feature", "properties": { "admin": "Thailand", "name": "Thailand", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[102.58493248902667, 12.186594956913279], [101.687157830819928, 12.645740057826568], [100.831809523524839, 12.627084865769204], [100.978467238369191, 13.412721665902563], [100.097797479251099, 13.406856390837429], [100.018732537844528, 12.307001044153353], [99.478920526123602, 10.846366685423545], [99.153772414143134, 9.963061428258554], [99.222398716226749, 9.239255479362425], [99.873831821698118, 9.207862046745118], [100.279646844486194, 8.29515289960605], [100.45927412313273, 7.429572658717175], [101.017327915452697, 6.856868597842476], [101.623079054778032, 6.740622463401918], [102.141186964936367, 6.221636053894626], [101.81428185425797, 5.810808417174242], [101.154218784593837, 5.691384182147713], [101.075515578213327, 6.20486705161592], [100.259596388756933, 6.642824815289542], [100.085756870527092, 6.46448944745029], [99.690690545655727, 6.848212795433595], [99.519641554769606, 7.343453884302759], [98.988252801512289, 7.907993068875325], [98.503786248775967, 8.382305202666286], [98.339661899816988, 7.794511623562384], [98.150009393305808, 8.350007432483876], [98.259150018306229, 8.973922837759799], [98.553550653073017, 9.932959906448543], [99.038120558673953, 10.960545762572435], [99.587286004639694, 11.892762762901695], [99.196353794351637, 12.804748439988666], [99.212011753336071, 13.269293728076462], [99.097755161538728, 13.827502549693275], [98.430819126379859, 14.622027696180831], [98.192074009191373, 15.123702500870349], [98.537375929765687, 15.308497422746081], [98.90334842325673, 16.177824204976115], [98.493761020911322, 16.837835598207928], [97.859122755934848, 17.567946071843657], [97.375896437573516, 18.445437730375811], [97.797782830804394, 18.627080389881751], [98.253723992915582, 19.708203029860041], [98.959675734454848, 19.752980658440944], [99.543309360759281, 20.186597601802056], [100.115987583417819, 20.41784963630818], [100.548881056726856, 20.109237982661124], [100.606293573003128, 19.508344427971217], [101.282014601651667, 19.462584947176762], [101.035931431077742, 18.408928330961611], [101.059547560635139, 17.512497259994486], [102.113591750092453, 18.109101670804161], [102.413004998791592, 17.932781683824281], [102.998705682387694, 17.961694647691598], [103.200192091893726, 18.309632066312769], [103.956476678485288, 18.240954087796872], [104.716947056092465, 17.428858954330078], [104.779320509868768, 16.441864935771445], [105.589038527450128, 15.570316066952856], [105.544338413517664, 14.723933620660414], [105.218776890078871, 14.27321177821069], [104.281418084736586, 14.416743068901363], [102.988422072361601, 14.225721136934464], [102.348099399833004, 13.39424734135822], [102.58493248902667, 12.186594956913279]]] } }, + { "type": "Feature", "properties": { "admin": "Tajikistan", "name": "Tajikistan", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[71.014198032520156, 40.244365546218226], [70.648018833299957, 39.935753892571157], [69.559609816368507, 40.103211371412968], [69.464886915977516, 39.526683254548693], [70.549161818325601, 39.604197902986492], [71.784693637991992, 39.279463202464363], [73.67537926625478, 39.431236884105594], [73.928852166646408, 38.505815334622724], [74.257514276022718, 38.606506862943441], [74.864815708316812, 38.378846340481587], [74.829985792952087, 37.990007025701388], [74.980002475895404, 37.419990139305888], [73.948695916646486, 37.421566270490786], [73.260055779924983, 37.495256862938994], [72.636889682917271, 37.047558091778349], [72.193040805962383, 36.94828766534566], [71.84463829945058, 36.738171291646914], [71.448693475230229, 37.065644843080513], [71.541917759084768, 37.905774441065631], [71.239403924448155, 37.953265082341879], [71.348131137990251, 38.258905341132156], [70.806820509732873, 38.486281643216408], [70.376304152309274, 38.138395901027515], [70.270574171840124, 37.73516469985401], [70.116578403610319, 37.588222764632086], [69.518785434857946, 37.608996690413413], [69.196272820924364, 37.15114350030742], [68.859445835245921, 37.344335842430588], [68.135562371701369, 37.023115139304302], [67.829999627559502, 37.144994004864678], [68.392032505165943, 38.157025254868728], [68.176025018185911, 38.901553453113898], [67.442219679641298, 39.140143541005479], [67.701428664017342, 39.580478420564518], [68.536416456989414, 39.533452867178923], [69.011632928345477, 40.086158148756653], [69.329494663372813, 40.727824408524839], [70.666622348925031, 40.960213324541407], [70.458159621059608, 40.49649485937028], [70.601406691372674, 40.218527330072284], [71.014198032520156, 40.244365546218226]]] } }, + { "type": "Feature", "properties": { "admin": "Turkmenistan", "name": "Turkmenistan", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[61.21081709172573, 35.650072333309218], [61.123070509694131, 36.491597194966239], [60.377637973883864, 36.52738312432836], [59.234761997316795, 37.412987982730336], [58.436154412678192, 37.522309475243794], [57.330433790928964, 38.029229437810933], [56.619366082592805, 38.121394354803478], [56.180374790273319, 37.935126654607423], [55.511578403551894, 37.964117133123153], [54.800303989486558, 37.392420762678178], [53.921597934795543, 37.198918361961255], [53.735511102112504, 37.906136176091685], [53.880928582581831, 38.952093003895349], [53.101027866432894, 39.290573635407121], [53.357808058491216, 39.975286363274442], [52.693972609269807, 40.033629055331964], [52.91525109234361, 40.87652334244472], [53.85813927594112, 40.631034450842165], [54.736845330632136, 40.951014919593455], [54.0083109881813, 41.551210842447404], [53.721713494690576, 42.123191433270016], [52.916749708880069, 41.868116563477322], [52.81468875510361, 41.135370591794704], [52.502459751196135, 41.783315538086356], [52.94429324729164, 42.116034247397586], [54.079417759014937, 42.324109402020817], [54.755345493392625, 42.04397146256656], [55.455251092353755, 41.259859117185826], [55.968191359282898, 41.308641669269356], [57.096391229079089, 41.32231008561056], [56.93221520368779, 41.82602610937559], [57.786529982337065, 42.170552883465511], [58.629010857991453, 42.751551011723045], [59.976422153569771, 42.223081976890199], [60.083340691981654, 41.425146185871391], [60.46595299667068, 41.22032664648254], [61.547178989513547, 41.2663703476546], [61.882714064384679, 41.084856879229392], [62.374260288344992, 40.053886216790382], [63.518014764261018, 39.363256537425627], [64.170223016216752, 38.892406724598231], [65.215998976507379, 38.402695013984292], [66.546150343700205, 37.974684963526855], [66.518606805288655, 37.362784328758785], [66.217384881459324, 37.393790188133913], [65.745630731066811, 37.661164048812061], [65.588947788357828, 37.305216783185628], [64.746105177677393, 37.111817735333297], [64.546479119733888, 36.31207326918426], [63.982895949158696, 36.007957465146596], [63.193538445900337, 35.857165635718907], [62.984662306576588, 35.404040839167614], [62.230651483005879, 35.270663967422287], [61.21081709172573, 35.650072333309218]]] } }, + { "type": "Feature", "properties": { "admin": "East Timor", "name": "Timor-Leste", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[124.96868248911619, -8.892790215697081], [125.086246372580248, -8.656887302284678], [125.947072381698234, -8.432094821815033], [126.64470421763852, -8.39824675866385], [126.957243280139792, -8.273344821814396], [127.335928175974615, -8.397316582882601], [126.967991978056517, -8.668256117388891], [125.925885044458568, -9.106007175333351], [125.088520135601073, -9.393173109579292], [125.070019972840583, -9.08998748132287], [124.96868248911619, -8.892790215697081]]] } }, + { "type": "Feature", "properties": { "admin": "Trinidad and Tobago", "name": "Trinidad and Tobago", "continent": "North America" }, "geometry": { "type": "Polygon", "coordinates": [[[-61.68, 10.76], [-61.105, 10.89], [-60.895, 10.855], [-60.935, 10.11], [-61.77, 10.0], [-61.95, 10.09], [-61.66, 10.365], [-61.68, 10.76]]] } }, + { "type": "Feature", "properties": { "admin": "Tunisia", "name": "Tunisia", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[9.482139926805273, 30.307556057246181], [9.055602654668148, 32.102691962201284], [8.439102817426116, 32.506284898400814], [8.430472853233367, 32.748337307255944], [7.612641635782181, 33.344114895148955], [7.524481642292242, 34.097376410451453], [8.140981479534302, 34.655145982393783], [8.376367628623766, 35.479876003555937], [8.217824334352313, 36.433176988260271], [8.420964389691674, 36.946427313783154], [9.509993523810605, 37.349994411766531], [10.210002475636315, 37.230001735984807], [10.180650262094529, 36.724037787415071], [11.028867221733348, 37.09210317641395], [11.100025668999249, 36.899996039368908], [10.600004510143092, 36.410000108377368], [10.593286573945134, 35.947444362932806], [10.939518670300686, 35.698984076473486], [10.807847120821007, 34.833507188449182], [10.149592726287123, 34.330773016897702], [10.339658644256613, 33.785741685515312], [10.856836378633684, 33.768740139291275], [11.108500603895118, 33.293342800422188], [11.488787469131008, 33.136995754523134], [11.432253452203692, 32.368903103152867], [10.944789666394453, 32.081814683555358], [10.636901482799484, 31.761420803345747], [9.950225050505081, 31.376069647745251], [10.056575148161752, 30.961831366493595], [9.97001712407285, 30.539324856075236], [9.482139926805273, 30.307556057246181]]] } }, + { "type": "Feature", "properties": { "admin": "Turkey", "name": "Turkey", "continent": "Asia" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[36.913127068842151, 41.335358384764291], [38.347664829264502, 40.948586127275711], [39.512606642420238, 41.102762763018561], [40.373432651538245, 41.013672593747337], [41.554084100110707, 41.535656236327604], [42.619548781104548, 41.58317271581992], [43.582745802592704, 41.09214325618256], [43.752657911968491, 40.740200914058811], [43.656436395040963, 40.253563951166157], [44.400008579288759, 40.005000311842302], [44.79398969908199, 39.713002631177027], [44.109225294782355, 39.428136298168049], [44.421402622257595, 38.281281236314513], [44.225755649600522, 37.971584377589345], [44.772699008977739, 37.170444647768441], [44.293451775902852, 37.001514390606353], [43.942258742047343, 37.256227525372928], [42.77912560402185, 37.385263576805798], [42.349591098811764, 37.229872544904104], [41.212089471203015, 37.074352321921729], [40.673259311695702, 37.091276353497356], [39.522580193852512, 36.716053778626012], [38.699891391765917, 36.712927354472313], [38.167727492024156, 36.90121043552778], [37.066761102045824, 36.623036200500614], [36.739494256341366, 36.817520453431108], [36.685389031731816, 36.259699205056499], [36.417550083163086, 36.040616970355096], [36.149762811026584, 35.821534735653664], [35.782084995269848, 36.274995429014915], [36.160821567537049, 36.650605577128367], [35.550936313628334, 36.565442816711325], [34.714553256984367, 36.795532131490909], [34.026894972476455, 36.219960028623966], [32.509158156064096, 36.107563788389193], [31.69959516777956, 36.644275214172602], [30.621624790171062, 36.677864895162308], [30.391096225717114, 36.262980658506983], [29.69997562024556, 36.144357408181001], [28.732902866335387, 36.676831366516431], [27.641186557737363, 36.658822129862749], [27.048767937943289, 37.653360907536005], [26.318218214633042, 38.208133246405382], [26.804700148228726, 38.985760199533551], [26.170785353304375, 39.463612168936457], [27.280019972449388, 40.420013739578302], [28.819977654747209, 40.460011298172212], [29.240003696415574, 41.219990749672682], [31.145933872204434, 41.087621568357058], [32.347979363745786, 41.736264146484629], [33.513282911927512, 42.018960069337304], [35.167703891751863, 42.040224921225438], [36.913127068842151, 41.335358384764291]]], [[[27.192376743282406, 40.690565700842448], [26.358009067497782, 40.151993923496477], [26.043351271272535, 40.617753607743161], [26.056942172965332, 40.824123440100735], [26.294602085075692, 40.936261298174166], [26.604195590936282, 41.562114569661013], [26.117041863720825, 41.826904608724554], [27.135739373490505, 42.141484890301307], [27.996720411905407, 42.007358710287768], [28.115524529744441, 41.622886054036279], [28.988442824018779, 41.299934190428175], [28.806438429486743, 41.05496206314853], [27.619017368284112, 40.999823309893102], [27.192376743282406, 40.690565700842448]]]] } }, + { "type": "Feature", "properties": { "admin": "Taiwan", "name": "Taiwan", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[121.777817824389899, 24.394273586519393], [121.175632358892713, 22.790857245367164], [120.747079705896198, 21.970571397382106], [120.220083449383651, 22.814860948166732], [120.106188592612369, 23.556262722258229], [120.694679803552233, 24.53845083261373], [121.49504438688875, 25.295458889257379], [121.951243931161429, 24.997595933527034], [121.777817824389899, 24.394273586519393]]] } }, + { "type": "Feature", "properties": { "admin": "United Republic of Tanzania", "name": "Tanzania", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[33.903711197104592, -0.95], [34.07262, -1.05982], [37.69869, -3.09699], [37.7669, -3.67712], [39.20222, -4.67677], [38.74054, -5.90895], [38.79977, -6.47566], [39.44, -6.84], [39.470000000000134, -7.1], [39.19469, -7.7039], [39.25203, -8.00781], [39.18652, -8.48551], [39.53574, -9.112369999999883], [39.9496, -10.0984], [40.31659, -10.317099999999867], [39.521, -10.89688], [38.427556593587767, -11.285202325081626], [37.82764, -11.26879], [37.47129, -11.56876], [36.775150994622884, -11.59453744878078], [36.514081658684397, -11.720938002166745], [35.312397902169145, -11.439146416879165], [34.559989047999451, -11.520020033415845], [34.28, -10.16], [33.940837724096518, -9.693673841980283], [33.73972, -9.41715], [32.759375441221373, -9.230599053589001], [32.191864861791935, -8.930358981973255], [31.556348097466628, -8.762048841998647], [31.157751336950064, -8.594578747317312], [30.74, -8.34], [30.2, -7.08], [29.62, -6.52], [29.419992710088305, -5.939998874539297], [29.519986606573063, -5.419978936386257], [29.339997592900367, -4.499983412294113], [29.753512404099858, -4.452389418153301], [30.11632, -4.09012], [30.50554, -3.56858], [30.75224, -3.35931], [30.74301, -3.03431], [30.52766, -2.80762], [30.46967, -2.41383], [30.758308953583132, -2.287250257988375], [30.816134881317844, -1.698914076345374], [30.419104852019291, -1.134659112150416], [30.769860000000101, -1.01455], [31.86617, -1.02736], [33.903711197104592, -0.95]]] } }, + { "type": "Feature", "properties": { "admin": "Uganda", "name": "Uganda", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[31.86617, -1.02736], [30.769860000000101, -1.01455], [30.419104852019291, -1.134659112150416], [29.821518588996121, -1.443322442229771], [29.579466180141019, -1.341313164885605], [29.587837762172164, -0.587405694179381], [29.8195, -0.2053], [29.875778842902431, 0.597379868976361], [30.086153598762785, 1.062312730306416], [30.468507521290285, 1.583805446779706], [30.852670118948133, 1.849396470543752], [31.174149204235952, 2.204465236821306], [30.77332, 2.339890000000139], [30.83385, 3.50917], [31.24556, 3.7819], [31.88145, 3.55827], [32.68642, 3.79232], [33.39, 3.79], [34.005, 4.249884947362147], [34.47913, 3.5556], [34.59607, 3.053740000000118], [35.03599, 1.90584], [34.6721, 1.17694], [34.18, 0.515], [33.893568969666994, 0.109813537861839], [33.903711197104592, -0.95], [31.86617, -1.02736]]] } }, + { "type": "Feature", "properties": { "admin": "Ukraine", "name": "Ukraine", "continent": "Europe" }, "geometry": { "type": "Polygon", "coordinates": [[[31.78599816257158, 52.10167796488544], [32.159412062312661, 52.061266994833204], [32.412058139787625, 52.288694973349735], [32.715760532366964, 52.238465481162038], [33.7526998227357, 52.335074571331681], [34.391730584457001, 51.768881740925778], [34.141978387190385, 51.566413479206226], [34.22481570815426, 51.255993150428942], [35.022183058417873, 51.207572333371445], [35.377923618315116, 50.773955390010343], [35.35611616388794, 50.577197374059054], [36.62616784032533, 50.225590928745127], [37.393459506995065, 50.383953355503586], [38.01063113785689, 49.915661526074622], [38.59498823421341, 49.926461900423618], [40.069058465339097, 49.601055406281688], [40.080789015469342, 49.307429917999272], [39.674663934087526, 48.783818467801872], [39.895632358567575, 48.232405097031425], [39.738277622238819, 47.898937079451983], [38.770584751141186, 47.825608222029807], [38.255112339029743, 47.546400458356807], [38.223538038899413, 47.102189846375872], [37.42513715998998, 47.022220567404197], [36.759854770664383, 46.698700263040919], [35.823684523264816, 46.645964463887054], [34.962341749823871, 46.273196519549636], [35.020787794745978, 45.65121898048465], [35.51000857925316, 45.409993394546177], [36.529997999830151, 45.46998973243705], [36.334712762199146, 45.113215643893952], [35.239999220528112, 44.939996242851599], [33.882511020652878, 44.361478583344066], [33.326420932760037, 44.564877020844875], [33.546924269349446, 45.034770819674883], [32.454174432105496, 45.327466132176063], [32.630804477679128, 45.519185695978905], [33.588162062318382, 45.851568508480227], [33.298567335754704, 46.08059845639783], [31.744140252415171, 46.333347886737378], [31.675307244602401, 46.706245022155528], [30.748748813609094, 46.583100084003995], [30.37760867688888, 46.032410183285663], [29.603289015427425, 45.293308010431119], [29.149724969201646, 45.464925442072442], [28.679779493939371, 45.30403087013169], [28.233553501099035, 45.488283189468369], [28.48526940279276, 45.596907050145887], [28.659987420371575, 45.939986884131628], [28.933717482221621, 46.258830471372491], [28.862972446414055, 46.437889309263824], [29.072106967899288, 46.517677720722482], [29.170653924279879, 46.379262396828693], [29.759971958136383, 46.349987697935354], [30.024658644335364, 46.423936672545032], [29.838210076626289, 46.525325832701675], [29.908851759569295, 46.67436066343145], [29.559674106573105, 46.928582872091312], [29.415135125452732, 47.346645209332571], [29.050867954227321, 47.510226955752493], [29.122698195113024, 47.849095160506458], [28.670891147585163, 48.118148505234089], [28.259546746541837, 48.155562242213406], [27.52253746919515, 48.467119452501102], [26.857823520624798, 48.368210761094488], [26.619336785597788, 48.220726223333457], [26.197450392366925, 48.220881252630342], [25.945941196402394, 47.987148749374207], [25.207743361112986, 47.891056423527459], [24.866317172960571, 47.737525743188307], [24.402056105250374, 47.981877753280422], [23.760958286237404, 47.985598456405448], [23.142236362406798, 48.096341050806942], [22.710531447040488, 47.882193915389394], [22.640819939878746, 48.150239569687351], [22.085608351334848, 48.422264309271782], [22.280841912533553, 48.825392157580659], [22.558137648211751, 49.08573802346713], [22.776418898212619, 49.027395331409608], [22.518450148211596, 49.476773586619736], [23.426508416444388, 50.308505764357449], [23.922757195743259, 50.424881089878738], [24.029985792748899, 50.705406602575174], [23.52707075368437, 51.578454087930233], [24.005077752384206, 51.617443956094448], [24.553106316839511, 51.888461005249177], [25.327787713327005, 51.910656032918538], [26.337958611768549, 51.832288723347915], [27.454066196408426, 51.59230337178446], [28.241615024536564, 51.572227077839059], [28.617612745892242, 51.427713934934836], [28.992835320763522, 51.602044379271462], [29.254938185347921, 51.368234361366881], [30.157363722460889, 51.416138414101454], [30.55511722181145, 51.319503485715643], [30.619454380014837, 51.822806098022362], [30.927549269338975, 52.042353420614383], [31.78599816257158, 52.10167796488544]]] } }, + { "type": "Feature", "properties": { "admin": "Uruguay", "name": "Uruguay", "continent": "South America" }, "geometry": { "type": "Polygon", "coordinates": [[[-57.625133429582945, -30.216294854454258], [-56.976025763564721, -30.109686374636119], [-55.97324459494093, -30.883075860316296], [-55.601510179249331, -30.853878676071385], [-54.572451544805105, -31.494511407193745], [-53.787951626182185, -32.047242526987617], [-53.209588995971529, -32.727666110974717], [-53.650543992718084, -33.202004082981823], [-53.373661668498229, -33.768377780900757], [-53.806425950726521, -34.396814874002224], [-54.935866054897716, -34.952646579733617], [-55.674089728403274, -34.752658786764066], [-56.215297003796053, -34.85983570733741], [-57.139685024633096, -34.430456231424238], [-57.817860683815489, -34.462547295877492], [-58.427074144104381, -33.909454441057569], [-58.349611172098854, -33.2631889788154], [-58.132647671121433, -33.040566908502008], [-58.142440355040748, -32.044503676076147], [-57.874937303281875, -31.016556084926201], [-57.625133429582945, -30.216294854454258]]] } }, + { "type": "Feature", "properties": { "admin": "United States of America", "name": "United States", "continent": "North America" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[-155.54211, 19.08348], [-155.68817, 18.91619], [-155.93665, 19.05939], [-155.90806, 19.33888], [-156.07347, 19.70294], [-156.02368, 19.81422], [-155.85008, 19.97729], [-155.91907, 20.17395], [-155.86108, 20.26721], [-155.78505, 20.2487], [-155.40214, 20.07975], [-155.22452, 19.99302], [-155.06226, 19.8591], [-154.80741, 19.50871], [-154.83147, 19.45328], [-155.222169999999892, 19.23972], [-155.54211, 19.08348]]], [[[-156.07926, 20.64397], [-156.41445, 20.57241], [-156.58673, 20.783], [-156.70167, 20.8643], [-156.71055, 20.92676], [-156.61258, 21.01249], [-156.25711, 20.91745], [-155.99566, 20.76404], [-156.07926, 20.64397]]], [[[-156.75824, 21.17684], [-156.78933, 21.06873], [-157.32521, 21.09777], [-157.25027, 21.21958], [-156.75824, 21.17684]]], [[[-157.65283, 21.32217], [-157.70703, 21.26442], [-157.7786, 21.27729], [-158.12667, 21.31244], [-158.2538, 21.53919], [-158.29265, 21.57912], [-158.0252, 21.71696], [-157.94161, 21.65272], [-157.65283, 21.32217]]], [[[-159.34512, 21.982], [-159.46372, 21.88299], [-159.80051, 22.06533], [-159.74877, 22.1382], [-159.5962, 22.23618], [-159.36569, 22.21494], [-159.34512, 21.982]]], [[[-94.81758, 49.38905], [-94.639999999999858, 48.840000000000103], [-94.32914, 48.67074], [-93.63087, 48.60926], [-92.61, 48.45], [-91.64, 48.14], [-90.829999999999856, 48.27], [-89.6, 48.01], [-89.272917446636654, 48.019808254582834], [-88.378114183286513, 48.302917588893806], [-87.439792623300207, 47.94], [-86.461990831228135, 47.553338019392037], [-85.652363247403215, 47.220218817730498], [-84.876079881514855, 46.900083319682366], [-84.779238247399817, 46.637101955749117], [-84.54374874544564, 46.538684190449224], [-84.6049, 46.4396], [-84.3367, 46.408770000000104], [-84.142119513673279, 46.512225857115723], [-84.091851264161463, 46.275418606138253], [-83.890765347005654, 46.116926988299149], [-83.616130947590491, 46.116926988299149], [-83.469550747394621, 45.994686387712584], [-83.592850714843067, 45.816893622412543], [-82.550924648758169, 45.347516587905446], [-82.337763125431053, 44.44], [-82.137642381503952, 43.571087551439987], [-82.43, 42.98], [-82.899999999999878, 42.430000000000135], [-83.119999999999877, 42.08], [-83.141999681312555, 41.975681057292995], [-83.029810146806909, 41.832795722005997], [-82.690089280920162, 41.675105088867319], [-82.439277716791608, 41.675105088867319], [-81.277746548167059, 42.209025987306845], [-80.247447679347843, 42.36619985612267], [-78.939362148743683, 42.863611355148116], [-78.92, 42.965], [-79.009999999999863, 43.27], [-79.171673550111862, 43.466339423184301], [-78.720279914042365, 43.625089423184953], [-77.737885097957601, 43.629055589363382], [-76.820034145805565, 43.628784288093748], [-76.5, 44.018458893758599], [-76.375, 44.09631], [-75.31821, 44.81645000000016], [-74.867, 45.00048000000011], [-73.347829999999874, 45.00738], [-71.505059999999858, 45.0082], [-71.405, 45.255000000000123], [-71.08482, 45.305240000000154], [-70.659999999999783, 45.46], [-70.305, 45.915], [-69.99997, 46.69307], [-69.237216, 47.447781], [-68.905, 47.185], [-68.23444, 47.35486], [-67.79046, 47.06636], [-67.79134, 45.702810000000134], [-67.13741, 45.13753], [-66.96466, 44.809700000000149], [-68.03252, 44.3252], [-69.059999999999874, 43.98], [-70.116169999999897, 43.684050000000141], [-70.645475633410967, 43.090238348964043], [-70.81489, 42.8653], [-70.825, 42.335], [-70.494999999999891, 41.805], [-70.08, 41.78], [-70.185, 42.145], [-69.88497, 41.922830000000111], [-69.96503, 41.637170000000161], [-70.64, 41.475], [-71.12039, 41.494450000000164], [-71.859999999999829, 41.32], [-72.295, 41.27], [-72.87643, 41.22065], [-73.71, 40.931102351654481], [-72.24126, 41.119480000000138], [-71.944999999999808, 40.93], [-73.345, 40.63], [-73.982, 40.628], [-73.952325, 40.75075], [-74.25671, 40.47351], [-73.96244, 40.42763], [-74.17838, 39.70926], [-74.90604, 38.93954], [-74.98041, 39.1964], [-75.20002, 39.24845], [-75.52805, 39.4985], [-75.32, 38.96], [-75.071834764789784, 38.782032230179276], [-75.05673, 38.404120000000106], [-75.37747, 38.01551], [-75.94023, 37.21689], [-76.03127, 37.2566], [-75.722049999999783, 37.937050000000106], [-76.23287, 38.319215], [-76.35, 39.15], [-76.542725, 38.717615], [-76.32933, 38.08326], [-76.98999793161353, 38.239991766913384], [-76.301619999999886, 37.917945], [-76.25874, 36.9664000000001], [-75.9718, 36.89726], [-75.868039999999809, 36.55125], [-75.72749, 35.550740000000125], [-76.36318, 34.808540000000129], [-77.39763499999988, 34.51201], [-78.05496, 33.92547], [-78.554349999999815, 33.861330000000116], [-79.06067, 33.49395], [-79.20357, 33.15839], [-80.301325, 32.509355], [-80.86498, 32.0333], [-81.33629, 31.44049], [-81.49042, 30.729990000000122], [-81.31371, 30.03552], [-80.98, 29.18000000000011], [-80.53558499999987, 28.47213], [-80.529999999999774, 28.04], [-80.056539284977532, 26.88000000000013], [-80.088015, 26.205765], [-80.131559999999837, 25.816775], [-80.38103, 25.20616], [-80.679999999999879, 25.08], [-81.17213, 25.201260000000126], [-81.33, 25.64], [-81.709999999999795, 25.87], [-82.239999999999895, 26.730000000000125], [-82.70515, 27.49504], [-82.85526, 27.88624], [-82.65, 28.550000000000146], [-82.929999999999865, 29.100000000000129], [-83.70959, 29.93656], [-84.1, 30.090000000000114], [-85.10882, 29.63615], [-85.28784, 29.686120000000127], [-85.7731, 30.152610000000116], [-86.399999999999878, 30.400000000000112], [-87.530359999999831, 30.27433], [-88.41782, 30.3849], [-89.180489999999836, 30.31598], [-89.593831178419748, 30.159994004836843], [-89.413735, 29.89419], [-89.43, 29.48864], [-89.21767, 29.29108], [-89.40823, 29.15961], [-89.77928, 29.307140000000135], [-90.15463, 29.11743], [-90.880224999999896, 29.148535000000116], [-91.626784999999842, 29.677000000000127], [-92.49906, 29.5523], [-93.22637, 29.78375], [-93.84842, 29.71363], [-94.69, 29.480000000000125], [-95.60026, 28.73863], [-96.59404, 28.30748], [-97.139999999999802, 27.83], [-97.37, 27.38], [-97.379999999999853, 26.69], [-97.33, 26.210000000000115], [-97.139999999999802, 25.87], [-97.529999999999859, 25.84], [-98.239999999999895, 26.060000000000109], [-99.019999999999854, 26.37], [-99.3, 26.84], [-99.52, 27.54], [-100.11, 28.11000000000012], [-100.45584, 28.696120000000118], [-100.957599999999886, 29.380710000000125], [-101.6624, 29.779300000000113], [-102.48, 29.76], [-103.11, 28.97], [-103.94, 29.27], [-104.456969999999814, 29.57196], [-104.705749999999895, 30.12173], [-105.03737, 30.64402], [-105.63159, 31.083830000000113], [-106.1429, 31.39995], [-106.507589999999794, 31.75452], [-108.24, 31.754853718166398], [-108.24194, 31.34222], [-109.035, 31.341940000000161], [-111.02361, 31.33472], [-113.30498, 32.03914], [-114.815, 32.52528], [-114.721389999999829, 32.72083], [-115.991349999999869, 32.61239000000014], [-117.127759999999753, 32.53534], [-117.295937691273863, 33.04622461520389], [-117.944, 33.621236431201389], [-118.410602275897475, 33.740909223124497], [-118.519894822799685, 34.027781577575745], [-119.081, 34.078], [-119.438840642016658, 34.348477178284291], [-120.36778, 34.44711], [-120.62286, 34.60855], [-120.74433, 35.156860000000101], [-121.714569999999853, 36.16153], [-122.54747, 37.551760000000101], [-122.51201, 37.783390000000132], [-122.95319, 38.113710000000104], [-123.7272, 38.951660000000111], [-123.865169999999878, 39.766990000000128], [-124.39807, 40.3132], [-124.17886, 41.142020000000109], [-124.2137, 41.999640000000134], [-124.532839999999894, 42.76599], [-124.14214, 43.70838], [-124.020535, 44.615895], [-123.898929999999893, 45.52341], [-124.079635, 46.86475], [-124.395669999999896, 47.72017], [-124.687210083007812, 48.184432983398537], [-124.566101074218736, 48.379714965820384], [-123.12, 48.04], [-122.587359999999876, 47.096], [-122.34, 47.36], [-122.5, 48.18], [-122.84, 49.0], [-120.0, 49.0], [-117.03121, 49.0], [-116.04818, 49.0], [-112.999999999999872, 49.0], [-110.049999999999812, 49.0], [-107.049999999999898, 49.0], [-104.04826, 48.99986], [-100.65, 49.0], [-97.228720000004699, 49.0007], [-95.159069509171943, 49.0], [-95.15609, 49.38425], [-94.81758, 49.38905]]], [[[-153.006314053336837, 57.115842190165878], [-154.0050902984581, 56.734676825581047], [-154.516402757770067, 56.992748928446687], [-154.670992804971092, 57.461195787172493], [-153.762779507441451, 57.816574612043773], [-153.228729417921073, 57.968968410872421], [-152.564790615835108, 57.901427313866961], [-152.141147223906273, 57.591058661521977], [-153.006314053336837, 57.115842190165878]]], [[[-165.579164191733554, 59.909986884187539], [-166.192770148767238, 59.754440822988961], [-166.848337368821944, 59.941406155020942], [-167.455277066090048, 60.213069159579376], [-166.467792121424566, 60.384169826897775], [-165.674429694663644, 60.293606879306232], [-165.579164191733554, 59.909986884187539]]], [[[-171.731656867539357, 63.782515367275906], [-171.114433560245175, 63.592191067144981], [-170.491112433940657, 63.694975490973505], [-169.682505459653555, 63.431115627691142], [-168.689439460300662, 63.297506212000584], [-168.77194088445458, 63.188598130945437], [-169.529439867204985, 62.976931464277882], [-170.290556200215917, 63.194437567794452], [-170.671385667990847, 63.375821845138965], [-171.553063117538642, 63.317789211675077], [-171.791110602891166, 63.40584585230048], [-171.731656867539357, 63.782515367275906]]], [[[-155.067790290324211, 71.147776394323685], [-154.344165208941206, 70.696408596470192], [-153.900006273392563, 70.889988511835682], [-152.210006069935275, 70.829992173944831], [-152.270002407826127, 70.60000621202984], [-150.739992438744508, 70.430016588005699], [-149.720003018167489, 70.530010484490433], [-147.613361579357047, 70.214034939241785], [-145.689989800225248, 70.120009670686741], [-144.920010959076393, 69.989991767040479], [-143.58944618042517, 70.152514146598307], [-142.072510348713365, 69.851938178172631], [-140.985987521560702, 69.711998399526365], [-140.985988329004869, 69.711998399526365], [-140.992498752029377, 66.000028591568665], [-140.997769748123119, 60.306396796298593], [-140.012997816153074, 60.276837877027575], [-139.03900042031583, 60.000007229240012], [-138.340889999999888, 59.562110000000146], [-137.4525, 58.905000000000101], [-136.47972, 59.46389], [-135.47583, 59.78778], [-134.945, 59.270560000000117], [-134.27111, 58.86111], [-133.355548882207188, 58.410285142645151], [-132.73042, 57.692890000000105], [-131.707809999999853, 56.55212], [-130.00778, 55.91583], [-129.979994263358265, 55.284997870497207], [-130.536110189467223, 54.802753404349389], [-131.08581823797212, 55.178906155002025], [-131.967211467142278, 55.497775580459049], [-132.250010742859445, 56.369996242897443], [-133.539181084356386, 57.178887437562125], [-134.07806292029602, 58.123067531966889], [-135.038211032279037, 58.187714748763931], [-136.628062309954629, 58.212209377670447], [-137.800006279686016, 58.499995429103777], [-139.867787041412981, 59.537761542389134], [-140.825273817133024, 59.72751740176507], [-142.574443535564427, 60.084446519604981], [-143.958880994879848, 59.99918040632339], [-145.925556816827822, 60.458609727614274], [-147.114373949146625, 60.884656073644628], [-148.224306200127643, 60.672989406977152], [-148.018065558850736, 59.978328965893631], [-148.570822516860858, 59.914172675203297], [-149.727857835875824, 59.705658270905545], [-150.608243374616421, 59.368211168039487], [-151.716392788683294, 59.155821031319974], [-151.859433153267105, 59.74498403587959], [-151.40971900124714, 60.725802720779392], [-150.346941494732505, 61.033587551509854], [-150.621110806256951, 61.284424953854447], [-151.895839199816834, 60.727197984451273], [-152.578329841095581, 60.061657212964285], [-154.019172126257558, 59.350279446034264], [-153.287511359653166, 58.864727688219787], [-154.232492438758442, 58.146373602930531], [-155.307491421510207, 57.727794501366319], [-156.308334723923082, 57.422774359763636], [-156.556097378546298, 56.979984849670636], [-158.117216559867728, 56.463608099994175], [-158.433321296197136, 55.994153550838533], [-159.603327399717415, 55.566686102920116], [-160.289719611634183, 55.643580634170561], [-161.223047655257773, 55.364734605523481], [-162.23776607974105, 55.024186916720097], [-163.069446581046378, 54.689737046927171], [-164.785569221027174, 54.40417308208216], [-164.942226325520011, 54.572224839895327], [-163.84833960676562, 55.039431464246107], [-162.870001390615897, 55.348043117893198], [-161.804174974596009, 55.894986477270429], [-160.563604702781134, 56.008054511125025], [-160.070559862284483, 56.418055324928744], [-158.684442918919416, 57.016675116597852], [-158.461097378553944, 57.216921291728866], [-157.722770352183858, 57.570000515363056], [-157.550274421193564, 58.328326321030218], [-157.041674974576949, 58.918884589261708], [-158.194731208305427, 58.615802313869828], [-158.517217984023034, 58.787781480537305], [-159.058606126928709, 58.424186102931671], [-159.711667040017318, 58.931390285876333], [-159.981288825500144, 58.572549140041623], [-160.355271165996498, 59.071123358793628], [-161.355003425115001, 58.670837714260742], [-161.968893602526293, 58.671664537177371], [-162.054986538724648, 59.266925360747436], [-161.874170702135331, 59.633621324290587], [-162.518059048492034, 59.989723619213905], [-163.818341437820123, 59.798055731843377], [-164.662217577146407, 60.267484442782639], [-165.346387702474772, 60.507495632562396], [-165.350831875651835, 61.073895168697497], [-166.121379157555907, 61.500019029376212], [-165.734451870770471, 62.074996853271792], [-164.919178636717788, 62.633076483807919], [-164.562507901039339, 63.146378485763044], [-163.753332485996964, 63.219448961023758], [-163.067224494457832, 63.05945872664801], [-162.260555386381697, 63.541935736741159], [-161.534449836248569, 63.455816962326757], [-160.772506680321101, 63.76610810002326], [-160.958335130842528, 64.222798570402759], [-161.518068407212184, 64.402787584075313], [-160.777777676414729, 64.788603827566405], [-161.391926235987597, 64.777235012462327], [-162.453050096668818, 64.559444688568206], [-162.757786017894034, 64.338605455168803], [-163.54639421288428, 64.559160468190484], [-164.960829841145141, 64.446945095468848], [-166.425288255864473, 64.686672064870706], [-166.845004238939026, 65.088895575614529], [-168.110560065767146, 65.669997056736733], [-166.70527116602193, 66.088317776139391], [-164.474709642575448, 66.576660061297488], [-163.652511766595637, 66.576660061297488], [-163.788601651036117, 66.077207343196662], [-161.677774421210131, 66.116119696712403], [-162.489714525379981, 66.735565090595102], [-163.719716966791083, 67.116394558370089], [-164.430991380856511, 67.616338202577779], [-165.390286831706703, 68.042772121850234], [-166.764440680995989, 68.35887685817967], [-166.204707404626561, 68.883030910916162], [-164.430810513343431, 68.915535386827727], [-163.168613654614489, 69.371114813912882], [-162.930566169261965, 69.858061835399255], [-161.908897264635499, 70.333329983187625], [-160.93479651593367, 70.447689927849567], [-159.039175788387126, 70.891642157668926], [-158.119722866833939, 70.824721177851032], [-156.580824551398024, 71.357763576941736], [-155.067790290324211, 71.147776394323685]]]] } }, + { "type": "Feature", "properties": { "admin": "Uzbekistan", "name": "Uzbekistan", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[66.518606805288655, 37.362784328758785], [66.546150343700205, 37.974684963526855], [65.215998976507379, 38.402695013984292], [64.170223016216752, 38.892406724598231], [63.518014764261018, 39.363256537425627], [62.374260288344992, 40.053886216790382], [61.882714064384679, 41.084856879229392], [61.547178989513547, 41.2663703476546], [60.46595299667068, 41.22032664648254], [60.083340691981654, 41.425146185871391], [59.976422153569771, 42.223081976890199], [58.629010857991453, 42.751551011723045], [57.786529982337065, 42.170552883465511], [56.93221520368779, 41.82602610937559], [57.096391229079089, 41.32231008561056], [55.968191359282898, 41.308641669269356], [55.928917270741081, 44.995858466159099], [58.503127068928457, 45.586804307632818], [58.689989048095882, 45.500013739598621], [60.239971958258316, 44.784036770194717], [61.05831994003244, 44.405816962250505], [62.013300408786236, 43.504476630215642], [63.185786981056559, 43.650074978197999], [64.900824415959264, 43.728080552742576], [66.098012322865074, 42.997660020513088], [66.023391554635609, 41.994646307943974], [66.510648634715707, 41.987644151368436], [66.714047072216502, 41.168443508461493], [67.985855747351806, 41.135990708982213], [68.259895867795606, 40.662324530594894], [68.632482944620008, 40.668680731766798], [69.070027296835306, 41.384244289712363], [70.388964878220776, 42.081307684897439], [70.96231489449913, 42.266154283205481], [71.259247674448218, 42.167710679689456], [70.420022414028196, 41.519998277343134], [71.157858514291576, 41.143587144529107], [71.870114780570447, 41.392900092121259], [73.055417108049156, 40.86603302668945], [71.774875115856545, 40.145844428053763], [71.014198032520156, 40.244365546218226], [70.601406691372674, 40.218527330072284], [70.458159621059608, 40.49649485937028], [70.666622348925031, 40.960213324541407], [69.329494663372813, 40.727824408524839], [69.011632928345477, 40.086158148756653], [68.536416456989414, 39.533452867178923], [67.701428664017342, 39.580478420564518], [67.442219679641298, 39.140143541005479], [68.176025018185911, 38.901553453113898], [68.392032505165943, 38.157025254868728], [67.829999627559502, 37.144994004864678], [67.075782098259609, 37.35614390720928], [66.518606805288655, 37.362784328758785]]] } }, + { "type": "Feature", "properties": { "admin": "Venezuela", "name": "Venezuela", "continent": "South America" }, "geometry": { "type": "Polygon", "coordinates": [[[-71.331583624950284, 11.776284084515805], [-71.36000566271079, 11.53999359786121], [-71.947049933546495, 11.423282375530018], [-71.620868292920164, 10.969459947142791], [-71.633063930941063, 10.446494452349027], [-72.074173956984495, 9.865651353388369], [-71.695644090446521, 9.072263088411246], [-71.26455929226772, 9.137194525585981], [-71.039999355743376, 9.859992784052407], [-71.350083787710773, 10.211935126176213], [-71.400623338492224, 10.968969021036013], [-70.155298834906503, 11.375481675660039], [-70.293843349881016, 11.846822414594211], [-69.943244594996813, 12.162307033736095], [-69.584300096297454, 11.459610907431211], [-68.882999233664435, 11.44338450769156], [-68.233271450458716, 10.885744126829945], [-68.194126552997616, 10.554653225135921], [-67.296248541926317, 10.545868231646306], [-66.227864142507983, 10.648626817258684], [-65.655237596281737, 10.20079885501732], [-64.890452236578156, 10.077214667191296], [-64.329478725833724, 10.389598700395679], [-64.318006557864933, 10.641417954953978], [-63.079322475828725, 10.701724351438598], [-61.880946010980182, 10.7156253117251], [-62.730118984616396, 10.420268662960904], [-62.388511928950969, 9.948204453974636], [-61.588767462801918, 9.873066921422263], [-60.830596686431711, 9.38133982994894], [-60.671252407459718, 8.580174261911877], [-60.150095587796166, 8.602756862823425], [-59.758284878159181, 8.367034816924045], [-60.550587938058186, 7.779602972846178], [-60.637972785063752, 7.414999904810853], [-60.295668097562377, 7.043911444522918], [-60.543999192940966, 6.856584377464881], [-61.159336310456467, 6.696077378766317], [-61.139415045807937, 6.234296779806142], [-61.410302903881941, 5.959068101419616], [-60.733574184803707, 5.2002772078619], [-60.601179165271922, 4.918098049332129], [-60.966893276601517, 4.536467596856638], [-62.085429653559125, 4.162123521334308], [-62.804533047116692, 4.006965033377951], [-63.093197597899092, 3.770571193858784], [-63.888342861574145, 4.020530096854571], [-64.628659430587533, 4.14848094320925], [-64.816064012294007, 4.056445217297422], [-64.368494432214092, 3.797210394705246], [-64.408827887617903, 3.126786200366623], [-64.269999152265783, 2.497005520025566], [-63.422867397705105, 2.411067613124174], [-63.368788011311644, 2.200899562993129], [-64.083085496666072, 1.91636912679408], [-64.199305792890499, 1.49285492594602], [-64.611011928959854, 1.328730576987041], [-65.354713304288353, 1.0952822941085], [-65.548267381437554, 0.78925446207603], [-66.325765143484944, 0.724452215982012], [-66.876325853122566, 1.253360500489336], [-67.181294318293041, 2.250638129074062], [-67.447092047786299, 2.600280869960869], [-67.809938117123693, 2.820655015469569], [-67.303173183853417, 3.31845408773718], [-67.33756384954367, 3.542342230641721], [-67.621835903581271, 3.839481716319994], [-67.823012254493534, 4.503937282728898], [-67.744696621355203, 5.221128648291667], [-67.521531948502741, 5.556870428891968], [-67.34143958196556, 6.095468044454021], [-67.695087246355001, 6.267318020040645], [-68.265052456318216, 6.153268133972473], [-68.985318569602327, 6.206804917826856], [-69.389479946557103, 6.099860541198835], [-70.093312954372408, 6.960376491723109], [-70.674233567981503, 7.087784735538717], [-71.960175747348629, 6.991614895043538], [-72.19835242378187, 7.340430813013682], [-72.444487270788059, 7.42378489830048], [-72.479678921178831, 7.632506008327352], [-72.360900641555958, 8.002638454617893], [-72.439862230097944, 8.405275376820027], [-72.660494757768092, 8.62528778730268], [-72.788729824500379, 9.085027167187331], [-73.304951544880026, 9.151999823437604], [-73.027604132769554, 9.736770331252441], [-72.905286017534692, 10.45034434655477], [-72.614657762325194, 10.821975409381777], [-72.227575446242923, 11.108702093953237], [-71.973921678338272, 11.608671576377116], [-71.331583624950284, 11.776284084515805]]] } }, + { "type": "Feature", "properties": { "admin": "Vietnam", "name": "Vietnam", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[108.050180291782908, 21.552379869060111], [106.715067987090066, 20.696850694252014], [105.881682163519002, 19.752050482659694], [105.662005649846279, 19.058165188060567], [106.426816847765991, 18.004120998603224], [107.36195356651973, 16.697456569887049], [108.269495070429599, 16.079742336486145], [108.877106561317447, 15.276690578670436], [109.335269810017209, 13.42602834721772], [109.200135939573954, 11.666859239137761], [108.366129998815424, 11.00832062422627], [107.22092858279521, 10.36448395430183], [106.4051127462034, 9.530839748569317], [105.158263787865081, 8.599759629750492], [104.795185174582372, 9.2410383162765], [105.076201613385592, 9.918490505406806], [104.334334751403446, 10.486543687375228], [105.199914992292321, 10.889309800658094], [106.249670037869436, 10.961811835163585], [105.810523716253101, 11.567614650921225], [107.491403029410861, 12.337205918827944], [107.614547967562402, 13.535530707244202], [107.382727492301058, 14.202440904186968], [107.564525181103875, 15.202173163305554], [107.312705926545576, 15.908538316303177], [106.55600792849566, 16.604283962464802], [105.925762160264, 17.485315456608955], [105.094598423281496, 18.666974595611073], [103.896532017026701, 19.265180975821799], [104.183387892678908, 19.624668077060214], [104.822573683697073, 19.886641750563879], [104.435000441508024, 20.758733221921528], [103.203861118586431, 20.766562201413745], [102.754896274834636, 21.675137233969462], [102.170435825613552, 22.464753119389297], [102.706992222100084, 22.708795070887668], [103.504514601660546, 22.703756618739202], [104.476858351664447, 22.819150092046961], [105.329209425886603, 23.352063300056908], [105.811247186305209, 22.976892401617899], [106.725403273548451, 22.794267889898414], [106.567273390735295, 22.218204860924768], [107.043420037872608, 21.811898912029907], [108.050180291782908, 21.552379869060111]]] } }, + { "type": "Feature", "properties": { "admin": "Vanuatu", "name": "Vanuatu", "continent": "Oceania" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[167.844876743845077, -16.466333103097153], [167.515181105822847, -16.597849623279966], [167.180007765977791, -16.159995212470957], [167.2168013857696, -15.891846205308449], [167.844876743845077, -16.466333103097153]]], [[[167.107712437201485, -14.933920179913951], [167.2700281110302, -15.74002084723487], [167.001207310247935, -15.614602146062492], [166.79315799384085, -15.668810723536719], [166.649859247095549, -15.392703545801192], [166.629136997746429, -14.6264970842096], [167.107712437201485, -14.933920179913951]]]] } }, + { "type": "Feature", "properties": { "admin": "Yemen", "name": "Yemen", "continent": "Asia" }, "geometry": { "type": "Polygon", "coordinates": [[[53.108572625547502, 16.651051133688949], [52.385205926325874, 16.38241120041965], [52.191729363825075, 15.938433132384018], [52.168164910699986, 15.597420355689945], [51.172515089732471, 15.175249742081489], [49.574576450403136, 14.708766587782746], [48.679230584514151, 14.003202419485657], [48.238947381387412, 13.948089504446369], [47.938914015500771, 14.007233181204423], [47.354453566279702, 13.592219753468379], [46.71707645039173, 13.399699204965016], [45.877592807810252, 13.347764390511681], [45.625050083199874, 13.290946153206759], [45.406458774605241, 13.02690542241143], [45.144355910020849, 12.953938300015306], [44.9895333188744, 12.699586900274708], [44.494576450382844, 12.721652736863344], [44.175112745954486, 12.585950425664873], [43.48295861183712, 12.63680003504008], [43.222871128112118, 13.220950425667422], [43.251448195169516, 13.767583726450848], [43.087943963398047, 14.062630316621306], [42.892245314308717, 14.802249253798745], [42.604872674333606, 15.213335272680592], [42.805015496600042, 15.261962795467252], [42.702437778500652, 15.718885809791995], [42.823670688657408, 15.911742255105263], [42.779332309750963, 16.34789134364868], [43.218375278502734, 16.666889960186406], [43.115797560403351, 17.088440456607369], [43.380794305196098, 17.579986680567668], [43.791518589051904, 17.319976711491105], [44.062613152855072, 17.410358791569589], [45.216651238797184, 17.43332896572333], [45.399999220568752, 17.333335069238554], [46.366658563020529, 17.233315334537632], [46.749994337761642, 17.283338120996174], [47.000004917189749, 16.949999294497438], [47.466694777217626, 17.116681626854877], [48.183343540241324, 18.166669216377311], [49.116671583864857, 18.616667588774941], [52.000009800022227, 19.000003363516054], [52.782184279192037, 17.349742336491229], [53.108572625547502, 16.651051133688949]]] } }, + { "type": "Feature", "properties": { "admin": "South Africa", "name": "South Africa", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[31.521001417778869, -29.257386976846245], [31.325561150850994, -29.401977634398907], [30.901762729625336, -29.909956963828034], [30.622813348113816, -30.423775730106122], [30.055716180142774, -31.140269463832951], [28.925552605919535, -32.172041110972494], [28.219755893677092, -32.771952813448848], [27.464608188595967, -33.226963799778794], [26.419452345492818, -33.614950453426175], [25.909664340933482, -33.667040297176392], [25.78062828950069, -33.944646091448334], [25.172861769315965, -33.796851495093577], [24.67785322439212, -33.987175795224537], [23.594043409934635, -33.794474379208147], [22.988188917744729, -33.916430759416976], [22.574157342222232, -33.864082533505304], [21.542799106541022, -34.258838799782922], [20.689052768646999, -34.417175388325226], [20.071261020597628, -34.795136814107984], [19.616405063564567, -34.819166355123706], [19.193278435958714, -34.462598972309777], [18.855314568769867, -34.444305515278458], [18.424643182049376, -33.997872816708963], [18.377410922934612, -34.13652068454806], [18.244499139079917, -33.867751560198023], [18.250080193767442, -33.281430759414434], [17.925190463948436, -32.61129078545342], [18.247909783611185, -32.429131361624563], [18.221761508871477, -31.661632989225662], [17.566917758868861, -30.72572112398754], [17.0644161312627, -29.878641045859158], [17.06291751472622, -29.875953871379977], [16.344976840895239, -28.576705010697697], [16.824017368240899, -28.082161553664466], [17.218928663815401, -28.355943291946804], [17.387497185951499, -28.783514092729774], [17.836151971109526, -28.856377862261311], [18.464899122804745, -29.045461928017271], [19.002127312911082, -28.972443129188857], [19.89473432788861, -28.461104831660769], [19.895767856534427, -24.767790215760588], [20.165725538827186, -24.917961928000768], [20.758609246511831, -25.868136488551446], [20.666470167735437, -26.477453301704916], [20.889609002371731, -26.828542982695907], [21.60589603036939, -26.726533705351748], [22.105968865657864, -26.28025603607913], [22.579531691180584, -25.979447523708142], [22.824271274514896, -25.500458672794768], [23.312096795350179, -25.268689873965712], [23.733569777122703, -25.39012948985161], [24.211266717228792, -25.670215752873567], [25.025170525825782, -25.719670098576891], [25.664666375437712, -25.486816094669706], [25.765848829865206, -25.174845472923671], [25.941652052522151, -24.696373386333214], [26.485753208123292, -24.616326592713097], [26.78640669119741, -24.240690606383478], [27.119409620886238, -23.574323011979772], [28.017235955525244, -22.827753594659072], [29.432188348109033, -22.091312758067584], [29.839036899542965, -22.102216485281172], [30.322883335091767, -22.271611830333931], [30.659865350067083, -22.151567478119912], [31.191409132621278, -22.251509698172395], [31.670397983534645, -23.658969008073861], [31.930588820124242, -24.369416599222532], [31.752408481581874, -25.484283949487406], [31.837777947728057, -25.843331801051342], [31.333157586397899, -25.660190525008943], [31.044079624157146, -25.731452325139436], [30.949666782359905, -26.022649021104144], [30.676608514129633, -26.398078301704604], [30.685961948374477, -26.743845310169526], [31.282773064913325, -27.285879408478991], [31.868060337051073, -27.17792734142127], [32.071665480281062, -26.733820082304902], [32.830120477028878, -26.74219166433619], [32.580264926897677, -27.470157566031808], [32.462132602678444, -28.30101124442055], [32.203388706193032, -28.752404880490065], [31.521001417778869, -29.257386976846245]], [[28.978262566857236, -28.955596612261708], [28.541700066855491, -28.647501722937562], [28.07433841320778, -28.851468601193581], [27.532511020627471, -29.242710870075353], [26.999261915807629, -29.875953871379977], [27.749397006956478, -30.645105889612214], [28.107204624145421, -30.545732110314944], [28.291069370239903, -30.226216729454293], [28.848399692507734, -30.070050551068245], [29.018415154748016, -29.743765557577362], [29.325166456832587, -29.257386976846245], [28.978262566857236, -28.955596612261708]]] } }, + { "type": "Feature", "properties": { "admin": "Zambia", "name": "Zambia", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[32.759375441221316, -9.230599053589058], [33.231387973775291, -9.676721693564799], [33.485687697083584, -10.525558770391111], [33.315310499817279, -10.796549981329695], [33.114289178201908, -11.607198174692311], [33.306422153463068, -12.435778090060214], [32.991764357237876, -12.783870537978272], [32.688165317523122, -13.712857761289273], [33.214024692525207, -13.97186003993615], [30.179481235481827, -14.796099134991525], [30.274255812305103, -15.507786960515208], [29.51683434420314, -15.644677829656386], [28.947463413211256, -16.043051446194436], [28.825868768028492, -16.389748630440611], [28.467906121542676, -16.468400160388843], [27.598243442502753, -17.290830580314005], [27.044427117630729, -17.938026218337427], [26.706773309035633, -17.961228936436477], [26.381935255648919, -17.846042168857892], [25.264225701608005, -17.736539808831413], [25.084443393664564, -17.661815687737366], [25.076950310982255, -17.578823337476617], [24.6823490740015, -17.35341073981947], [24.033861525170771, -17.29584319424632], [23.215048455506057, -17.52311614346598], [22.562478468524255, -16.89845142992181], [21.887842644953867, -16.080310153876876], [21.933886346125913, -12.898437188369357], [24.016136508894672, -12.91104623784857], [23.930922072045373, -12.565847670138854], [24.079905226342838, -12.191296888887361], [23.904153680118181, -11.722281589406318], [24.017893507592586, -11.237298272347088], [23.912215203555714, -10.926826267137512], [24.257155389103982, -10.951992689663655], [24.314516228947948, -11.262826429899269], [24.783169793402948, -11.238693536018962], [25.418118116973197, -11.330935967659958], [25.752309604604726, -11.784965101776356], [26.55308759939961, -11.924439792532125], [27.164419793412456, -11.608748467661071], [27.38879886242378, -12.132747491100663], [28.15510867687998, -12.272480564017894], [28.52356163912102, -12.698604424696679], [28.934285922976834, -13.248958428605132], [29.699613885219485, -13.257226657771827], [29.616001417771223, -12.178894545137307], [29.341547885869087, -12.36074391037241], [28.642417433392346, -11.971568698782312], [28.372253045370421, -11.793646742401389], [28.496069777141763, -10.789883721564044], [28.673681674928922, -9.605924981324931], [28.449871046672818, -9.164918308146083], [28.734866570762495, -8.526559340044576], [29.002912225060467, -8.40703175215347], [30.34608605319081, -8.238256524288216], [30.740015496551781, -8.340007419470913], [31.157751336950042, -8.594578747317362], [31.55634809746649, -8.76204884199864], [32.191864861791963, -8.930358981973276], [32.759375441221316, -9.230599053589058]]] } }, + { "type": "Feature", "properties": { "admin": "Zimbabwe", "name": "Zimbabwe", "continent": "Africa" }, "geometry": { "type": "Polygon", "coordinates": [[[31.191409132621278, -22.251509698172395], [30.659865350067083, -22.151567478119912], [30.322883335091767, -22.271611830333931], [29.839036899542965, -22.102216485281172], [29.432188348109033, -22.091312758067584], [28.794656202924209, -21.639454034107445], [28.02137007010861, -21.485975030200578], [27.727227817503252, -20.851801853114711], [27.724747348753247, -20.499058526290387], [27.296504754350501, -20.391519870690995], [26.164790887158478, -19.293085625894935], [25.850391473094724, -18.714412937090533], [25.649163445750155, -18.536025892818987], [25.264225701608005, -17.736539808831413], [26.381935255648919, -17.846042168857892], [26.706773309035633, -17.961228936436477], [27.044427117630729, -17.938026218337427], [27.598243442502753, -17.290830580314005], [28.467906121542676, -16.468400160388843], [28.825868768028492, -16.389748630440611], [28.947463413211256, -16.043051446194436], [29.51683434420314, -15.644677829656386], [30.274255812305103, -15.507786960515208], [30.338954705534537, -15.880839125230242], [31.173063999157673, -15.860943698797868], [31.636498243951188, -16.071990248277881], [31.852040643040592, -16.319417006091374], [32.328238966610222, -16.392074069893749], [32.847638787575839, -16.713398125884613], [32.849860874164385, -17.979057305577175], [32.654885695127142, -18.672089939043492], [32.611994256324884, -19.419382826416268], [32.772707960752619, -19.715592136313294], [32.659743279762573, -20.30429005298231], [32.508693068173436, -20.395292250248303], [32.244988234188007, -21.116488539313689], [31.191409132621278, -22.251509698172395]]] } } + ] + }; + +var randomcountriesData1 = [ + { country: "Iran", "continent": "Asia", "CategoryName": "Books", "Sales": 550 }, + { country: "Benin", "continent": "Africa", "CategoryName": "Books", "Sales": 1000 }, + { country: "China", "continent": "Asia", "CategoryName": "Books", "Sales": 420 }, + { country: "Chile", "continent": "South America", "CategoryName": "Books", "Sales": 1100 }, + { country: "Cuba", "continent": "North America", "CategoryName": "Books", "Sales": 450 }, + { country: "Spain", "continent": "Europe", "CategoryName": "Books", "Sales": 1200 }, + { country: "Fiji", "continent": "Oceania", "CategoryName": "Books", "Sales": 618.0 }, +]; + +module mapcomponenet { + $(function () { + var mapsample = new ej.datavisualization.Map($("#map"), { + enableAnimation: true, + navigationControl: { + enableNavigation: true, + orientation: 'vertical', + absolutePosition: { x: 5, y: 15 }, + dockPosition: 'none' + }, + layers: [ + { + layerType: 'geometry', + enableMouseHover: false, + enableSelection: false, + shapeSettings: { + fill: "#626171", + autoFill: false, + highlightStroke: "white", + stroke: "white", + strokeThickness: 0.5, + highlightColor: "#BFBFBF" + }, + shapeData: world_map, + legendSettings: { dockOnMap: false } + } + ] + }); + }); +} + + + + + + +module MenuComponent { + $(function () { + var sample = new ej.Menu($("#syncfusionProducts"),{ + width: "100%", + animationType: ej.AnimationType.Default, + cssClass: 'gradient-lime ', + enableAnimation: true, + enableSeparator: true, + height: 40, + htmlAttributes: { "aria-label": "menu" }, + menuType: "normalmenu", + orientation: ej.Orientation.Horizontal, + showRootLevelArrows: true, + showSubLevelArrows: true, + subMenuDirection: ej.Direction.Right, + titleText: "Menu", + }); + }); +} + + +module NavigationDrawerComponent { + $(function () { + var navigationdrawerInstance = new ej.NavigationDrawer($("#navpane"), { + targetId: "butdrawer", + contentId: "content_container", + type: "overlay", + direction: "left", + enableListView: true, + listViewSettings: { + width: 300, + selectedItemIndex: 0 + }, + position: "normal" + }); + $("#navpane_listview").click(function(e: any) { + var text=e.target["text"]||$(e.target).closest("li.e-list").text(); + $("#butdrawer").parent().children("h2").text(text); + }); + }); +} + + + +module PDFViewerComponent { + $(function () { + var pdfviewerControl = new ej.PdfViewer($("#pdfviewer"), { + serviceUrl:(window).baseurl+ "api/PdfViewer", + isResponsive: true + }); + }); +} + + + +module PivotChartOlap { + $(function () { + var sample = new ej.PivotChart($("#PivotChart"),{ + dataSource: { + data: "//bi.syncfusion.com/olap/msmdpump.dll", + catalog: "Adventure Works DW 2008 SE", + cube: "Adventure Works", + rows: [ + { + fieldName: "[Date].[Fiscal]" + } + ], + columns: [ + { + fieldName: "[Customer].[Customer Geography]" + } + ], + values: [ + { + measures: [ + { + fieldName: "[Measures].[Internet Sales Amount]" + } + ], + axis: "columns" + } + ], + filters:[] + }, + isResponsive: true,zooming:{enableScrollbar: true}, + commonSeriesOptions: { + type: "column" + }, + size: { height: "460px", width: "100%" }, + primaryXAxis: { title: { text: "Date - Fiscal" }, labelRotation: 0 }, + primaryYAxis: { title: { text: "Internet Sales Amount" } }, + legend: { visible: true, rowCount: 2 }, + load: function () { + var PivotChart = (window).themeStyle + (window).themeColor + (window).themeVarient; + PivotChart = PivotChart.toString(); + if (PivotChart.indexOf("dark") > -1 || PivotChart.indexOf("contrast") > -1) + PivotChart = "flatdark"; + else + PivotChart = "flatlight"; + this.model.theme = PivotChart; + }, + }); + }); +} + + + +var pivot_dataset = [ + { Amount: 100, Country: "Canada", Date: "FY 2005", Product: "Bike", Quantity: 2, State: "Alberta" }, + { Amount: 200, Country: "Canada", Date: "FY 2006", Product: "Van", Quantity: 3, State: "British Columbia" }, + { Amount: 300, Country: "Canada", Date: "FY 2007", Product: "Car", Quantity: 4, State: "Brunswick" }, + { Amount: 150, Country: "Canada", Date: "FY 2008", Product: "Bike", Quantity: 3, State: "Manitoba" }, + { Amount: 200, Country: "Canada", Date: "FY 2006", Product: "Car", Quantity: 4, State: "Ontario" }, + { Amount: 100, Country: "Canada", Date: "FY 2007", Product: "Van", Quantity: 1, State: "Quebec" }, + { Amount: 200, Country: "France", Date: "FY 2005", Product: "Bike", Quantity: 2, State: "Charente-Maritime" }, + { Amount: 250, Country: "France", Date: "FY 2006", Product: "Van", Quantity: 4, State: "Essonne" }, + { Amount: 300, Country: "France", Date: "FY 2007", Product: "Car", Quantity: 3, State: "Garonne (Haute)" }, + { Amount: 150, Country: "France", Date: "FY 2008", Product: "Van", Quantity: 2, State: "Gers" }, + { Amount: 200, Country: "Germany", Date: "FY 2006", Product: "Van", Quantity: 3, State: "Bayern" }, + { Amount: 250, Country: "Germany", Date: "FY 2007", Product: "Car", Quantity: 3, State: "Brandenburg" }, + { Amount: 150, Country: "Germany", Date: "FY 2008", Product: "Car", Quantity: 4, State: "Hamburg" }, + { Amount: 200, Country: "Germany", Date: "FY 2008", Product: "Bike", Quantity: 4, State: "Hessen" }, + { Amount: 150, Country: "Germany", Date: "FY 2007", Product: "Van", Quantity: 3, State: "Nordrhein-Westfalen" }, + { Amount: 100, Country: "Germany", Date: "FY 2005", Product: "Bike", Quantity: 2, State: "Saarland" }, + { Amount: 150, Country: "United Kingdom", Date: "FY 2008", Product: "Bike", Quantity: 5, State: "England" }, + { Amount: 250, Country: "United States", Date: "FY 2007", Product: "Car", Quantity: 4, State: "Alabama" }, + { Amount: 200, Country: "United States", Date: "FY 2005", Product: "Van", Quantity: 4, State: "California" }, + { Amount: 100, Country: "United States", Date: "FY 2006", Product: "Bike", Quantity: 2, State: "Colorado" }, + { Amount: 150, Country: "United States", Date: "FY 2008", Product: "Car", Quantity: 3, State: "New Mexico" }, + { Amount: 200, Country: "United States", Date: "FY 2005", Product: "Bike", Quantity: 4, State: "New York" }, + { Amount: 250, Country: "United States", Date: "FY 2008", Product: "Car", Quantity: 3, State: "North Carolina" }, + { Amount: 300, Country: "United States", Date: "FY 2007", Product: "Van", Quantity: 4, State: "South Carolina" } +] + +module PivotChartRelational { + + $(function () { + var sample = new ej.PivotChart($("#PivotChart"),{ + dataSource: { + data: pivot_dataset, + rows: [ + { + fieldName: "Country", + fieldCaption: "Country" + }, + { + fieldName: "State", + fieldCaption: "State" + }, + { + fieldName: "Date", + fieldCaption: "Date" + } + ], + columns: [ + { + fieldName: "Product", + fieldCaption: "Product" + } + ], + values: [ + { + fieldName: "Amount", + fieldCaption: "Amount" + } + ], + filters:[] + }, + isResponsive: true,zooming:{enableScrollbar: true}, + commonSeriesOptions: { + type: "column" + }, + size: { height: "460px", width: "100%" }, + primaryYAxis: { title: { text: "Amount" } }, + legend: { visible: true }, + load: function () { + var PivotChart = (window).themeStyle + (window).themeColor + (window).themeVarient; + PivotChart = PivotChart.toString(); + if (PivotChart.indexOf("dark") > -1 || PivotChart.indexOf("contrast") > -1) + PivotChart = "flatdark"; + else + PivotChart = "flatlight"; + this.model.theme = PivotChart; + }, + }); + }); +} + + + +module PivotGaugeOlap { + + $(function () { + var sample = new ej.PivotGauge($("#PivotGauge"),{ + dataSource: { + data: "//bi.syncfusion.com/olap/msmdpump.dll", + catalog: "Adventure Works DW 2008 SE", + cube: "Adventure Works", + rows: [ + { + fieldName: "[Date].[Fiscal]", + filterItems: { filterType: "include", values: ["[Date].[Fiscal].[Fiscal Year].&[2004]"] } + }, + ], + columns: [ + { + fieldName: "[Customer].[Customer Geography]" + } + ], + values: [ + { + measures: [ + { + fieldName: "[Measures].[Internet Sales Amount]" + }, + { + fieldName: "[Measures].[Internet Revenue Status]" + }, + { + fieldName: "[Measures].[Internet Revenue Trend]" + }, + { + fieldName: "[Measures].[Internet Revenue Goal]" + }, + ], + axis: "columns" + } + ], + filters:[] + }, + enableTooltip: true, isResponsive: true, + labelFormatSettings: { decimalPlaces: 2 }, + scales: [{ + showRanges: true, + radius: 150, showScaleBar: true, size: 1, + border: { + width: 0.5 + }, + showIndicators: true, showLabels: true, + pointers: [{ + showBackNeedle: true, + backNeedleLength: 20, + length: 120, + width: 7 + }, + { + type: "marker", + markerType: "diamond", + distanceFromScale: 5, + placement: "center", + backgroundColor: "#29A4D9", + length: 25, + width: 15 + }], + ticks: [{ + type: "major", + distanceFromScale: 2, + height: 16, + width: 1, color: "#8c8c8c" + }, + { + type: "minor", + height: 6, + width: 1, + distanceFromScale: 2, + color: "#8c8c8c" + }], + labels: [{ + color: "#8c8c8c" + }], + ranges: [{ + distanceFromScale: -5, + backgroundColor: "#fc0606", + border: { color: "#fc0606" } + }, + { + distanceFromScale: -5 + }], + customLabels: [{ + position: { x: 180, y: 290 }, + font: { size: "10px", fontFamily: "Segoe UI", fontStyle: "Normal" }, color: "#666666" + }, + { + position: { x: 180, y: 320 }, + font: { size: "10px", fontFamily: "Segoe UI", fontStyle: "Normal" }, color: "#666666" + }, + { + position: { x: 180, y: 150 }, + font: { size: "12px", fontFamily: "Segoe UI", fontStyle: "Normal" }, color: "#666666" + }] + }] + }); + }); +} + + + +var pivot_dataset = [ + { Amount: 100, Country: "Canada", Date: "FY 2005", Product: "Bike", Quantity: 2, State: "Alberta" }, + { Amount: 200, Country: "Canada", Date: "FY 2006", Product: "Van", Quantity: 3, State: "British Columbia" }, + { Amount: 300, Country: "Canada", Date: "FY 2007", Product: "Car", Quantity: 4, State: "Brunswick" }, + { Amount: 150, Country: "Canada", Date: "FY 2008", Product: "Bike", Quantity: 3, State: "Manitoba" }, + { Amount: 200, Country: "Canada", Date: "FY 2006", Product: "Car", Quantity: 4, State: "Ontario" }, + { Amount: 100, Country: "Canada", Date: "FY 2007", Product: "Van", Quantity: 1, State: "Quebec" }, + { Amount: 200, Country: "France", Date: "FY 2005", Product: "Bike", Quantity: 2, State: "Charente-Maritime" }, + { Amount: 250, Country: "France", Date: "FY 2006", Product: "Van", Quantity: 4, State: "Essonne" }, + { Amount: 300, Country: "France", Date: "FY 2007", Product: "Car", Quantity: 3, State: "Garonne (Haute)" }, + { Amount: 150, Country: "France", Date: "FY 2008", Product: "Van", Quantity: 2, State: "Gers" }, + { Amount: 200, Country: "Germany", Date: "FY 2006", Product: "Van", Quantity: 3, State: "Bayern" }, + { Amount: 250, Country: "Germany", Date: "FY 2007", Product: "Car", Quantity: 3, State: "Brandenburg" }, + { Amount: 150, Country: "Germany", Date: "FY 2008", Product: "Car", Quantity: 4, State: "Hamburg" }, + { Amount: 200, Country: "Germany", Date: "FY 2008", Product: "Bike", Quantity: 4, State: "Hessen" }, + { Amount: 150, Country: "Germany", Date: "FY 2007", Product: "Van", Quantity: 3, State: "Nordrhein-Westfalen" }, + { Amount: 100, Country: "Germany", Date: "FY 2005", Product: "Bike", Quantity: 2, State: "Saarland" }, + { Amount: 150, Country: "United Kingdom", Date: "FY 2008", Product: "Bike", Quantity: 5, State: "England" }, + { Amount: 250, Country: "United States", Date: "FY 2007", Product: "Car", Quantity: 4, State: "Alabama" }, + { Amount: 200, Country: "United States", Date: "FY 2005", Product: "Van", Quantity: 4, State: "California" }, + { Amount: 100, Country: "United States", Date: "FY 2006", Product: "Bike", Quantity: 2, State: "Colorado" }, + { Amount: 150, Country: "United States", Date: "FY 2008", Product: "Car", Quantity: 3, State: "New Mexico" }, + { Amount: 200, Country: "United States", Date: "FY 2005", Product: "Bike", Quantity: 4, State: "New York" }, + { Amount: 250, Country: "United States", Date: "FY 2008", Product: "Car", Quantity: 3, State: "North Carolina" }, + { Amount: 300, Country: "United States", Date: "FY 2007", Product: "Van", Quantity: 4, State: "South Carolina" } +] + +module PivotGaugeRelational { + $(function () { + var sample = new ej.PivotGauge($("#PivotGauge"),{ + dataSource: { + data: pivot_dataset, + rows: [ + { + fieldName: "Country", + }, + { + fieldName: "State", + } + ], + columns: [ + { + fieldName: "Product", + } + ], + values: [ + { + fieldName: "Amount", + }, + { + fieldName: "Quantity", + } + ] + }, + enableTooltip: true, isResponsive: true, + labelFormatSettings: { decimalPlaces: 2 }, + scales: [{ + showRanges: true, + radius: 150, showScaleBar: true, size: 1, + border: { + width: 0.5 + }, + showIndicators: true, showLabels: true, + pointers: [{ + showBackNeedle: true, + backNeedleLength: 20, + length: 120, + width: 7 + }, + { + type: "marker", + markerType: "diamond", + distanceFromScale: 5, + placement: "center", + backgroundColor: "#29A4D9", + length: 25, + width: 15 + }], + ticks: [{ + type: "major", + distanceFromScale: 2, + height: 16, + width: 1, color: "#8c8c8c" + }, + { + type: "minor", + height: 6, + width: 1, + distanceFromScale: 2, + color: "#8c8c8c" + }], + labels: [{ + color: "#8c8c8c" + }], + ranges: [{ + distanceFromScale: -5, + backgroundColor: "#fc0606", + border: { color: "#fc0606" } + }, + { + distanceFromScale: -5 + }], + customLabels: [{ + position: { x: 180, y: 290 }, + font: { size: "10px", fontFamily: "Segoe UI", fontStyle: "Normal" }, color: "#666666" + }, + { + position: { x: 180, y: 320 }, + font: { size: "10px", fontFamily: "Segoe UI", fontStyle: "Normal" }, color: "#666666" + }, + { + position: { x: 180, y: 150 }, + font: { size: "12px", fontFamily: "Segoe UI", fontStyle: "Normal" }, color: "#666666" + }] + }] + }); + }); +} + + + +module PivotGridOlap { + + $(function () { + var sample = new ej.PivotGrid($("#PivotGrid"),{ + dataSource: { + data: "//bi.syncfusion.com/olap/msmdpump.dll", + catalog: "Adventure Works DW 2008 SE", + cube: "Adventure Works", + rows: [ + { + fieldName: "[Date].[Fiscal]" + } + ], + columns: [ + { + fieldName: "[Customer].[Customer Geography]" + } + ], + values: [ + { + measures: [ + { + fieldName: "[Measures].[Internet Sales Amount]", + } + ], + axis: "columns" + } + ], + filters:[] + }, + enableGroupingBar: true, + pivotTableFieldListID:"PivotSchemaDesigner" + }); + $("#PivotSchemaDesigner").ejPivotSchemaDesigner(); + }); +} + + + +var pivot_dataset = [ + { Amount: 100, Country: "Canada", Date: "FY 2005", Product: "Bike", Quantity: 2, State: "Alberta" }, + { Amount: 200, Country: "Canada", Date: "FY 2006", Product: "Van", Quantity: 3, State: "British Columbia" }, + { Amount: 300, Country: "Canada", Date: "FY 2007", Product: "Car", Quantity: 4, State: "Brunswick" }, + { Amount: 150, Country: "Canada", Date: "FY 2008", Product: "Bike", Quantity: 3, State: "Manitoba" }, + { Amount: 200, Country: "Canada", Date: "FY 2006", Product: "Car", Quantity: 4, State: "Ontario" }, + { Amount: 100, Country: "Canada", Date: "FY 2007", Product: "Van", Quantity: 1, State: "Quebec" }, + { Amount: 200, Country: "France", Date: "FY 2005", Product: "Bike", Quantity: 2, State: "Charente-Maritime" }, + { Amount: 250, Country: "France", Date: "FY 2006", Product: "Van", Quantity: 4, State: "Essonne" }, + { Amount: 300, Country: "France", Date: "FY 2007", Product: "Car", Quantity: 3, State: "Garonne (Haute)" }, + { Amount: 150, Country: "France", Date: "FY 2008", Product: "Van", Quantity: 2, State: "Gers" }, + { Amount: 200, Country: "Germany", Date: "FY 2006", Product: "Van", Quantity: 3, State: "Bayern" }, + { Amount: 250, Country: "Germany", Date: "FY 2007", Product: "Car", Quantity: 3, State: "Brandenburg" }, + { Amount: 150, Country: "Germany", Date: "FY 2008", Product: "Car", Quantity: 4, State: "Hamburg" }, + { Amount: 200, Country: "Germany", Date: "FY 2008", Product: "Bike", Quantity: 4, State: "Hessen" }, + { Amount: 150, Country: "Germany", Date: "FY 2007", Product: "Van", Quantity: 3, State: "Nordrhein-Westfalen" }, + { Amount: 100, Country: "Germany", Date: "FY 2005", Product: "Bike", Quantity: 2, State: "Saarland" }, + { Amount: 150, Country: "United Kingdom", Date: "FY 2008", Product: "Bike", Quantity: 5, State: "England" }, + { Amount: 250, Country: "United States", Date: "FY 2007", Product: "Car", Quantity: 4, State: "Alabama" }, + { Amount: 200, Country: "United States", Date: "FY 2005", Product: "Van", Quantity: 4, State: "California" }, + { Amount: 100, Country: "United States", Date: "FY 2006", Product: "Bike", Quantity: 2, State: "Colorado" }, + { Amount: 150, Country: "United States", Date: "FY 2008", Product: "Car", Quantity: 3, State: "New Mexico" }, + { Amount: 200, Country: "United States", Date: "FY 2005", Product: "Bike", Quantity: 4, State: "New York" }, + { Amount: 250, Country: "United States", Date: "FY 2008", Product: "Car", Quantity: 3, State: "North Carolina" }, + { Amount: 300, Country: "United States", Date: "FY 2007", Product: "Van", Quantity: 4, State: "South Carolina" } +] + +module PivotGridRelational { + $(function () { + var sample = new ej.PivotGrid($("#PivotGrid"),{ + dataSource: { + data: pivot_dataset, + rows: [ + { + fieldName: "Country", + fieldCaption: "Country" + }, + { + fieldName: "State", + fieldCaption: "State" + } + ], + columns: + [{ + fieldName: "Product", + fieldCaption: "Product" + } + ], + values: [ + { + fieldName: "Amount", + fieldCaption: "Amount" + }, + { + fieldName: "Quantity", + fieldCaption: "Quantity" + } + ], + filters:[] + }, + enableGroupingBar: true, + pivotTableFieldListID:"PivotSchemaDesigner" + }); + $("#PivotSchemaDesigner").ejPivotSchemaDesigner(); + }); +} + + + +module PivotTreeMap { + $(function () { + var sample = new ej.PivotTreeMap($("#PivotTreeMap"),{ + dataSource: { + data: "//bi.syncfusion.com/olap/msmdpump.dll;Locale Identifier=1033;", + catalog: "Adventure Works DW 2008 SE", + cube: "Adventure Works", + rows: [ + { + fieldName: "[Customer].[Customer Geography]" + } + ], + columns: [ + { + fieldName: "[Date].[Fiscal]" + } + ], + values: [ + { + measures: [ + { + fieldName: "[Measures].[Customer Count]", + } + ], + axis: "columns" + } + ], + filters:[] + } + }); + }); +} + + + +module ProgressBarComponent { + $(function () { + var sample = new ej.ProgressBar($("#progressBar"),{ + width: 200, + value: 45, + height: 20, + enablePersistence: true, + maxValue: 200, + minValue: 0, + showRoundedCorner: true, + text: 'loading...' + }); + }); + +} + + + + +declare var rteObj: any; +declare var data: any; +var radialEle = $('#defaultradialmenu'), action = 0, forRedo = 0; +var rteEle = $("#rteSample1"); +module RadialMenuComponent { + $(function () { + + if (!(ej.browserInfo().name == "msie" && parseInt(ej.browserInfo().version) < 9)) { + var radialmenuInstance = new ej.RadialMenu($("#defaultradialmenu"), { + imageClass: "imageclass", + backImageClass: "backimageclass", + targetElementId: "radialtarget1" + }); + $("#radialtarget1").parent().css("position", "relative"); + } + else { + $("#contentDiv").html("Radial Menu is only supported from Internet Explorer Versioned 9 and above.").css({ "font-size": "20px", "color": "red" }); + } + var rteInstance = new ej.RTE($("#rteSample1"), { + width: "100%", + minWidth: "10px", + change: (e) => { radialEle.ejRadialMenu("enableItem", "Undo"); }, + select: (e) => { + var target = $("#radialtarget1"), radialRadius = 150, radialDiameter = 2 * radialRadius, + // To get Iframe positions + iframeY = e.event.clientY, iframeX = e.event.clientX, + // To set Radial Menu position within target + x = iframeX > target.width() - radialRadius ? target.width() - radialDiameter : (iframeX > radialRadius ? iframeX - radialRadius : 0), + y = iframeY > target.height() - radialRadius ? target.height() - radialDiameter : (iframeY > radialRadius ? iframeY - radialRadius : 0); + radialEle.ejRadialMenu("setPosition", x, y); + radialEle.focus(); + $('iframe').contents().find('body').blur(); + }, + showToolbar: false, + showContextMenu: false + }); + $(window).resize(function () { + if (ej.isMobile() && ej.isPortrait()) + $('#defaultradialmenu').css({ "left": 25 }); + }); + }); +} + + +function bold(e: any) { + + rteObj = rteEle.data("ejRTE"); + rteObj.executeCommand("bold"); + data = rteObj._getSelectedHtmlString() ? true : false; + if (data) action += 1; + forRedo = action; + radialEle.focus(); +} +function italic(e: any) { + rteObj = rteEle.data("ejRTE"); + rteObj.executeCommand("italic"); + data = rteObj._getSelectedHtmlString() ? true : false; + if (data) action += 1; + forRedo = action; + radialEle.focus(); +} +function undo(e: any) { + rteObj = rteEle.data("ejRTE"); + rteObj.executeCommand("undo"); + action -= 1; + if (action == 0) + radialEle.ejRadialMenu("disableItem", "Undo"); + radialEle.ejRadialMenu("enableItem", "Redo"); + radialEle.focus(); +} +function redo(e: any) { + rteObj = rteEle.data("ejRTE"); + rteObj.executeCommand("redo"); + action += 1; + if (forRedo == action) radialEle.ejRadialMenu("disableItem", "Redo"); + radialEle.ejRadialMenu("enableItem", "Undo"); + radialEle.focus(); +} + + +module RadialSliderComponent { + $(function () { + var radialsliderInstance = new ej.RadialSlider($("#radialSlider"), { + innerCircleImageUrl: "images/radialslider/chevron-right.png" + }); + }); +} + + +module rangecomponent { + $(function () { + var linearsample = new ej.datavisualization.RangeNavigator($("#RangeNavigator"), { + enableDeferredUpdate: true, + padding: "15", + allowSnapping: true, + selectedRangeSettings: { + start: "2010/5/1", end: "2011/10/1" + }, + isResponsive: true, + tooltipSettings: { + visible: true, labelFormat: "MM/dd/yyyy", backgroundColor: "gray", tooltipDisplayMode: "ondemand" + }, + load: () => { + var rn = $("#RangeNavigator").data("ejRangeNavigator"); + rn.model.series = [ + { + type: 'line', + dataSource: data.Open, xName: "XValue", yName: "YValue", + fill: '#69D2E7' + } + ]; + }, + loaded: function () { + var sender = $("#RangeNavigator").data("ejRangeNavigator"); + var theme = (window).themeStyle + (window).themeColor + (window).themeVarient; + if (theme) { + switch (theme) { + case "flatazurelight": + theme = "azurelight"; + break; + case "flatlimelight": + theme = "limelight"; + break; + case "flatsaffronlight": + theme = "saffronlight"; + break; + case "gradientazurelight": + theme = "gradientazure"; + break; + case "gradientlimelight": + theme = "gradientlime"; + break; + case "gradientsaffronlight": + theme = "gradientsaffron"; + break; + case "flatazuredark": + theme = "azuredark"; + break; + case "flatlimedark": + theme = "limedark"; + break; + case "flatsaffrondark": + theme = "saffrondark"; + break; + case "gradientazuredark": + theme = "gradientazuredark"; + break; + case "gradientlimedark": + theme = "gradientlimedark"; + break; + case "gradientsaffrondark": + theme = "gradientsaffrondark"; + break; + case "flathigh-contrast-01dark": + theme = "highcontrast01"; + break; + case "flathigh-contrast-02dark": + theme = "highcontrast02"; + break; + case "flatmateriallight": + theme = "material"; + break; + case "flatoffice-365light": + theme = "office"; + break; + default: + theme = "flatlight"; + break; + } + sender.model.theme = theme; + } + } + + }); + }); +} +var data; +data = GetData(); + +function GetData() { + var series1:any[]=[]; + var series2:any[]= []; + var value = 100; + var value1 = 120; + for (var i = 1; i < 730; i++) { + + if (Math.random() > .5) { + value += Math.random(); + value1 += Math.random(); + } else { + value -= Math.random(); + value1 -= Math.random(); + } + var point1 = { XValue: new Date(2010, 0, i), YValue: value }; + var point2 = { XValue: new Date(2010, 0, i), YValue: value1 }; + series1.push(point1); + series2.push(point2); + } + + data = { Open: series1, Close: series2 }; + return data; +}; + + + +module RatingComponent { + $(function () { + + var sample1 = new ej.Rating($("#fullRating"),{ + value: 4, + precision: ej.Rating.Precision.Full, + allowReset: true, + cssClass: "gradient-lime", + enabled: true, + enablePersistence: true, + incrementStep: 2, + maxValue: 10, + minValue: 0, + orientation: ej.Orientation.Horizontal, + shapeHeight: 25, + shapeWidth: 25, + showTooltip: true + }); + + var sample2 = new ej.Rating($("#halfRating"),{ + precision: ej.Rating.Precision.Half, + value: 3.5, + allowReset: true, + cssClass: "gradient-lime", + enabled: true, + enablePersistence: true, + incrementStep: 2, + maxValue: 10, + minValue: 0, + orientation: "horizontal", + shapeHeight: 25, + shapeWidth: 25, + showTooltip: true + }); + + var sample3 = new ej.Rating($("#exactRating"),{ + precision: ej.Rating.Precision.Exact, + value: 3.7, + allowReset: true, + cssClass: "gradient-lime", + enabled: true, + enablePersistence: true, + incrementStep: 2, + maxValue: 10, + minValue: 0, + orientation: "horizontal", + shapeHeight: 25, + shapeWidth: 25, + showTooltip: true + }); + }); +} + + + +module ReportViewerComponent { + $(function () { + var report = new ej.ReportViewer($("#DefaultReportViewer"), { + reportServiceUrl: (window).baseurl + 'api/ReportViewer', + processingMode: ej.ReportViewer.ProcessingMode.Remote, + reportPath: "ConditionalFormating.rdl", + isResponsive: true + }); + }); +} + + + +var fontfamily = ["Segoe UI", "Arial", "Times New Roman", "Tahoma", "Helvetica"], fontsize = ["1pt", "2pt", "3pt", "4pt", "5pt"], action1 = ["New", "Clear"], action2 = ["Bold", "Italic", "Underline", "strikethrough", "superscript", "subscript", "JustifyLeft", "JustifyCenter", "JustifyRight", "JustifyFull", "Undo", "Redo"]; +module RibbonComponent { + $(function () { + var sample = new ej.Ribbon($("#defaultRibbon"), { + width: "100%", + expandPinSettings: { + toolTip: "Collapse the Ribbon" + }, + collapsePinSettings: { + toolTip: "Pin the Ribbon" + }, + applicationTab: { + type: ej.Ribbon.ApplicationTabType.Menu, menuItemID: "ribbonmenu", menuSettings: { openOnClick: false } + }, + tabs: [{ + id: "home", text: "HOME", groups: [{ + text: "New", alignType: ej.Ribbon.AlignType.Rows, content: [{ + groups: [{ + id: "new", + text: "New", + toolTip: "New", + buttonSettings: { + contentType: ej.ContentType.ImageOnly, + imagePosition: ej.ImagePosition.ImageTop, + prefixIcon: "e-icon e-ribbon e-new", + click: "onClick" + } + } + ], + defaults: { + type: "button", + width: 60, + height: 70 + } + }] + }, + { + text: "Clipboard", alignType: ej.Ribbon.AlignType.Columns, content: [{ + groups: [{ + id: "paste", + text: "paste", + toolTip: "Paste", + splitButtonSettings: { + contentType: ej.ContentType.ImageOnly, + prefixIcon: "e-icon e-ribbon e-ribbonpaste", + targetID: "pasteSplit", + buttonMode: "dropdown", + click: "onClick", + arrowPosition: ej.ArrowPosition.Bottom + } + } + ], + defaults: { + type: "splitbutton", + width: 50, + height: 70 + } + }, + { + groups: [{ + id: "cut", + text: "Cut", + toolTip: "Cut", + buttonSettings: { + contentType: ej.ContentType.TextAndImage, + click: "onClick", + prefixIcon: "e-icon e-ribbon e-ribboncut" + } + }, + { + id: "copy", + text: "Copy", + toolTip: "Copy", + buttonSettings: { + contentType: ej.ContentType.TextAndImage, + click: "onClick", + prefixIcon: "e-icon e-ribbon e-ribboncopy" + } + }, + { + id: "clear", + text: "Clear", + toolTip: "Clear All", + buttonSettings: { + contentType: ej.ContentType.TextAndImage, + click: "onClick", + prefixIcon: "e-icon e-ribbon clearAll" + } + }], + defaults: { + type: "button", + width: 60, + isBig: false + } + }] + }, + { + text: "Font", alignType: "rows", content: [{ + groups: [{ + id: "fontfamily", + toolTip: "Font", + dropdownSettings: { + dataSource: fontfamily, + text: "Segoe UI", + select: "onClick", + width: 150 + } + }, + { + id: "fontsize", + toolTip: "FontSize", + dropdownSettings: { + dataSource: fontsize, + text: "1pt", + select: "onClick", + width: 65 + } + }], + defaults: { + type: "dropdownlist", + height: 28 + } + }, + { + groups: [{ + id: "bold", + toolTip: "Bold", + type: ej.Ribbon.Type.ToggleButton, + toggleButtonSettings: { + contentType: ej.ContentType.ImageOnly, + defaultText: "Bold", + activeText: "Bold", + click: "onClick", + defaultPrefixIcon: "e-icon e-ribbon bold", + activePrefixIcon: "e-icon e-ribbon bold" + } + }, + { + id: "italic", + toolTip: "Italic", + type: ej.Ribbon.Type.ToggleButton, + toggleButtonSettings: { + contentType: ej.ContentType.ImageOnly, + defaultText: "Italic", + activeText: "Italic", + click: "onClick", + defaultPrefixIcon: "e-icon e-ribbon e-ribbonitalic", + activePrefixIcon: "e-icon e-ribbon e-ribbonitalic" + } + }, + { + id: "underline", + text: "Underline", + toolTip: "Underline", + type: ej.Ribbon.Type.ToggleButton, + toggleButtonSettings: { + contentType: ej.ContentType.ImageOnly, + defaultText: "Underline", + activeText: "Underline", + click: "onClick", + defaultPrefixIcon: "e-icon e-ribbon e-ribbonunderline", + activePrefixIcon: "e-icon e-ribbon e-ribbonunderline" + } + }, + { + id: "strikethrough", + text: "strikethrough", + toolTip: "Strikethrough", + type: ej.Ribbon.Type.ToggleButton, + toggleButtonSettings: { + contentType: ej.ContentType.ImageOnly, + defaultText: "Strikethrough", + activeText: "Strikethrough", + click: "onClick", + defaultPrefixIcon: "e-icon e-ribbon strikethrough", + activePrefixIcon: "e-icon e-ribbon strikethrough" + } + }, + { + id: "superscript", + text: "superscript", + toolTip: "Superscript", + buttonSettings: { + click: "onClick", + contentType: ej.ContentType.ImageOnly, + prefixIcon: "e-icon e-ribbon e-superscripticon" + } + }, + { + id: "subscript", + text: "subscript", + toolTip: "Subscript", + enableSeparator: true, + buttonSettings: { + click: "onClick", + contentType: ej.ContentType.ImageOnly, + prefixIcon: "e-icon e-ribbon e-subscripticon" + } + }, + { + id: "fontcolor", + text: "Font Color", + toolTip: "Font Color", + type: ej.Ribbon.Type.Custom, + contentID: "fontcolor" + }, + { + id: "fillcolor", + text: "Fill Color", + toolTip: "Fill Color", + type: ej.Ribbon.Type.Custom, + contentID: "fillcolor" + } + ], + defaults: { + isBig: false + } + }] + }, + { + text: "Alignment", alignType: ej.Ribbon.AlignType.Rows, content: [ + { + groups: [{ + id: "bullet", + text: "Bullet Format", + toolTip: "Bullets", + buttonSettings: { + click: "onClick", + contentType: ej.ContentType.ImageOnly, + prefixIcon: "e-icon e-ribbon e-bullet" + } + }, + { + id: "number", + text: "Number Format", + toolTip: "Numbering", + enableSeparator: true, + buttonSettings: { + click: "onClick", + contentType: ej.ContentType.ImageOnly, + prefixIcon: "e-icon e-ribbon e-numbericon" + } + }, + { + id: "textindent", + text: "Indent", + toolTip: "Text Indent", + buttonSettings: { + click: "onClick", + contentType: ej.ContentType.ImageOnly, + prefixIcon: "e-icon e-ribbon e-indent" + } + }, + { + id: "textoudent", + text: "Outdent", + toolTip: "Text Outdent", + enableSeparator: true, + buttonSettings: { + click: "onClick", + contentType: ej.ContentType.ImageOnly, + prefixIcon: "e-icon e-ribbon e-outdent" + } + }, + { + id: "sortascending", + text: "Sort", + toolTip: "Sort", + enableSeparator: true, + buttonSettings: { + click: "onClick", + contentType: ej.ContentType.ImageOnly, + prefixIcon: "e-icon e-ribbon e-sort" + } + }, + { + id: "border", + text: "Border", + toolTip: "Border", + buttonSettings: { + click: "onClick", + contentType: ej.ContentType.ImageOnly, + prefixIcon: "e-icon e-ribbon e-border" + } + }], + defaults: { + type: "button", + isBig: false + } + }, + { + groups: [{ + id: "alignleft", + text: "JustifyLeft", + toolTip: "Align Left", + buttonSettings: { + click: "onClick", + contentType: ej.ContentType.ImageOnly, + prefixIcon: "e-icon e-ribbon alignleft" + } + }, + { + id: "aligncenter", + text: "JustifyCenter", + toolTip: "Align Center", + buttonSettings: { + click: "onClick", + contentType: ej.ContentType.ImageOnly, + prefixIcon: "e-icon e-ribbon aligncenter" + } + }, + { + id: "alignright", + text: "JustifyRight", + toolTip: "Align Right", + buttonSettings: { + click: "onClick", + contentType: ej.ContentType.ImageOnly, + prefixIcon: "e-icon e-ribbon alignright" + } + }, + { + id: "justify", + text: "JustifyFull", + toolTip: "Justify", + enableSeparator: true, + buttonSettings: { + click: "onClick", + contentType: ej.ContentType.ImageOnly, + prefixIcon: "e-icon e-ribbon justify" + } + }, + { + id: "uppercase", + text: "Upper Case", + toolTip: "Upper Case", + buttonSettings: { + click: "onClick", + contentType: ej.ContentType.ImageOnly, + prefixIcon: "e-icon e-ribbon e-uppercase" + } + }, + { + id: "lowercase", + text: "Lower Case", + toolTip: "Lower Case", + buttonSettings: { + click: "onClick", + contentType: ej.ContentType.ImageOnly, + prefixIcon: "e-icon e-ribbon e-lowercase" + } + }], + defaults: { + type: "button", + isBig: false + } + }] + }, + { + text: "Actions", alignType: ej.Ribbon.AlignType.Rows, content: [{ + groups: [{ + id: "undo", + text: "Undo", + toolTip: "Undo", + buttonSettings: { + click: "onClick", + contentType: ej.ContentType.TextAndImage, + imagePosition: ej.ImagePosition.ImageTop, + prefixIcon: "e-icon e-ribbon e-undo" + } + }, + { + id: "redo", + text: "Redo", + toolTip: "Redo", + buttonSettings: { + click: "onClick", + contentType: ej.ContentType.TextAndImage, + imagePosition: ej.ImagePosition.ImageTop, + prefixIcon: "e-icon e-ribbon e-redo" + } + } + ], + defaults: { + type: "button", + width: 40, + height: 70 + } + }] + }, + { + text: "View", alignType: ej.Ribbon.AlignType.Rows, content: [{ + groups: [{ + id: "zoomin", + text: "Zoom In", + toolTip: "Zoom In", + buttonSettings: { + width: 58, + click: "onClick", + contentType: ej.ContentType.TextAndImage, + imagePosition: ej.ImagePosition.ImageTop, + prefixIcon: "e-icon e-ribbon e-zoomin" + } + }, + { + id: "zoomout", + text: "Zoom Out", + toolTip: "Zoom Out", + buttonSettings: { + width: 70, + click: "onClick", + contentType: ej.ContentType.TextAndImage, + imagePosition: ej.ImagePosition.ImageTop, + prefixIcon: "e-icon e-ribbon e-zoomout" + } + }, + { + id: "fullscreen", + text: "Full Screen", + toolTip: "Full Screen", + buttonSettings: { + width: 73, + click: "onClick", + contentType: ej.ContentType.TextAndImage, + imagePosition: ej.ImagePosition.ImageTop, + prefixIcon: "e-icon e-ribbon e-fullscreen" + } + } + ], + defaults: { + type: "button", + height: 70 + } + }] + }] + },{ + id: "insert", text: "INSERT", groups: [{ + text: "Tables", alignType: ej.Ribbon.AlignType.Columns, content: [{ + groups: [{ + id: "tables", + text: "Tables", + toolTip: "Tables", + buttonSettings: { + click: "onClick", + contentType: ej.ContentType.TextAndImage, + imagePosition: ej.ImagePosition.ImageTop, + prefixIcon: "e-icon e-ribbon e-table" + } + } + ], + defaults: { + type: "button", + width: 50, + height: 70 + } + }] + }, + { + text: "Illustrations", alignType: ej.Ribbon.AlignType.Rows, content: [{ + groups: [{ + id: "pictures", + text: "Pictures", + toolTip: "Pictures", + buttonSettings: { + click: "onClick", + contentType: ej.ContentType.TextAndImage, + imagePosition: ej.ImagePosition.ImageTop, + prefixIcon: "e-icon e-ribbon e-picture" + } + }, + { + id: "videos", + text: "Videos", + toolTip: "Videos", + buttonSettings: { + click: "onClick", + contentType: ej.ContentType.TextAndImage, + imagePosition: ej.ImagePosition.ImageTop, + prefixIcon: "e-icon e-ribbon e-video" + } + }, + { + id: "shapes", + text: "Shapes", + toolTip: "Shapes", + buttonSettings: { + click: "onClick", + contentType: ej.ContentType.TextAndImage, + imagePosition: ej.ImagePosition.ImageTop, + prefixIcon: "e-icon e-ribbon e-shape" + } + }, + { + id: "charts", + text: "Charts", + toolTip: "Charts", + buttonSettings: { + click: "onClick", + contentType: ej.ContentType.TextAndImage, + imagePosition: ej.ImagePosition.ImageTop, + prefixIcon: "e-icon e-ribbon e-chart" + } + } + ], + defaults: { + type: "button", + width: 56, + height: 70 + } + }] + }, + { + text: "Comments", alignType: ej.Ribbon.AlignType.Rows, content: [{ + groups: [{ + id: "comments", + text: "Comments", + toolTip: "Comments", + buttonSettings: { + click: "onClick", + contentType: ej.ContentType.TextAndImage, + imagePosition: ej.ImagePosition.ImageTop, + prefixIcon: "e-icon e-ribbon e-comment" + } + } + ], + defaults: { + type: "button", + width: 70, + height: 70 + } + }] + }, + { + text: "Text", alignType: ej.Ribbon.AlignType.Rows, content: [{ + groups: [{ + id: "text", + text: "Text", + toolTip: "Text", + buttonSettings: { + click: "onClick", + contentType: ej.ContentType.TextAndImage, + imagePosition: ej.ImagePosition.ImageTop, + prefixIcon: "e-icon e-ribbon e-text", + width: 50 + } + }, + { + id: "datetime", + text: "Date Time", + toolTip: "DateTime", + buttonSettings: { + click: "onClick", + contentType: ej.ContentType.TextAndImage, + imagePosition: ej.ImagePosition.ImageTop, + prefixIcon: "e-icon e-ribbon e-datetimenew" + } + } + ], + defaults: { + type: "button", + width: 70, + height: 70 + } + }] + }, + { + text: "Hyperlink", alignType: ej.Ribbon.AlignType.Rows, content: [{ + groups: [{ + id: "hyperlink", + text: "Hyperlink", + toolTip: "Hyperlink", + buttonSettings: { + click: "onClick", + contentType: ej.ContentType.TextAndImage, + imagePosition: ej.ImagePosition.ImageTop, + prefixIcon: "e-icon e-ribbon e-hyperlink" + } + } + ], + defaults: { + type: "button", + width: 70, + height: 70 + } + }] + }, + { + text: "Equation", alignType: ej.Ribbon.AlignType.Rows, content: [{ + groups: [{ + id: "equation", + text: "Equation", + toolTip: "Equation", + buttonSettings: { + click: "onClick", + contentType: ej.ContentType.TextAndImage, + imagePosition: ej.ImagePosition.ImageTop, + prefixIcon: "e-icon e-ribbon e-equation" + } + } + ], + defaults: { + type: "button", + width: 60, + height: 70 + } + }] + }, + { + text: "Print Layout", alignType: ej.Ribbon.AlignType.Rows, content: [{ + groups: [{ + id: "printlayout", + text: "Print Layout", + toolTip: "Print Layout", + buttonSettings: { + click: "onClick", + contentType: ej.ContentType.TextAndImage, + imagePosition: ej.ImagePosition.ImageTop, + prefixIcon: "e-icon e-ribbon e-printlayout" + } + } + ], + defaults: { + type: "button", + width: 80, + height: 70 + } + }] + }, + { + text: "Save", alignType: ej.Ribbon.AlignType.Rows, content: [{ + groups: [{ + id: "print", + text: "Print", + toolTip: "Print", + buttonSettings: { + click: "onClick", + contentType: ej.ContentType.TextAndImage, + imagePosition: ej.ImagePosition.ImageTop, + prefixIcon: "e-icon e-ribbon e-print" + } + }, + { + id: "save", + text: "Save", + toolTip: "Save", + buttonSettings: { + click: "onClick", + contentType: ej.ContentType.TextAndImage, + imagePosition: ej.ImagePosition.ImageTop, + prefixIcon: "e-icon e-ribbon e-save" + } + } + ], + defaults: { + type: "button", + width: 50, + height: 70 + } + }] + } + ] + } + ], + create: function createControl(args) { + var ribbon = $("#defaultRibbon").data("ejRibbon"); + $("#fontcolor").ejColorPicker({ value: "#FFFF00", modelType: "palette", cssClass: "e-ribbon", toolIcon: "e-fontcoloricon", select: colorHandler }); + $("#fillcolor").ejColorPicker({ value: "#FF0000", modelType: "palette", cssClass: "e-ribbon", toolIcon: "e-fillcoloricon", select: colorHandler }); + } + }); + }); +} +function colorHandler(args:any) { + (this._id.indexOf("fillcolor") != -1) ? $("#contenteditor").css('background-color', args.value) : document.execCommand('forecolor', false, args.value); +} +function onClick(args:any) { + let val:any, prop = args.text; + val = (ej.isNullOrUndefined(args.model.text)) ? args.model.activeText : args.model.text; + if (action1.indexOf(val) != -1) + $("#contenteditor").empty(); + else if (action2.indexOf(val) != -1) + document.execCommand(val, false, null); + else if (fontfamily.indexOf(prop) != -1) + document.execCommand("FontName", false, prop); + else if (fontsize.indexOf(prop) != -1) + document.execCommand("FontSize", false, prop.replace("pt", "")); + else + $("#contenteditor").append("

Action: " + val + " Triggered

"); +} + + +module RotatorComponent { + $(function () { + var rotatorInstance = new ej.Rotator($("#sliderContent"), { + slideWidth: "100%", + frameSpace: "0px", + slideHeight: "auto", + displayItemsCount: "1", + navigateSteps: "1", + pagerPosition:"outside", + orientation: "horizontal", + showPager: true, + enabled: true, + showCaption: true, + allowKeyboardNavigation: true, + showPlayButton: true, + isResponsive:true, + animationType: "slide", + }); + }); +} + + + +module RTEComponent { + $(function () { + var sample = new ej.RTE($("#rteSample"),{ + width: "100%", + minWidth: "150px", + showFooter: true, + showHtmlSource: true, + allowEditing: true, + allowKeyboardNavigation: true, + autoFocus: true, + autoHeight: true, + colorPaletteColumns: 10, + colorPaletteRows: 5, + cssClass: 'gradient-lime', + enableResize: true, + enableTabKeyNavigation: true, + fileBrowser: { + filePath: (window).baseurl + "Content/FileBrowser/", + extensionAllow: "*.png, *.doc, *.pdf, *.txt, *.docx", + ajaxAction: (window).baseurl + "api/FileExplorer/FileOperations" + }, + imageBrowser: { + filePath: (window).baseurl + "Content/FileBrowser/", + extensionAllow: "*.png, *.gif, *.jpg, *.jpeg, *.docx", + ajaxAction: (window).baseurl + "api/FileExplorer/FileOperations" + }, + isResponsive: true, + showClearAll: true, + showClearFormat: true, + showDimensions: true, + showCharCount: true, + tools: { + formatStyle: ["format"], + edit: ["findAndReplace"], + font: ["fontName", "fontSize", "fontColor", "backgroundColor"], + style: ["bold", "italic", "underline", "strikethrough"], + alignment: ["justifyLeft", "justifyCenter", "justifyRight", "justifyFull"], + lists: ["unorderedList", "orderedList"], + clipboard: ["cut", "copy", "paste"], + doAction: ["undo", "redo"], + indenting: ["outdent", "indent"], + clear: ["clearFormat", "clearAll"], + links: ["createLink", "removeLink"], + images: ["image"], + media: ["video"], + tables: ["createTable", "addRowAbove", "addRowBelow", "addColumnLeft", "addColumnRight", "deleteRow", "deleteColumn", "deleteTable"], + effects: ["superscript", "subscript"], + casing: ["upperCase", "lowerCase"], + view: ["fullScreen", "zoomIn", "zoomOut"], + print: ["print"], + customUnorderedList: [{ + name: "unOrderInsert", + tooltip: "Custom UnOrderList", + css: "e-rte-toolbar-icon e-rte-unlistitems customUnOrder", + text: "Smiley", + listImage: "url('../content/images/rte/Smiley-GIF.gif')" + }], + customOrderedList: [{ + name: "orderInsert", + tooltip: "Custom OrderList", + css: "e-rte-toolbar-icon e-rte-listitems customOrder", + text: "Lower-Greek", + listStyle: "lower-greek" + }] + } + }); + }); + +} + + + +module ScheduleComponent { + $(function () { + var sample = new ej.Schedule($("#Schedule1"), { + width: "100%", + height: "525px", + currentDate: new Date(2017, 5, 5), + timeScale: { + minorSlotCount: 4, + majorSlot: 60 + }, + contextMenuSettings: { + enable: true, + menuItems: { + appointment: [ + { id: "open", text: "Open Appointment" }, + { id: "delete", text: "Delete Appointment" }, + { id: "customMenu3", text: "Menu Item 3" }, + { id: "customMenu4", text: "Menu Item 4" } + ], + cells: [ + { id: "new", text: "New Appointment" }, + { id: "recurrence", text: "New Recurring Appointment" }, + { id: "today", text: "Today" }, + { id: "gotodate", text: "Go to date" }, + { id: "settings", text: "Settings" }, + { id: "view", text: "View", parentId: "settings" }, + { id: "timemode", text: "TimeMode", parentId: "settings" }, + { id: "view_Day", text: "Day", parentId: "view" }, + { id: "view_Week", text: "Week", parentId: "view" }, + { id: "view_Workweek", text: "Workweek", parentId: "view" }, + { id: "view_Month", text: "Month", parentId: "view" }, + { id: "timemode_Hour12", text: "12 Hours", parentId: "timemode" }, + { id: "timemode_Hour24", text: "24 Hours", parentId: "timemode" }, + { id: "workhours", text: "Work Hours", parentId: "settings" }, + { id: "customMenu1", text: "Menu Item 1" }, + { id: "customMenu2", text: "Menu Item 2" } + ] + } + }, + resources: [{ + field: "ownerId", + title: "Owner", + name: "Owners", allowMultiple: true, + resourceSettings: { + dataSource: [ + { text: "Nancy", id: 1, groupId: 1, color: "#f8a398" }, + { text: "Steven", id: 3, groupId: 2, color: "#56ca85" }, + { text: "Michael", id: 5, groupId: 1, color: "#51a0ed" } + ], + text: "text", id: "id", groupId: "groupId", color: "color" + } + }], + appointmentSettings: { + dataSource: new ej.DataManager((window).ResourcesData).executeLocal(new ej.Query().take(10)), + id: "Id", + subject: "Subject", + startTime: "StartTime", + endTime: "EndTime", + description: "Description", + allDay: "AllDay", + recurrence: "Recurrence", + recurrenceRule: "RecurrenceRule", + resourceFields: "ownerId" + } + }); + }); +} + + + +module ScrollerComponent { + $(function () { + var scrollerSample = new ej.Scroller($("#scrollcontent"), { + height: "300px", + width: "100%" + }); + $(window).bind('resize', function () { + scrollerSample.refresh(); + }); + + }); +} + + + +module SignatureComponent { + $(function () { + var basicSignature = new ej.Signature($("#signature"), { + height: "400px", + isResponsive: true, + strokeWidth: 3 + }); + }); +} + + + + +module SliderComponent { + $(function () { + var slider = new ej.Slider($("#minSlider"), { + sliderType: "MinRange", + value: 60, + minValue: 0, + maxValue: 100 + }); + var rangeslider = new ej.Slider($("#rangeSlider"), { + sliderType: "Range", + values: [30, 60], + minValue: 0 + }); + + }); +} + + + + + + +module linesparkline { + $(function () { + + var sparklinesample = new ej.Sparkline($("#line"), { + dataSource: [12, 14, 11, 12, 11, 15, 12, 10, 11, 12, 15, 13, 12, 11, 10, 13, 15, 12, 14, 16, 14, 12, 11], + tooltip: { + visible: true, + font: { size:"12px" } + }, + type: "line", + size: { height: "40", width:"170" }, + }); + }); +} + +module columnsparkline { + $(function () { + var sparkcolumnsample = new ej.Sparkline($("#column"), { + dataSource: [2, 6, -1, 1, 12, 5, -2, 7, -3, 5, 8, 10,], + negativePointColor: "red", + highPointColor: "blue", + tooltip: { + visible: true, + font: { + size: "12px", + } + }, + type: "column", + size: { height: "100", width: "150" }, + }); + }); +} + +module areasparkline { + $(function () { + var sparkareasample = new ej.Sparkline($("#area"), { + dataSource: [12, -10, 11, 8, 17, 6, 2, -17, 13, -6, 8, 10,], + markerSettings: { visible: true }, + highPointColor: "blue", + lowPointColor: "orange", + type: "area", + opacity: 0.5, + tooltip: { + visible: true, + font: { + size: "12px", + } + }, + size: { height: "100", width: "150" }, + }); + }); +} + +module windlosssparkline { + $(function () { + var sparkwinlosssample = new ej.Sparkline($("#winloss"), { + dataSource: [12, 15, -11, 13, 17, 0, -12, 17, 13, -15, 8, 10,], + type: "winloss", + size: { height: "100", width: "150" }, + }); + }); +} + +module piesparkline1 { + $(function () { + var sparkpiesample1 = new ej.Sparkline($("#pie1"), { + dataSource: [4, 6, 7], + type: "pie", + tooltip: { + visible: true, + font: { + size: "12px", + } + }, + size: { height: "40", width: "40" }, + }); + }); +} + +module piesparkline2 { + $(function () { + var sparkpiesample2 = new ej.Sparkline($("#pie2"), { + dataSource: [8, 9, 1,], + type: "pie", + tooltip: { + visible: true, + font: { + size: "12px", + } + }, + size: { height: "40", width: "40" }, + }); + }); +} + +module piesparkline3 { + $(function () { + var sparkpiesample3 = new ej.Sparkline($("#pie3"), { + dataSource: [2, 3, 5], + type: "pie", + tooltip: { + visible: true, + font: { + size: "12px", + } + }, + size: { height: "40", width: "40" }, + }); + }); +} + +module piesparkline4 { + $(function () { + var sparkpiesample4 = new ej.Sparkline($("#pie4"), { + dataSource: [10, 12, 11], + type: "pie", + tooltip: { + visible: true, + font: { + size: "12px", + } + }, + size: { height: "40", width: "40" }, + }); + }); +} + + + +module SplitterComponent { + $(function () { + var splitterInstance = new ej.Splitter($("#outterSpliter"), { + height: "250px", + width: "50%", + orientation: ej.Orientation.Vertical, + properties: [{}, { paneSize: 80 }], + isResponsive:true + }); + var splitterInstance1 = new ej.Splitter($("#innerSpliter"), { + isResponsive:true, + }); + }); +} + + + +module SpreadsheetComponent { +$(function () { + var sample = new ej.Spreadsheet($("#basicSpreadsheet"), { + scrollSettings: { + height: 550, + }, + importSettings: { + importMapper: (window).baseurl + "api/Spreadsheet/Import" + }, + exportSettings: { + excelUrl: (window).baseurl + "api/Spreadsheet/ExcelExport", + csvUrl: (window).baseurl + "api/Spreadsheet/CsvExport", + pdfUrl: (window).baseurl + "api/Spreadsheet/PdfExport" + }, + sheets: [{ rangeSettings: [{ dataSource: (window).defaultData, startCell: "A1" }] }], + loadComplete: () => { + var spreadsheet = $("#basicSpreadsheet").data("ejSpreadsheet"), xlFormat = spreadsheet.XLFormat; + if (!(spreadsheet).isImport) { + spreadsheet.setWidthToColumns([140, 128, 105, 100, 100, 110, 120, 120, 100]); + xlFormat.format({ "style": { "font-weight": "bold" } }, "A1:H1"); + xlFormat.format({ "type": "currency" }, "E2:H11"); + spreadsheet.XLRibbon.updateRibbonIcons(); + }} + }); + }); +} + + + +var default_data: Array = [ + { Category : "Employees", Country : "USA", JobDescription : "Sales", JobGroup:"Executive", EmployeesCount : 50 }, + { Category : "Employees", Country : "USA", JobDescription : "Sales", JobGroup : "Analyst", EmployeesCount : 40 }, + { Category : "Employees", Country : "USA", JobDescription : "Marketing", EmployeesCount : 40 }, + { Category : "Employees", Country : "USA", JobDescription : "Technical", JobGroup : "Testers", EmployeesCount : 55 }, + { Category : "Employees", Country : "USA", JobDescription : "Technical", JobGroup : "Developers", JobRole : "Windows", EmployeesCount : 175}, + { Category : "Employees", Country : "USA", JobDescription : "Technical", JobGroup : "Developers", JobRole : "Web", EmployeesCount : 70 }, + { Category : "Employees", Country : "USA", JobDescription : "Management", EmployeesCount : 40 }, + { Category : "Employees", Country : "USA", JobDescription : "Accounts", EmployeesCount : 60 }, + + { Category : "Employees", Country : "India", JobDescription : "Technical", JobGroup : "Testers", EmployeesCount : 43 }, + { Category : "Employees", Country : "India", JobDescription : "Technical", JobGroup : "Developers", JobRole : "Windows", EmployeesCount : 125}, + { Category : "Employees", Country : "India", JobDescription : "Technical", JobGroup : "Developers", JobRole : "Web", EmployeesCount : 60 }, + { Category : "Employees", Country : "India", JobDescription : "HR Executives", EmployeesCount : 70 }, + { Category : "Employees", Country : "India", JobDescription : "Accounts", EmployeesCount : 45 }, + + { Category : "Employees", Country : "Germany", JobDescription : "Sales", JobGroup : "Executive", EmployeesCount : 30 }, + { Category : "Employees", Country : "Germany", JobDescription : "Sales", JobGroup : "Analyst", EmployeesCount : 40 }, + { Category : "Employees", Country : "Germany", JobDescription : "Marketing", EmployeesCount : 50 }, + { Category : "Employees", Country : "Germany", JobDescription : "Technical", JobGroup : "Testers", EmployeesCount : 40 }, + { Category : "Employees", Country : "Germany", JobDescription : "Technical", JobGroup : "Developers", JobRole : "Windows", EmployeesCount : 65 }, + { Category : "Employees", Country : "Germany", JobDescription : "Technical", JobGroup : "Developers", JobRole : "Web", EmployeesCount : 27 }, + { Category : "Employees", Country : "Germany", JobDescription : "Management", EmployeesCount : 33 }, + { Category : "Employees", Country : "Germany", JobDescription : "Accounts", EmployeesCount : 55 }, + + { Category : "Employees", Country : "UK", JobDescription : "Technical", JobGroup : "Testers", EmployeesCount : 45 }, + { Category : "Employees", Country : "UK", JobDescription : "Technical", JobGroup : "Developers", JobRole : "Windows", EmployeesCount : 96 }, + { Category : "Employees", Country : "UK", JobDescription : "Technical", JobGroup : "Developers", JobRole : "Web", EmployeesCount : 55 }, + { Category : "Employees", Country : "UK", JobDescription : "HR Executives", EmployeesCount : 60 }, + { Category : "Employees", Country : "UK", JobDescription: "Accounts", EmployeesCount: 30 }, + + { Category : "Employees", Country : "France", JobDescription : "Technical", JobGroup : "Testers", EmployeesCount : 40 }, + { Category : "Employees", Country : "France", JobDescription : "Technical", JobGroup : "Developers", JobRole : "Windows", EmployeesCount : 65 }, + { Category : "Employees", Country : "France", JobDescription : "Technical", JobGroup : "Developers", JobRole : "Web", EmployeesCount : 27 }, + { Category : "Employees", Country : "France", JobDescription: "Marketing", EmployeesCount: 50 } +]; + +module sunburstcomponent { + $(function () { + var sunburstsample = new ej.SunburstChart($("#Sunburst"), { + valueMemberPath: "EmployeesCount", + levels: [ + {groupMemberPath: "Country"}, + {groupMemberPath: "JobDescription"}, + {groupMemberPath: "JobGroup"}, + {groupMemberPath: "JobRole"} + ], + dataSource: default_data, + dataLabelSettings:{visible:true}, + tooltip:{visible:false}, + enableAnimation:false, + size:{height:"600"}, + innerRadius:0.2, + load: function () { + var sender = $("#Sunburst").data("ejSunburstChart"); + var SunBurstTheme = (window).themeStyle + (window).themeColor + (window).themeVarient; + SunBurstTheme = SunBurstTheme.toString(); + if (SunBurstTheme.indexOf("dark") > -1 || SunBurstTheme.indexOf("contrast") > -1) + SunBurstTheme = "flatdark"; + else + SunBurstTheme = "flatlight"; + sender.model.theme = SunBurstTheme; + }, + title:{text:"Employees Count"}, + zoomSettings:{enable:false}, + legend:{visible:true,position:'top'}, + }); + }); +} + + + +module TabComponent { + $(function () { + var sample = new ej.Tab($("#defaultTab"),{ + width: "500px", + collapsible: true, + events: "click", + heightAdjustMode: ej.Tab.HeightAdjustMode.Content, + showCloseButton: true, + showRoundedCorner: false + }); + }); +} + + + +module TagCloudComponent { + + var websiteCollection = [ + { text: "Google", url: "http://www.google.com", frequency: 12 }, + { text: "All Things Digital", url: "http://allthingsd.com/", frequency: 3 }, + { text: "Arts Technica", url: "http://arstechnica.com/", frequency: 8 }, + { text: "Business Week", url: "http://www.businessweek.com/", frequency: 2 }, + { text: "Yahoo", url: "http://in.yahoo.com/", frequency: 12 }, + { text: "Center Networks", url: "http://www.centernetworks.com/", frequency: 5 }, + { text: "Crave", url: "http://news.cnet.com/crave/", frequency: 8 }, + { text: "Crunch Gear", url: "http://techcrunch.com/gadgets/", frequency: 20 }, + { text: "Daily Tech", url: "http://www.dailytech.com/", frequency: 1 }, + { text: "Electronista", url: "http://www.electronista.com/", frequency: 3 }, + { text: "Engadget", url: "http://www.engadget.com/", frequency: 5 }, + { text: "Gearlog", url: "http://www.gearlog.com/", frequency: 9 }, + { text: "Information Week", url: "http://www.informationweek.com/", frequency: 0 }, + { text: "PCWorld", url: "http://www.pcworld.com/", frequency: 11 }, + { text: "Tech Republic", url: "http://techrepublic.com/", frequency: 3 }, + { text: "Valleywag", url: "http://valleywag.gawker.com/", frequency: 6 }, + { text: "Rediff", url: "http://in.rediff.com/", frequency: 9 }, + { text: "WebProNews", url: "http://www.webpronews.com/", frequency: 2 } + ]; + + $(function () { + var sample = new ej.TagCloud($("#techWebList"), { + titleText: "Tech Sites", + dataSource: websiteCollection, + cssClass: "gradient-lime", + fields: { + text: "text", url: "url", frequency: "frequency" + } + }); + }); +} + + +module EditorComponent { + $(function () { + var num = new ej.NumericTextbox($("#numeric"), { + value: 30, + minValue: 1, + maxValue: 100, + name: "numeric", + width: "100%" + }); + var per = new ej.PercentageTextbox($("#percent"), { + value: 60, + minValue: 10, + maxValue: 1000, + name: "percent", + width: "100%" + }); + var cur = new ej.CurrencyTextbox($("#currency"), { + value: 100, + minValue: 10, + maxValue: 1000, + name: "currency", + width: "100%" + }); + var mask = new ej.MaskEdit($("#maskedit"), { + name: "mask", + value: "4242422424", + maskFormat: "99 999-99999", + width: "100%" + }) + }); +} + + +module TileViewComponent { + $(function () { + var tile1 = new ej.Tile($("#tile1"), { + imagePosition:"fill", + caption:{text:"People"}, + tileSize:"medium", + imageUrl:'content/images/tile/windows/people_1.png' + }); + var tile2 = new ej.Tile($("#tile2"), { + imagePosition:"center", + tileSize:"small", + imageUrl:'content/images/tile/windows/alerts.png', + }); + var tile3 = new ej.Tile($("#tile3"), { + imagePosition:"center", + tileSize:"small", + imageUrl:'content/images/tile/windows/bing.png', + }); + var tile4 = new ej.Tile($("#tile4"), { + tileSize:"small", + imageUrl:'content/images/tile/windows/camera.png', + }); + var tile5 = new ej.Tile($("#tile5"), { + imagePosition:"center", + tileSize:"small", + imageUrl:'content/images/tile/windows/messages.png', + }); + var tile6 = new ej.Tile($("#tile6"), { + imagePosition:"center", + tileSize:"medium", + imageUrl:'content/images/tile/windows/games.png', + caption:{text:"Play"} + }); + var tile7 = new ej.Tile($("#tile7"), { + tileSize:"medium", + imageUrl:'content/images/tile/windows/map.png', + caption:{text:"Maps"} + }); + var tile8 = new ej.Tile($("#tile8"), { + imagePosition:"fill", + tileSize:"wide", + imageUrl:'content/images/tile/windows/sports.png', + caption:{text:"Sports"} + }); + var tile9 = new ej.Tile($("#tile9"), { + imagePosition:"fill", + tileSize:"medium", + imageUrl:'content/images/tile/windows/people_2.png', + caption:{text:"People"} + }); + var tile10 = new ej.Tile($("#tile10"), { + imagePosition:"center", + tileSize:"medium", + imageUrl:'content/images/tile/windows/pictures.png', + caption:{text:"Photo"} + }); + var tile11 = new ej.Tile($("#tile11"), { + imagePosition:"center", + tileSize:"wide", + imageUrl:'content/images/tile/windows/weather.png', + caption:{text:"Weather"} + }); + var tile12 = new ej.Tile($("#tile12"), { + imagePosition:"center", + tileSize:"medium", + imageUrl:'content/images/tile/windows/music.png', + caption:{text:"Music"} + }); + var tile13 = new ej.Tile($("#tile13"), { + imagePosition:"center", + tileSize:"medium", + imageUrl:'content/images/tile/windows/favs.png', + caption:{text:"Favorites"} + }); + }); +} + + + +module TimePickerComponent { + $(function () { + var timeSample = new ej.TimePicker($("#timepick"), { + width: "100%" + }); + }); +} + + + + +module ToolbarComponent { + $(function () { + var sample = new ej.Toolbar($("#editingToolbar"),{ + width: "100%", + cssClass: "gradient-lime", + enableSeparator: true, + isResponsive: true, + orientation: ej.Orientation.Horizontal, + showRoundedCorner: true + }); + }); +} + + + +module TooltipComponent { + $(function () { + + var sample1 = new ej.Tooltip($("#link1"),{ + content: "ECMAScript (or ES) is a trademarked scripting-language specification standardized by Ecma International in ECMA-262 and ISO/IEC 16262.", + associate: "mousefollow", + autoCloseTimeout: 5000, + collision: "fit", + containment: ".frame", + showRoundedCorner: true, + showShadow: true + }); + + var sample2 = new ej.Tooltip($("#link2"),{ + content: "The World Wide Web (WWW) is an information space where documents and other web resources are identified by URLs, interlinked by hypertext links, and can be accessed via the Internet.", + position: { + stem: { + horizontal: "right", + vertical: "center" + }, + target: { + horizontal: "left", + vertical: "center" + } + }, + autoCloseTimeout: 5000, + collision: "fit", + containment: ".frame", + showRoundedCorner: true, + showShadow: true + }); + + var sample3 = new ej.Tooltip($("#link3"),{ + content: 'Object-oriented programming (OOP) is a programming language model organized around objects rather than "actions" and data rather than logic.', + position: { + stem: { + horizontal: "right", + vertical: "center" + }, + target: { + horizontal: "left", + vertical: "center", + }, + }, + associate: "mousefollow", + autoCloseTimeout: 5000, + collision: "fit", + containment: ".frame", + showRoundedCorner: true, + showShadow: true + }); + }); +} + + + +module TreeGridComponent { + $(function () { + var treegridInstance = new ej.TreeGrid($("#TreeGridContainer"), { + dataSource: (window).treeGridData, + childMapping: "subtasks", + allowSorting: true, + allowMultiSorting: true, + enableAltRow: true, + allowFiltering: true, + treeColumnIndex: 1, + allowKeyboardNavigation: true, + showColumnChooser: true, + showColumnOptions: true, + contextMenuSettings: { + showContextMenu: true, + contextMenuItems: ["add", "edit", "delete"] + }, + columnDialogFields: ["field", "headerText", "editType", "width", "visible", "allowSorting", "textAlign", "headerTextAlign"], + editSettings: { + allowAdding: true, + allowEditing: true, + allowDeleting: true, + editMode: "cellEditing", + rowPosition: "belowSelectedRow" + }, + toolbarSettings: { + showToolbar: true, + toolbarItems: ["add","edit","delete","update","cancel","expandAll","collapseAll"] + }, + columns: [ + { field: "taskID", headerText: "Task Id", allowFiltering: false, editType: "numericedit", filterEditType: "numericedit" }, + { field: "taskName", headerText: "Task Name", editType: "stringedit", filterEditType: "stringedit" }, + { field: "startDate", headerText: "Start Date", editType: "datepicker", filterEditType: "datepicker", format:"{0:MM/dd/yyyy}" }, + { field: "endDate", headerText: "End Date", editType: "datepicker", filterEditType: "datepicker", format:"{0:MM/dd/yyyy}" }, + { field: "progress", headerText: "Progress", editType: "numericedit", filterEditType: "numericedit" } + ], + isResponsive: true, + }); +}); +} + + + +var population_data: Array = [ + { Continent: "Asia", Country: "Indonesia", Growth: 3, Population: 237641326 }, + { Continent: "Asia", Country: "Russia", Growth: 2, Population: 152518015 }, + { Continent: "Asia", Country: "Malaysia", Growth: 1, Population: 29672000 }, + { Continent: "North America", Country: "United States", Growth: 4, Population: 315645000 }, + { Continent: "North America", Country: "Mexico", Growth: 2, Population: 112336538 }, + { Continent: "North America", Country: "Canada", Growth: 1, Population: 39056064 }, + { Continent: "South America", Country: "Colombia", Growth: 1, Population: 47000000 }, + { Continent: "South America", Country: "Brazil", Growth: 3, Population: 193946886 }, + { Continent: "Africa", Country: "Nigeria", Growth: 2, Population: 170901000 }, + { Continent: "Africa", Country: "Egypt", Growth: 1, Population: 83661000 }, + { Continent: "Europe", Country: "Germany", Growth: 1, Population: 81993000 }, + { Continent: "Europe", Country: "France", Growth: 1, Population: 65605000 }, + { Continent: "Europe", Country: "UK", Growth: 1, Population: 63181775 } +]; + +module treemapcomponent { + $(function () { + var treemapsample = new ej.datavisualization.TreeMap($("#treemap"), { + leafItemSettings: { showLabels: true, labelPath: "Country" }, + rangeColorMapping: [ + { color: "#77D8D8", legendLabel: "1% Growth", from: 0, to: 1 }, + { color: "#AED960", from: 0, legendLabel: "2% Growth", to: 2 }, + { color: "#FFAF51", from: 0, legendLabel: "3% Growth", to: 3 }, + { color: "#F3D240", from: 0, legendLabel: "4% Growth", to: 4 } + ], + levels: [ + { groupPath: "Continent", groupGap: 5, headerHeight: 25, showHeader: true, headerTemplate: 'headertemplate' } + ], + dataSource: population_data, + colorValuePath: "Growth", + weightValuePath: "Population", + borderThickness: 0, + showLegend: true + }); + }); +} + + + +module TreeViewComponent { + $(function () { + var tree = new ej.TreeView($("#treeView"), { + allowEditing: true, + allowDragAndDrop: true, + allowDropChild: true, + allowDropSibling: true, + }); + }); +} + + + + +module UploadboxComponent { + + $(function () { + var sample = new ej.Uploadbox($("#UploadDefault"),{ + saveUrl: (window).baseurl + "api/uploadbox/Save", + removeUrl: (window).baseurl + "api/uploadbox/Remove", + buttonText: { + browse: "Choose File", upload: "Upload", cancel: "Cancel" + }, + cssClass: "gradient- purple", + dialogAction: { + modal: false, closeOnComplete: false, drag: true + }, + extensionsAllow: ".zip", + multipleFilesSelection: true, + showFileDetails: true + }); + }); + +} + + + +module WaitingPopupComponent { + $(function () { + var sample = new ej.WaitingPopup($("#target"),{ + showOnInit: true, + showImage: true, + text: 'waiting…', + target: "#target", + appendTo: "#waiting" + }); + }); + +} diff --git a/types/ej.web.all/index.d.ts b/types/ej.web.all/index.d.ts index 77332f6a6d..7584d0ba4c 100644 --- a/types/ej.web.all/index.d.ts +++ b/types/ej.web.all/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for ej.web.all 16.1 +// Type definitions for ej.web.all 16.2 // Project: http://help.syncfusion.com/js/typescript // Definitions by: Syncfusion // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -8,7 +8,7 @@ /*! * filename: ej.web.all.d.ts -* version : 16.1.0.37 +* version : 16.2.0.41 * Copyright Syncfusion Inc. 2001 - 2018. All rights reserved. * Use of this code is subject to the terms of our license. * A copy of the current license can be obtained at any time by e-mailing @@ -23226,10 +23226,9 @@ declare namespace ej { getCurrentViewData(): any[]; /** Get the data of given row index in grid. - * @param {number} Pass the index of the row to get the corresponding data * @returns {any} */ - getDataByIndex(rowIndex: number): any; + getDataByIndex(): any; /** Get the column field name from the given header text in grid. * @param {string} Pass header text of the column to get its corresponding field name @@ -24810,6 +24809,10 @@ declare namespace ej { */ isShiftKeyPressed?: boolean; + /** Returns the cancel option value. + */ + cancel?: boolean; + /** Returns the grid model. */ model?: any; @@ -30849,6 +30852,10 @@ declare namespace ej { */ beforeServiceInvoke?(e: BeforeServiceInvokeEventArgs): void; + /** Triggers before rendering multiple series with multiple axes. + */ + beforeSeriesRender?(e: BeforeSeriesRenderEventArgs): void; + /** Triggers when performing drill up/down operation in the pivot chart control. */ drillSuccess?(e: DrillSuccessEventArgs): void; @@ -30915,6 +30922,13 @@ declare namespace ej { element?: any; } + export interface BeforeSeriesRenderEventArgs { + + /** series - Instance of the series which is about to get rendered + */ + data?: any; + } + export interface DrillSuccessEventArgs { /** returns the current instance of PivotChart. @@ -33114,10 +33128,6 @@ declare namespace ej { */ load?(e: LoadEventArgs): void; - /** Triggers before populating the pivot engine from datasource. - */ - beforePivotEnginePopulate?(e: BeforePivotEnginePopulateEventArgs): void; - /** Triggers when drill up/down happens in PivotTreeMap control. And it returns the outer HTML of PivotTreeMap control. */ drillSuccess?(e: DrillSuccessEventArgs): void; @@ -33180,13 +33190,6 @@ declare namespace ej { element?: any; } - export interface BeforePivotEnginePopulateEventArgs { - - /** returns the current instance of PivotTreeMap control. - */ - treeMapObject?: any; - } - export interface DrillSuccessEventArgs { /** return the HTML element of PivotTreeMap control. @@ -35392,6 +35395,11 @@ declare namespace ej { */ clearFilter(): void; + /** To clear the sorted columns in Gantt. + * @returns {void} + */ + clearSorting(): void; + /** To collapse all the parent items in Gantt * @returns {void} */ @@ -35450,6 +35458,16 @@ declare namespace ej { */ filterContent(ejPredicate: Gantt.EjPredicate): void; + /** To get available column collection in Gantt. + * @returns {void} + */ + getColumns(): void; + + /** To get the column collection which are used to edit the task by using task add/edit dialog in resource view. + * @returns {void} + */ + getResourceViewEditColumns(): void; + /** To hide the column by using header text * @param {string} you can pass a header text of a column to hide * @returns {void} @@ -35500,6 +35518,12 @@ declare namespace ej { */ selectMultipleRows(rowIndexes: any[]): void; + /** Method to set scroll top value for Gantt control. + * @param {number} Pass a value to set top position of vertical scroll bar. + * @returns {void} + */ + setScrollTop(Top: number): void; + /** Positions the splitter by the specified column index. * @param {number} Set the splitter position based on column index. * @returns {void} @@ -35553,6 +35577,13 @@ declare namespace ej { */ updateRecordByIndex(index: number, data: any): void; + /** To update the schedule start date and schedule end date of project. + * @param {string} New schedule start date of project + * @param {string} New schedule end date of project + * @returns {void} + */ + updateScheduleDates(startDate: string, endDate: string): void; + /** To change an existing Gantt ID by new ID value dynamically * @param {number} you can pass an existing ID value to be change * @param {number} you can pass a new ID value to be change @@ -37237,7 +37268,7 @@ declare namespace ej { /** Specifies the list of toolbar items to be rendered in Gantt toolbar * @Default {[]} */ - toolbarItems?: any[]; + toolbarItems?: Array; /** Allows the user to insert custom toolbar items. */ @@ -37386,6 +37417,49 @@ declare namespace ej { } + enum ToolbarItems { + + ///Enables the add icon in toolbar + Add, + + ///Enables the edit icon in toolbar + Edit, + + ///Enables the edit icon in toolbar + Delete, + + ///Enables the update icon in toolbar + Update, + + ///Enables the cancel icon in toolbar + Cancel, + + ///Enables the search icon in toolbar + Search, + + ///Enables the indent icon in toolbar + Indent, + + ///Enables the outdent icon in toolbar + Outdent, + + ///Enables the expand all icon in toolbar + ExpandAll, + + ///Enables the collapse all icon in toolbar + CollapseAll, + + ///Enables the previous time span icon in toolbar + PrevTimeSpan, + + ///Enables the next time span icon in toolbar + NextTimeSpan, + + ///Enables the excel export toolbar icon + ExcelExport + } + + enum ViewType { ///Displays the project in task view in Gantt. @@ -38083,173 +38157,56 @@ declare namespace ej { */ addRow(data: any, rowPosition: string): void; + /** Clears the filter applied to a specific column. + * @param {string} Pass the column field name to clear filtering done in that column. + * @returns {void} + */ + clearFilter(fieldName: string): void; + /** To clear all the selection in TreeGrid * @param {number} you can pass a row index to clear the row selection. * @returns {void} */ clearSelection(index: number): void; - /** To select cell based on the cell and row index dynamically. - * @param {any[]} array of cell indexes to be select - * @param {boolean} Defines that we need to preserve the previously selected cells or not + /** To clear the sorting from sorted columns in TreeGrid. * @returns {void} */ - selectCells(Indexes: any[], preservePreviousSelectedCell: boolean): void; - - /** To rename a column with the specified name - * @param {number} Index of the column to be renamed - * @param {string} Header text of the column - * @returns {void} - */ - renameColumn(columnIndex: number, name: string): void; - - /** To delete the specified column - * @param {number} Index of the column to be deleted - * @returns {void} - */ - deleteColumn(columnIndex: number): void; + clearSorting(): void; /** To collapse all the parent items in tree grid * @returns {void} */ collapseAll(): void; - /** To hide the column by using header text - * @param {string} you can pass a header text of a column to hide. - * @returns {void} - */ - hideColumn(headerText: string): void; - - /** Expands the records at specific hierarchical level - * @param {number} you can pass the level as index number to expand - * @returns {void} - */ - expandAtLevel(index: number): void; - /** Collapses the records at specific hierarchical level * @param {number} you can pass the particular level as index. * @returns {void} */ collapseAtLevel(index: number): void; - /** To refresh the changes in tree grid - * @param {any[]} Pass which data source you want to show in tree grid - * @param {any} Pass which data you want to show in tree grid + /** To change the index of the tree column in TreeGrid. + * @param {number} Pass the column index to make the column as treeColumnIndex. * @returns {void} */ - refresh(dataSource: any[], query: any): void; + columnIndex(Index: number): void; - /** Freeze all the columns preceding to the column specified by the field name. - * @param {string} Freeze all Columns before this field column. + /** To delete the specified column + * @param {number} Index of the column to be deleted * @returns {void} */ - freezePrecedingColumns(field: string): void; + deleteColumn(columnIndex: number): void; - /** Freeze/unfreeze the specified column. - * @param {string} Freeze/Unfreeze this field column. - * @param {boolean} Decides to Freeze/Unfreeze this field column. + /** To expand all the root level nodes in TreeGrid. * @returns {void} */ - freezeColumn(field: string, isFrozen: boolean): void; + expandAll(): void; - /** To save the edited cell in TreeGrid + /** Expands the records at specific hierarchical level + * @param {number} you can pass the level as index number to expand * @returns {void} */ - saveCell(): void; - - /** To show the column by using header text - * @param {string} you can pass a header text of a column to show. - * @returns {void} - */ - showColumn(headerText: string): void; - - /** To sorting the data based on the particular fields - * @param {string} you can pass a name of column to sort. - * @param {string} you can pass a sort direction to sort the column. - * @returns {void} - */ - sortColumn(fieldName: string, columnSortDirection: string): void; - - /** To move the TreeGrid rows programmatically with from index ,to index and position. - * @param {number} you can pass drag Index of the row - * @param {number} you can pass target Index of the row. - * @param {string} you can pass the drop position as above,below,child - * @returns {void} - */ - moveRow(fromIndex: number, toIndex: number, position: string): void; - - /** To reorder the column with field name and target index values - * @param {string} you can pass a name of column to reorder. - * @param {string} you can pass a target column index to be inserted. - * @returns {void} - */ - reorderColumn(fieldName: string, targetIndex: string): void; - - /** To get the updated data source of TreeGrid. - * @returns {any[]} - */ - getUpdatedRecords(): any[]; - - /** Sends request to navigate to a specific page in TreeGrid. - * @param {number} Pass the page index to perform paging at specified page index. - * @returns {void} - */ - gotoPage(PageIndex: number): void; - - /** To change the checkbox selection to any column. - * @param {string} Pass the column field name to check box selection to that column. - * @returns {void} - */ - updateCheckboxColumn(fieldName: string): void; - - /** Gets the selected cell(s) element details in TreeGrid. - * @returns {any[]} - */ - getSelectedCells(): any[]; - - /** Sets the minimum responsive width for TreeGrid. - * @param {string} Pass the minimum responsive width, above which the TreeGrid needs to work in responsive mode. - * @returns {void} - */ - updateResponsiveMinWidth(width: string): void; - - /** To open the dialog to add new record/row in TreeGrid. - * @returns {void} - */ - showAddDialog(): void; - - /** To open the dialog to edit a row/record in TreeGrid. - * @param {number} Pass the index of row to be edit. - * @returns {void} - */ - showEditDialog(Index: number): void; - - /** Sets the scroll left and scroll top offsets of TreeGrid. - * @param {string} Pass a value to set left position of horizontal scroll bar. - * @param {string} Pass a value to set top position of vertical scroll bar. - * @returns {void} - */ - scrollOffset(Left: string, Top: string): void; - - /** Gets the scroll top offset of TreeGrid. - * @returns {number} - */ - getScrollTopOffset(): number; - - /** Gets the scroll left offset of TreeGrid. - * @returns {number} - */ - getScrollLeftOffset(): number; - - /** Sets the scroll top offset of TreeGrid to 0. - * @returns {void} - */ - scrollToTop(): void; - - /** Sets the scroll top offset of TreeGrid to maximum value. - * @returns {void} - */ - scrollToBottom(): void; + expandAtLevel(index: number): void; /** To expand and collapse an item in TreeGrid using item’s index. * @param {number} Pass the row index of row to expand/collapse. @@ -38257,16 +38214,11 @@ declare namespace ej { */ expandCollapseRow(Index: number): void; - /** To expand all the root level nodes in TreeGrid. + /** To expand collapse the total summary row. + * @param {boolean} Decides to expand/collapse the total summary * @returns {void} */ - expandAll(): void; - - /** Show/Hide the detail row of a specific record. - * @param {number} Pass the row index of record to show/hide the detail row. - * @returns {void} - */ - showHideDetailsRow(rowIndex: number): void; + expandCollapseTotalSummary(expanded: boolean): void; /** Sends filtering request to filter a column in TreeGrid. * @param {string} Pass the field name of the column. @@ -38286,16 +38238,30 @@ declare namespace ej { */ filterContent(ejPredicate: TreeGrid.EjPredicate): void; - /** To change the index of the tree column in TreeGrid. - * @param {number} Pass the column index to make the column as treeColumnIndex. + /** Freeze/unfreeze the specified column. + * @param {string} Freeze/Unfreeze this field column. + * @param {boolean} Decides to Freeze/Unfreeze this field column. * @returns {void} */ - columnIndex(Index: number): void; + freezeColumn(field: string, isFrozen: boolean): void; - /** To clear the sorting from sorted columns in TreeGrid. + /** Freeze all the columns preceding to the column specified by the field name. + * @param {string} Freeze all Columns before this field column. * @returns {void} */ - clearSorting(): void; + freezePrecedingColumns(field: string): void; + + /** Gets the column object of specific column. + * @param {string} Pass the column field name to get details of that column. + * @returns {any} + */ + getColumnByField(fieldName: string): any; + + /** Gets the column object of specific column. + * @param {string} Pass the column header text to get details of that column. + * @returns {any} + */ + getColumnByHeaderText(headerText: string): any; /** Gets the column index of specific column with data source field. * @param {string} Pass the column field name to get its index. @@ -38309,23 +38275,144 @@ declare namespace ej { */ getFieldNameByHeaderText(headerText: string): string; - /** Gets the column object of specific column. - * @param {string} Pass the column header text to get details of that column. - * @returns {any} + /** Gets the scroll left offset of TreeGrid. + * @returns {number} */ - getColumnByHeaderText(headerText: string): any; + getScrollLeftOffset(): number; - /** Clears the filter applied to a specific column. - * @param {string} Pass the column field name to clear filtering done in that column. + /** Gets the scroll top offset of TreeGrid. + * @returns {number} + */ + getScrollTopOffset(): number; + + /** Gets the selected cell(s) element details in TreeGrid. + * @returns {any[]} + */ + getSelectedCells(): any[]; + + /** To get the updated data source of TreeGrid. + * @returns {any[]} + */ + getUpdatedRecords(): any[]; + + /** Sends request to navigate to a specific page in TreeGrid. + * @param {number} Pass the page index to perform paging at specified page index. * @returns {void} */ - clearFilter(fieldName: string): void; + gotoPage(PageIndex: number): void; - /** Gets the column object of specific column. - * @param {string} Pass the column field name to get details of that column. - * @returns {any} + /** To hide the column by using header text + * @param {string} you can pass a header text of a column to hide. + * @returns {void} */ - getColumnByField(fieldName: string): any; + hideColumn(headerText: string): void; + + /** To move the TreeGrid rows programmatically with from index ,to index and position. + * @param {number} you can pass drag Index of the row + * @param {number} you can pass target Index of the row. + * @param {string} you can pass the drop position as above,below,child + * @returns {void} + */ + moveRow(fromIndex: number, toIndex: number, position: string): void; + + /** To refresh the changes in tree grid + * @param {any[]} Pass which data source you want to show in tree grid + * @param {any} Pass which data you want to show in tree grid + * @returns {void} + */ + refresh(dataSource: any[], query: any): void; + + /** To rename a column with the specified name + * @param {number} Index of the column to be renamed + * @param {string} Header text of the column + * @returns {void} + */ + renameColumn(columnIndex: number, name: string): void; + + /** To reorder the column with field name and target index values + * @param {string} you can pass a name of column to reorder. + * @param {string} you can pass a target column index to be inserted. + * @returns {void} + */ + reorderColumn(fieldName: string, targetIndex: string): void; + + /** To save the edited cell in TreeGrid + * @returns {void} + */ + saveCell(): void; + + /** Sets the scroll left and scroll top offsets of TreeGrid. + * @param {string} Pass a value to set left position of horizontal scroll bar. + * @param {string} Pass a value to set top position of vertical scroll bar. + * @returns {void} + */ + scrollOffset(Left: string, Top: string): void; + + /** Sets the scroll top offset of TreeGrid to maximum value. + * @returns {void} + */ + scrollToBottom(): void; + + /** Sets the scroll top offset of TreeGrid to 0. + * @returns {void} + */ + scrollToTop(): void; + + /** To select cell based on the cell and row index dynamically. + * @param {any[]} array of cell indexes to be select + * @param {boolean} Defines that we need to preserve the previously selected cells or not + * @returns {void} + */ + selectCells(Indexes: any[], preservePreviousSelectedCell: boolean): void; + + /** To open the dialog to add new record/row in TreeGrid. + * @returns {void} + */ + showAddDialog(): void; + + /** To show the column by using header text + * @param {string} you can pass a header text of a column to show. + * @returns {void} + */ + showColumn(headerText: string): void; + + /** To open the dialog to edit a row/record in TreeGrid. + * @param {number} Pass the index of row to be edit. + * @returns {void} + */ + showEditDialog(Index: number): void; + + /** Show/Hide the detail row of a specific record. + * @param {number} Pass the row index of record to show/hide the detail row. + * @returns {void} + */ + showHideDetailsRow(rowIndex: number): void; + + /** To sorting the data based on the particular fields + * @param {string} you can pass a name of column to sort. + * @param {string} you can pass a sort direction to sort the column. + * @returns {void} + */ + sortColumn(fieldName: string, columnSortDirection: string): void; + + /** To change the checkbox selection to any column. + * @param {string} Pass the column field name to check box selection to that column. + * @returns {void} + */ + updateCheckboxColumn(fieldName: string): void; + + /** To update the value of TreeGrid row by using row index. + * @param {number} index of record to be updated + * @param {any} object with modified field value + * @returns {void} + */ + updateRecordByIndex(index: number, data: any): void; + + /** Sets the minimum responsive width for TreeGrid. + * @param {string} Pass the minimum responsive width, above which the TreeGrid needs to work in responsive mode. + * @returns {void} + */ + updateResponsiveMinWidth(width: string): void; } export namespace TreeGrid { @@ -38350,16 +38437,16 @@ declare namespace ej { export interface Model { - /** Enables or disables the ability to resize the column width interactively. - * @Default {false} - */ - allowColumnResize?: boolean; - /** Enables or disables the option for column reordering * @Default {false} */ allowColumnReordering?: boolean; + /** Enables or disables the ability to resize the column width interactively. + * @Default {false} + */ + allowColumnResize?: boolean; + /** Enables or disables the ability to drag and drop the row interactively to reorder the rows. * @Default {false} */ @@ -38381,6 +38468,16 @@ declare namespace ej { */ allowMultiSorting?: boolean; + /** Enables/disables pagination of rows in TreeGrid + * @Default {false} + */ + allowPaging?: boolean; + + /** Enables or disables the toolbar searching in TreeGrid. + * @Default {false} + */ + allowSearching?: boolean; + /** Enables or disables the ability to select a row interactively. * @Default {true} */ @@ -38391,16 +38488,6 @@ declare namespace ej { */ allowSorting?: boolean; - /** Enables or disables the toolbar searching in TreeGrid. - * @Default {false} - */ - allowSearching?: boolean; - - /** Enables/disables pagination of rows in TreeGrid - * @Default {false} - */ - allowPaging?: boolean; - /** Gets or sets a value that indicates whether the Content will wrap to the next line if the content exceeds the boundary of the Column Cells. * @Default {false} */ @@ -38410,23 +38497,38 @@ declare namespace ej { */ altRowTemplateID?: string; - /** Specifies the mapping property path for the expand status of a record in data source. + /** Specifies the template for cell tooltip + * @Default {null} */ - expandStateMapping?: string; + cellTooltipTemplate?: string; /** Specifies the mapping property path for sub tasks in datasource */ childMapping?: string; - /** Option for adding columns; each column has the option to bind to a field in the dataSource. + /** Enables or disables the expandable/collapsible footer summary row. By default expander icon for footer summary will be rendered in first column of first summary row. + * @Default {false} */ - columns?: Column[]; + collapsibleTotalSummary?: boolean; /** To Specify the column fields to be displayed in the dialog while inserting a column using column menu. * @Default {[]} */ columnDialogFields?: any[]; + /** Specifies the settings for column resize + */ + columnResizeSettings?: ColumnResizeSettings; + + /** Option for adding columns; each column has the option to bind to a field in the dataSource. + */ + columns?: Column[]; + + /** Defines the common width for all the columns in TreeGrid + * @Default {150} + */ + commonWidth?: number; + /** Options for displaying and customizing context menu items. */ contextMenuSettings?: ContextMenuSettings; @@ -38440,10 +38542,14 @@ declare namespace ej { */ dataSource?: any[]; - /** Specifies whether to wrap the header text when it is overflown i.e., when it exceeds the header width. - * @Default {ej.TreeGrid.HeaderTextOverflow.None} + /** Specifies the template for details view */ - headerTextOverflow?: ej.TreeGrid.HeaderTextOverflow|string; + detailsTemplate?: string; + + /** Specifies the row height of the details view + * @Default {100} + */ + detailsRowHeight?: number; /** Options for displaying and customizing the tooltip. This tooltip will show the preview of the row that is being dragged. */ @@ -38463,6 +38569,11 @@ declare namespace ej { */ enableCollapseAll?: boolean; + /** Gets or sets a value that indicates whether to enable load on demand approach, for rendering child records and page records. + * @Default {false} + */ + enableLoadOnDemand?: boolean; + /** Specifies whether to resize TreeGrid whenever window size changes. * @Default {false} */ @@ -38473,33 +38584,18 @@ declare namespace ej { */ enableVirtualization?: boolean; - /** Gets or sets a value that indicates whether to enable load on demand approach, for rendering child records and page records. - * @Default {false} + /** Specifies the mapping property path for the expand status of a record in data source. */ - enableLoadOnDemand?: boolean; - - /** Specifies the settings for column resize - */ - columnResizeSettings?: ColumnResizeSettings; - - /** Defines the common width for all the columns in TreeGrid - * @Default {150} - */ - commonWidth?: number; + expandStateMapping?: string; /** Options for filtering and customizing filter actions. */ filterSettings?: FilterSettings; - /** Specifies the localization information to customize the User Interface (UI) to support regional language and culture - * @Default {en-US} + /** Specifies whether to wrap the header text when it is overflown i.e., when it exceeds the header width. + * @Default {ej.TreeGrid.HeaderTextOverflow.None} */ - locale?: string; - - /** Enables or disables internal parsing of a row. When disabled this property, row will be displayed using the defined template without any internal event bindings. - * @Default {true} - */ - parseRowTemplate?: boolean; + headerTextOverflow?: ej.TreeGrid.HeaderTextOverflow|string; /** Specifies the name of the field in the dataSource, which contains the id of that row. */ @@ -38510,19 +38606,24 @@ declare namespace ej { */ isResponsive?: boolean; - /** Specifies the name of the field in the dataSource, which contains the parent's id. This is necessary to form a parent-child hierarchy, if the dataSource contains self-referential - * data. + /** Specifies the localization information to customize the User Interface (UI) to support regional language and culture + * @Default {en-US} */ - parentIdMapping?: string; + locale?: string; /** Specifies the options for customizing the pager. */ pageSettings?: PageSettings; - /** Specifies the template for cell tooltip - * @Default {null} + /** Specifies the name of the field in the dataSource, which contains the parent's id. This is necessary to form a parent-child hierarchy, if the dataSource contains self-referential + * data. */ - cellTooltipTemplate?: string; + parentIdMapping?: string; + + /** Enables or disables internal parsing of a row. When disabled this property, row will be displayed using the defined template without any internal event bindings. + * @Default {true} + */ + parseRowTemplate?: boolean; /** Specifies ej.Query to select data from the dataSource. This property is applicable only when the dataSource is ej.DataManager. * @Default {null} @@ -38538,30 +38639,34 @@ declare namespace ej { */ rowTemplateID?: string; - /** Specifies the index of the selected row. - * @Default {-1} + /** Specifies the toolbar searching customizations. */ - selectedRowIndex?: number; + searchSettings?: SearchSettings; /** Specifies the selected cell information on rendering TreeGrid. */ selectedCellIndexes?: SelectedCellIndex[]; + /** Specifies the index of the selected row. + * @Default {-1} + */ + selectedRowIndex?: number; + /** Specifies the settings for row and cell selection. */ selectionSettings?: SelectionSettings; - /** Enables/disables the options for inserting , deleting and renaming columns. - * @Default {false} - */ - showColumnOptions?: boolean; - /** Controls the visibility of the menu button, which is displayed on the column header. Clicking on this button will show a popup menu. When you choose Columns item from this popup, * a list box with column names will be shown, from which you can select/deselect a column name to control the visibility of the respective columns. * @Default {false} */ showColumnChooser?: boolean; + /** Enables/disables the options for inserting , deleting and renaming columns. + * @Default {false} + */ + showColumnOptions?: boolean; + /** Specifies the visibility of details view * @Default {false} */ @@ -38572,29 +38677,21 @@ declare namespace ej { */ showDetailsRowInfoColumn?: boolean; - /** Specifies the template for details view + /** Specifies whether to show tooltip when mouse is hovered on the cell. + * @Default {true} */ - detailsTemplate?: string; + showGridCellTooltip?: boolean; - /** Specifies the row height of the details view - * @Default {100} + /** Specifies whether to show tooltip for the cells, which has expander button. + * @Default {true} */ - detailsRowHeight?: number; + showGridExpandCellTooltip?: boolean; /** Gets or sets a value that indicates stacked header should be shown on TreeGrid layout when the property “stackedHeaderRows” is set. * @Default {false} */ showStackedHeader?: boolean; - /** Gets or sets an object that indicates to managing the collection of stacked header rows for the treegrid. - * @Default {[]} - */ - stackedHeaderRows?: StackedHeaderRow[]; - - /** Specifies the toolbar searching customizations. - */ - searchSettings?: SearchSettings; - /** Specifies the visibility of summary row * @Default {false} */ @@ -38605,21 +38702,6 @@ declare namespace ej { */ showTotalSummary?: boolean; - /** Specifies the summary row collection object to be displayed - * @Default {[]} - */ - summaryRows?: SummaryRow[]; - - /** Specifies whether to show tooltip when mouse is hovered on the cell. - * @Default {true} - */ - showGridCellTooltip?: boolean; - - /** Specifies whether to show tooltip for the cells, which has expander button. - * @Default {true} - */ - showGridExpandCellTooltip?: boolean; - /** Options for setting width and height for TreeGrid. */ sizeSettings?: SizeSettings; @@ -38628,10 +38710,25 @@ declare namespace ej { */ sortSettings?: SortSettings; + /** Gets or sets an object that indicates to managing the collection of stacked header rows for the TreeGrid. + * @Default {[]} + */ + stackedHeaderRows?: StackedHeaderRow[]; + + /** Specifies the summary row collection object to be displayed + * @Default {[]} + */ + summaryRows?: SummaryRow[]; + /** Options for displaying and customizing the toolbar items. */ toolbarSettings?: ToolbarSettings; + /** Specifies the height of footer summary container. + * @Default {90} + */ + totalSummaryHeight?: number; + /** Specifies the index of the column that needs to have the expander button. By default, cells in the first column contain the expander button. * @Default {0} */ @@ -38653,6 +38750,14 @@ declare namespace ej { */ beginEdit?(e: BeginEditEventArgs): void; + /** Triggered after selected a cell + */ + cellSelected?(e: CellSelectedEventArgs): void; + + /** Triggered before selecting a cell + */ + cellSelecting?(e: CellSelectingEventArgs): void; + /** Triggered after collapsed the TreeGrid record */ collapsed?(e: CollapsedEventArgs): void; @@ -38661,29 +38766,29 @@ declare namespace ej { */ collapsing?(e: CollapsingEventArgs): void; - /** Triggered when you start to drag a column - */ - columnDragStart?(e: ColumnDragStartEventArgs): void; - /** Triggered while dragging a column */ columnDrag?(e: ColumnDragEventArgs): void; + /** Triggered when you start to drag a column + */ + columnDragStart?(e: ColumnDragStartEventArgs): void; + /** Triggered when a column is dropped */ columnDrop?(e: ColumnDropEventArgs): void; - /** Triggered after a column resized + /** Triggered when a column has been resized */ - columnResized?(e: ColumnResizedEventArgs): void; + columnResizeEnd?(e: ColumnResizeEndEventArgs): void; /** Triggered while start to resize a column */ columnResizeStart?(e: ColumnResizeStartEventArgs): void; - /** Triggered when a column has been resized + /** Triggered after a column resized */ - columnResizeEnd?(e: ColumnResizeEndEventArgs): void; + columnResized?(e: ColumnResizedEventArgs): void; /** Triggered while Context Menu is rendered in TreeGrid control */ @@ -38697,14 +38802,14 @@ declare namespace ej { */ detailsDataBound?(e: DetailsDataBoundEventArgs): void; - /** Triggered when details template pop-up is shown. - */ - detailsShown?(e: DetailsShownEventArgs): void; - /** Triggered when details template pop-up is hidden. */ detailsHidden?(e: DetailsHiddenEventArgs): void; + /** Triggered when details template pop-up is shown. + */ + detailsShown?(e: DetailsShownEventArgs): void; + /** Triggered after saved the modified cellValue in TreeGrid */ endEdit?(e: EndEditEventArgs): void; @@ -38725,6 +38830,14 @@ declare namespace ej { */ queryCellInfo?(e: QueryCellInfoEventArgs): void; + /** Triggered while clicking a row, even when allowSelection property is disabled. + */ + recordClick?(e: RecordClickEventArgs): void; + + /** Triggered during record double click action, even when allowSelection property is disabled. + */ + recordDoubleClick?(e: RecordDoubleClickEventArgs): void; + /** Triggered while rendering each row */ rowDataBound?(e: RowDataBoundEventArgs): void; @@ -38745,14 +38858,6 @@ declare namespace ej { */ rowDropActionBegin?(e: RowDropActionBeginEventArgs): void; - /** Triggered before selecting a cell - */ - cellSelecting?(e: CellSelectingEventArgs): void; - - /** Triggered after selected a cell - */ - cellSelected?(e: CellSelectedEventArgs): void; - /** Triggered after the row is selected. */ rowSelected?(e: RowSelectedEventArgs): void; @@ -38761,14 +38866,6 @@ declare namespace ej { */ rowSelecting?(e: RowSelectingEventArgs): void; - /** Triggered while clicking a row, even when allowSelection property is disabled. - */ - recordClick?(e: RecordClickEventArgs): void; - - /** Triggered during record double click action, even when allowSelection property is disabled. - */ - recordDoubleClick?(e: RecordDoubleClickEventArgs): void; - /** Triggered when toolbar item is clicked in TreeGrid. */ toolbarClick?(e: ToolbarClickEventArgs): void; @@ -38854,7 +38951,7 @@ declare namespace ej { */ cancel?: boolean; - /** Returns the treegrid element which is going to be print + /** Returns the TreeGrid element which is going to be print */ element?: any; @@ -38886,6 +38983,88 @@ declare namespace ej { columnIndex?: number; } + export interface CellSelectedEventArgs { + + /** Returns the cancel option value. + */ + cancel?: boolean; + + /** Returns the cell index on the selection. + */ + cellIndex?: number; + + /** Returns the row index on the selection + */ + rowIndex?: number; + + /** Returns the selecting cell element + */ + targetCell?: any; + + /** Returns the selecting row element + */ + targetRow?: any; + + /** Returns the selecting record object + */ + data?: any; + + /** Returns the Gantt object Model + */ + model?: any; + + /** Returns the previously selected row data + */ + previousData?: any; + + /** Returns the previously selected cell index + */ + previousCellIndex?: any; + + /** Returns the previously selected row index + */ + previousRowIndex?: any; + + /** Returns the previously selected cell element + */ + previousTargetCell?: any; + + /** Returns the previously selected row element + */ + previousTargetRow?: any; + } + + export interface CellSelectingEventArgs { + + /** Returns the cancel option value. + */ + cancel?: boolean; + + /** Returns the cell index on the selection. + */ + cellIndex?: number; + + /** Returns the row index on the selection + */ + rowIndex?: number; + + /** Returns the selecting cell element + */ + targetCell?: any; + + /** Returns the selecting row element + */ + targetRow?: any; + + /** Returns the selecting record object + */ + data?: any; + + /** Returns the Gantt object Model + */ + model?: any; + } + export interface CollapsedEventArgs { /** Returns the cancel option value. @@ -38936,29 +39115,6 @@ declare namespace ej { expanded?: boolean; } - export interface ColumnDragStartEventArgs { - - /** Returns the cancel option value. - */ - cancel?: boolean; - - /** Returns the control model values. - */ - model?: any; - - /** Returns the event Type. - */ - type?: string; - - /** Returns the column data which is dragged - */ - draggedColumn?: any; - - /** Returns the index of the column being dragged - */ - draggedColumnIndex?: number; - } - export interface ColumnDragEventArgs { /** Returns the cancel option value. @@ -38994,6 +39150,29 @@ declare namespace ej { canDrop?: boolean; } + export interface ColumnDragStartEventArgs { + + /** Returns the cancel option value. + */ + cancel?: boolean; + + /** Returns the control model values. + */ + model?: any; + + /** Returns the event Type. + */ + type?: string; + + /** Returns the column data which is dragged + */ + draggedColumn?: any; + + /** Returns the index of the column being dragged + */ + draggedColumnIndex?: number; + } + export interface ColumnDropEventArgs { /** Returns the cancel option value. @@ -39025,68 +39204,6 @@ declare namespace ej { targetColumnIndex?: number; } - export interface ColumnResizedEventArgs { - - /** Returns the cancel option value. - */ - cancel?: boolean; - - /** Returns the control model values. - */ - model?: any; - - /** Returns the event Type. - */ - type?: string; - - /** Returns the column data which is resized - */ - column?: any; - - /** Returns the index of the column being resized. - */ - columnIndex?: number; - - /** Returns resized column width after resized. - */ - newWidth?: number; - - /** Returns resized column width before resizing - */ - oldWidth?: number; - } - - export interface ColumnResizeStartEventArgs { - - /** Returns the cancel option value. - */ - cancel?: boolean; - - /** Returns the control model values. - */ - model?: any; - - /** Returns the event Type. - */ - type?: string; - - /** Returns the column data in which the resizing started - */ - column?: any; - - /** Returns the column index in which the resizing started - */ - columnIndex?: number; - - /** Returns column width before dragging - */ - oldWidth?: number; - - /** Returns initial column element object. - */ - target?: any; - } - export interface ColumnResizeEndEventArgs { /** Returns the cancel option value. @@ -39126,6 +39243,68 @@ declare namespace ej { target?: any; } + export interface ColumnResizeStartEventArgs { + + /** Returns the cancel option value. + */ + cancel?: boolean; + + /** Returns the control model values. + */ + model?: any; + + /** Returns the event Type. + */ + type?: string; + + /** Returns the column data in which the resizing started + */ + column?: any; + + /** Returns the column index in which the resizing started + */ + columnIndex?: number; + + /** Returns column width before dragging + */ + oldWidth?: number; + + /** Returns initial column element object. + */ + target?: any; + } + + export interface ColumnResizedEventArgs { + + /** Returns the cancel option value. + */ + cancel?: boolean; + + /** Returns the control model values. + */ + model?: any; + + /** Returns the event Type. + */ + type?: string; + + /** Returns the column data which is resized + */ + column?: any; + + /** Returns the index of the column being resized. + */ + columnIndex?: number; + + /** Returns resized column width after resized. + */ + newWidth?: number; + + /** Returns resized column width before resizing + */ + oldWidth?: number; + } + export interface ContextMenuOpenEventArgs { /** Returns the cancel option value. @@ -39191,6 +39370,25 @@ declare namespace ej { type?: string; } + export interface DetailsHiddenEventArgs { + + /** Returns the cancel option value. + */ + cancel?: boolean; + + /** Returns the TreeGrid model + */ + model?: any; + + /** Returns the data collection of hidden details Template + */ + rowData?: any; + + /** Returns the name of the event. + */ + type?: string; + } + export interface DetailsShownEventArgs { /** Returns the cancel option value. @@ -39218,25 +39416,6 @@ declare namespace ej { type?: string; } - export interface DetailsHiddenEventArgs { - - /** Returns the cancel option value. - */ - cancel?: boolean; - - /** Returns the TreeGrid model - */ - model?: any; - - /** Returns the data collection of hidden details Template - */ - rowData?: any; - - /** Returns the name of the event. - */ - type?: string; - } - export interface EndEditEventArgs { /** Returns the cancel option value. @@ -39352,6 +39531,68 @@ declare namespace ej { column?: any; } + export interface RecordClickEventArgs { + + /** Returns the cancel option value. + */ + cancel?: boolean; + + /** Returns the element of clicked cell. + */ + cell?: any; + + /** Returns the index of the clicked cell. + */ + cellIndex?: number; + + /** Returns the data of clicked cell. + */ + cellValue?: any; + + /** Returns the element of the clicked row. + */ + row?: any; + + /** Returns the index of the clicked row. + */ + rowIndex?: number; + + /** Returns the column name of the clicked cell. + */ + columnName?: string; + } + + export interface RecordDoubleClickEventArgs { + + /** Returns the cancel option value. + */ + cancel?: boolean; + + /** Returns the element of clicked cell. + */ + cell?: any; + + /** Returns the index of the clicked cell. + */ + cellIndex?: number; + + /** Returns the data of clicked cell. + */ + cellValue?: any; + + /** Returns the element of the clicked row. + */ + row?: any; + + /** Returns the index of the clicked row. + */ + rowIndex?: number; + + /** Returns the column name of the clicked cell. + */ + columnName?: string; + } + export interface RowDataBoundEventArgs { /** Returns the cancel option value. @@ -39511,88 +39752,6 @@ declare namespace ej { type?: string; } - export interface CellSelectingEventArgs { - - /** Returns the cancel option value. - */ - cancel?: boolean; - - /** Returns the cell index on the selection. - */ - cellIndex?: number; - - /** Returns the row index on the selection - */ - rowIndex?: number; - - /** Returns the selecting cell element - */ - targetCell?: any; - - /** Returns the selecting row element - */ - targetRow?: any; - - /** Returns the selecting record object - */ - data?: any; - - /** Returns the Gantt object Model - */ - model?: any; - } - - export interface CellSelectedEventArgs { - - /** Returns the cancel option value. - */ - cancel?: boolean; - - /** Returns the cell index on the selection. - */ - cellIndex?: number; - - /** Returns the row index on the selection - */ - rowIndex?: number; - - /** Returns the selecting cell element - */ - targetCell?: any; - - /** Returns the selecting row element - */ - targetRow?: any; - - /** Returns the selecting record object - */ - data?: any; - - /** Returns the Gantt object Model - */ - model?: any; - - /** Returns the previously selected row data - */ - previousData?: any; - - /** Returns the previously selected cell index - */ - previousCellIndex?: any; - - /** Returns the previously selected row index - */ - previousRowIndex?: any; - - /** Returns the previously selected cell element - */ - previousTargetCell?: any; - - /** Returns the previously selected row element - */ - previousTargetRow?: any; - } - export interface RowSelectedEventArgs { /** Returns the cancel option value. @@ -39647,68 +39806,6 @@ declare namespace ej { previousTreeGridRow?: any; } - export interface RecordClickEventArgs { - - /** Returns the cancel option value. - */ - cancel?: boolean; - - /** Returns the element of clicked cell. - */ - cell?: any; - - /** Returns the index of the clicked cell. - */ - cellIndex?: number; - - /** Returns the data of clicked cell. - */ - cellValue?: any; - - /** Returns the element of the clicked row. - */ - row?: any; - - /** Returns the index of the clicked row. - */ - rowIndex?: number; - - /** Returns the column name of the clicked cell. - */ - columnName?: string; - } - - export interface RecordDoubleClickEventArgs { - - /** Returns the cancel option value. - */ - cancel?: boolean; - - /** Returns the element of clicked cell. - */ - cell?: any; - - /** Returns the index of the clicked cell. - */ - cellIndex?: number; - - /** Returns the data of clicked cell. - */ - cellValue?: any; - - /** Returns the element of the clicked row. - */ - row?: any; - - /** Returns the index of the clicked row. - */ - rowIndex?: number; - - /** Returns the column name of the clicked cell. - */ - columnName?: string; - } - export interface ToolbarClickEventArgs { /** Returns the cancel option value. @@ -39732,6 +39829,14 @@ declare namespace ej { type?: string; } + export interface ColumnResizeSettings { + + /** Specifies the mode for column resizing + * @Default {ej.TreeGrid.ColumnResizeMode.Normal} + */ + columnResizeMode?: ej.TreeGrid.ColumnResizeMode|string; + } + export interface ColumnsCommand { /** Gets or sets an object to customize command button with available ejButton properties. @@ -39745,6 +39850,16 @@ declare namespace ej { export interface Column { + /** Enables/disables cell selection. + * @Default {false} + */ + allowCellSelection?: boolean; + + /** Enables or disables the ability to edit a row or cell. + * @Default {false} + */ + allowEditing?: boolean; + /** Enables or disables the ability to filter the rows based on this column. * @Default {false} */ @@ -39755,15 +39870,38 @@ declare namespace ej { */ allowFilteringBlankContent?: boolean; + /** Enables or disables the ability to freeze/unfreeze the columns + * @Default {false} + */ + allowFreezing?: boolean; + /** Enables or disables the ability to sort the rows based on this column/field. * @Default {false} */ allowSorting?: boolean; - /** Enables/disables cell selection. + /** Specifies the template ID or the template string of the AngularJS script element to enable column template for a column. + */ + angularTemplate?: string; + + /** Sets the clip mode for TreeGrid cell as ellipsis or clipped content(both header and content) + * @Default {ej.TreeGrid.ClipMode.Clip} + */ + clipMode?: ej.TreeGrid.ClipMode|string; + + /** Gets or sets an object to define a command column in TreeGrid. + * @Default {[]} + */ + commands?: ColumnsCommand[]; + + /** Gets or sets a value that indicates to display a column value as checkbox or string * @Default {false} */ - allowCellSelection?: boolean; + displayAsCheckbox?: boolean; + + /** To bind the dropdown data for TreeGrid column mapped with ejDropDownList + */ + dropdownData?: string; /** To customize the ej controls defined in TreeGrid column with their native property. */ @@ -39779,26 +39917,10 @@ declare namespace ej { */ editType?: ej.TreeGrid.EditingType|string; - /** To bind the dropdown data for TreeGrid column mapped with ejDropDownList - */ - dropdownData?: string; - /** Specifies the name of the field from the dataSource to bind with this column. */ field?: string; - /** Specifies the template string of the script element to enable column template for a column. - */ - template?: string; - - /** Specifies the template ID of the script element to enable column template for a column. - */ - templateID?: string; - - /** Specifies the template ID or the template string of the AngularJS script element to enable column template for a column. - */ - angularTemplate?: string; - /** Specifies the type of the editor control to be used to filter the rows. * @Default {ej.TreeGrid.EditingType.String} */ @@ -39809,102 +39931,85 @@ declare namespace ej { */ filterType?: ej.TreeGrid.FilterType|string; - /** Header text of the column. - * @Default {null} - */ - headerText?: string; - - /** Gets or sets a value that indicates to display a column value as checkbox or string - * @Default {false} - */ - displayAsCheckbox?: boolean; - - /** Enables or disables the checkbox visibility in a column for checkbox selection. - * @Default {false} - */ - showCheckbox?: boolean; - - /** Controls the visibility of the column. - * @Default {true} - */ - visible?: boolean; - - /** Gets or sets a value for treegrid column width - */ - width?: number; - - /** Specifies the header template value for the column header - */ - headerTemplateID?: string; - /** Specifies the display format of a column * @Default {null} */ format?: any; - /** Specifies whether the column is a template column - * @Default {false} + /** Specifies the header template value for the column header */ - isTemplateColumn?: boolean; + headerTemplateID?: string; + + /** Header text of the column. + * @Default {null} + */ + headerText?: string; /** Specifies the alignment of the column header text * @Default {ej.TextAlign.Left} */ headerTextAlign?: ej.TextAlign|string; - /** Specifies whether the column is frozen - * @Default {false} - */ - isFrozen?: boolean; - - /** Specifies the text alignment for the column - * @Default {ej.TextAlign.Left} - */ - textAlign?: ej.TextAlign|string; - - /** Enables or disables the ability to edit a row or cell. - * @Default {false} - */ - allowEditing?: boolean; - - /** Gets or sets an object to define a command column in TreeGrid. - * @Default {[]} - */ - commands?: ColumnsCommand[]; - - /** We can include or exclude particular column from column visibility list in column menu. - * @Default {true} - */ - showInColumnChooser?: boolean; - - /** Sets the clip mode for TreeGrid cell as ellipsis or clipped content(both header and content) - * @Default {ej.TreeGrid.ClipMode.Clip} - */ - clipMode?: ej.TreeGrid.ClipMode|string; - - /** Sets the tooltip template for the specific column. - * @Default {null} - */ - tooltip?: string; - /** Sets the tooltip template for the column header * @Default {null} */ headerTooltip?: string; - /** specifies the conditions for saving data to the database while adding or editing the fields. + /** Specifies whether the column is frozen + * @Default {false} */ - validationRules?: any; + isFrozen?: boolean; + + /** Specifies whether the column is a template column + * @Default {false} + */ + isTemplateColumn?: boolean; /** Gets or sets the priority value of the column. It is used to show/hide TreeGrid columns in responsive mode. * @Default {-1} */ priority?: number; - /** Enables or disables the ability to freeze/unfreeze the columns + /** Enables or disables the checkbox visibility in a column for checkbox selection. * @Default {false} */ - allowFreezing?: boolean; + showCheckbox?: boolean; + + /** We can include or exclude particular column from column visibility list in column menu. + * @Default {true} + */ + showInColumnChooser?: boolean; + + /** Specifies the template string of the script element to enable column template for a column. + */ + template?: string; + + /** Specifies the template ID of the script element to enable column template for a column. + */ + templateID?: string; + + /** Specifies the text alignment for the column + * @Default {ej.TextAlign.Left} + */ + textAlign?: ej.TextAlign|string; + + /** Sets the tooltip template for the specific column. + * @Default {null} + */ + tooltip?: string; + + /** specifies the conditions for saving data to the database while adding or editing the fields. + */ + validationRules?: any; + + /** Controls the visibility of the column. + * @Default {true} + */ + visible?: boolean; + + /** Gets or sets a value for TreeGrid column width + */ + width?: number; } export interface ContextMenuSettings { @@ -39912,7 +40017,7 @@ declare namespace ej { /** Option for adding items to context menu. * @Default {[]} */ - contextMenuItems?: any[]; + contextMenuItems?: Array; /** Shows/hides the context menu. * @Default {false} @@ -39960,6 +40065,11 @@ declare namespace ej { */ beginEditAction?: ej.TreeGrid.BeginEditAction|string; + /** Specifies the template ID for the custom dialog. + * @Default {null} + */ + dialogEditorTemplateID?: string; + /** specifies the edit mode in TreeGrid , "cellEditing" is for cell type editing and "rowEditing" is for entire row. * @Default {ej.TreeGrid.EditMode.CellEditing} */ @@ -39970,51 +40080,53 @@ declare namespace ej { */ rowPosition?: ej.TreeGrid.RowPosition|string; - /** Specifies the template ID for the custom dialog. - * @Default {null} - */ - dialogEditorTemplateID?: string; - /** Enable or disable the confirmation dialog while deleting the record. * @Default {false} */ showDeleteConfirmDialog?: boolean; } - export interface ColumnResizeSettings { - - /** Specifies the mode for column resizing - * @Default {ej.TreeGrid.ColumnResizeMode.Normal} - */ - columnResizeMode?: ej.TreeGrid.ColumnResizeMode|string; - } - export interface FilterSettingsFilteredColumn { - /** Specifies the value to be filtered in TreeGrid. - */ - value?: string; - /** Specifies the field where filtering has to be performed. */ field?: string; + /** Specifies the filter condition to filtered column. See operator + */ + operator?: string; + /** Specifies the predicate(and/or) value to perform filtering. */ predicate?: string; - /** Specifies the filter condition to filtered column. See operator + /** Specifies the value to be filtered in TreeGrid. */ - operator?: string; + value?: string; } export interface FilterSettings { + /** Gets or sets a value that indicates to perform the filter operation with case sensitive in excel styled filter menu mode. + * @Default {false} + */ + enableCaseSensitivity?: boolean; + + /** Enables or disables the ability to filter the columns with empty, null and undefined values. + * @Default {true} + */ + enableComplexBlankFilter?: boolean; + /** Specifies the mode on which column filtering should start * @Default {immediate} */ filterBarMode?: string; + /** Specifies the mode of filtering to filter the record with or without hierarchy. + * @Default {ej.TreeGrid.FilterHierarchyMode.Parent} + */ + filterHierarchyMode?: ej.TreeGrid.FilterHierarchyMode|string; + /** Specifies the type of column filtering. * @Default {ej.TreeGrid.FilterType.FilterBar} */ @@ -40029,25 +40141,15 @@ declare namespace ej { * @Default {1000} */ maxFilterChoice?: number; - - /** Gets or sets a value that indicates to perform the filter operation with case sensitive in excel styled filter menu mode. - * @Default {false} - */ - enableCaseSensitivity?: boolean; - - /** Enables or disables the ability to filter the columns with empty, null and undefined values. - * @Default {true} - */ - enableComplexBlankFilter?: boolean; - - /** Specifies the mode of filtering to filter the record with or without hierarchy. - * @Default {ej.TreeGrid.FilterHierarchyMode.Parent} - */ - filterHierarchyMode?: ej.TreeGrid.FilterHierarchyMode|string; } export interface PageSettings { + /** Specifies the current page to display at load time. + * @Default {1} + */ + currentPage?: number; + /** Using this property we can specify the number of pages should pager contains, according to this count TreeGrid height will be updated. * @Default {8} */ @@ -40058,16 +40160,6 @@ declare namespace ej { */ pageSize?: number; - /** Get the value of records which is bound to TreeGrid. The totalRecordsCount value is calculated based on the datasource bound to TreeGrid. - * @Default {null} - */ - totalRecordsCount?: number; - - /** Specifies the current page to display at load time. - * @Default {1} - */ - currentPage?: number; - /** Specifies the mode of record count in a page, whether it should count all the records or the root to count zero level parent records. * @Default {ej.TreeGrid.PageSizeMode.All} */ @@ -40082,32 +40174,48 @@ declare namespace ej { * @Default {null} */ template?: string; + + /** Get the value of records which is bound to TreeGrid. The totalRecordsCount value is calculated based on the datasource bound to TreeGrid. + * @Default {null} + */ + totalRecordsCount?: number; + } + + export interface SearchSettings { + + /** Default Value + * @Default {[]} + */ + fields?: any[]; + + /** Default Value + * @Default {true} + */ + ignoreCase?: boolean; + + /** Default Value + */ + key?: string; + + /** Specifies the operator for the search key words in toolbar searching. + * @Default {contains} + */ + operator?: string; } export interface SelectedCellIndex { + /** Specifies the cell index to be selected in the row. + */ + cellIndex?: number; + /** Specifies the row index of the cell to be selected in TreeGrid control */ rowIndex?: number; - - /** Specifies the cell index to be selected in the row. - * @Default { } - */ - cellIndex?: number; } export interface SelectionSettings { - /** Specifies the type of selection whether to select row or cell. - * @Default {ej.TreeGrid.SelectionMode.Row} - */ - selectionMode?: ej.TreeGrid.SelectionMode|string; - - /** Specifies the type of selection whether single, multiple or checkbox. - * @Default {ej.TreeGrid.SelectionType.Single} - */ - selectionType?: ej.TreeGrid.SelectionType|string; - /** Enables or disables the selection by hierarchy in check box selection * @Default {true} */ @@ -40117,6 +40225,48 @@ declare namespace ej { * @Default {true} */ enableSelectAll?: boolean; + + /** Specifies the type of selection whether to select row or cell. + * @Default {ej.TreeGrid.SelectionMode.Row} + */ + selectionMode?: ej.TreeGrid.SelectionMode|string; + + /** Specifies the type of selection whether single, multiple or checkbox. + * @Default {ej.TreeGrid.SelectionType.Single} + */ + selectionType?: ej.TreeGrid.SelectionType|string; + } + + export interface SizeSettings { + + /** Height of the TreeGrid. + * @Default {450px} + */ + height?: string; + + /** Width of the TreeGrid. + * @Default {100%} + */ + width?: string; + } + + export interface SortSettingsSortedColumn { + + /** Specifies the sort direction in TreeGrid + */ + direction?: string; + + /** Specifies the field to be sorted in TreeGrid + */ + field?: string; + } + + export interface SortSettings { + + /** Option to add columns based on which the rows have to be sorted recursively. + * @Default {[]} + */ + sortedColumns?: SortSettingsSortedColumn[]; } export interface StackedHeaderRowsStackedHeaderColumn { @@ -40155,34 +40305,8 @@ declare namespace ej { stackedHeaderColumns?: StackedHeaderRowsStackedHeaderColumn[]; } - export interface SearchSettings { - - /** Default Value - * @Default {[]} - */ - fields?: any[]; - - /** Default Value - */ - key?: string; - - /** Specifies the operator for the search key words in toolbar searching. - * @Default {contains} - */ - operator?: string; - - /** Default Value - * @Default {true} - */ - ignoreCase?: boolean; - } - export interface SummaryRowsSummaryColumn { - /** Specifies the summary type to perform calculations in a corresponding summary column. See summaryType. - */ - summaryType?: ej.TreeGrid.SummaryType|string; - /** Specifies summary column used to perform the summary calculation. */ dataMember?: string; @@ -40191,6 +40315,10 @@ declare namespace ej { */ displayColumn?: string; + /** Specifies the format to be applied on the summary column value. + */ + format?: string; + /** Specifies the text to be displayed before the summary column value. */ prefix?: string; @@ -40199,52 +40327,20 @@ declare namespace ej { */ suffix?: string; - /** Specifies the format to be applied on the summary column value. + /** Specifies the summary type to perform calculations in a corresponding summary column. See summaryType. */ - format?: string; + summaryType?: ej.TreeGrid.SummaryType|string; } export interface SummaryRow { - /** Specifies the title for summary row collection in TreeGrid - */ - title?: string; - /** Specifies the summary columns in the summary rows. */ summaryColumns?: SummaryRowsSummaryColumn[]; - } - export interface SizeSettings { - - /** Height of the TreeGrid. - * @Default {null} + /** Specifies the title for summary row collection in TreeGrid */ - height?: string; - - /** Width of the TreeGrid. - * @Default {null} - */ - width?: string; - } - - export interface SortSettingsSortedColumn { - - /** Specifies the field to be sorted in TreeGrid - */ - field?: string; - - /** Specifies the sort direction in TreeGrid - */ - direction?: string; - } - - export interface SortSettings { - - /** Option to add columns based on which the rows have to be sorted recursively. - * @Default {[]} - */ - sortedColumns?: SortSettingsSortedColumn[]; + title?: string; } export interface ToolbarSettingsCustomToolbarItem { @@ -40264,6 +40360,10 @@ declare namespace ej { export interface ToolbarSettings { + /** Allows the user to insert custom toolbar items. + */ + customToolbarItems?: ToolbarSettingsCustomToolbarItem[]; + /** Shows/hides the toolbar. * @Default {false} */ @@ -40272,13 +40372,48 @@ declare namespace ej { /** Specifies the list of toolbar items to be rendered in TreeGrid toolbar * @Default {[]} */ - toolbarItems?: any[]; - - /** Allows the user to insert custom toolbar items. - */ - customToolbarItems?: ToolbarSettingsCustomToolbarItem[]; + toolbarItems?: Array; } + enum ColumnResizeMode { + + ///At load time column are rendered with given width value, while resizing the column only current column width is changed + FixedColumns, + + ///At load time columns are stretched with control width,while resizing the column, current column width updated based on next column + Normal, + + ///In this mode columns are stretched with control width in load time and on resizing action. + NextColumn + } + + + enum ClipMode { + + ///Shows ellipsis for the overflown cell. + Ellipsis, + + ///Truncate the text in the cell. + Clip + } + + + enum UnboundType { + + ///Unbound type to perform edit action + Edit, + + ///Unbound type to perform save action + Save, + + ///Unbound type to perform delete action + Delete, + + ///Unbound type to perform cancel action + Cancel + } + + enum EditingType { ///It Specifies String edit type. @@ -40314,39 +40449,16 @@ declare namespace ej { } - enum UnboundType { + enum ContextMenuItems { - ///Unbound type to perform edit action + ///Enables the add menu item in context menu + Add, + + ///Enables the edit menu item in context menu Edit, - ///Unbound type to perform save action - Save, - - ///Unbound type to perform delete action - Delete, - - ///Unbound type to perform cancel action - Cancel - } - - - enum ClipMode { - - ///Shows ellipsis for the overflown cell. - Ellipsis, - - ///Truncate the text in the cell. - Clip - } - - - enum HeaderTextOverflow { - - ///You can disable the word wrap - None, - - ///You can wrap the header content - Wrap + ///Enables the edit menu item in context menu + Delete } @@ -40392,19 +40504,6 @@ declare namespace ej { } - enum ColumnResizeMode { - - ///At load time column are rendered with given width value, while resizing the column only current column width is changed - FixedColumns, - - ///At load time columns are stretched with control width,while resizing the column, current column width updated based on next column - Normal, - - ///In this mode columns are stretched with control width in load time and on resizing action. - NextColumn - } - - enum FilterHierarchyMode { ///Shows the filtered record with parent record @@ -40421,6 +40520,16 @@ declare namespace ej { } + enum HeaderTextOverflow { + + ///You can disable the word wrap + None, + + ///You can wrap the header content + Wrap + } + + enum PageSizeMode { ///To count all the parent and child records. @@ -40494,6 +40603,40 @@ declare namespace ej { FalseCount } + + enum ToolbarItems { + + ///Enables the add icon in toolbar + Add, + + ///Enables the edit icon in toolbar + Edit, + + ///Enables the edit icon in toolbar + Delete, + + ///Enables the update icon in toolbar + Update, + + ///Enables the cancel icon in toolbar + Cancel, + + ///Enables the expand all icon in toolbar + ExpandAll, + + ///Enables the collapse all icon in toolbar + CollapseAll, + + ///Enables the PDF export icon in toolbar + PdfExport, + + ///Enables the excel export icon in toolbar + ExcelExport, + + ///Enables the printing icon in toolbar + Print + } + } class GroupButton extends ej.Widget { @@ -42652,9 +42795,10 @@ declare namespace ej { /** This method is used to set the width for the columns in the Spreadsheet. * @param {any[]|any} Pass the column index and width of the columns. + * @param {number} Optional. If sheetIdx is specified, it will set the width for columns to the specified sheet else it will use active sheet. * @returns {void} */ - setWidthToColumns(widthColl: any[]|any): void; + setWidthToColumns(widthColl: any[]|any, sheetIndex?: number): void; /** This method is used to rename the active sheet. * @param {string} Pass the sheet name that you want to change the current active sheet name. @@ -46184,6 +46328,33 @@ declare namespace ej { */ zoomTo(zoomValue: number): void; + /** Searches the target text in the PDF document and highlights the occurrences in the pages. + * @param {string} The text to be searched in the pages in the PDF viewer. + * @returns {void} + */ + searchText(targetText: string): void; + + /** Searches the next occurrence of the searched text from the current occurrence in the PDF viewer control. + * @returns {void} + */ + searchNext(): void; + + /** Searches the previous occurrence of the searched text from the current occurrence in the PDF viewer control. + * @returns {void} + */ + searchPrevious(): void; + + /** Searches the target text with its casing. + * @param {boolean} Specifies whether the text search must be performed with match case or not. + * @returns {void} + */ + matchCase(enableMatchCase: boolean): void; + + /** Cancels the text search and removes the highlighted occurrences from the PDF viewer. + * @returns {void} + */ + cancelSearchText(): void; + /** Adds annotations to the PDF document. * @param {ej.PdfViewer.AnnotationType} type of the annotation to be added in the PDF document. * @returns {void} @@ -48201,6 +48372,410 @@ declare namespace ej { } + class ReportDesigner extends ej.Widget { + static fn: ReportDesigner; + constructor(element: JQuery | Element, options?: ReportDesigner.Model); + static Locale: any; + model: ReportDesigner.Model; + defaults: ReportDesigner.Model; + + /** Determines whether a copy operation is possible. + * @returns {boolean} + */ + canCopy(): boolean; + + /** Determines whether a cut operation is possible. + * @returns {boolean} + */ + canCut(): boolean; + + /** Determines whether a delete operation is possible. + * @returns {boolean} + */ + canRemove(): boolean; + + /** Determines whether a paste operation is possible. + * @returns {boolean} + */ + canPaste(): boolean; + + /** Returns the bool value indicating whether the user can redo the previous action in the report. + * @returns {boolean} + */ + canRedo(): boolean; + + /** Returns a bool value indicating whether the user can undo the previous action in the report. + * @returns {boolean} + */ + canUndo(): boolean; + + /** Copies the selected ReportItem from design panel to Report Designer internal clipboard. + * @returns {void} + */ + copy(): void; + + /** Cuts the selected ReportItem from design panel to Report Designer internal clipboard. + * @returns {void} + */ + cut(): void; + + /** Deletes the selected item from the report. + * @returns {void} + */ + remove(): void; + + /** Returns the bool value that specifies whether the report has changes or not. + * @returns {boolean} + */ + hasReportChanges(): boolean; + + /** Returns the bool value that specifies whether the currently processing report is a new report or not. + * @returns {boolean} + */ + isNewReport(): boolean; + + /** Returns the bool value that specifies whether the currently processing report is a new server report or not. + * @returns {boolean} + */ + isNewServerReport(): boolean; + + /** Returns the bool value that specifies whether the currently processing report is obtained from the server or local. + * @returns {boolean} + */ + isServerReport(): boolean; + + /** To create a new report. + * @returns {void} + */ + newReport(): void; + + /** To create a new report in the server. + * @returns {void} + */ + newServerReport(): void; + + /** This method opens the report from the ReportServer. + * @returns {void} + */ + openReport(): void; + + /** To open the report client browse dialog. + * @returns {void} + */ + openReportFromDevice(): void; + + /** To open the report open server browse dialog. + * @returns {void} + */ + openServerReportDialog(): void; + + /** Pastes the selected ReportItem from Report Designer internal clipboard to design panel. + * @returns {void} + */ + paste(): void; + + /** Reverses the action of the last Undo command. + * @returns {void} + */ + redo(): void; + + /** This method saves the report into the ReportServer. + * @returns {void} + */ + saveReport(): void; + + /** To open the report save server browse dialog. + * @returns {void} + */ + saveServerReportDialog(): void; + + /** To download the designed report. + * @returns {void} + */ + saveToDevice(): void; + + /** To show the report design. + * @returns {void} + */ + showDesign(): void; + + /** To open the new report dialog. + * @returns {void} + */ + showNewReportDialog(): void; + + /** To open the server browse dialog. + * @returns {void} + */ + showOpenSaveReportDialog(): void; + + /** To show the report preview. + * @returns {void} + */ + showPreview(): void; + + /** Reverses the last action that was performed. + * @returns {void} + */ + undo(): void; + } + export namespace ReportDesigner { + + export interface Model { + + /** Specifies the locale for report designer. + * @Default {en-US} + */ + locale?: string; + + /** Gets or Sets the report path of server. + * @Default {null} + */ + reportPath?: string; + + /** Gets or Sets the reports server URL. + * @Default {null} + */ + reportServerUrl?: string; + + /** Gets or sets the serviceAuthorizationToken to access the Report Server API services. + * @Default {empty} + */ + serviceAuthorizationToken?: string; + + /** Gets or Sets the URL of the WebAPI service; it will be used for processing the report. + * @Default {null} + */ + serviceUrl?: string; + + /** Specifies the toolbar settings. + */ + toolbarSettings?: ToolbarSettings; + + /** This event will be triggered before AJAX loads. + */ + ajaxBeforeLoad?(e: AjaxBeforeLoadEventArgs): void; + + /** This event will be triggered when AJAX result is failed. + */ + ajaxError?(e: AjaxErrorEventArgs): void; + + /** This event will be triggered when AJAX result is succeeded. + */ + ajaxSuccess?(e: AjaxSuccessEventArgs): void; + + /** This event will be triggered when the Report Designer widget is created. + */ + create?(e: CreateEventArgs): void; + + /** This event will be triggered when the Report Designer widget is destroyed. + */ + destroy?(e: DestroyEventArgs): void; + + /** This event will be triggered while clicking open menu items. + */ + openReportClick?(e: OpenReportClickEventArgs): void; + + /** This event will be triggered when the report is modified. + */ + reportModified?(e: ReportModifiedEventArgs): void; + + /** This event will be triggered when the report is opened. + */ + reportOpened?(e: ReportOpenedEventArgs): void; + + /** This event will be triggered when the report is saved. + */ + reportSaved?(e: ReportSavedEventArgs): void; + + /** This event will be triggered when the save menu items are clicked. + */ + saveReportClick?(e: SaveReportClickEventArgs): void; + + /** This event will be triggered while clicking the toolbar items. + */ + toolbarClick?(e: ToolbarClickEventArgs): void; + + /** This event will be triggered on rendering the Report Designer toolbar. + */ + toolbarRendering?(e: ToolbarRenderingEventArgs): void; + } + + export interface AjaxBeforeLoadEventArgs { + + /** AJAX headers, we can pass any custom header through this property. + */ + headers?: any[]; + + /** To pass the custom data while AJAX post back. + */ + data?: any; + + /** Token of report designer. + */ + reportDesignerToken?: string; + + /** Token of ReportingService. + */ + serviceAuthorizationToken?: string; + + /** Action type of AJAX call back. + */ + actionType?: string; + } + + export interface AjaxErrorEventArgs { + } + + export interface AjaxSuccessEventArgs { + } + + export interface CreateEventArgs { + } + + export interface DestroyEventArgs { + } + + export interface OpenReportClickEventArgs { + + /** DOM of the clicked target. + */ + target?: JQuery; + + /** Name of selected item. + */ + select?: string; + } + + export interface ReportModifiedEventArgs { + + /** Specifies whether the report is modified or not. + */ + isModified?: boolean; + + /** Name of Opened Report. + */ + reportName?: string; + } + + export interface ReportOpenedEventArgs { + + /** Specifies whether report opened from device or server. + */ + isServerReport?: boolean; + + /** Name of Opened Report. + */ + reportName?: string; + } + + export interface ReportSavedEventArgs { + + /** Specifies whether report opened from device or server. + */ + isServerReport?: boolean; + + /** States whether report is downloaded from ReportServer. + */ + reportAction?: string; + } + + export interface SaveReportClickEventArgs { + + /** DOM of the clicked target. + */ + target?: JQuery; + + /** Name of selected item. + */ + select?: string; + } + + export interface ToolbarClickEventArgs { + + /** DOM of the clicked target. + */ + target?: JQuery; + + /** Name of clicked item. + */ + click?: string; + } + + export interface ToolbarRenderingEventArgs { + } + + export interface ToolbarSettings { + + /** Shows or hides the grouped items in the toolbar with the help of enum ej.ReportDesigner.ToolbarItems. + * @Default {ej.ReportDesigner.ToolbarItems.All} + */ + items?: ej.ReportDesigner.ToolbarItems|string; + + /** Shows or hides the toolbar. + * @Default {true} + */ + showToolbar?: boolean; + + /** Specifies the toolbar template ID. + * @Default {empty} + */ + templateId?: string; + } + + enum ToolbarItems { + + ///Creates a new, blank report. + New, + + ///Displays the Open dialog box to retrieve an existing report. + Open, + + ///Saves the active report to a specified location. + Save, + + ///Removes the selected item from the active report. + Cut, + + ///Copies selected text or object to the clipboard. + Copy, + + ///Pastes the item that cut or copied into (the position of the insertion point) the report from the clipboard. + Paste, + + ///Deletes the selected item or text from the report. + Delete, + + ///Reverses the last action or deletes the last entry that is typed. + Undo, + + ///Reverses the action of the last Undo command. + Redo, + + ///Used to "zoom in" to get a close-up view of a report or "zoom out" to see more of the page at a reduced size. + Zoom, + + ///Previews the active report in report viewer. + Preview, + + ///Enables/Disables the gridline in active report. + GridLine, + + ///Enables header area in the report. + Header, + + ///Enables footer area in the report. + Footer, + + ///Switches from preview to design view of the report. + EditDesign, + + ///Shows all the toolbar items. + All + } + + } + } declare namespace ej.datavisualization { class SymbolPalette extends ej.Widget { @@ -64292,6 +64867,16 @@ declare namespace ej.datavisualization { * @returns {void} */ zoom(level: number, isAnimate: boolean): void; + + /** Method to reload the shape marker with updated values. + * @returns {void} + */ + refreshLayer(): void; + + /** Add markers dynamically based on layer and sublayer index value. + * @returns {void} + */ + addMarkers(): void; } export namespace Map { @@ -64413,6 +64998,10 @@ declare namespace ej.datavisualization { */ Click?(e: ClickEventArgs): void; + /** Fires on clicking the legend item. + */ + legendItemClick?(e: LegendItemClickEventArgs): void; + /** Fires, on double clicking the map. */ doubleClick?(e: DoubleClickEventArgs): void; @@ -64424,6 +65013,18 @@ declare namespace ej.datavisualization { /** Fires before loading the map. */ onLoad?(e: OnLoadEventArgs): void; + + /** Triggers while entering the hovered marker shape. + */ + markerEnter?(e: MarkerEnterEventArgs): void; + + /** Triggers while leaving the hovered marker shape. + */ + markerLeave?(e: MarkerLeaveEventArgs): void; + + /** Triggers after refreshing the map items. + */ + refreshed?(e: RefreshedEventArgs): void; } export interface MarkerSelectedEventArgs { @@ -64518,6 +65119,27 @@ declare namespace ej.datavisualization { originalEvent?: any; } + export interface LegendItemClickEventArgs { + + /** Set this option to true to cancel the event + */ + cancel?: boolean; + + /** Instance of the map model object + */ + model?: any; + + /** Name of the event + */ + type?: string; + + /** startX - X-coordinate of legend item in pixel LegendItem - Instance of the legend item object that is about to be rendered style - Options to customize the legend item + * styles such as border, color, size, etc…, symbolShape - Name of the legend item shape. Use this option to customize legend item shape before rendering map - Instance + * of the map object corresponding to the legend item + */ + data?: any; + } + export interface DoubleClickEventArgs { /** Returns double clicked shape object. @@ -64547,8 +65169,50 @@ declare namespace ej.datavisualization { type?: string; } + export interface MarkerEnterEventArgs { + + /** Set this option to true to cancel the event + */ + cancel?: boolean; + + /** Instance of the map model object + */ + model?: any; + + /** Name of the event + */ + type?: string; + } + + export interface MarkerLeaveEventArgs { + + /** Set this option to true to cancel the event + */ + cancel?: boolean; + + /** Instance of the map model object + */ + model?: any; + + /** Name of the event + */ + type?: string; + } + + export interface RefreshedEventArgs { + + /** Refresh and load the map. + */ + originalEvent?: any; + } + export interface ZoomSettings { + /** Specifies animation duration for map shapes while zooming. + * @Default {600} + */ + animationDuration?: string; + /** Enables or Disables the zooming of map * @Default {true} */ @@ -64806,6 +65470,11 @@ declare namespace ej.datavisualization { */ showLegend?: boolean; + /** Toggle the visibility of the legend. + * @Default {false} + */ + toggleVisibility?: boolean; + /** to get title of legend setting * @Default {null} */ @@ -65639,6 +66308,11 @@ declare namespace ej.datavisualization { * @returns {void} */ refresh(): void; + + /** Method to drilldown the treemap. + * @returns {void} + */ + drillDown(): void; } export namespace TreeMap { @@ -65711,6 +66385,16 @@ declare namespace ej.datavisualization { */ enableDrillDown?: boolean; + /** Specifies to drill the particular data of the treemap. + * @Default {null} + */ + drillDownValue?: string; + + /** Specifies to render particular level of the treemap. + * @Default {0} + */ + drillDownLevel?: number; + /** Controls whether Treemap has to be responsive while resizing the window. * @Default {true} */ @@ -68109,6 +68793,11 @@ declare namespace ej.datavisualization { */ margin?: ConnectorsLabelsMargin; + /** Sets the padding for connector label. + * @Default {ej.datavisualization.Diagram.Point(0.5, 0.5)} + */ + padding?: any; + /** Sets the value which is used to drag the label within certain bounds. * @Default {null} */ @@ -69323,6 +70012,11 @@ declare namespace ej.datavisualization { */ overflowType?: ej.datavisualization.Diagram.OverflowType|string; + /** To set the padding of the node label + * @Default {ej.datavisualization.Diagram.Padding()} + */ + padding?: any; + /** Defines whether the label is editable or not * @Default {false} */ @@ -70713,6 +71407,10 @@ declare namespace ej.datavisualization { BridgeObstacle, //Enables connector to be selected and dragged. Interaction, + //Enables the Routing for an connector + Routing, + //Inherit the routing option defined in the diagram constraints. + InheritRouting, //Enables all constraints Default, } @@ -70919,6 +71617,8 @@ declare namespace ej.datavisualization { ZoomTextEditor, //Enables/Disables the drag and drop of element from one diagram to the other FloatElements, + //Enables the routing for an connector in diagram + Routing, //Enables all Constraints Default, } @@ -74355,6 +75055,9 @@ interface JQuery { ejRecurrenceEditor(options?: ej.RecurrenceEditor.Model): JQuery; ejRecurrenceEditor(memberName: any, value?: any, param?: any): any; + ejReportDesigner(options?: ej.ReportDesigner.Model): JQuery; + ejReportDesigner(memberName: any, value?: any, param?: any): any; + ejReportViewer(options?: ej.ReportViewer.Model): JQuery; ejReportViewer(memberName: any, value?: any, param?: any): any; @@ -74501,6 +75204,7 @@ interface JQuery { data(key: "ejRangeNavigator"): ej.datavisualization.RangeNavigator; data(key: "ejRating"): ej.Rating; data(key: "ejRecurrenceEditor"): ej.RecurrenceEditor; + data(key: "ejReportDesigner"): ej.ReportDesigner; data(key: "ejReportViewer"): ej.ReportViewer; data(key: "ejResizable"): ej.Resizable; data(key: "ejRibbon"): ej.Ribbon; diff --git a/types/elasticsearch/elasticsearch-tests.ts b/types/elasticsearch/elasticsearch-tests.ts index 35b4e39798..68625bd5bb 100644 --- a/types/elasticsearch/elasticsearch-tests.ts +++ b/types/elasticsearch/elasticsearch-tests.ts @@ -37,6 +37,21 @@ client.search({ }, (error) => { }); +client.search({ + body: { + query: { + match_all: { + _name: 'test' + } + } + } +} +).then((body) => { + const hit = body.hits.hits[0]; + const names = hit && hit.matched_queries; +}, (error) => { +}); + client.indices.delete({ index: 'test_index', ignore: [404] @@ -44,6 +59,13 @@ client.indices.delete({ }, (error) => { }); +client.indices.delete({ + index: 'test_index', + ignoreUnavailable: true +}).then((body) => { +}, (error) => { +}); + client.deleteByQuery({ index: 'test_index', type: 'test_type', diff --git a/types/elasticsearch/index.d.ts b/types/elasticsearch/index.d.ts index 2cfd14f689..a9dc133545 100644 --- a/types/elasticsearch/index.d.ts +++ b/types/elasticsearch/index.d.ts @@ -645,6 +645,7 @@ export interface SearchResponse { fields?: any; highlight?: any; inner_hits?: any; + matched_queries?: string[]; sort?: string[]; }>; }; @@ -1143,6 +1144,7 @@ export interface IndicesDeleteParams extends GenericParams { timeout?: TimeSpan; masterTimeout?: TimeSpan; index: NameList; + ignoreUnavailable?: boolean; } export interface IndicesDeleteAliasParams extends GenericParams { diff --git a/types/electron-devtools-installer/electron-devtools-installer-tests.ts b/types/electron-devtools-installer/electron-devtools-installer-tests.ts index 798e6ad223..ddc7711afe 100644 --- a/types/electron-devtools-installer/electron-devtools-installer-tests.ts +++ b/types/electron-devtools-installer/electron-devtools-installer-tests.ts @@ -7,7 +7,6 @@ import installExtension, { MOBX_DEVTOOLS } from 'electron-devtools-installer'; - installExtension(EMBER_INSPECTOR); installExtension(REACT_DEVELOPER_TOOLS); installExtension(BACKBONE_DEBUGGER); @@ -19,4 +18,7 @@ installExtension(REACT_PERF); installExtension(CYCLEJS_DEVTOOL); installExtension(APOLLO_DEVELOPER_TOOLS); installExtension(MOBX_DEVTOOLS); -installExtension('abcdefghijkl'); \ No newline at end of file +installExtension('abcdefghijkl'); +installExtension([EMBER_INSPECTOR, JQUERY_DEBUGGER]); +installExtension(['extension', 'another-extension']); +installExtension([REACT_DEVELOPER_TOOLS, 'MOBX_DEVTOOLS']); diff --git a/types/electron-devtools-installer/index.d.ts b/types/electron-devtools-installer/index.d.ts index 88649cd0a8..92d94044d7 100644 --- a/types/electron-devtools-installer/index.d.ts +++ b/types/electron-devtools-installer/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for electron-devtools-installer v2.0.1 +// Type definitions for electron-devtools-installer v2.2.4 // Project: https://github.com/MarshallOfSound/electron-devtools-installer // Definitions by: Robin Van den Broeck // M. Fatih Mar @@ -11,7 +11,7 @@ declare module "electron-devtools-installer" { } // Default installation function - export default function (extensionReference: ExtensionReference | string, forceDownload?: boolean): Promise; + export default function (extensionReference: ExtensionReference | string | Array, forceDownload?: boolean): Promise; // Devtools themself export const EMBER_INSPECTOR: ExtensionReference; @@ -25,4 +25,4 @@ declare module "electron-devtools-installer" { export const CYCLEJS_DEVTOOL: ExtensionReference; export const APOLLO_DEVELOPER_TOOLS: ExtensionReference; export const MOBX_DEVTOOLS: ExtensionReference; -} \ No newline at end of file +} diff --git a/types/electron-packager/electron-packager-tests.ts b/types/electron-packager/electron-packager-tests.ts index f956910b78..06cadf97f0 100644 --- a/types/electron-packager/electron-packager-tests.ts +++ b/types/electron-packager/electron-packager-tests.ts @@ -2,7 +2,7 @@ import packager = require("electron-packager"); function callback(err: Error, appPaths: string[]) { const msg = err.message; - const index = appPaths.indexOf("test"); + const index = appPaths.indexOf("test"); } function completeFunction(buildPath: string, electronVersion: string, platform: string, arch: string, callbackFn: () => void) { @@ -13,6 +13,8 @@ function ignoreFunction(path: string) { return true; } +// this is the obsolete API and will be removed in a future version + packager({ dir: ".", name: "myapplication", @@ -30,6 +32,29 @@ packager({ } }, callback); +function onCompleted(appPaths: string | string[]) { +} + +function onError(error: Error) { +} + +packager({ + dir: ".", + name: "myapplication", + platform: "win32", + arch: "all", + electronVersion: "0.34.0", + win32metadata: { + CompanyName: "Acme CO", + FileDescription: "My application", + OriginalFilename: "myapp.exe", + ProductName: "Application", + InternalName: "roadrunner", + "requested-execution-level": "highestAvailable", + "application-manifest": "manifest.xml" + } +}).then(onCompleted).catch(onError); + packager({ dir: ".", name: "myapplication", @@ -44,7 +69,7 @@ packager({ "requested-execution-level": "requireAdministrator", "application-manifest": "manifest.xml" } -}, callback); +}).then(onCompleted).catch(onError); packager({ dir: ".", @@ -52,14 +77,14 @@ packager({ platform: "all", arch: "all", electronVersion: "0.34.0" -}, callback); +}).then(onCompleted).catch(onError); packager({ dir: ".", name: "myapplication", electronVersion: "0.34.0", all: true -}, callback); +}).then(onCompleted).catch(onError); packager({ dir: ".", @@ -67,7 +92,7 @@ packager({ electronVersion: "0.34.0", arch: "arm64", executableName: "myapp" -}, callback); +}).then(onCompleted).catch(onError); packager({ dir: ".", @@ -110,7 +135,7 @@ packager({ "requested-execution-level": "asInvoker", "application-manifest": "manifest.xml" } -}, callback); +}).then(onCompleted).catch(onError); packager({ dir: ".", @@ -142,7 +167,7 @@ packager({ extendInfo: "plist.txt", helperBundleId: "23223f", osxSign: true -}, callback); +}).then(onCompleted).catch(onError); packager({ dir: ".", @@ -161,7 +186,7 @@ packager({ ignore: ignoreFunction, packageManager: "cnpm", platform: "linux" -}, callback); +}).then(onCompleted).catch(onError); packager({ dir: ".", @@ -192,4 +217,4 @@ packager({ "myapp2" ] }] -}, callback); +}).then(onCompleted).catch(onError); diff --git a/types/electron-packager/index.d.ts b/types/electron-packager/index.d.ts index 6e430ecdb2..0e438ebc6e 100644 --- a/types/electron-packager/index.d.ts +++ b/types/electron-packager/index.d.ts @@ -1,14 +1,28 @@ -// Type definitions for electron-packager 10.1 +// Type definitions for electron-packager 12.0 // Project: https://github.com/electron-userland/electron-packager // Definitions by: Maxime LUCE // Juan Jimenez-Anca // John Kleinschmidt +// Brendan Forster // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped /// export = electronPackager; +/** + * This will: + * - Find or download the correct release of Electron + * - Use that version of electron to create a app in /-- + * + * You should be able to launch the app on the platform you built for. If not, check your settings and try again. + * + * @param opts - Options to configure packaging. + * + * @returns A promise containing the path(s) to the newly created application(s) + */ +declare function electronPackager(opts: electronPackager.Options): Promise; + /** * This will: * - Find or download the correct release of Electron @@ -18,6 +32,8 @@ export = electronPackager; * * @param opts - Options to configure packaging. * @param callback - Callback which is called when packaging is done or an error occured. + * + * @deprecated since version 12.0 */ declare function electronPackager(opts: electronPackager.Options, callback: electronPackager.finalCallback): void; diff --git a/types/electron-unhandled/electron-unhandled-tests.ts b/types/electron-unhandled/electron-unhandled-tests.ts new file mode 100644 index 0000000000..42444658f8 --- /dev/null +++ b/types/electron-unhandled/electron-unhandled-tests.ts @@ -0,0 +1,5 @@ +import * as unhandled from "electron-unhandled"; + +unhandled({ logger: 'foo' }); // $ExpectError +unhandled({ showDialog: 'bar' }); // $ExpectError +unhandled({ logger: (err: Error) => {}, showDialog: true }); // $ExpectType void diff --git a/types/electron-unhandled/index.d.ts b/types/electron-unhandled/index.d.ts new file mode 100644 index 0000000000..d560e05b80 --- /dev/null +++ b/types/electron-unhandled/index.d.ts @@ -0,0 +1,15 @@ +// Type definitions for electron-unhandled 1.1 +// Project: https://github.com/sindresorhus/electron-unhandled +// Definitions by: Olegs Jeremejevs +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare namespace unhandled { + interface Options { + logger?: (err: Error) => void; + showDialog?: boolean; + } +} + +declare function unhandled(options?: unhandled.Options): void; + +export = unhandled; diff --git a/types/electron-unhandled/tsconfig.json b/types/electron-unhandled/tsconfig.json new file mode 100644 index 0000000000..fa790385fe --- /dev/null +++ b/types/electron-unhandled/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", + "electron-unhandled-tests.ts" + ] +} diff --git a/types/electron-unhandled/tslint.json b/types/electron-unhandled/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/electron-unhandled/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/elegant-spinner/elegant-spinner-tests.ts b/types/elegant-spinner/elegant-spinner-tests.ts new file mode 100644 index 0000000000..5d2ddb9dc7 --- /dev/null +++ b/types/elegant-spinner/elegant-spinner-tests.ts @@ -0,0 +1,8 @@ +import elegantSpinner = require('elegant-spinner'); + +const frameFunction = elegantSpinner(); + +// $ExpectType string +frameFunction(); + +const frames = elegantSpinner.frames; diff --git a/types/elegant-spinner/index.d.ts b/types/elegant-spinner/index.d.ts new file mode 100644 index 0000000000..fbb8d4710a --- /dev/null +++ b/types/elegant-spinner/index.d.ts @@ -0,0 +1,12 @@ +// Type definitions for elegant-spinner 1.0 +// Project: https://github.com/sindresorhus/elegant-spinner +// Definitions by: Daniel Byrne +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export = elegantSpinner; + +declare function elegantSpinner(): () => string; + +declare namespace elegantSpinner { + const frames: ReadonlyArray; +} diff --git a/types/elegant-spinner/tsconfig.json b/types/elegant-spinner/tsconfig.json new file mode 100644 index 0000000000..cdd768d4c6 --- /dev/null +++ b/types/elegant-spinner/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": ["es6"], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": false, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": ["../"], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "elegant-spinner-tests.ts" + ] +} diff --git a/types/elegant-spinner/tslint.json b/types/elegant-spinner/tslint.json new file mode 100644 index 0000000000..d88586e5bd --- /dev/null +++ b/types/elegant-spinner/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": "dtslint/dt.json" +} diff --git a/types/elementtree/elementtree-tests.ts b/types/elementtree/elementtree-tests.ts new file mode 100644 index 0000000000..630a17f6c6 --- /dev/null +++ b/types/elementtree/elementtree-tests.ts @@ -0,0 +1,56 @@ +import * as et from 'elementtree'; + +// Example 1 +// https://github.com/racker/node-elementtree#example-1--creating-an-xml-document + +const XML = et.XML; +const ElementTree = et.ElementTree; +const element = et.Element; +const subElement = et.SubElement; + +const root = element('entry'); +root.set('xmlns', 'http://www.w3.org/2005/Atom'); + +const tenantId = subElement(root, 'TenantId'); +tenantId.text = '12345'; + +const serviceName = subElement(root, 'ServiceName'); +serviceName.text = 'MaaS'; + +const resourceId = subElement(root, 'ResourceID'); +resourceId.text = 'enAAAA'; + +const usageId = subElement(root, 'UsageID'); +usageId.text = '550e8400-e29b-41d4-a716-446655440000'; + +const eventType = subElement(root, 'EventType'); +eventType.text = 'create'; + +const category = subElement(root, 'category'); +category.set('term', 'monitoring.entity.create'); + +const dataCenter = subElement(root, 'DataCenter'); +dataCenter.text = 'global'; + +const region = subElement(root, 'Region'); +region.text = 'global'; + +const startTime = subElement(root, 'StartTime'); +startTime.text = new Date(); + +const resourceName = subElement(root, 'ResourceName'); +resourceName.text = 'entity'; + +const etree1 = new ElementTree(root); +const xml = etree1.write({ xml_declaration: false }); + +// Example 2 +// https://github.com/racker/node-elementtree#example-2--parsing-an-xml-document + +const data = ''; +const etree2 = et.parse(data); + +etree2.findall('./entry/TenantId').length; // 2 +etree2.findtext('./entry/ServiceName'); // MaaS +etree2.findall('./entry/category')[0].get('term'); // monitoring.entity.create +etree2.findall('*/category/[@term="monitoring.entity.update"]').length; // 1 diff --git a/types/elementtree/index.d.ts b/types/elementtree/index.d.ts new file mode 100644 index 0000000000..8019797b4a --- /dev/null +++ b/types/elementtree/index.d.ts @@ -0,0 +1,88 @@ +// Type definitions for elementtree 0.1 +// Project: https://github.com/racker/node-elementtree +// Definitions by: Daniel Imhoff +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export interface ElementTreeWriteOptions { + default_namespace?: string; + encoding?: string; // default is 'utf-8' + indent?: number; + method?: 'xml' | 'text'; // default is 'xml' + xml_declaration?: boolean; // on by default +} + +export class ElementTree { + constructor(element: Element); + + getroot(): Element; + _setroot(element: Element): void; + + parse(source: string): Element; + find(path: string): Element | null; + findtext(path: string): ElementText | undefined; + findall(path: string): Element[]; + write(options?: ElementTreeWriteOptions): string; +} + +export interface Attributes { + [key: string]: string | undefined; +} + +export type ElementTag = typeof Comment | typeof CData | typeof ProcessingInstruction | string; + +export type ElementText = { toString(): string; } | string; + +export interface Element { + tag: ElementTag; + attrib: Attributes; + text: ElementText | null; + tail: string | null; + + toString(): string; + makeelement(tag: ElementTag, attrib?: Attributes): Element; + len(): number; + + getItem(index: number): Element | undefined; + setItem(index: number, element: Element): void; + delItem(index: number): void; + getSlice(start: number, stop: number): Element[]; + setSlice(start: number, stop: number, elements: ReadonlyArray): void; + delSlice(start: number, stop: number): void; + + append(element: Element): void; + extend(elements: ReadonlyArray): void; + insert(index: number, element: Element): void; + remove(element: Element): void; + getchildren(): Element[]; + + find(path: string): Element | null; + findtext(path: string): ElementText | undefined; + findall(path: string): Element[]; + + clear(): void; + + get(k: string): string | undefined; + set(k: string, v?: string): string; + keys(): string[]; + items(): Array<[string, string]>; +} + +export class QName { + text: string; + + constructor(text_or_uri: string, tag?: string); + toString(): string; +} + +// special tags +export function CData(text?: ElementText): Element; +export function Comment(text?: ElementText): Element; +export function ProcessingInstruction(target: ElementText, text?: ElementText): Element; + +export function XML(data: string): Element; +export function Element(ElementTag: string, attrib?: Attributes): Element; +export function SubElement(parent: Element, ElementTag: string, attrib?: Attributes): Element; + +export function parse(source: string): ElementTree; +export function register_namespace(prefix: string, uri: string): void; +export function tostring(element: Element, options: ElementTreeWriteOptions): string; diff --git a/types/elementtree/tsconfig.json b/types/elementtree/tsconfig.json new file mode 100644 index 0000000000..9f9991fb4e --- /dev/null +++ b/types/elementtree/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", + "elementtree-tests.ts" + ] +} diff --git a/types/elementtree/tslint.json b/types/elementtree/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/elementtree/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/ember-data/index.d.ts b/types/ember-data/index.d.ts index b891bbe1d1..b071662326 100644 --- a/types/ember-data/index.d.ts +++ b/types/ember-data/index.d.ts @@ -526,7 +526,7 @@ declare module 'ember-data' { * invoking the callback with the name of each relationship and its relationship * descriptor. */ - eachRelationship(callback: Function, binding: any): any; + eachRelationship(callback: (name: string, details: RelationshipMeta) => void, binding?: any): any; /** * Represents the model's class name as a string. This can be used to look up the model's class name through * `DS.Store`'s modelFor method. @@ -577,7 +577,7 @@ declare module 'ember-data' { * invoking the callback with the name of each relationship and its relationship * descriptor. */ - static eachRelationship(callback: Function, binding: any): any; + static eachRelationship(callback: (name: string, details: RelationshipMeta) => void, binding?: any): any; /** * Given a callback, iterates over each of the types related to a model, * invoking the callback with the related type's class. Each type will be diff --git a/types/ember-data/test/relationships.ts b/types/ember-data/test/relationships.ts index df43387bb4..06795c0e26 100644 --- a/types/ember-data/test/relationships.ts +++ b/types/ember-data/test/relationships.ts @@ -12,6 +12,20 @@ const Polymorphic = DS.Model.extend({ paymentMethods: DS.hasMany('payment-method', { polymorphic: true }) }); +Polymorphic.eachRelationship(() => ''); +Polymorphic.eachRelationship(() => '', {}); +Polymorphic.eachRelationship((n, meta) => { + let s: string = n; + let m: 'belongsTo' | 'hasMany' = meta.kind; +}); +let p = Polymorphic.create(); +p.eachRelationship(() => ''); +p.eachRelationship(() => '', {}); +p.eachRelationship((n, meta) => { + let s: string = n; + let m: 'belongsTo' | 'hasMany' = meta.kind; +}); + class Comment extends DS.Model { author = DS.attr('string'); } diff --git a/types/ember-mocha/ember-mocha-tests.ts b/types/ember-mocha/ember-mocha-tests.ts index 75d1154a87..09662096b6 100644 --- a/types/ember-mocha/ember-mocha-tests.ts +++ b/types/ember-mocha/ember-mocha-tests.ts @@ -1,7 +1,8 @@ import { describeComponent, describeModel, describeModule, setResolver, setupAcceptanceTest, setupComponentTest, - setupModelTest, setupTest + setupModelTest, setupTest, setupRenderingTest, + setupApplicationTest } from 'ember-mocha'; import { describe, it, beforeEach, afterEach, before, after } from 'mocha'; import chai = require('chai'); @@ -96,8 +97,6 @@ describeModule('component:x-foo', 'TestModule callbacks', function() { }); describe('setupTest', function() { - setupTest(); - setupTest('service:ajax'); setupTest('service:ajax', { @@ -193,3 +192,62 @@ it('can calculate the result', function(assert) { it.skip('disabled test'); it.skip('disabled test', function() { }); + +// New testing APIs of ember-mocha 0.14 + +describe('setupTest', function() { + setupTest(); + + setupTest({ resolver: Ember.DefaultResolver.create() }); + + const hooks = setupTest(); + hooks.beforeEach(function() { + this.owner.lookup('service:foo'); + }); + hooks.afterEach(function() { + this.owner.factoryFor('service:foo'); + }); + + setupRenderingTest(); + + setupRenderingTest({ resolver: Ember.DefaultResolver.create() }); + + const hooks2 = setupRenderingTest(); + hooks2.beforeEach(function() { + this.owner.lookup('service:foo'); + }); + + hooks2.afterEach(function() { + this.owner.factoryFor('service:foo'); + }); + + setupApplicationTest(); + + setupApplicationTest({ resolver: Ember.DefaultResolver.create() }); + + const hooks3 = setupApplicationTest(); + hooks3.beforeEach(function() { + this.owner.lookup('service:foo'); + }); + + hooks3.afterEach(function() { + this.owner.factoryFor('service:foo'); + }); + + it('test', function() { + }); +}); + +describe('rendering test', function() { + setupRenderingTest(); + + it('renders', async function() { + // setup the outer context + this.set('value', 'cat'); + + // render the component + await this.render(hbs`{{ x-foo value=value}}`); + + chai.expect(this.element.querySelector('div>.value').textContent.trim()).to.equal('cat', 'The component shows the correct value'); + }); +}); diff --git a/types/ember-mocha/index.d.ts b/types/ember-mocha/index.d.ts index 84510eee38..638edb8542 100644 --- a/types/ember-mocha/index.d.ts +++ b/types/ember-mocha/index.d.ts @@ -1,6 +1,7 @@ -// Type definitions for ember-mocha 0.12 +// Type definitions for ember-mocha 0.14 // Project: https://github.com/emberjs/ember-mocha#readme // Definitions by: Derek Wickern +// Simon Ihmig // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.4 @@ -36,6 +37,17 @@ declare module 'ember-mocha' { (callbacks: ModuleCallbacks): void; } + interface TestHooks { + beforeEach: mochaBeforeEach; + afterEach: mochaAfterEach; + } + + interface SetupOptions { + resolver: Ember.Resolver; + } + + type NewSetupTest = (options?: SetupOptions) => TestHooks; + /** @deprecated Use setupTest instead */ export const describeModule: ContextDefinition; @@ -45,11 +57,14 @@ declare module 'ember-mocha' { /** @deprecated Use setupModelTest instead */ export const describeModel: ContextDefinition; - export const setupTest: SetupTest; + export const setupTest: NewSetupTest & SetupTest; export const setupAcceptanceTest: SetupTest; export const setupComponentTest: SetupTest; export const setupModelTest: SetupTest; + export const setupRenderingTest: NewSetupTest; + export const setupApplicationTest: NewSetupTest; + export const it: typeof mochaIt; /** diff --git a/types/ember-qunit/ember-qunit-tests.ts b/types/ember-qunit/ember-qunit-tests.ts index 6ddb4e5454..acd9650f98 100644 --- a/types/ember-qunit/ember-qunit-tests.ts +++ b/types/ember-qunit/ember-qunit-tests.ts @@ -2,6 +2,7 @@ import Ember from 'ember'; import hbs from 'htmlbars-inline-precompile'; import { module } from 'qunit'; import { + start, test, skip, moduleFor, @@ -137,3 +138,5 @@ module('x-foo', function(hooks) { module('foo service', function(hooks) { setupTest(hooks); }); + +start(); diff --git a/types/ember-qunit/index.d.ts b/types/ember-qunit/index.d.ts index 9dc93b980b..5dbfb49401 100644 --- a/types/ember-qunit/index.d.ts +++ b/types/ember-qunit/index.d.ts @@ -97,6 +97,48 @@ declare module 'ember-qunit' { export class QUnitAdapter extends Ember.Test.Adapter { } export { module, test, skip, only, todo } from 'qunit'; + + interface QUnitStartOptions { + /** + * If `false` tests will not be loaded automatically. + */ + loadTests?: boolean; + + /** + * If `false` the test container will not be setup based on `devmode`, + * `dockcontainer`, or `nocontainer` URL params. + */ + setupTestContainer?: boolean; + + /** + * If `false` tests will not be automatically started (you must run + * `QUnit.start()` to kick them off). + */ + startTests?: boolean; + + /** + * If `false` the default Ember.Test adapter will not be updated. + */ + setupTestAdapter?: boolean; + + /** + * `false` opts out of the default behavior of setting `Ember.testing` + * to `true` before all tests and back to `false` after each test will. + */ + setupEmberTesting?: boolean; + + /** + * If `false` validation of `Ember.onerror` will be disabled. + */ + setupEmberOnerrorValidation?: boolean; + + /** + * If `false` test isolation validation will be disabled. + */ + setupTestIsolationValidatoin?: boolean; + } + + export function start(options?: QUnitStartOptions): void; } declare module 'qunit' { diff --git a/types/ember/index.d.ts b/types/ember/index.d.ts index 56a0879ae5..93babaa0a7 100755 --- a/types/ember/index.d.ts +++ b/types/ember/index.d.ts @@ -7,6 +7,7 @@ // Theron Cross // Martin Feckie // Alex LaFroscia +// Mike North // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.4 @@ -111,6 +112,8 @@ declare module 'ember' { | 'render' | 'afterRender' | 'destroy'; + type QueryParamTypes = 'boolean' | 'number' | 'array' | 'string'; + type QueryParamScopeTypes = 'controller' | 'model'; type ObserverMethod = | (keyof Target) @@ -308,6 +311,10 @@ declare module 'ember' { * Given a fullName return a corresponding instance. */ lookup(fullName: string, options?: {}): any; + /** + * Given a fullName return a corresponding factory. + */ + factoryFor(fullName: string, options?: {}): any; } const _ContainerProxyMixin: Mixin<_ContainerProxyMixin>; @@ -321,11 +328,11 @@ declare module 'ember' { */ resolveRegistration(fullName: string): Function; /** - * Registers a factory that can be used for dependency injection (with + * Registers a factory or value that can be used for dependency injection (with * `inject`) or for service lookup. Each factory is registered with * a full name including two parts: `type:name`. */ - register(fullName: string, factory: Function, options?: { singleton?: boolean, instantiate?: boolean }): any; + register(fullName: string, factory: any, options?: { singleton?: boolean, instantiate?: boolean }): any; /** * Unregister a factory. */ @@ -473,6 +480,11 @@ declare module 'ember' { **/ Router: Router; registry: Registry; + /** + * Initialize the application and return a promise that resolves with the `Application` + * object when the boot process is complete. + */ + boot(): Promise; } /** The `ApplicationInstance` encapsulates all of the stateful aspects of a @@ -738,7 +750,11 @@ declare module 'ember' { replaceRoute(name: string, ...args: any[]): void; transitionToRoute(name: string, ...args: any[]): void; model: any; - queryParams: string[] | Array<{ [key: string]: { type: string } }>; + queryParams: string | string[] | Array<{ [key: string]: { + type?: QueryParamTypes, + scope?: QueryParamScopeTypes, + as?: string + }}>; target: Object; } const ControllerMixin: Ember.Mixin; @@ -1100,6 +1116,12 @@ declare module 'ember' { * Unregister a factory. */ unregister(fullName: string): any; + + /** + * Initialize the `EngineInstance` and return a promise that resolves + * with the instance itself when the boot process is complete. + */ + boot(): Promise; } /** * This mixin defines the common interface implemented by enumerable objects @@ -1173,7 +1195,7 @@ declare module 'ember' { * key. You can pass an optional second argument with the target value. Otherwise * this will match any property that evaluates to false. */ - rejectBy(key: string, value?: string): NativeArray; + rejectBy(key: string, value?: any): NativeArray; /** * Returns the first item in the array for which the callback returns true. * This method works similar to the `filter()` method defined in JavaScript 1.6 @@ -1492,25 +1514,25 @@ declare module 'ember' { __ember_mixin__: never; static create( - args?: T & ThisType> + args?: MixinOrLiteral & ThisType> ): Mixin; static create( - arg1: T1 & ThisType>, - arg2: T2 & ThisType> + arg1: MixinOrLiteral & ThisType>, + arg2: MixinOrLiteral & ThisType> ): Mixin; static create( - arg1: T1 & ThisType>, - arg2: T2 & ThisType>, - arg3: T3 & ThisType> + arg1: MixinOrLiteral & ThisType>, + arg2: MixinOrLiteral & ThisType>, + arg3: MixinOrLiteral & ThisType> ): Mixin; static create( - arg1: T1 & ThisType>, - arg2: T2 & ThisType>, - arg3: T3 & ThisType>, - arg4: T4 & ThisType> + arg1: MixinOrLiteral & ThisType>, + arg2: MixinOrLiteral & ThisType>, + arg3: MixinOrLiteral & ThisType>, + arg4: MixinOrLiteral & ThisType> ): Mixin; } /** @@ -1984,6 +2006,19 @@ declare module 'ember' { */ transitionTo(name: string, ...object: any[]): Transition; + // https://emberjs.com/api/ember/3.2/classes/Route/methods/intermediateTransitionTo?anchor=intermediateTransitionTo + /** + * Perform a synchronous transition into another route without attempting to resolve promises, + * update the URL, or abort any currently active asynchronous transitions + * (i.e. regular transitions caused by transitionTo or URL changes). + * + * @param name the name of the route or a URL + * @param object the model(s) or identifier(s) to be used while + * transitioning to the route. + * @returns the Transition object associated with this attempted transition + */ + intermediateTransitionTo(name: string, ...object: any[]): Transition; + // properties /** * The controller associated with this route. @@ -3337,7 +3372,48 @@ declare module 'ember' { /** * The Router service is the public API that provides component/view layer access to the router. */ - class RouterService extends Ember.Service { + export class RouterService extends Ember.Service { + // + /** + Name of the current route. + This property represent the logical name of the route, + which is comma separated. + For the following router: + ```app/router.js + Router.map(function() { + this.route('about'); + this.route('blog', function () { + this.route('post', { path: ':post_id' }); + }); + }); + ``` + It will return: + * `index` when you visit `/` + * `about` when you visit `/about` + * `blog.index` when you visit `/blog` + * `blog.post` when you visit `/blog/some-post-id` + */ + readonly currentRouteName: string; + // + /** + Current URL for the application. + This property represent the URL path for this route. + For the following router: + ```app/router.js + Router.map(function() { + this.route('about'); + this.route('blog', function () { + this.route('post', { path: ':post_id' }); + }); + }); + ``` + It will return: + * `/` when you visit `/` + * `/about` when you visit `/about` + * `/blog` when you visit `/blog` + * `/blog/some-post-id` when you visit `/blog/some-post-id` + */ + readonly currentURL: string; // /** * Determines whether a route is active. @@ -3741,6 +3817,11 @@ declare module '@ember/routing/router' { export default class EmberRouter extends Ember.Router { } } +declare module '@ember/routing/router-service' { + import { RouterService } from 'ember'; + export default class extends RouterService { } +} + declare module '@ember/runloop' { import Ember from 'ember'; export const begin: typeof Ember.run.begin; diff --git a/types/ember/test/application-instance.ts b/types/ember/test/application-instance.ts index dfda446463..9ae22e5f26 100644 --- a/types/ember/test/application-instance.ts +++ b/types/ember/test/application-instance.ts @@ -1,4 +1,5 @@ import ApplicationInstance from '@ember/application/instance'; +import hbs from 'htmlbars-inline-precompile'; const appInstance = ApplicationInstance.create(); appInstance.register('some:injection', class Foo {}); @@ -11,7 +12,18 @@ appInstance.register('some:injection', class Foo {}, { instantiate: false, }); +appInstance.register('templates:foo/bar', hbs`

Hello World

`); + appInstance.register('some:injection', class Foo {}, { singleton: false, instantiate: true, }); + +appInstance.factoryFor('router:main'); +appInstance.lookup('route:basic'); + +appInstance.boot(); + +(async function() { + await appInstance.boot(); +}()); diff --git a/types/ember/test/engine-instance.ts b/types/ember/test/engine-instance.ts new file mode 100644 index 0000000000..c74914dea5 --- /dev/null +++ b/types/ember/test/engine-instance.ts @@ -0,0 +1,26 @@ +import EngineInstance from '@ember/engine/instance'; + +const engineInstance = EngineInstance.create(); +engineInstance.register('some:injection', class Foo {}); + +engineInstance.register('some:injection', class Foo {}, { + singleton: true, +}); + +engineInstance.register('some:injection', class Foo {}, { + instantiate: false, +}); + +engineInstance.register('some:injection', class Foo {}, { + singleton: false, + instantiate: true, +}); + +engineInstance.factoryFor('router:main'); +engineInstance.lookup('route:basic'); + +engineInstance.boot(); + +(async function() { + await engineInstance.boot(); +}()); diff --git a/types/ember/test/mixin.ts b/types/ember/test/mixin.ts index 2c417c00da..a89f490a11 100755 --- a/types/ember/test/mixin.ts +++ b/types/ember/test/mixin.ts @@ -44,3 +44,14 @@ const obj = LiteralMixins.create(); assertType(obj.a); assertType(obj.b); assertType(obj.c); + +/* Test composition of mixins */ +const EditableAndCancelableMixin = Ember.Mixin.create(EditableMixin, { + cancelled: false, +}); + +const EditableAndCancelableComment = Ember.Route.extend(EditableAndCancelableMixin); + +const editableAndCancelable = EditableAndCancelableComment.create(); +assertType(editableAndCancelable.isEditing); +assertType(editableAndCancelable.cancelled); diff --git a/types/ember/test/route.ts b/types/ember/test/route.ts index fad5bbc634..84e432dbd3 100755 --- a/types/ember/test/route.ts +++ b/types/ember/test/route.ts @@ -92,4 +92,13 @@ class RouteUsingClass extends Route.extend({ beforeModel(this: RouteUsingClass) { return 'beforeModel can return anything, not just promises'; } + intermediateTransitionWithoutModel() { + this.intermediateTransitionTo('some-route'); + } + intermediateTransitionWithModel() { + this.intermediateTransitionTo('some.other.route', { }); + } + intermediateTransitionWithMultiModel() { + this.intermediateTransitionTo('some.other.route', 1, 2, { }); + } } diff --git a/types/ember/test/router.ts b/types/ember/test/router.ts index c663083679..760e9ed5bc 100755 --- a/types/ember/test/router.ts +++ b/types/ember/test/router.ts @@ -1,4 +1,5 @@ import Ember from 'ember'; +import { assertType } from './lib/assert'; const AppRouter = Ember.Router.extend({ }); @@ -25,6 +26,12 @@ AppRouter.map(function() { const RouterServiceConsumer = Ember.Service.extend({ router: Ember.inject.service('router'), + currentRouteName() { + const x: string = Ember.get(this, 'router').currentRouteName; + }, + currentURL() { + const x: string = Ember.get(this, 'router').currentURL; + }, transitionWithoutModel() { Ember.get(this, 'router') .transitionTo('some-route'); @@ -34,6 +41,11 @@ const RouterServiceConsumer = Ember.Service.extend({ Ember.get(this, 'router') .transitionTo('some.other.route', model); }, + transitionWithMultiModel() { + const model = Ember.Object.create(); + Ember.get(this, 'router') + .transitionTo('some.other.route', model, model); + }, transitionWithModelAndOptions() { const model = Ember.Object.create(); Ember.get(this, 'router') diff --git a/types/ember/tsconfig.json b/types/ember/tsconfig.json index b4bc966044..676c107f72 100755 --- a/types/ember/tsconfig.json +++ b/types/ember/tsconfig.json @@ -23,6 +23,7 @@ "test/lib/assert.ts", "test/application.ts", "test/application-instance.ts", + "test/engine-instance.ts", "test/ember-tests.ts", "test/error.ts", "test/event.ts", diff --git a/types/ember__test-helpers/ember__test-helpers-tests.ts b/types/ember__test-helpers/ember__test-helpers-tests.ts new file mode 100644 index 0000000000..9fe9e4c297 --- /dev/null +++ b/types/ember__test-helpers/ember__test-helpers-tests.ts @@ -0,0 +1,95 @@ +/// + +import { test } from 'qunit'; +import Application from '@ember/application'; +import hbs from 'htmlbars-inline-precompile'; +import { + click, + doubleClick, + tap, + focus, + blur, + triggerEvent, + triggerKeyEvent, + fillIn, + render, + find, + findAll, + getRootElement, + pauseTest, + resumeTest, + waitFor, + waitUntil, + settled, + isSettled, + getSettledState, + visit, + currentURL, + currentRouteName, + setApplication +} from '@ember/test-helpers'; + +const MyApp = Application.extend({ modulePrefix: 'my-app' }); + +setApplication(MyApp.create()); + +test('DOM interactions', async () => { + await render(hbs`
Hello, world
`); + + await click('.message'); + await doubleClick('.message'); + await tap('.message'); + await focus('.message'); + await blur('.message'); + await triggerEvent('.message', 'custom-event'); + await triggerKeyEvent('.message', 'keydown', 'Enter', { ctrlKey: true }); + await fillIn('.message', 'content'); + + const messageElement = find('.message')!; + await click(messageElement); + await doubleClick(messageElement); + await tap(messageElement); + await focus(messageElement); + await blur(messageElement); + await triggerEvent(messageElement, 'custom-event'); + await triggerKeyEvent(messageElement, 'keydown', 'Enter', { ctrlKey: true }); + await fillIn(messageElement, 'content'); + + const allMessages = findAll('.message'); + for (const element of allMessages) { + await click(element); + } + + const root = getRootElement(); + await click(root); +}); + +test('routing helpers', async (assert) => { + await visit('/foo'); + + assert.equal(currentURL(), '/foo'); + assert.equal(currentRouteName(), 'foo'); +}); + +test('pause and resume', async () => { + await pauseTest(); + setTimeout(resumeTest, 1000); +}); + +test('wait helpers', async (assert) => { + await render(hbs`
Hello
`); + + await waitFor('.message', { count: 1, timeout: 10, timeoutMessage: 'uh oh' }); + await waitUntil(() => 'hello', { timeout: 1000, timeoutMessage: 'boom' }); + + await settled(); + assert.ok(isSettled()); + + const { + hasPendingRequests, + hasPendingTimers, + hasPendingWaiters, + hasRunLoop, + pendingRequestCount + } = getSettledState(); +}); diff --git a/types/ember__test-helpers/index.d.ts b/types/ember__test-helpers/index.d.ts new file mode 100644 index 0000000000..067222b425 --- /dev/null +++ b/types/ember__test-helpers/index.d.ts @@ -0,0 +1,220 @@ +// Type definitions for @ember/test-helpers 0.7 +// Project: https://github.com/emberjs/ember-test-helpers +// Definitions by: Dan Freeman +// James C. Davis +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.6 + +/// + +declare module '@ember/test-helpers' { + // DOM Interaction Helpers + + export type Target = string | Element; + + export { default as click } from '@ember/test-helpers/dom/click'; + export { default as doubleClick } from '@ember/test-helpers/dom/double-click'; + export { default as tap } from '@ember/test-helpers/dom/tap'; + export { default as focus } from '@ember/test-helpers/dom/focus'; + export { default as blur } from '@ember/test-helpers/dom/blur'; + export { default as triggerEvent } from '@ember/test-helpers/dom/trigger-event'; + export { default as triggerKeyEvent } from '@ember/test-helpers/dom/trigger-key-event'; + export { default as fillIn } from '@ember/test-helpers/dom/fill-in'; + + // DOM Query Helpers + + export { default as find } from '@ember/test-helpers/dom/find'; + export { default as findAll } from '@ember/test-helpers/dom/find-all'; + export { default as getRootElement } from '@ember/test-helpers/dom/get-root-element'; + + // Routing Helpers + + export { visit, currentRouteName, currentURL } from '@ember/test-helpers/setup-application-context'; + + // Rendering Helpers + + export { render, clearRender } from '@ember/test-helpers/setup-rendering-context'; + + // Wait Helpers + + export { default as waitFor } from '@ember/test-helpers/dom/wait-for'; + export { default as waitUntil } from '@ember/test-helpers/wait-until'; + export { default as settled, isSettled, getSettledState } from '@ember/test-helpers/settled'; + + // Pause Helpers + + export { pauseTest, resumeTest } from '@ember/test-helpers/setup-context'; + + // Test Framework APIs + + export { setResolver, getResolver } from '@ember/test-helpers/resolver'; + export { default as setupContext, getContext, setContext, unsetContext } from '@ember/test-helpers/setup-context'; + export { default as teardownContext } from '@ember/test-helpers/teardown-context'; + export { default as setupRenderingContext } from '@ember/test-helpers/setup-rendering-context'; + export { default as teardownRenderingContext } from '@ember/test-helpers/teardown-rendering-context'; + export { getApplication, setApplication } from '@ember/test-helpers/application'; + export { default as setupApplicationContext } from '@ember/test-helpers/setup-application-context'; + export { default as teardownApplicationContext } from '@ember/test-helpers/teardown-application-context'; + export { default as validateErrorHandler } from '@ember/test-helpers/validate-error-handler'; +} + +declare module '@ember/test-helpers/dom/click' { + import { Target } from '@ember/test-helpers'; + + export default function(target: Target): Promise; +} + +declare module '@ember/test-helpers/dom/double-click' { + import { Target } from '@ember/test-helpers'; + + export default function(target: Target): Promise; +} + +declare module '@ember/test-helpers/dom/tap' { + import { Target } from '@ember/test-helpers'; + + export default function(target: Target): Promise; +} + +declare module '@ember/test-helpers/dom/focus' { + import { Target } from '@ember/test-helpers'; + + export default function(target: Target): Promise; +} + +declare module '@ember/test-helpers/dom/blur' { + import { Target } from '@ember/test-helpers'; + + export default function(target: Target): Promise; +} + +declare module '@ember/test-helpers/dom/trigger-event' { + import { Target } from '@ember/test-helpers'; + + export default function(target: Target, eventType: string, options?: object): Promise; +} + +declare module '@ember/test-helpers/dom/trigger-key-event' { + import { Target } from '@ember/test-helpers'; + + export type KeyEvent = 'keydown' | 'keyup' | 'keypress'; + + export interface KeyModifiers { + ctrlKey?: boolean; + altKey?: boolean; + shiftKey?: boolean; + metaKey?: boolean; + } + + export default function(target: Target, eventType: KeyEvent, key: number | string, modifiers?: KeyModifiers): Promise; +} + +declare module '@ember/test-helpers/dom/fill-in' { + import { Target } from '@ember/test-helpers'; + + export default function(target: Target, text: string): Promise; +} + +declare module '@ember/test-helpers/dom/find' { + export default function(selector: string): Element | null; +} + +declare module '@ember/test-helpers/dom/find-all' { + export default function(selector: string): Element[]; +} + +declare module '@ember/test-helpers/dom/get-root-element' { + export default function(): Element; +} + +declare module '@ember/test-helpers/setup-application-context' { + export default function(context: Context): Promise; + export function visit(url: string): Promise; + export function currentRouteName(): string; + export function currentURL(): string; +} + +declare module '@ember/test-helpers/setup-rendering-context' { + import { TemplateFactory } from 'htmlbars-inline-precompile'; + + export default function(context: Context): Promise; + export function render(template: TemplateFactory): Promise; + export function clearRender(): Promise; +} + +declare module '@ember/test-helpers/dom/wait-for' { + export interface Options { + timeout?: number; + count?: number; + timeoutMessage?: string; + } + + export default function(selector: string, options?: Options): Promise; +} + +declare module '@ember/test-helpers/wait-until' { + export interface Options { + timeout?: number; + timeoutMessage?: string; + } + + export default function(callback: () => T, options?: Options): Promise; +} + +declare module '@ember/test-helpers/settled' { + export interface SettledState { + hasRunLoop: boolean; + hasPendingTimers: boolean; + hasPendingWaiters: boolean; + hasPendingRequests: boolean; + pendingRequestCount: number; + } + + export default function(): Promise; + export function isSettled(): boolean; + export function getSettledState(): SettledState; +} + +declare module '@ember/test-helpers/setup-context' { + import Resolver from '@ember/application/resolver'; + + export default function(context: C, options?: { resolver?: Resolver }): Promise; + export function getContext(): object; + export function setContext(context: object): void; + export function unsetContext(): void; + + export function pauseTest(): Promise; + export function resumeTest(): void; +} + +declare module '@ember/test-helpers/resolver' { + import Resolver from '@ember/application/resolver'; + + export function setResolver(resolver: Resolver): void; + export function getResolver(): Resolver; +} + +declare module '@ember/test-helpers/teardown-context' { + export default function(context: object): Promise; +} + +declare module '@ember/test-helpers/teardown-rendering-context' { + export default function(context: object): Promise; +} + +declare module '@ember/test-helpers/teardown-application-context' { + export default function(context: object): Promise; +} + +declare module '@ember/test-helpers/validate-error-handler' { + import Error from '@ember/error'; + + export default function(callback?: (error: Error) => void): { isValid: boolean, message: string }; +} + +declare module '@ember/test-helpers/application' { + import Application from '@ember/application'; + + export function getApplication(): Application; + export function setApplication(application: Application): void; +} diff --git a/types/ember__test-helpers/tsconfig.json b/types/ember__test-helpers/tsconfig.json new file mode 100644 index 0000000000..de0efdd984 --- /dev/null +++ b/types/ember__test-helpers/tsconfig.json @@ -0,0 +1,27 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "paths": { + "@ember/test-helpers": ["ember__test-helpers"] + } + }, + "files": [ + "index.d.ts", + "ember__test-helpers-tests.ts" + ] +} diff --git a/types/ember__test-helpers/tslint.json b/types/ember__test-helpers/tslint.json new file mode 100644 index 0000000000..4c4fc86ace --- /dev/null +++ b/types/ember__test-helpers/tslint.json @@ -0,0 +1,6 @@ +{ + "extends": "dtslint/dt.json", + "rules": { + "strict-export-declare-modifiers": false + } +} diff --git a/types/emoji-mart/dist-es/components/category.d.ts b/types/emoji-mart/dist-es/components/category.d.ts index 8cd4ceefbb..efa52e9988 100644 --- a/types/emoji-mart/dist-es/components/category.d.ts +++ b/types/emoji-mart/dist-es/components/category.d.ts @@ -1,12 +1,11 @@ import React = require('react'); -import { EmojiData } from '..'; - -import { Emoji, EmojiProps, I18n } from '.'; +import { Emoji, EmojiData, EmojiProps, I18n, CategoryName } from '..'; export interface Props { emojis?: Array; hasStickyPosition?: boolean; + id: CategoryName; name: string; native: boolean; perLine: number; diff --git a/types/emoji-mart/dist-es/components/emoji.d.ts b/types/emoji-mart/dist-es/components/emoji.d.ts deleted file mode 100644 index 030ff7ce12..0000000000 --- a/types/emoji-mart/dist-es/components/emoji.d.ts +++ /dev/null @@ -1,31 +0,0 @@ -import React = require('react'); - -import { EmojiData, EmojiSkin } from '..'; - -export type BackgroundImageFn = (set: EmojiSet, sheetSize: EmojiSheetSize) => string; -export type EmojiSet = 'apple'|'google'|'twitter'|'emojione'|'messenger'|'facebook'; -export type EmojiSheetSize = 16|20|32|64; - -export interface Props { - onOver?(emoji: EmojiData, e: React.MouseEvent): void; - onLeave?(emoji: EmojiData, e: React.MouseEvent): void; - onClick?(emoji: EmojiData, e: React.MouseEvent): void; - /** defaults to returning a png from unpkg.com-hosted emoji-datasource-${set} */ - backgroundImageFn?: BackgroundImageFn; - native?: boolean; - forceSize?: boolean; - tooltip?: boolean; - /** defaults to 1 */ - skin?: EmojiSkin; - /** defaults to 64 */ - sheetSize?: EmojiSheetSize; - /** defaults to 'apple' */ - set?: EmojiSet; - size: number; - emoji: string|EmojiData; -} - -// tslint:disable-next-line strict-export-declare-modifiers -declare const Emoji: React.SFC; - -export { Emoji as default }; diff --git a/types/emoji-mart/dist-es/components/emoji/emoji.d.ts b/types/emoji-mart/dist-es/components/emoji/emoji.d.ts new file mode 100644 index 0000000000..d86d2b686f --- /dev/null +++ b/types/emoji-mart/dist-es/components/emoji/emoji.d.ts @@ -0,0 +1,8 @@ +import React = require('react'); + +import { EmojiProps } from '../..'; + +// tslint:disable-next-line strict-export-declare-modifiers +declare const Emoji: React.StatelessComponent; + +export { Emoji as default }; diff --git a/types/emoji-mart/dist-es/components/emoji/nimble-emoji.d.ts b/types/emoji-mart/dist-es/components/emoji/nimble-emoji.d.ts new file mode 100644 index 0000000000..77888f5a94 --- /dev/null +++ b/types/emoji-mart/dist-es/components/emoji/nimble-emoji.d.ts @@ -0,0 +1,12 @@ +import React = require('react'); + +import { EmojiProps, Data } from '../..'; + +export interface NimbleEmojiProps extends EmojiProps { + data: Data; +} + +// tslint:disable-next-line strict-export-declare-modifiers +declare const NimbleEmoji: React.SFC; + +export { NimbleEmoji as default }; diff --git a/types/emoji-mart/dist-es/components/index.d.ts b/types/emoji-mart/dist-es/components/index.d.ts index 6fc29ecd54..3f05ca5c82 100644 --- a/types/emoji-mart/dist-es/components/index.d.ts +++ b/types/emoji-mart/dist-es/components/index.d.ts @@ -1,4 +1,6 @@ // The other exports on the components folder are not public API export { default as Category, Props as CategoryProps } from './category'; -export { default as Emoji, Props as EmojiProps, BackgroundImageFn, EmojiSet, EmojiSheetSize } from './emoji'; -export { default as Picker, Props as PickerProps, I18n, PartialI18n, CustomEmoji } from './picker'; +export { default as Emoji } from './emoji/emoji'; +export { default as NimbleEmoji, NimbleEmojiProps } from './emoji/nimble-emoji'; +export { default as Picker } from './picker/picker'; +export { default as NimblePicker, NimblePickerProps } from './picker/nimble-picker'; diff --git a/types/emoji-mart/dist-es/components/picker.d.ts b/types/emoji-mart/dist-es/components/picker.d.ts deleted file mode 100644 index 9f9132df05..0000000000 --- a/types/emoji-mart/dist-es/components/picker.d.ts +++ /dev/null @@ -1,54 +0,0 @@ -import React = require('react'); - -import { EmojiData, EmojiSkin } from '..'; - -import { Category, Emoji, EmojiProps, BackgroundImageFn, EmojiSet, EmojiSheetSize } from '.'; - -// tslint:disable-next-line interface-name -export interface I18n { - search: string; - categories: Record<'search'|'recent'|'people'|'nature'|'foods'|'activity'|'places'|'objects'|'symbols'|'flags'|'custom', string>; - notfound: string; -} - -export type PartialI18n = Partial & { categories: Partial}>; - -export interface CustomEmoji { - // id is overridden by short_names[0] - name: string; - /** Must contain at least one name. The first name is used as the unique id. */ - short_names: string[]; - emoticons?: string[]; - keywords?: string[]; - imageUrl: string; -} - -export interface Props { - /** NOTE: default is not preventable */ - onClick?(emoji: EmojiData, e: React.MouseEvent): void; - perLine?: number; - emojiSize?: number; - i18n?: PartialI18n; - style?: React.CSSProperties; - title?: string; - emoji?: string; - color?: string; - set?: EmojiSet; - skin?: EmojiSkin; - native?: boolean; - backgroundImageFn?: BackgroundImageFn; - sheetSize?: EmojiSheetSize; - emojisToShowFilter?(emoji: EmojiData): boolean; - showPreview?: boolean; - emojiTooltip?: boolean; - include?: string[]; - exclude?: string[]; - recent?: string[]; - autoFocus?: boolean; - /** NOTE: custom emoji are copied into a singleton object on every new mount */ - custom: CustomEmoji[]; -} - -export default class Picker extends React.PureComponent { - // everything inside it is supposed to be private -} diff --git a/types/emoji-mart/dist-es/components/picker/nimble-picker.d.ts b/types/emoji-mart/dist-es/components/picker/nimble-picker.d.ts new file mode 100644 index 0000000000..cc564b2a5e --- /dev/null +++ b/types/emoji-mart/dist-es/components/picker/nimble-picker.d.ts @@ -0,0 +1,11 @@ +import React = require('react'); + +import { Data, PickerProps } from '../..'; + +export interface NimblePickerProps extends PickerProps { + data: Data; +} + +export default class NimblePicker extends React.PureComponent { + // everything inside it is supposed to be private +} diff --git a/types/emoji-mart/dist-es/components/picker/picker.d.ts b/types/emoji-mart/dist-es/components/picker/picker.d.ts new file mode 100644 index 0000000000..01f8a41f8b --- /dev/null +++ b/types/emoji-mart/dist-es/components/picker/picker.d.ts @@ -0,0 +1,7 @@ +import React = require('react'); + +import { PickerProps } from '../..'; + +export default class Picker extends React.PureComponent { + // everything inside it is supposed to be private +} diff --git a/types/emoji-mart/dist-es/index.d.ts b/types/emoji-mart/dist-es/index.d.ts index e49d37fcf6..bb0c79be3e 100644 --- a/types/emoji-mart/dist-es/index.d.ts +++ b/types/emoji-mart/dist-es/index.d.ts @@ -1,15 +1,30 @@ -export { default as emojiIndex, EmojiData, EmojiSkin } from './utils/emoji-index'; export { default as store, StoreHandlers } from './utils/store'; export { default as frequently } from './utils/frequently'; +export { Data } from './utils/data'; + +export { + PickerProps, + EmojiProps, + I18n, + PartialI18n, + CategoryName +} from './utils/shared-props'; + +export { + emojiIndex, + nimbleEmojiIndex, + EmojiData, + CustomEmoji, + EmojiSkin +} from './utils/emoji-index'; export { Picker, - PickerProps, - I18n, - PartialI18n, - CustomEmoji, + NimblePicker, + NimblePickerProps, Emoji, - EmojiProps, + NimbleEmoji, + NimbleEmojiProps, Category, CategoryProps } from './components'; diff --git a/types/emoji-mart/dist-es/utils/data.d.ts b/types/emoji-mart/dist-es/utils/data.d.ts new file mode 100644 index 0000000000..ad1bc0d229 --- /dev/null +++ b/types/emoji-mart/dist-es/utils/data.d.ts @@ -0,0 +1,73 @@ +export interface Data { + compressed: boolean; + categories: Category[]; + emojis: { [key: string]: Emoji }; + aliases: { [key: string]: string }; +} + +export interface Category { + id: string; + name: string; + emojis: string[]; +} + +export interface Emoji { + name?: string; + a?: string; + unified?: string; + b?: string; + non_qualified?: string; + c?: string; + has_img_apple?: boolean; + d?: boolean; + has_img_google?: boolean; + e?: boolean; + has_img_twitter?: boolean; + f?: boolean; + has_img_emojione?: boolean; + g?: boolean; + has_img_facebook?: boolean; + h?: boolean; + has_img_messenger?: boolean; + i?: boolean; + keywords?: string[]; + j?: string[]; + sheet?: number[]; + k?: number[]; + emoticons?: string[]; + l?: string[]; + text?: string; + m?: string; + short_names?: string[]; + n?: string[]; + added_in?: number; + o?: number; + sheet_x?: number; + sheet_y?: number; + skin_variations?: { [key: string]: SkinVariation }; + obsoleted_by?: string; + obsoletes?: string; +} + +export interface SkinVariation { + unified: string; + non_qualified: null | string; + image: string; + sheet_x: number; + sheet_y: number; + added_in: string; + has_img_apple: boolean; + has_img_google: boolean; + has_img_twitter: boolean; + has_img_emojione: boolean; + has_img_facebook: boolean; + has_img_messenger: boolean; + obsoleted_by?: string; + obsoletes?: string; +} + +export function buildSearch(emoji: Emoji): string; + +export function compress(emoji: Emoji): void; + +export function uncompress(data: Data): void; diff --git a/types/emoji-mart/dist-es/utils/emoji-index.d.ts b/types/emoji-mart/dist-es/utils/emoji-index.d.ts deleted file mode 100644 index c6499e663c..0000000000 --- a/types/emoji-mart/dist-es/utils/emoji-index.d.ts +++ /dev/null @@ -1,25 +0,0 @@ -export type EmojiSkin = 1|2|3|4|5|6; - -export interface EmojiData { - id: string; - name: string; - colons: string; - /** Reverse mapping to keyof emoticons */ - emoticons: string[]; - unified: string; - skin: EmojiSkin|null; - native: string; -} - -// tslint:disable-next-line strict-export-declare-modifiers -declare const _default: { - search(query: ''): null - search(query: string): EmojiData|null - - emojis: { [emoji: string]: EmojiData } - - /** Mapping of string to keyof emojis */ - emoticons: { [emoticon: string]: string } -}; - -export { _default as default }; diff --git a/types/emoji-mart/dist-es/utils/emoji-index/emoji-index.d.ts b/types/emoji-mart/dist-es/utils/emoji-index/emoji-index.d.ts new file mode 100644 index 0000000000..0d1d6b8881 --- /dev/null +++ b/types/emoji-mart/dist-es/utils/emoji-index/emoji-index.d.ts @@ -0,0 +1,14 @@ +import { EmojiData } from './nimble-emoji-index'; + +// tslint:disable-next-line strict-export-declare-modifiers +declare const _default: { + search(query: ''): null; + search(query: string): EmojiData|null; + + emojis: { [emoji: string]: EmojiData }; + + /** Mapping of string to keyof emojis */ + emoticons: { [emoticon: string]: string }; +}; + +export { _default as default }; diff --git a/types/emoji-mart/dist-es/utils/emoji-index/index.d.ts b/types/emoji-mart/dist-es/utils/emoji-index/index.d.ts new file mode 100644 index 0000000000..576a5d0cb7 --- /dev/null +++ b/types/emoji-mart/dist-es/utils/emoji-index/index.d.ts @@ -0,0 +1,2 @@ +export { default as emojiIndex } from './emoji-index'; +export { default as nimbleEmojiIndex, EmojiData, CustomEmoji, EmojiSkin } from './nimble-emoji-index'; diff --git a/types/emoji-mart/dist-es/utils/emoji-index/nimble-emoji-index.d.ts b/types/emoji-mart/dist-es/utils/emoji-index/nimble-emoji-index.d.ts new file mode 100644 index 0000000000..010c313d19 --- /dev/null +++ b/types/emoji-mart/dist-es/utils/emoji-index/nimble-emoji-index.d.ts @@ -0,0 +1,40 @@ +import { Data } from "../data"; + +import { CategoryName } from '../shared-props'; + +export type EmojiSkin = 1 | 2 | 3 | 4 | 5 | 6; + +export interface BaseEmoji { + id: string; + name: string; + colons: string; + /** Reverse mapping to keyof emoticons */ + emoticons: string[]; + unified: string; + skin: EmojiSkin | null; + native: string; +} + +export interface CustomEmoji { + // id is overridden by short_names[0] + id?: string; + // colons is overridden by :id: + colons?: string; + name: string; + /** Must contain at least one name. The first name is used as the unique id. */ + short_names: string[]; + emoticons?: string[]; + keywords?: string[]; + imageUrl: string; +} + +export type EmojiData = BaseEmoji | CustomEmoji; + +export default class NimbleEmojiIndex { + constructor(data: Data); + search(query: ''): null; + search(query: string): EmojiData[]|null; + emojis: { [emoji: string]: EmojiData }; + /** Mapping of string to keyof emojis */ + emoticons: { [emoticon: string]: string }; +} diff --git a/types/emoji-mart/dist-es/utils/shared-props.d.ts b/types/emoji-mart/dist-es/utils/shared-props.d.ts new file mode 100644 index 0000000000..c091e24556 --- /dev/null +++ b/types/emoji-mart/dist-es/utils/shared-props.d.ts @@ -0,0 +1,83 @@ +import React = require('react'); + +import { EmojiData, EmojiSkin, CustomEmoji } from './emoji-index/nimble-emoji-index'; + +export type BackgroundImageFn = (set: EmojiSet, sheetSize: EmojiSheetSize) => string; +export type EmojiSet = 'apple' | 'google' | 'twitter' | 'emojione' | 'messenger' | 'facebook'; +export type EmojiSheetSize = 16 | 20 | 32 | 64; + +export interface EmojiProps { + onOver?(emoji: EmojiData, e: React.MouseEvent): void; + onLeave?(emoji: EmojiData, e: React.MouseEvent): void; + onClick?(emoji: EmojiData, e: React.MouseEvent): void; + fallback?(emoji: EmojiData, props: EmojiProps): React.Component; + /** defaults to returning a png from unpkg.com-hosted emoji-datasource-${set} */ + backgroundImageFn?: BackgroundImageFn; + native?: boolean; + forceSize?: boolean; + tooltip?: boolean; + /** defaults to 1 */ + skin?: EmojiSkin; + /** defaults to 64 */ + sheetSize?: EmojiSheetSize; + /** defaults to 52 */ + sheetColumns?: number; + /** defaults to 52 */ + sheetRows?: number; + /** defaults to 'apple' */ + set?: EmojiSet; + size: number; + emoji: string | EmojiData; + html?: boolean; + /** data is omitted here as it should be used for NimbleEmoji only - not emoji */ +} + +export type CategoryName = 'search' | 'recent' | 'people' | 'nature' | 'foods' | 'activity' | 'places' | 'objects' | 'symbols' | 'flags' | 'custom'; + +// tslint:disable-next-line interface-name +export interface I18n { + search: string; + categories: Record; + notfound: string; + skintext: string; +} + +export type PartialI18n = Partial & { categories: Partial }>; + +export interface CustomIcons { + categories: Record React.Component>; +} + +export interface PickerProps { + /** NOTE: default is not preventable */ + onClick?(emoji: EmojiData, e: React.MouseEvent): void; + onSelect?(emoji: EmojiData): void; + onSkinChange?(skin: EmojiSkin): void; + perLine?: number; + emojiSize?: number; + i18n?: PartialI18n; + style?: React.CSSProperties; + title?: string; + emoji?: string; + color?: string; + set?: EmojiSet; + skin?: EmojiSkin; + defaultSkin?: EmojiSkin; + native?: boolean; + backgroundImageFn?: BackgroundImageFn; + sheetSize?: EmojiSheetSize; + emojisToShowFilter?(emoji: EmojiData): boolean; + showPreview?: boolean; + showSkinTones?: boolean; + emojiTooltip?: boolean; + include?: CategoryName[]; + exclude?: CategoryName[]; + recent?: string[]; + autoFocus?: boolean; + /** NOTE: custom emoji are copied into a singleton object on every new mount */ + custom: CustomEmoji[]; + skinEmoji?: string; + notFound?(): React.Component; + notFoundEmoji?: string; + icons?: CustomIcons; +} diff --git a/types/emoji-mart/emoji-mart-tests.tsx b/types/emoji-mart/emoji-mart-tests.tsx index 7b7b8d0471..56b05453a9 100644 --- a/types/emoji-mart/emoji-mart-tests.tsx +++ b/types/emoji-mart/emoji-mart-tests.tsx @@ -1,4 +1,4 @@ -// Port of https://github.com/missive/emoji-mart/blob/master/src/components/emoji.js +// Port of https://github.com/missive/emoji-mart/blob/v2.8.0/stories/index.js import React = require('react'); diff --git a/types/emoji-mart/index.d.ts b/types/emoji-mart/index.d.ts index 6a8ed65632..38acd9e021 100644 --- a/types/emoji-mart/index.d.ts +++ b/types/emoji-mart/index.d.ts @@ -1,9 +1,8 @@ -// Type definitions for emoji-mart 2.2 +// Type definitions for emoji-mart 2.8 // Project: https://github.com/missive/emoji-mart // Definitions by: Diogo Franco +// Nick Winans // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 - -// These definitions should work with 2.3, but the tests doesn't pass on 2.3. +// TypeScript Version: 2.8 export * from './dist-es'; diff --git a/types/emoji-mart/tsconfig.json b/types/emoji-mart/tsconfig.json index 6ecc944e77..d929a3cc01 100644 --- a/types/emoji-mart/tsconfig.json +++ b/types/emoji-mart/tsconfig.json @@ -20,11 +20,17 @@ "files": [ "index.d.ts", "dist-es/components/category.d.ts", - "dist-es/components/emoji.d.ts", + "dist-es/components/emoji/emoji.d.ts", + "dist-es/components/emoji/nimble-emoji.d.ts", "dist-es/components/index.d.ts", - "dist-es/components/picker.d.ts", - "dist-es/utils/emoji-index.d.ts", + "dist-es/components/picker/picker.d.ts", + "dist-es/components/picker/nimble-picker.d.ts", + "dist-es/utils/emoji-index/emoji-index.d.ts", + "dist-es/utils/emoji-index/nimble-emoji-index.d.ts", + "dist-es/utils/emoji-index/index.d.ts", + "dist-es/utils/data.d.ts", "dist-es/utils/frequently.d.ts", + "dist-es/utils/shared-props.d.ts", "dist-es/utils/store.d.ts", "dist-es/index.d.ts", "emoji-mart-tests.tsx" diff --git a/types/emoji-regex/emoji-regex-tests.ts b/types/emoji-regex/emoji-regex-tests.ts new file mode 100644 index 0000000000..6d6b0d25d9 --- /dev/null +++ b/types/emoji-regex/emoji-regex-tests.ts @@ -0,0 +1,3 @@ +import emojiRegex from "emoji-regex"; + +emojiRegex(); // $ExpectType RegExp diff --git a/types/emoji-regex/index.d.ts b/types/emoji-regex/index.d.ts new file mode 100644 index 0000000000..edff690dc7 --- /dev/null +++ b/types/emoji-regex/index.d.ts @@ -0,0 +1,7 @@ +// Type definitions for emoji-regex 7.0 +// Project: https://github.com/mathiasbynens/emoji-regex +// Definitions by: iKBAHT +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare function createRegExp(): RegExp; +export = createRegExp; diff --git a/types/emoji-regex/tsconfig.json b/types/emoji-regex/tsconfig.json new file mode 100644 index 0000000000..1dfdf53dac --- /dev/null +++ b/types/emoji-regex/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "allowSyntheticDefaultImports": true, + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictFunctionTypes": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "emoji-regex-tests.ts" + ] +} diff --git a/types/emoji-regex/tslint.json b/types/emoji-regex/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/emoji-regex/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/enhanced-resolve/index.d.ts b/types/enhanced-resolve/index.d.ts index 1cf3a3397a..0a82a4263e 100644 --- a/types/enhanced-resolve/index.d.ts +++ b/types/enhanced-resolve/index.d.ts @@ -1,6 +1,8 @@ // Type definitions for enhanced-resolve v3.0.0 // Project: https://github.com/webpack/enhanced-resolve.git -// Definitions by: e-cloud , Onigoetz +// Definitions by: e-cloud +// Onigoetz +// John Reilly // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 diff --git a/types/env-paths/env-paths-tests.ts b/types/env-paths/env-paths-tests.ts new file mode 100644 index 0000000000..b143fb47b5 --- /dev/null +++ b/types/env-paths/env-paths-tests.ts @@ -0,0 +1,4 @@ +import envPaths = require('env-paths'); + +// $ExpectType Paths +envPaths('./'); diff --git a/types/env-paths/index.d.ts b/types/env-paths/index.d.ts new file mode 100644 index 0000000000..c759f3875c --- /dev/null +++ b/types/env-paths/index.d.ts @@ -0,0 +1,18 @@ +// Type definitions for env-paths 1.0 +// Project: https://github.com/sindresorhus/env-paths +// Definitions by: Daniel Byrne +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export = envPaths; + +declare function envPaths(name: string, opts?: { suffix: string; }): envPaths.Paths; + +declare namespace envPaths { + interface Paths { + readonly data: string; + readonly config: string; + readonly cache: string; + readonly log: string; + readonly temp: string; + } +} diff --git a/types/env-paths/tsconfig.json b/types/env-paths/tsconfig.json new file mode 100644 index 0000000000..62dcbca022 --- /dev/null +++ b/types/env-paths/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": ["es6"], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": false, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": ["../"], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "env-paths-tests.ts" + ] +} diff --git a/types/env-paths/tslint.json b/types/env-paths/tslint.json new file mode 100644 index 0000000000..d88586e5bd --- /dev/null +++ b/types/env-paths/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": "dtslint/dt.json" +} diff --git a/types/enzyme-adapter-react-15.4/index.d.ts b/types/enzyme-adapter-react-15.4/index.d.ts index 570cc22e99..2496fb1719 100644 --- a/types/enzyme-adapter-react-15.4/index.d.ts +++ b/types/enzyme-adapter-react-15.4/index.d.ts @@ -2,7 +2,7 @@ // Project: http://airbnb.io/enzyme/ // Definitions by: Nabeelah Ali // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import { EnzymeAdapter } from 'enzyme'; diff --git a/types/enzyme-adapter-react-15/index.d.ts b/types/enzyme-adapter-react-15/index.d.ts index 90149cae55..06659d75b9 100644 --- a/types/enzyme-adapter-react-15/index.d.ts +++ b/types/enzyme-adapter-react-15/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/airbnb/enzyme // Definitions by: Tanguy Krotoff // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import { EnzymeAdapter } from 'enzyme'; diff --git a/types/enzyme-adapter-react-16/index.d.ts b/types/enzyme-adapter-react-16/index.d.ts index 53f97ccce6..3e567d956b 100644 --- a/types/enzyme-adapter-react-16/index.d.ts +++ b/types/enzyme-adapter-react-16/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/airbnb/enzyme // Definitions by: Tanguy Krotoff // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import { EnzymeAdapter } from 'enzyme'; diff --git a/types/enzyme-redux/index.d.ts b/types/enzyme-redux/index.d.ts index ad312d6d1f..e231119b89 100644 --- a/types/enzyme-redux/index.d.ts +++ b/types/enzyme-redux/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/Knegusen/enzyme-redux#readme // Definitions by: Dennis Axelsson // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import { ReactWrapper, ShallowWrapper } from 'enzyme'; import { ReactElement } from 'react'; diff --git a/types/enzyme-to-json/index.d.ts b/types/enzyme-to-json/index.d.ts index d2ba70fc8f..1a8cafb23a 100644 --- a/types/enzyme-to-json/index.d.ts +++ b/types/enzyme-to-json/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/adriantoine/enzyme-to-json#readme // Definitions by: Joscha Feth // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import { ReactWrapper, ShallowWrapper } from 'enzyme'; diff --git a/types/enzyme/enzyme-tests.tsx b/types/enzyme/enzyme-tests.tsx index bbdd8f404f..e1762b843e 100644 --- a/types/enzyme/enzyme-tests.tsx +++ b/types/enzyme/enzyme-tests.tsx @@ -36,10 +36,18 @@ interface MyComponentState { } class MyComponent extends Component { + handleEcho(value: string) { + return value; + } setState(...args: any[]) { console.log(args); } } +class MyComponentPropsOnly extends Component { + handleEcho(value: string) { + return value; + } +} class AnotherComponent extends Component { setState(...args: any[]) { @@ -78,6 +86,34 @@ function ShallowWrapperTest() { let anotherStatelessWrapper: ShallowWrapper; let anotherComponentWrapper: ShallowWrapper; + // testStatePropsInstanceFn(shallow()); + function testStatePropsInstance() { + const wrapper = shallow(); + + const { + numberProp, // $ExpectType number + stringProp // $ExpectType string + } = wrapper.props(); + const { + stateProperty // $ExpectType string + } = wrapper.state(); + const { + handleEcho // $ExpectType (value: string) => string + } = wrapper.instance(); + + // $ExpectError + wrapper.setState({stateProperty: 123}); + // $ExpectError + wrapper.setState({statePropertyzasd: 'hello'}); + wrapper.setState({stateProperty: 'hello'}); + + // $ExpectError + wrapper.setProps({numberProp: '123'}); + // $ExpectError + wrapper.setProps({numberPropzasd: 'hello'}); + wrapper.setProps({numberProp: 123}); + } + function test_props_state_inferring() { let wrapper: ShallowWrapper; wrapper = shallow(); @@ -340,7 +376,16 @@ function ShallowWrapperTest() { } function test_instance() { - const myComponent: MyComponent = shallowWrapper.instance(); + const myComponent = shallowWrapper.instance() as MyComponent; + myComponent.handleEcho('it works'); + + const wrapper = shallow(); + wrapper.instance().handleEcho('it works'); + + const wrapperPropsOnly = shallow(); + wrapperPropsOnly.setProps({stringProp: 'new value'}); + // $ExpectError + wrapperPropsOnly.instance().handleEcho; } function test_update() { @@ -438,6 +483,33 @@ function ReactWrapperTest() { let anotherStatelessWrapper: ReactWrapper; let anotherComponentWrapper: ReactWrapper; + function testStatePropsInstance() { + const wrapper = mount(); + + const { + numberProp, // $ExpectType number + stringProp // $ExpectType string + } = wrapper.props(); + const { + stateProperty // $ExpectType string + } = wrapper.state(); + const { + handleEcho // $ExpectType (value: string) => string + } = wrapper.instance(); + + // $ExpectError + wrapper.setState({stateProperty: 123}); + // $ExpectError + wrapper.setState({statePropertyzasd: 'hello'}); + wrapper.setState({stateProperty: 'hello'}); + + // $ExpectError + wrapper.setProps({numberProp: '123'}); + // $ExpectError + wrapper.setProps({numberPropzasd: 'hello'}); + wrapper.setProps({numberProp: 123}); + } + function test_prop_state_inferring() { let wrapper: ReactWrapper; wrapper = mount(); @@ -696,7 +768,16 @@ function ReactWrapperTest() { } function test_instance() { - const myComponent: MyComponent = reactWrapper.instance(); + const myComponent = reactWrapper.instance() as MyComponent; + myComponent.handleEcho('it works'); + + const wrapperPropsOnly = mount(); + wrapperPropsOnly.setProps({stringProp: 'new value'}); + // $ExpectError + wrapperPropsOnly.instance().handleEcho; + + const wrapper = mount(); + wrapper.instance().handleEcho('it works'); } function test_update() { diff --git a/types/enzyme/index.d.ts b/types/enzyme/index.d.ts index 0a741460f6..a91f60b3c6 100644 --- a/types/enzyme/index.d.ts +++ b/types/enzyme/index.d.ts @@ -7,8 +7,9 @@ // huhuanming // MartynasZilinskas // Torgeir Hovden +// Martin Hochel // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 /// import { ReactElement, Component, AllHTMLAttributes as ReactHTMLAttributes, SVGAttributes as ReactSVGAttributes } from "react"; @@ -45,7 +46,7 @@ export type EnzymeSelector = string | StatelessComponent | ComponentClass = (intercepter: T) => void; -export interface CommonWrapper

{ +export interface CommonWrapper

> { /** * Returns a new wrapper with only the nodes of the current wrapper that, when passed into the provided predicate function, return true. */ @@ -258,7 +259,7 @@ export interface CommonWrapper

{ * * NOTE: can only be called on a wrapper instance that is also the root instance. */ - instance(): Component; + instance(): C; /** * Forces a re-render. Useful to run before checking the render output if something external may be updating @@ -354,8 +355,8 @@ export interface CommonWrapper

{ } // tslint:disable-next-line no-empty-interface -export interface ShallowWrapper

extends CommonWrapper { } -export class ShallowWrapper

{ +export interface ShallowWrapper

extends CommonWrapper { } +export class ShallowWrapper

{ constructor(nodes: JSX.Element[] | JSX.Element, root?: ShallowWrapper, options?: ShallowRendererProps); shallow(options?: ShallowRendererProps): ShallowWrapper; unmount(): this; @@ -440,8 +441,8 @@ export class ShallowWrapper

{ } // tslint:disable-next-line no-empty-interface -export interface ReactWrapper

extends CommonWrapper { } -export class ReactWrapper

{ +export interface ReactWrapper

extends CommonWrapper { } +export class ReactWrapper

{ constructor(nodes: JSX.Element | JSX.Element[], root?: ReactWrapper, options?: MountRendererProps); unmount(): this; @@ -588,12 +589,14 @@ export interface MountRendererProps { * Shallow rendering is useful to constrain yourself to testing a component as a unit, and to ensure that * your tests aren't indirectly asserting on behavior of child components. */ +export function shallow(node: ReactElement

, options?: ShallowRendererProps): ShallowWrapper; export function shallow

(node: ReactElement

, options?: ShallowRendererProps): ShallowWrapper; export function shallow(node: ReactElement

, options?: ShallowRendererProps): ShallowWrapper; /** * Mounts and renders a react component into the document and provides a testing wrapper around it. */ +export function mount(node: ReactElement

, options?: MountRendererProps): ReactWrapper; export function mount

(node: ReactElement

, options?: MountRendererProps): ReactWrapper; export function mount(node: ReactElement

, options?: MountRendererProps): ReactWrapper; diff --git a/types/epilogue/index.d.ts b/types/epilogue/index.d.ts index 3fe56b9e9f..e54f127d9e 100644 --- a/types/epilogue/index.d.ts +++ b/types/epilogue/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/dchester/epilogue // Definitions by: Satana Charuwichitratana // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.4 +// TypeScript Version: 2.8 import { Sequelize, diff --git a/types/error-subclass/error-subclass-tests.ts b/types/error-subclass/error-subclass-tests.ts new file mode 100644 index 0000000000..9944bba159 --- /dev/null +++ b/types/error-subclass/error-subclass-tests.ts @@ -0,0 +1,7 @@ +import ErrorSubclass from 'error-subclass'; + +class ExampleError extends ErrorSubclass { + static displayName = 'ExampleError'; +} + +throw new ExampleError('Something went wrong!'); diff --git a/types/error-subclass/index.d.ts b/types/error-subclass/index.d.ts new file mode 100644 index 0000000000..55add2c057 --- /dev/null +++ b/types/error-subclass/index.d.ts @@ -0,0 +1,8 @@ +// Type definitions for error-subclass 2.2 +// Project: https://github.com/spudly/error-subclass#readme +// Definitions by: Fitbit +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export default class ErrorSubclass extends Error { + static displayName: string; +} diff --git a/types/error-subclass/tsconfig.json b/types/error-subclass/tsconfig.json new file mode 100644 index 0000000000..1574ebeea2 --- /dev/null +++ b/types/error-subclass/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", + "error-subclass-tests.ts" + ] +} diff --git a/types/error-subclass/tslint.json b/types/error-subclass/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/error-subclass/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/es-feature-detection/es-feature-detection-tests.ts b/types/es-feature-detection/es-feature-detection-tests.ts new file mode 100644 index 0000000000..13b779c1bb --- /dev/null +++ b/types/es-feature-detection/es-feature-detection-tests.ts @@ -0,0 +1,14 @@ +import * as es from "es-feature-detection"; + +const fns = es.builtins(); +if (fns["Array.prototype.includes"]) { + // [].includes +} +const syntax = es.syntax(); +if (syntax["Arrow function"]) { + new Function("() => {}"); +} + +if (fns.es2017.__all && syntax.es2017.__all) { + // support es2017! +} diff --git a/types/es-feature-detection/index.d.ts b/types/es-feature-detection/index.d.ts new file mode 100644 index 0000000000..7c4124ce73 --- /dev/null +++ b/types/es-feature-detection/index.d.ts @@ -0,0 +1,30 @@ +// Type definitions for es-feature-detection 2.0 +// Project: https://github.com/Tokimon/es-feature-detection#readme +// Definitions by: Jack Works +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.5 +export type ES2015Builtins = "__all" | "Array.from" | "Array.of" | "Array.prototype.fill" | "Array.prototype.find" | "Array.prototype.findIndex" | "Array.prototype.entries" | "Array.prototype.keys" | + "Array.prototype.copyWithin" | "base64" | "Map" | "Set" | "WeakMap" | "WeakSet" | "Math.imul" | "Math.clz32" | "Math.fround" | "Math.log10" | "Math.log2" | "Math.log1p" | "Math.expm1" | + "Math.cosh" | "Math.sinh" | "Math.tanh" | "Math.acosh" | "Math.asinh" | "Math.hypot" | "Math.trunc" | "Math.sign" | "Math.cbrt" | "Number.isNaN" | "Number.isFinite" | "Number.isInteger" | + "Number.parseInt" | "Number.parseFloat" | "Number.EPSILON" | "Number.MAX_SAFE_INTEGER" | "Number.MIN_SAFE_INTEGER" | "Number.isSafeInteger" | "Object.prototype.__proto__" | "Object.is" | + "Object.setPrototypeOf" | "Object.assign" | "Object.getOwnPropertySymbols" | "Promise" | "Proxy" | "Reflect" | "requestAnimationFrame" | "String.fromCodePoint" | "String.prototype.codePointAt" | + "String.prototype.startsWith" | "String.prototype.endsWith" | "String.prototype.includes" | "String.prototype.repeat" | "String.prototype.normalize" | "String.raw" | "Symbol" | "TypedArrays" | + "new.target"; +export type ES2016Builtins = "__all" | "Array.prototype.includes" | "TypedArray.prototype.includes"; +export type ES2017Builtins = "__all" | "Atomics" | "Object.values" | "Object.entries" | "Object.getOwnPropertyDescriptors" | + "String.prototype.padEnd" | "String.prototype.padStart" | "SharedArrayBuffer"; +export type ES2015Syntax = "__all" | "for...of" | "RegExp.prototype.sticky" | "RegExp.prototype.unicode" | "const" | "let" | "Destructuring" | "Spread Array" | "Spread Function call" | + "Rest parameters" | "Default parameters" | "Arrow function" | "Generator function" | "Binary literals" | "Octal literals" | "Template Strings" | "Shorthand property" | "Shorthand method" | + "Computed property" | "Block level function declaration" | "class"; +export type ES2016Syntax = "__all" | "Exponentiation operator" | "Rest destructuring"; +export type ES2017Syntax = "__all" | "async/await" | "Trailing parameter commas"; +export function builtins(): Record & { + es2015: Record; + es2016: Record; + es2017: Record; +}; +export function syntax(): Record & { + es2015: Record; + es2016: Record; + es2017: Record; +}; diff --git a/types/es-feature-detection/tsconfig.json b/types/es-feature-detection/tsconfig.json new file mode 100644 index 0000000000..1a348b7edc --- /dev/null +++ b/types/es-feature-detection/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", + "es-feature-detection-tests.ts" + ] +} diff --git a/types/es-feature-detection/tslint.json b/types/es-feature-detection/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/es-feature-detection/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/escape-string-regexp/index.d.ts b/types/escape-string-regexp/index.d.ts index 7a52a312b1..a0b218afe9 100644 --- a/types/escape-string-regexp/index.d.ts +++ b/types/escape-string-regexp/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for escape-string-regexp +// Type definitions for escape-string-regexp 1.0 // Project: https://github.com/sindresorhus/escape-string-regexp // Definitions by: kruncher // faergeek diff --git a/types/eslint/eslint-tests.ts b/types/eslint/eslint-tests.ts index 6a81d69c8a..b0c3c1966d 100644 --- a/types/eslint/eslint-tests.ts +++ b/types/eslint/eslint-tests.ts @@ -446,6 +446,7 @@ let cli: CLIEngine; cli = new CLIEngine({ allowInlineConfig: false }); cli = new CLIEngine({ baseConfig: false }); +cli = new CLIEngine({ baseConfig: { extends: ['lynt'] }}); cli = new CLIEngine({ cache: true }); cli = new CLIEngine({ cacheFile: 'foo' }); cli = new CLIEngine({ configFile: 'foo' }); diff --git a/types/eslint/index.d.ts b/types/eslint/index.d.ts index 89067f97c8..031ab984f7 100644 --- a/types/eslint/index.d.ts +++ b/types/eslint/index.d.ts @@ -483,7 +483,7 @@ export class CLIEngine { export namespace CLIEngine { class Options { allowInlineConfig?: boolean; - baseConfig?: boolean; + baseConfig?: false | { [name: string]: any }; cache?: boolean; cacheFile?: string; cacheLocation?: string; diff --git a/types/espruino/espruino-tests.ts b/types/espruino/espruino-tests.ts index 5e84a93e65..c1bafc9048 100644 --- a/types/espruino/espruino-tests.ts +++ b/types/espruino/espruino-tests.ts @@ -1,2 +1,17 @@ +import * as wifi from 'Wifi'; + +wifi.connect('ssid', { password: 'pass', authMode: 'wpa_wpa2' }, err => { + if (err) throw err; + console.log('connected'); +}); + +wifi.startAP('ssid', { password: 'pass', authMode: 'wpa_wpa2' }, err => { + if (err) throw err; + console.log("created"); +}); + +digitalWrite(D2, false); +digitalWrite(D2, true); + I2C1.setup({ scl: D4, sda: D0 }); Serial2.setup(9600, { rx: D16, tx: D17 }); diff --git a/types/espruino/index.d.ts b/types/espruino/index.d.ts index 43d1068230..cb6151e85a 100644 --- a/types/espruino/index.d.ts +++ b/types/espruino/index.d.ts @@ -1,6 +1,7 @@ // Type definitions for Espruino 1.94 // Project: http://www.espruino.com/ // Definitions by: Stanislav Berkov +// Jurand Niemczycki // Definitions: https://github.com/borisyankov/DefinitelyTyped declare interface Object { @@ -9,6 +10,7 @@ declare interface Object { declare module "Wifi" { function connect(ssid: string, options: any, callback: (err: any) => any): any; + function startAP(ssid: string, options: any, callback: (err: any) => any): any; } declare module "InfluxDB" { @@ -391,10 +393,10 @@ declare interface Timer { } - // write(data: any[]): any; - // on(event: string, handler: (data: any) => any): any; - // setup(boudrate: number, options: any): any; - // read(chars?: number): string; +// write(data: any[]): any; +// on(event: string, handler: (data: any) => any): any; +// setup(boudrate: number, options: any): any; +// read(chars?: number): string; /** @@ -3598,7 +3600,7 @@ declare function digitalPulse(pin: Pin, value: boolean, time: any): void; * @param value * @url http://www.espruino.com/Reference#l__global_digitalWrite */ -declare function digitalWrite(pin: Pin, value: number): void; +declare function digitalWrite(pin: Pin, value: number | boolean): void; /** *

Get the digital value of the given pin.

diff --git a/types/esri-leaflet/index.d.ts b/types/esri-leaflet/index.d.ts index 3dbd351cb5..df1a9c3752 100644 --- a/types/esri-leaflet/index.d.ts +++ b/types/esri-leaflet/index.d.ts @@ -44,6 +44,7 @@ declare module 'leaflet' { | 'GrayLabels' | 'DarkGrayLabels' | 'ImageryLabels' + | 'ImageryClarity' | 'ImageryTransportation' | 'ShadedReliefLabels' | 'TerrainLabels'; diff --git a/types/eth-lightwallet/eth-lightwallet-tests.ts b/types/eth-lightwallet/eth-lightwallet-tests.ts new file mode 100644 index 0000000000..4907c73cbf --- /dev/null +++ b/types/eth-lightwallet/eth-lightwallet-tests.ts @@ -0,0 +1,3 @@ +import * as lw from "eth-lightwallet"; + +lw.keystore.createVault({}); diff --git a/types/eth-lightwallet/index.d.ts b/types/eth-lightwallet/index.d.ts new file mode 100644 index 0000000000..f55e71884e --- /dev/null +++ b/types/eth-lightwallet/index.d.ts @@ -0,0 +1,64 @@ +// Type definitions for eth-lightwallet 3.0 +// Project: https://github.com/ConsenSys/eth-lightwallet#readme +// Definitions by: Leonid Logvinov +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.4 + +/// + +export interface ECSignatureBuffer { + v: number; + r: Buffer; + s: Buffer; +} +export namespace signing { + function signTx( + keystore: keystore, + pwDerivedKey: Uint8Array, + rawTx: string, + signingAddress: string + ): string; + function signMsg( + keystore: keystore, + pwDerivedKey: Uint8Array, + rawMsg: string, + signingAddress: string + ): ECSignatureBuffer; + function signMsgHash( + keystore: keystore, + pwDerivedKey: Uint8Array, + msgHash: string, + signingAddress: string + ): ECSignatureBuffer; + function concatSig(signature: any): string; +} + +export class keystore { + static createVault( + options: any, + callback?: (error: Error, keystore: keystore) => void + ): keystore; + static generateRandomSeed(): string; + static isSeedValid(seed: string): boolean; + static deserialize(keystore: string): keystore; + serialize(): string; + keyFromPassword( + password: string, + callback?: (error: Error, pwDerivedKey: Uint8Array) => void + ): Uint8Array; + isDerivedKeyCorrect(pwDerivedKey: Uint8Array): boolean; + generateNewAddress( + pwDerivedKey: Uint8Array, + numberOfAddresses: number + ): void; + getSeed(pwDerivedKey: Uint8Array): string; + exportPrivateKey(address: string, pwDerivedKey: Uint8Array): string; + getAddresses(): string[]; +} + +export interface VaultOptions { + password: string; + seedPhrase: string; + salt?: string; + hdPathString: string; +} diff --git a/types/eth-lightwallet/tsconfig.json b/types/eth-lightwallet/tsconfig.json new file mode 100644 index 0000000000..80eab8563a --- /dev/null +++ b/types/eth-lightwallet/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", + "eth-lightwallet-tests.ts" + ] +} diff --git a/types/eth-lightwallet/tslint.json b/types/eth-lightwallet/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/eth-lightwallet/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/ethereum-protocol/ethereum-protocol-tests.ts b/types/ethereum-protocol/ethereum-protocol-tests.ts new file mode 100644 index 0000000000..a30a691e87 --- /dev/null +++ b/types/ethereum-protocol/ethereum-protocol-tests.ts @@ -0,0 +1,4 @@ +import { CallData, BlockParamLiteral } from 'ethereum-protocol'; +BlockParamLiteral.Earliest; +BlockParamLiteral.Latest; +BlockParamLiteral.Pending; diff --git a/types/ethereum-protocol/index.d.ts b/types/ethereum-protocol/index.d.ts new file mode 100644 index 0000000000..9b967cfc83 --- /dev/null +++ b/types/ethereum-protocol/index.d.ts @@ -0,0 +1,293 @@ +// Type definitions for ethereum-protocol 1.0 +// Project: https://www.npmjs.com/package/ethereum-protocol +// Definitions by: Leonid Logvinov +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.4 + +import BigNumber from 'bignumber.js'; + +export type JSONRPCErrorCallback = (err: Error | null, result?: JSONRPCResponsePayload) => void; + +/** + * Do not create your own provider. Use an existing provider from a Web3 or ProviderEngine library + * Read more about Providers in the 0x wiki. + */ +export interface Provider { + sendAsync(payload: JSONRPCRequestPayload, callback: JSONRPCErrorCallback): void; +} + +export type ContractAbi = AbiDefinition[]; + +export type AbiDefinition = FunctionAbi | EventAbi; + +export type FunctionAbi = MethodAbi | ConstructorAbi | FallbackAbi; + +export type ConstructorStateMutability = 'nonpayable' | 'payable'; +export type StateMutability = 'pure' | 'view' | ConstructorStateMutability; + +export enum AbiType { + Function = 'function', + Constructor = 'constructor', + Event = 'event', + Fallback = 'fallback', +} + +export interface MethodAbi { + type: AbiType.Function; + name: string; + inputs: DataItem[]; + outputs: DataItem[]; + constant: boolean; + stateMutability: StateMutability; + payable: boolean; +} + +export interface ConstructorAbi { + type: AbiType.Constructor; + inputs: DataItem[]; + payable: boolean; + stateMutability: ConstructorStateMutability; +} + +export interface FallbackAbi { + type: AbiType.Fallback; + payable: boolean; +} + +export interface EventParameter extends DataItem { + indexed: boolean; +} + +export interface EventAbi { + type: AbiType.Event; + name: string; + inputs: EventParameter[]; + anonymous: boolean; +} + +export interface DataItem { + name: string; + type: string; + components?: DataItem[]; +} + +export enum OpCode { + DelegateCall = 'DELEGATECALL', + Revert = 'REVERT', + Create = 'CREATE', + Stop = 'STOP', + Invalid = 'INVALID', + CallCode = 'CALLCODE', + StaticCall = 'STATICCALL', + Return = 'RETURN', + Call = 'CALL', + SelfDestruct = 'SELFDESTRUCT', +} + +export interface StructLog { + depth: number; + error: string; + gas: number; + gasCost: number; + memory: string[]; + op: OpCode; + pc: number; + stack: string[]; + storage: { [location: string]: string }; +} + +export interface TransactionTrace { + gas: number; + returnValue: any; + structLogs: StructLog[]; +} + +export type Unit = + | 'kwei' + | 'ada' + | 'mwei' + | 'babbage' + | 'gwei' + | 'shannon' + | 'szabo' + | 'finney' + | 'ether' + | 'kether' + | 'grand' + | 'einstein' + | 'mether' + | 'gether' + | 'tether'; + +export interface JSONRPCRequestPayload { + params: any[]; + method: string; + id: number; + jsonrpc: string; +} + +export interface JSONRPCResponsePayload { + result: any; + id: number; + jsonrpc: string; +} + +export interface AbstractBlock { + number: number | null; + hash: string | null; + parentHash: string; + nonce: string | null; + sha3Uncles: string; + logsBloom: string | null; + transactionsRoot: string; + stateRoot: string; + miner: string; + difficulty: BigNumber; + totalDifficulty: BigNumber; + extraData: string; + size: number; + gasLimit: number; + gasUsed: number; + timestamp: number; + uncles: string[]; +} + +export interface BlockWithoutTransactionData extends AbstractBlock { + transactions: string[]; +} + +export interface BlockWithTransactionData extends AbstractBlock { + transactions: Transaction[]; +} + +export interface Transaction { + hash: string; + nonce: number; + blockHash: string | null; + blockNumber: number | null; + transactionIndex: number | null; + from: string; + to: string | null; + value: BigNumber; + gasPrice: BigNumber; + gas: number; + input: string; +} + +export interface CallTxDataBase { + to?: string; + value?: number | string | BigNumber; + gas?: number | string | BigNumber; + gasPrice?: number | string | BigNumber; + data?: string; + nonce?: number; +} + +export interface TxData extends CallTxDataBase { + from: string; +} + +export interface CallData extends CallTxDataBase { + from?: string; +} + +export interface FilterObject { + fromBlock?: number | string; + toBlock?: number | string; + address?: string; + topics?: LogTopic[]; +} + +export type LogTopic = null | string | string[]; + +export interface DecodedLogEntry
extends LogEntry { + event: string; + args: A; +} + +export interface DecodedLogEntryEvent extends DecodedLogEntry { + removed: boolean; +} + +export interface LogEntryEvent extends LogEntry { + removed: boolean; +} + +export interface LogEntry { + logIndex: number | null; + transactionIndex: number | null; + transactionHash: string; + blockHash: string | null; + blockNumber: number | null; + address: string; + data: string; + topics: string[]; +} + +export interface TxDataPayable extends TxData { + value?: BigNumber; +} + +export interface TransactionReceipt { + blockHash: string; + blockNumber: number; + transactionHash: string; + transactionIndex: number; + from: string; + to: string; + status: null | string | 0 | 1; + cumulativeGasUsed: number; + gasUsed: number; + contractAddress: string | null; + logs: LogEntry[]; +} + +export type ContractEventArg = string | BigNumber | number | boolean; + +export interface DecodedLogArgs { + [argName: string]: ContractEventArg; +} + +export interface LogWithDecodedArgs extends DecodedLogEntry {} +export type RawLog = LogEntry; + +export enum BlockParamLiteral { + Earliest = 'earliest', + Latest = 'latest', + Pending = 'pending', +} + +export type BlockParam = BlockParamLiteral | number; + +export interface RawLogEntry { + logIndex: string | null; + transactionIndex: string | null; + transactionHash: string; + blockHash: string | null; + blockNumber: string | null; + address: string; + data: string; + topics: string[]; +} + +export enum SolidityTypes { + Address = 'address', + Uint256 = 'uint256', + Uint8 = 'uint8', + Uint = 'uint', +} + +/** + * Contains the logs returned by a TransactionReceipt. We attempt to decode the + * logs using AbiDecoder. If we have the logs corresponding ABI, we decode it, + * otherwise we don't. + */ +export interface TransactionReceiptWithDecodedLogs extends TransactionReceipt { + logs: Array | LogEntry>; +} + +export interface TraceParams { + disableMemory?: boolean; + disableStack?: boolean; + disableStorage?: boolean; +} diff --git a/types/ethereum-protocol/package.json b/types/ethereum-protocol/package.json new file mode 100644 index 0000000000..4eeb6b18c8 --- /dev/null +++ b/types/ethereum-protocol/package.json @@ -0,0 +1,4 @@ +{ + "private": true, + "dependencies": { "bignumber.js": "7.2.1" } +} diff --git a/types/ethereum-protocol/tsconfig.json b/types/ethereum-protocol/tsconfig.json new file mode 100644 index 0000000000..5f358a8dec --- /dev/null +++ b/types/ethereum-protocol/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", "ethereum-protocol-tests.ts"] +} diff --git a/types/ethereum-protocol/tslint.json b/types/ethereum-protocol/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/ethereum-protocol/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/ethereumjs-abi/index.d.ts b/types/ethereumjs-abi/index.d.ts index 4314e46cbd..9208712d59 100644 --- a/types/ethereumjs-abi/index.d.ts +++ b/types/ethereumjs-abi/index.d.ts @@ -8,3 +8,5 @@ export function soliditySHA3(argTypes: string[], args: any[]): Buffer; export function soliditySHA256(argTypes: string[], args: any[]): Buffer; export function methodID(name: string, types: string[]): Buffer; +export function simpleEncode(signature: string, ...args: any[]): Buffer; +export function rawDecode(signature: string[], data: Buffer): any[]; diff --git a/types/evaporate/evaporate-tests.ts b/types/evaporate/evaporate-tests.ts index 3140cd9ea9..077cc2ebfd 100644 --- a/types/evaporate/evaporate-tests.ts +++ b/types/evaporate/evaporate-tests.ts @@ -25,3 +25,14 @@ Evaporate.create({ console.log(awsS3ObjectKey + '!!!'); }); }); + +Evaporate.create({ + bucket: 'test', + computeContentMd5: true, + cryptoMd5Method(data: ArrayBuffer) { + return ''; + }, + cryptoHexEncodedHash256(data: ArrayBuffer | string | null) { + return ''; + }, +}); diff --git a/types/evaporate/index.d.ts b/types/evaporate/index.d.ts index 1c415769b8..8ae110416e 100644 --- a/types/evaporate/index.d.ts +++ b/types/evaporate/index.d.ts @@ -34,12 +34,12 @@ declare namespace Evaporate { s3Acceleration?: boolean; mockLocalStorage?: boolean; encodeFilename?: boolean; - computeContentMd5?: false; + computeContentMd5?: boolean; allowS3ExistenceOptimization?: boolean; onlyRetryForSameFileName?: boolean; timeUrl?: string; cryptoMd5Method?: null | ((data: ArrayBuffer) => string); - cryptoHexEncodedHash256?: null | ((data: ArrayBuffer) => string); + cryptoHexEncodedHash256?: null | ((data: string | ArrayBuffer | null) => string); aws_url?: string; aws_key?: string; awsRegion?: string; @@ -52,7 +52,7 @@ declare namespace Evaporate { customAuthMethod?: null | (( signParams: string, signHeaders: string, - stringToSign: () => string | undefined, + stringToSign: string, signatureDateTime: string, canonicalRequest: string ) => Promise); diff --git a/types/ex-react-native-i18n/ex-react-native-i18n-tests.ts b/types/ex-react-native-i18n/ex-react-native-i18n-tests.ts new file mode 100644 index 0000000000..c83c4b60d3 --- /dev/null +++ b/types/ex-react-native-i18n/ex-react-native-i18n-tests.ts @@ -0,0 +1,8 @@ +import I18n from 'ex-react-native-i18n'; + +I18n.defaultLocale = 'en'; +I18n.fallbacks = true; +I18n.translations = {}; +I18n.locale = 'zh'; + +const deviceLocale: string = I18n.locale; diff --git a/types/ex-react-native-i18n/index.d.ts b/types/ex-react-native-i18n/index.d.ts new file mode 100644 index 0000000000..0b83b06a68 --- /dev/null +++ b/types/ex-react-native-i18n/index.d.ts @@ -0,0 +1,11 @@ +// Type definitions for ex-react-native-i18n 0.0 +// Project: https://github.com/xcarpentier/ex-react-native-i18n/ +// Definitions by: LikKee Richie +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.2 + +// Actual version for ex-react-native-i18n is 0.0.4 but 'npm run lint' doesn't allow patch version to pass +import I18n = require("i18n-js"); +// import I18n from 'ex-react-native-i18n'; + +export default I18n; diff --git a/types/ex-react-native-i18n/tsconfig.json b/types/ex-react-native-i18n/tsconfig.json new file mode 100644 index 0000000000..8e6dd691bf --- /dev/null +++ b/types/ex-react-native-i18n/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", + "ex-react-native-i18n-tests.ts" + ] +} diff --git a/types/ex-react-native-i18n/tslint.json b/types/ex-react-native-i18n/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/ex-react-native-i18n/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/exceljs/exceljs-tests.ts b/types/exceljs/exceljs-tests.ts index 684fad8719..0f5504fef0 100644 --- a/types/exceljs/exceljs-tests.ts +++ b/types/exceljs/exceljs-tests.ts @@ -1,7 +1,6 @@ import * as Excel from 'exceljs'; import * as stream from 'stream'; import * as fs from 'fs'; -import * as Bluebird from 'bluebird'; // most examples taken and adapted from README.md @@ -464,4 +463,4 @@ worksheet.commit(); workbook.commit().then(() => null); -Excel.config.setValue('promise', Bluebird); +Excel.config.setValue('promise', Promise); diff --git a/types/expect-puppeteer/expect-puppeteer-tests.ts b/types/expect-puppeteer/expect-puppeteer-tests.ts index 4ad0ce1f3c..4c646da1d9 100644 --- a/types/expect-puppeteer/expect-puppeteer-tests.ts +++ b/types/expect-puppeteer/expect-puppeteer-tests.ts @@ -5,7 +5,8 @@ const testGlobal = async (instance: ElementHandle | Page) => { await expect(instance).toClick("selector", { polling: "mutation", text: "text" }); await expect(instance).toClick("selector", { polling: "raf", timeout: 777 }); - await expect(instance).toDisplayDialog(async () => {}); + const dialog = await expect(instance).toDisplayDialog(async () => {}); + console.log(dialog.message()); await expect(instance).toFill("selector", "value"); await expect(instance).toFill("selector", "value", { polling: 777 }); diff --git a/types/expect-puppeteer/index.d.ts b/types/expect-puppeteer/index.d.ts index 4d599f99fe..7c216f4259 100644 --- a/types/expect-puppeteer/index.d.ts +++ b/types/expect-puppeteer/index.d.ts @@ -1,12 +1,13 @@ // Type definitions for expect-puppeteer 2.2 // Project: https://github.com/smooth-code/jest-puppeteer/tree/master/packages/expect-puppeteer // Definitions by: Josh Goldberg +// Tanguy Krotoff // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.4 +// TypeScript Version: 2.8 /// -import { ElementHandle, Page } from "puppeteer"; +import { ElementHandle, Page, Dialog } from "puppeteer"; /** * Interval at which pageFunctions may be executed. @@ -39,7 +40,7 @@ interface ExpectPuppeteer { // These must all match the ExpectPuppeteer interface above. // We can't extend from it directly because some method names conflict in type-incompatible ways. toClick(selector: string, options?: ExpectToClickOptions): Promise; - toDisplayDialog(block: () => Promise): Promise; + toDisplayDialog(block: () => Promise): Promise; toFill(selector: string, value: string, options?: ExpectTimingActions): Promise; toMatch(selector: string, options?: ExpectTimingActions): Promise; toMatchElement(selector: string, options?: ExpectToClickOptions): Promise; @@ -54,7 +55,7 @@ declare global { // These must all match the ExpectPuppeteer interface above. // We can't extend from it directly because some method names conflict in type-incompatible ways. toClick(selector: string, options?: ExpectToClickOptions): Promise; - toDisplayDialog(block: () => Promise): Promise; + toDisplayDialog(block: () => Promise): Promise; toFill(selector: string, value: string, options?: ExpectTimingActions): Promise; toMatch(selector: string, options?: ExpectTimingActions): Promise; toMatchElement(selector: string, options?: ExpectToClickOptions): Promise; diff --git a/types/expired-storage/expired-storage-tests.ts b/types/expired-storage/expired-storage-tests.ts new file mode 100644 index 0000000000..5c1a814b23 --- /dev/null +++ b/types/expired-storage/expired-storage-tests.ts @@ -0,0 +1,69 @@ +import ExpiredStorage = require('expired-storage'); + +const expiredStorage = new ExpiredStorage(); + +const mjkModel = { + firstName: 'Maynard', + middleName: 'James', + familyName: 'Keenan', +}; + +expiredStorage.clear(); + +expiredStorage.setItem('tool', '46&2', 10); + +if (expiredStorage.getItem('tool') !== '46&2') { + throw new Error('.setItem method is not working!'); +} + +expiredStorage.setJson('mjk', mjkModel, 1); + +const mjkTest = expiredStorage.getJson('mjk'); + +if (typeof mjkTest === 'undefined' || mjkTest.firstName !== mjkModel.firstName || mjkTest.middleName !== mjkModel.middleName || mjkTest.familyName !== mjkModel.familyName) { + throw new Error('.setJson method is not working!'); +} + +const keyCheck = expiredStorage.keys(true); + +if (keyCheck && keyCheck.length === 2) { + throw new Error('.keys method has failed.'); +} + +expiredStorage.setItem('apc', 'brena', 2); + +const goBackToSleep = expiredStorage.peek('apc'); + +if (!goBackToSleep.isExpired && goBackToSleep.value !== 'brena') { + throw new Error('.peek -- we have expired early... or our value was incorrect...'); +} + +do { + // nothing here to see +} while (!expiredStorage.isExpired('apc')); + +const expiredKeys = expiredStorage.clearExpired(); + +if (expiredKeys.indexOf('apc') !== -1) { + throw new Error('.clearExpired did not work..'); +} + +if (expiredStorage.getItem('apc') !== null) { + throw new Error('Expiration as a whole does not work.'); +} + +expiredStorage.setItem('puscifer', 'the humbling river', 10000); + +expiredStorage.updateExpiration('puscifer', 5000); + +const checkKeyTime = expiredStorage.getTimeLeft('puscifer'); + +if (checkKeyTime && checkKeyTime >= 10000) { + throw new Error('.updateExpiration method is broken -- or .getTimeLeft method is broken.'); +} + +if (!expiredStorage.isExpired('mjk')) { + throw new Error('.isExpired or Expiration as a whole is not working...'); +} + +expiredStorage.clear(); diff --git a/types/expired-storage/index.d.ts b/types/expired-storage/index.d.ts new file mode 100644 index 0000000000..bc7f7eb0b5 --- /dev/null +++ b/types/expired-storage/index.d.ts @@ -0,0 +1,105 @@ +// Type definitions for extended-storage 1.0 +// Project: https://github.com/RonenNess/ExpiredStorage/ +// Definitions by: Allen Gammel +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.2 + +export = ExpiredStorage; + +declare class ExpiredStorage { + constructor(localStorage?: any); + /** + * Clear the entire storage and all keys in it. + */ + clear(): void; + /** + * Get a json serializable value. This basically calls JSON.parse on the returned value. + * @param key Item key to get (string). + * @return Stored value (JSON.parsed), or undefined if not set / expired. + */ + getJson(key: string): any; + /** + * Get item. + * @param key: Item key to get (string). + * @return: Stored value, or undefined if not set / expired. + */ + getItem(key: string): string | null; + /** + * Remove an item. + * @param key Item key to remove (string). + * @return Storage.removeItem() return code. + */ + removeItem(key: string): any; + /** + * Set a json serializable value. This basically calls JSON.stringify on 'val' before setting it. + * @param key Item key to set (string). + * @param value Value to store (object, will be JSON.stringified). + * @param expiration Expiration time, in seconds. If not provided, will not set expiration time. + * @param return Storage.setItem() return code. + */ + setJson(key: string, value: object, expirationTime?: number): any; + /** + * Set item. + * @param key Item key to set (string). + * @param value Value to store (string). + * @param expiration Expiration time, in seconds. If not provided, will not set expiration time. + * @return Storage.setItem() return code. + */ + setItem(key: string, value: string, expiration?: number): any; + /** + * Get all keys in storage, not including internal keys used to store expiration. + * @param: includeExpired: if true, will also include expired keys. + * @return: Array with keys. + */ + keys(includeExpired: boolean): string[] | null; + /** + * Get item time left to live. + * @param key Item key to get (string). + * @return Time left to expire (in seconds), or null if don't have expiration date. + */ + getTimeLeft(key: string): number | null; + /** + * Clear expired keys. + * If you never call this function, expired keys will remain until you try to get them / reset a new value. + * + * @param return: List of removed keys due to expiration. + */ + clearExpired(): string[]; + /** + * Return if an item is expired (don't remove it, even if expired). + * @param key Item key to check (string). + * @return True if expired, False otherwise. + */ + isExpired(key: string): boolean; + /** + * Get item + metadata such as time left and if expired. + * Even if item expired, will not remove it. + * @param key Item key to get (string). + * @return PeekInterface with: {value, timeLeft, isExpired} + */ + peek(key: string): ExpiredStorage.PeekInterface; + /** + * Update expiration time for an item (note: doesn't validate that the item is set). + * @param key: Item key to update expiration for (string). + * @param expiration: New expiration time in seconds to set. + * @return: Storage.setItem() return code for setting new expiration. + */ + updateExpiration(key: string, expiration: number): any; +} + +declare namespace ExpiredStorage { + interface PeekInterface { + /** + * The value of a [key] + */ + value: string | null; + /** + * Time remaining until expiration + */ + timeLeft: number | null; + /** + * Has the [key] expired or not + */ + isExpired: boolean; + } +} diff --git a/types/expired-storage/tsconfig.json b/types/expired-storage/tsconfig.json new file mode 100644 index 0000000000..cd1454cca7 --- /dev/null +++ b/types/expired-storage/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", + "expired-storage-tests.ts" + ] +} \ No newline at end of file diff --git a/types/typed.js/tslint.json b/types/expired-storage/tslint.json similarity index 100% rename from types/typed.js/tslint.json rename to types/expired-storage/tslint.json diff --git a/types/expo/expo-tests.tsx b/types/expo/expo-tests.tsx index d9b7edcb5d..0098a14489 100644 --- a/types/expo/expo-tests.tsx +++ b/types/expo/expo-tests.tsx @@ -25,6 +25,7 @@ import { ImagePicker, ImageManipulator, FaceDetector, + Linking, Svg, IntentLauncherAndroid, KeepAwake, @@ -223,8 +224,8 @@ Audio.RECORDING_OPTIONS_PRESET_HIGH_QUALITY; Audio.RECORDING_OPTIONS_PRESET_LOW_QUALITY; async () => { const result = await Audio.Sound.create({uri: 'uri'}, { - volume: 0.5, - rate: 0.6 + volume: 0.55, + rate: 16.5 }, null, true); const sound = result.sound; @@ -267,8 +268,8 @@ const barcodeReadCallback = () => {}; ); async () => { - await Brightness.setBrightnessAsync(.6); - await Brightness.setSystemBrightnessAsync(.7); + await Brightness.setBrightnessAsync(0.65); + await Brightness.setSystemBrightnessAsync(0.75); const br1 = await Brightness.getBrightnessAsync(); const br2 = await Brightness.getSystemBrightnessAsync(); }; @@ -373,10 +374,13 @@ async () => { }; async () => { - const result = await ImageManipulator.manipulate('url', { - rotate: 90 - }, { - compress: 0.5 + const result = await ImageManipulator.manipulate('url', [ + { rotate: 90 }, + { resize: { width: 300 } }, + { resize: { height: 300 } }, + { resize: { height: 300, width: 300 } }, + ], { + compress: 0.75 }); result.height; @@ -400,6 +404,38 @@ async () => { result.faces[0]; }; +async () => { + function isBoolean(x: boolean) { + } + function isString(x: string) { + } + // Two examples of members inherited from react-native Linking + // to prove that inheritence is working. + Linking.addEventListener('url', (e) => { + e.url === ''; + }); + isBoolean(await Linking.canOpenURL('expo://')); + + // Extensions added by expo. + + isString(Linking.makeUrl('path')); + isString(Linking.makeUrl('path', { q: 2, u: 'ery', })); + + const { + path, + queryParams, + } = Linking.parse(''); + isString(path); + isString(queryParams['x'] || ''); + + const { + path: path2, + queryParams: queryParams2, + } = await Linking.parseInitialURLAsync(); + isString(path2); + isString(queryParams2['y'] || ''); +}; + () => ( { /> + diff --git a/types/expo/index.d.ts b/types/expo/index.d.ts index 952cd4a086..868afd5e56 100644 --- a/types/expo/index.d.ts +++ b/types/expo/index.d.ts @@ -9,8 +9,9 @@ // Moshe Feuchtwanger // Michael Prokopchuk // Tina Roh +// Nathan Phillip Brink // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import { EventSubscription } from 'fbemitter'; import { Component, ComponentClass, Ref, ComponentType } from 'react'; @@ -18,6 +19,7 @@ import { ColorPropType, ImageRequireSource, ImageURISource, + LinkingStatic as ReactNativeLinkingStatic, NativeEventEmitter, ViewProps, ViewStyle, @@ -27,7 +29,6 @@ import { export type Axis = number; export type BarCodeReadCallback = (params: { type: string; data: string; }) => void; -export type FloatFromZeroToOne = 0 | 0.1 | 0.2 | 0.3 | 0.4 | 0.5 | 0.6 | 0.7 | 0.8 | 0.9 | 1; export type Md5 = string; export type Orientation = 'portrait' | 'landscape'; export type RequireSource = ImageRequireSource; @@ -37,6 +38,7 @@ export type ResizeModeStretch = 'stretch'; export type URISource = ImageURISource; export interface HashMap { [key: string]: any; } +export interface StringHashMap { [key: string]: string; } /** Access the device accelerometer sensor(s) to respond to changes in acceleration in 3d space. */ export namespace Accelerometer { @@ -550,14 +552,16 @@ export type PlaybackStatus = { export interface PlaybackStatusToSet { androidImplementation?: string; - progressUpdateIntervalMillis?: number; - positionMillis?: number; - shouldPlay?: boolean; - rate?: FloatFromZeroToOne; - shouldCorrectPitch?: boolean; - volume?: FloatFromZeroToOne; - isMuted?: boolean; isLooping?: boolean; + isMuted?: boolean; + positionMillis?: number; + progressUpdateIntervalMillis?: number; + /** The desired playback rate of the media. This value must be between `0.0` and `32.0`. Only available on Android API version 23 and later and iOS. */ + rate?: number; + shouldCorrectPitch?: boolean; + shouldPlay?: boolean; + /** A number between `0.0` (silence) and `1.0` (maximum volume). */ + volume?: number; } export type PlaybackSource = RequireSource | { uri: string } | Asset; @@ -670,7 +674,6 @@ export class PlaybackObject { setRateAsync( /** The desired playback rate of the media. This value must be between `0.0` and `32.0`. Only available on Android API version 23 and later and iOS. */ rate: number, - /** A boolean describing if we should correct the pitch for a changed rate. If set to `true`, the pitch of the audio will be corrected (so a rate different than `1.0` will timestretch the audio). */ shouldCorrectPitch: boolean ): Promise; @@ -732,13 +735,32 @@ export class BlurView extends Component { } // #endregion /** - * Brightness + * An API to get and set screen brightness. */ export namespace Brightness { - function setBrightnessAsync(brightnessValue: FloatFromZeroToOne): Promise; - function getBrightnessAsync(): Promise; - function getSystemBrightnessAsync(): Promise; - function setSystemBrightnessAsync(brightnessValue: FloatFromZeroToOne): Promise; + /** Sets screen brightness. */ + function setBrightnessAsync( + /** A number between `0` and `1`, representing the desired screen brightness. */ + brightnessValue: number + ): Promise; + + /** + * Gets screen brightness. + * @returns A Promise that is resolved with a number between `0` and `1`, representing the current screen brightness. + */ + function getBrightnessAsync(): Promise; + + /** + * Gets global system screen brightness. + * @returns A Promise that is resolved with a number between `0` and `1`, representing the current system screen brightness. + */ + function getSystemBrightnessAsync(): Promise; + + /** Sets global system screen brightness, requires `WRITE_SETTINGS` permissions on Android. */ + function setSystemBrightnessAsync( + /** A number between `0` and `1`, representing the desired screen brightness. */ + brightnessValue: number + ): Promise; } // #region Camera @@ -771,22 +793,24 @@ export class CameraObject { } export interface CameraProps extends ViewProps { - zoom?: FloatFromZeroToOne; - ratio?: string; - focusDepth?: FloatFromZeroToOne; - type?: string | number; - onCameraReady?: () => void; - onBarCodeRead?: BarCodeReadCallback; + autoFocus?: string | number | boolean; + barCodeTypes?: Array; + faceDetectionClassifications?: number; + faceDetectionLandmarks?: number; faceDetectionMode?: number; flashMode?: string | number; - barCodeTypes?: Array; - whiteBalance?: string | number; - faceDetectionLandmarks?: number; - autoFocus?: string | number | boolean; - faceDetectionClassifications?: number; - onMountError?: () => void; + /** Distance to plane of sharpest focus. A value between `0` and `1`. `0`: infinity focus, `1`: focus as close as possible. Default: `0`. For Android this is available only for some devices and when `useCamera2Api` is set to `true`. */ + focusDepth?: number; + onBarCodeRead?: BarCodeReadCallback; + onCameraReady?: () => void; onFacesDetected?: (options: { faces: TrackedFaceFeature[] }) => void; + onMountError?: () => void; + ratio?: string; ref?: Ref; + type?: string | number; + whiteBalance?: string | number; + /** A value between `0` and `1` being a percentage of device's max zoom. `0`: not zoomed, `1`: maximum zoom. Default: `0`. */ + zoom?: number; } export interface CameraConstants { @@ -1492,6 +1516,27 @@ export namespace Gyroscope { * ImageManipulator */ export namespace ImageManipulator { + type Action = Resize | Rotate | Flip | Crop; + + interface Resize { + resize: { width?: number, height?: number }; + } + + interface Rotate { + rotate: number; + } + + interface Flip { + flip?: { vertical?: boolean; horizontal?: boolean }; + } + + interface Crop { + originX: number; + originY: number; + width: number; + height: number; + } + interface ImageResult { uri: string; width: number; @@ -1501,25 +1546,12 @@ export namespace ImageManipulator { interface SaveOptions { base64?: boolean; - compress?: FloatFromZeroToOne; + /** A value in range `0` - `1` specifying compression level of the result image. `1` means no compression and `0` the highest compression. */ + compress?: number; format?: 'jpeg' | 'png'; } - interface CropParameters { - originX: number; - originY: number; - width: number; - height: number; - } - - interface ImageManipulationOptions { - resize?: { width?: number; height?: number }; - rotate?: number; - flip?: { vertical?: boolean; horizontal?: boolean }; - crop?: CropParameters; - } - - function manipulate(uri: string, actions: ImageManipulationOptions, saveOptions?: SaveOptions): Promise; + function manipulate(uri: string, actions: Action[], saveOptions?: SaveOptions): Promise; } /** @@ -1683,6 +1715,21 @@ export interface LinearGradientProps { export class LinearGradient extends Component { } // #endregion +/** + * Linking + */ +export interface LinkInfo { + path: string; + queryParams: Partial; +} + +export interface LinkingStatic extends ReactNativeLinkingStatic { + makeUrl(path: string, queryParams?: HashMap): string; + parse(url: string): LinkInfo; + parseInitialURLAsync(): Promise; +} +export const Linking: LinkingStatic; + /** * Location */ @@ -2076,6 +2123,8 @@ export interface SvgUseProps extends SvgCommonProps { href: string; x: number | string; y: number | string; + width?: number | string; + height?: number | string; } export interface SvgSymbolProps extends SvgCommonProps { @@ -2222,6 +2271,7 @@ export interface VideoProps { translateY?: number; rotation?: number; ref?: Ref; + style?: StyleProp; } export interface VideoState { diff --git a/types/expo/v23/index.d.ts b/types/expo/v23/index.d.ts index 4c33d8b13f..b5c327f6a1 100644 --- a/types/expo/v23/index.d.ts +++ b/types/expo/v23/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/expo/expo-sdk // Definitions by: Konstantin Kai // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import { EventSubscription } from 'fbemitter'; import { Component, Ref } from 'react'; diff --git a/types/expo/v24/index.d.ts b/types/expo/v24/index.d.ts index 803ecccf32..35d1e9be92 100644 --- a/types/expo/v24/index.d.ts +++ b/types/expo/v24/index.d.ts @@ -6,7 +6,7 @@ // Sergio Sánchez // Fernando Helwanger // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import { EventSubscription } from 'fbemitter'; import { Component, ComponentClass, Ref, ComponentType } from 'react'; diff --git a/types/expo/v25/index.d.ts b/types/expo/v25/index.d.ts index 0a7093e2b7..766c055911 100644 --- a/types/expo/v25/index.d.ts +++ b/types/expo/v25/index.d.ts @@ -7,7 +7,7 @@ // Fernando Helwanger // Umidbek Karimov // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import { EventSubscription } from 'fbemitter'; import { Component, ComponentClass, Ref, ComponentType } from 'react'; diff --git a/types/expo/v26/index.d.ts b/types/expo/v26/index.d.ts index f1641ea643..9804579e66 100644 --- a/types/expo/v26/index.d.ts +++ b/types/expo/v26/index.d.ts @@ -8,7 +8,7 @@ // Umidbek Karimov // Tina Roh // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import { EventSubscription } from 'fbemitter'; import { Component, ComponentClass, Ref, ComponentType } from 'react'; @@ -2202,6 +2202,7 @@ export interface VideoProps { translateY?: number; rotation?: number; ref?: Ref; + style?: StyleProp; } export interface VideoState { diff --git a/types/expo__status-bar-height/expo__status-bar-height-tests.ts b/types/expo__status-bar-height/expo__status-bar-height-tests.ts new file mode 100644 index 0000000000..84dd284d12 --- /dev/null +++ b/types/expo__status-bar-height/expo__status-bar-height-tests.ts @@ -0,0 +1,11 @@ +import StatusBarHeight from '@expo/status-bar-height'; + +const onChangeHeight = (height: number) => console.log(`New height: ${height}`); + +StatusBarHeight.addEventListener(onChangeHeight); + +StatusBarHeight.getAsync() + .then((height: number) => console.log(`Current height: ${height}`)) + .catch((error: Error) => console.error('Threw an error in StatusBarHeight.getAsync():', error)); + +StatusBarHeight.removeEventListener(onChangeHeight); diff --git a/types/expo__status-bar-height/index.d.ts b/types/expo__status-bar-height/index.d.ts new file mode 100644 index 0000000000..24331721da --- /dev/null +++ b/types/expo__status-bar-height/index.d.ts @@ -0,0 +1,24 @@ +// Type definitions for @expo/status-bar-height 0.0 +// Project: https://github.com/expo/status-bar-height +// Definitions by: Janeene Beeforth +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export type StatusBarHeightHandler = (height: number) => void; + +export class StatusBarHeight { + /** + * Get the current status bar height + */ + getAsync(): Promise; + /** + * Add 'willChange' event listener + */ + addEventListener(handler: StatusBarHeightHandler): void; + /** + * Remove 'willChange' event listener + */ + removeEventListener(handler: StatusBarHeightHandler): void; +} + +declare const StatusBarHeightStatic: StatusBarHeight; +export default StatusBarHeightStatic; diff --git a/types/expo__status-bar-height/tsconfig.json b/types/expo__status-bar-height/tsconfig.json new file mode 100644 index 0000000000..88649150a0 --- /dev/null +++ b/types/expo__status-bar-height/tsconfig.json @@ -0,0 +1,29 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "dom", + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "paths": { + "@expo/status-bar-height": [ + "expo__status-bar-height" + ] + }, + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "expo__status-bar-height-tests.ts" + ] +} diff --git a/types/expo__status-bar-height/tslint.json b/types/expo__status-bar-height/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/expo__status-bar-height/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/expo__vector-icons/expo__vector-icons-tests.tsx b/types/expo__vector-icons/expo__vector-icons-tests.tsx index 14ccbc7aa4..7d918c917f 100644 --- a/types/expo__vector-icons/expo__vector-icons-tests.tsx +++ b/types/expo__vector-icons/expo__vector-icons-tests.tsx @@ -41,13 +41,9 @@ class Example extends React.Component { } class TabTest extends React.Component<{}, { selectedTab: string }> { - constructor() { - super({}); - - this.state = { - selectedTab: 'tab1' - }; - } + state = { + selectedTab: 'tab1' + }; render() { return ( diff --git a/types/expo__vector-icons/index.d.ts b/types/expo__vector-icons/index.d.ts index 19aadf2a33..529142c0e9 100644 --- a/types/expo__vector-icons/index.d.ts +++ b/types/expo__vector-icons/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/expo/vector-icons // Definitions by: Hyeonsu Lee // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from 'react'; import { TextProps } from 'react-native'; diff --git a/types/express-fileupload/index.d.ts b/types/express-fileupload/index.d.ts index 89331c066a..060476b109 100644 --- a/types/express-fileupload/index.d.ts +++ b/types/express-fileupload/index.d.ts @@ -1,6 +1,7 @@ -// Type definitions for express-fileupload 0.1 +// Type definitions for express-fileupload 0.4 // Project: https://github.com/richardgirges/express-fileupload#readme // Definitions by: Gintautas Miselis +// Sefa Ilkimen // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 @@ -28,13 +29,16 @@ declare namespace fileUpload { encoding: string; mimetype: string; data: Buffer; + truncated: boolean; mv(path: string, callback: (err: any) => void): void; + mv(path: string): Promise; } interface Options { debug?: boolean; safeFileNames?: boolean; preserveExtension?: boolean | string | number; + abortOnLimit?: boolean; [property: string]: any; } } diff --git a/types/express-redis-cache/express-redis-cache-tests.ts b/types/express-redis-cache/express-redis-cache-tests.ts new file mode 100644 index 0000000000..3f8976c812 --- /dev/null +++ b/types/express-redis-cache/express-redis-cache-tests.ts @@ -0,0 +1,105 @@ +import express = require('express'); +import redis = require('redis'); +import expressRedisCache = require('express-redis-cache'); + +const app = express(); +const cache = expressRedisCache(); + +expressRedisCache({ host: 'localhsot', port: 6379, auth_pass: 'passw0rd' }); +expressRedisCache({ client: redis.createClient() }); + +cache.on('error', (error) => { + throw new Error('Cache error!'); +}); + +app.get('/', + cache.route(), // cache entry name is `cache.prefix + "/"` + (req, res, next) => { }); + +app.get('/', + cache.route('home'), // cache entry name is now `cache.prefix + "home"` + (req, res, next) => { }); + +app.get('/', + cache.route({ name: 'home' }), // cache entry name is `cache.prefix + "home"` + (req, res, next) => { }); + +app.get('/user/:userid', + // middleware to define cache name + (req, res, next) => { + // set cache name + res.express_redis_cache_name = 'user-' + req.params.userid; + next(); + }, + // cache middleware + cache.route(), + // content middleware + (req, res) => { + res.render('user'); + } +); + +app.get('/user', + // middleware to decide if using cache + (req, res, next) => { + // Use only cache if user not signed in + res.use_express_redis_cache = !req.signedCookies.user; + next(); + }, + cache.route(), // this will be skipped if user is signed in + (req, res) => { + res.render('user'); + } +); + +// Prefix +expressRedisCache({ prefix: 'test' }); + +// Expiration +expressRedisCache({ expire: 60 }); + +app.get('/index.html', + cache.route({ expire: 5000 }), // cache entry will live 5000 seconds + (req, res) => { } +); + +// You can also use the number sugar syntax +cache.route(5000); +// Or +cache.route('index', 5000); + +app.get('/index.html', + cache.route({ + expire: { + 200: 5000, + '4xx': 10, + 403: 5000, + '5xx': 10, + xxx: 1 + } + }), + (req, res) => { } +); + +cache.get((error, entries) => { + if (error) throw error; + entries.forEach(console.log); +}); + +cache.get('home', (error, entries) => {}); + +cache.add( + 'user:info', + JSON.stringify({ id: 1, email: 'john@doe.com' }), + { expire: 60 * 60 * 24, type: 'json' }, + (error, added) => {} +); + +cache.add( + 'user:info', + JSON.stringify({ id: 1, email: 'john@doe.com' }), + (error, added) => {} +); + +cache.del('home', (error, deleted) => {}); +cache.size((error, bytes) => {}); diff --git a/types/express-redis-cache/index.d.ts b/types/express-redis-cache/index.d.ts new file mode 100644 index 0000000000..ffd8c844a6 --- /dev/null +++ b/types/express-redis-cache/index.d.ts @@ -0,0 +1,77 @@ +// Type definitions for express-redis-cache 1.1 +// Project: https://github.com/rv-kip/express-redis-cache +// Definitions by: AJ Livingston +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 + +import events = require('events'); +import express = require('express'); +import redis = require('redis'); + +declare module 'express-serve-static-core' { + interface Response { + express_redis_cache_name?: string; + use_express_redis_cache?: boolean; + } +} + +declare function expressRedisCache(options?: expressRedisCache.Options): expressRedisCache.ExpressRedisCache; +declare namespace expressRedisCache { + class ExpressRedisCache extends events.EventEmitter { + constructor(options?: Options); + static init(options?: Options): ExpressRedisCache; + readonly FOREVER: number; + options: Options; + host: string; + port: string | number; + prefix: string; + auth_pass: string; + connected: boolean; + expire: number; + client: redis.RedisClient; + add(name: string, body: string, options: AddOptions, callback: (error: any, added: Entry) => void): void; + add(name: string, body: string, callback: (error: any, added: Entry) => void): void; + del(name: string, callback: (error: any, deleted: number) => void): void; + get(name: string, callback: (error: any, entries: Entry[]) => void): void; + get(callback: (error: any, entries: Entry[]) => void): void; + route(nameOrOptions: string | RouteOptions, expire?: ExpireOption): express.RequestHandler; + route(expire?: number): express.RequestHandler; + size(callback: (error: any, bytes: number) => void): void; + } + + interface AddOptions { + type?: string; + expire?: number; + } + + interface Entry { + body: string; + touched: number; + expire: number; + type: string; + } + + interface ExpirationConfig { + [statusCode: string]: number; + } + + type ExpireOption = number | ExpirationConfig; + type ExpirationPolicy = (req: express.Request, res: express.Response) => number; + + interface Options { + auth_pass?: string; + client?: redis.RedisClient; + expire?: number; + host?: string; + port?: string | number; + prefix?: string; + } + + interface RouteOptions { + name?: string; + expire?: ExpireOption | ExpirationPolicy; + binary?: boolean; + } +} + +export = expressRedisCache; diff --git a/types/express-redis-cache/tsconfig.json b/types/express-redis-cache/tsconfig.json new file mode 100644 index 0000000000..7884be049e --- /dev/null +++ b/types/express-redis-cache/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", + "express-redis-cache-tests.ts" + ] +} diff --git a/types/express-redis-cache/tslint.json b/types/express-redis-cache/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/express-redis-cache/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/express-wechat-access/express-wechat-access-tests.ts b/types/express-wechat-access/express-wechat-access-tests.ts new file mode 100644 index 0000000000..60cc5d9d88 --- /dev/null +++ b/types/express-wechat-access/express-wechat-access-tests.ts @@ -0,0 +1,18 @@ +import express = require('express'); +import * as weAccessMiddleware from 'express-wechat-access'; + +const app: express.Application = express(); + +const options: weAccessMiddleware.WeAccessMidOption = { + appId: 'xxxxx', + appSecret: 'xxxxx' +}; + +app.use( + weAccessMiddleware( + options, + e => { + console.error(e); + } + ) +); diff --git a/types/express-wechat-access/index.d.ts b/types/express-wechat-access/index.d.ts new file mode 100644 index 0000000000..fb0d58701d --- /dev/null +++ b/types/express-wechat-access/index.d.ts @@ -0,0 +1,38 @@ +// Type definitions for express-wechat-access 1.1 +// Project: https://github.com/simmons8616/express-wechat-access +// Definitions by: Simmons Zhang +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.2 + +/// + +import { Response, NextFunction } from 'express'; +import * as http from 'http'; +import { EventEmitter } from 'events'; + +type WeMiddleware = (req: any, res: Response | http.ServerResponse, next: NextFunction) => any; + +declare function weAccessMiddleware( + options: { + accessTokenUrl?: string; + ticketUrl?: string; + appId: string; + appSecret: string; + https?: boolean; + }, + errorHandler?: (e: any) => any +): WeMiddleware; + +declare namespace weAccessMiddleware { + interface WeAccessMidOption { + accessTokenUrl?: string; + ticketUrl?: string; + appId: string; + appSecret: string; + https?: boolean; + } + + interface WeAccessMiddleware extends WeMiddleware, EventEmitter, Function {} +} + +export = weAccessMiddleware; diff --git a/types/express-wechat-access/tsconfig.json b/types/express-wechat-access/tsconfig.json new file mode 100644 index 0000000000..e24d740f2c --- /dev/null +++ b/types/express-wechat-access/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", + "express-wechat-access-tests.ts" + ] +} diff --git a/types/express-wechat-access/tslint.json b/types/express-wechat-access/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/express-wechat-access/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/express-winston/express-winston-tests.ts b/types/express-winston/express-winston-tests.ts index 5671160de0..f370abdb5d 100644 --- a/types/express-winston/express-winston-tests.ts +++ b/types/express-winston/express-winston-tests.ts @@ -23,26 +23,22 @@ app.use(expressWinston.logger({ skip: (req, res) => false, statusLevels: ({ error: 'error', success: 'success', warn: 'warn' }), transports: [ - new winston.transports.Console({ - json: true, - colorize: true - }) + new winston.transports.Console({}) ] })); // Logger with minimum options (transport) app.use(expressWinston.logger({ transports: [ - new winston.transports.Console({ - json: true, - colorize: true - }) + new winston.transports.Console({}) ], })); +const logger = winston.createLogger(); + // Logger with minimum options (winstonInstance) app.use(expressWinston.logger({ - winstonInstance: winston, + winstonInstance: logger, })); // Error Logger with all options @@ -55,26 +51,20 @@ app.use(expressWinston.errorLogger({ requestFilter: (req, prop) => true, requestWhitelist: ['foo', 'bar'], transports: [ - new winston.transports.Console({ - json: true, - colorize: true - }) + new winston.transports.Console({}) ] })); // Error Logger with min options (transports) app.use(expressWinston.errorLogger({ transports: [ - new winston.transports.Console({ - json: true, - colorize: true - }) + new winston.transports.Console({}) ], })); // Error Logger with min options (winstonInstance) app.use(expressWinston.errorLogger({ - winstonInstance: winston, + winstonInstance: logger, })); expressWinston.bodyBlacklist.push('potato'); diff --git a/types/express-winston/index.d.ts b/types/express-winston/index.d.ts index e6184f64b9..462f3df1b3 100644 --- a/types/express-winston/index.d.ts +++ b/types/express-winston/index.d.ts @@ -1,11 +1,12 @@ -// Type definitions for express-winston 2.4 +// Type definitions for express-winston 3.0 // Project: https://github.com/bithavoc/express-winston#readme // Definitions by: Alex Brick // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.2 import { ErrorRequestHandler, Handler, Request, Response } from 'express'; -import { TransportInstance, Winston } from 'winston'; +import * as winston from 'winston'; +import * as Transport from 'winston-transport'; export type DynamicMetaFunction = (req: Request, res: Response, err: Error) => object; export type DynamicLevelFunction = (req: Request, res: Response, err: Error) => string; @@ -39,11 +40,11 @@ export interface BaseLoggerOptions { } export interface LoggerOptionsWithTransports extends BaseLoggerOptions { - transports: TransportInstance[]; + transports: Transport[]; } export interface LoggerOptionsWithWinstonInstance extends BaseLoggerOptions { - winstonInstance: Winston; + winstonInstance: winston.Logger; } export type LoggerOptions = LoggerOptionsWithTransports | LoggerOptionsWithWinstonInstance; @@ -61,11 +62,11 @@ export interface BaseErrorLoggerOptions { } export interface ErrorLoggerOptionsWithTransports extends BaseErrorLoggerOptions { - transports: TransportInstance[]; + transports: Transport[]; } export interface ErrorLoggerOptionsWithWinstonInstance extends BaseErrorLoggerOptions { - winstonInstance: Winston; + winstonInstance: winston.Logger; } export type ErrorLoggerOptions = ErrorLoggerOptionsWithTransports | ErrorLoggerOptionsWithWinstonInstance; diff --git a/types/express-winston/package.json b/types/express-winston/package.json new file mode 100644 index 0000000000..0aa4cf368f --- /dev/null +++ b/types/express-winston/package.json @@ -0,0 +1,6 @@ +{ + "private": true, + "dependencies": { + "winston": "^3.0.0" + } +} diff --git a/types/extsprintf/extsprintf-tests.ts b/types/extsprintf/extsprintf-tests.ts new file mode 100644 index 0000000000..4b45462487 --- /dev/null +++ b/types/extsprintf/extsprintf-tests.ts @@ -0,0 +1,8 @@ +import { sprintf, fprintf, printf } from "extsprintf"; + +fprintf({write: (s: string) => {}}, ''); +fprintf({write: (s: string) => {}}, '', {}, [], null, 0, ''); +printf(''); +printf('', {}, [], null, 0, ''); +sprintf(''); // $ExpectType string +sprintf('', {}, [], null, 0, ''); // $ExpectType string diff --git a/types/extsprintf/index.d.ts b/types/extsprintf/index.d.ts new file mode 100644 index 0000000000..29d073b4c5 --- /dev/null +++ b/types/extsprintf/index.d.ts @@ -0,0 +1,12 @@ +// Type definitions for extsprintf 1.4 +// Project: https://github.com/joyent/node-extsprintf#readme +// Definitions by: Alex Hankins +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export interface Stream { + write(str: string): void; +} + +export function fprintf(stream: Stream, format: string, ...args: any[]): any; +export function printf(format: string, ...args: any[]): any; +export function sprintf(format: string, ...args: any[]): string; diff --git a/types/extsprintf/tsconfig.json b/types/extsprintf/tsconfig.json new file mode 100644 index 0000000000..bc9783f347 --- /dev/null +++ b/types/extsprintf/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", + "extsprintf-tests.ts" + ] +} diff --git a/types/extsprintf/tslint.json b/types/extsprintf/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/extsprintf/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/fabric/fabric-impl.d.ts b/types/fabric/fabric-impl.d.ts index 07c1227706..783a4f41f7 100644 --- a/types/fabric/fabric-impl.d.ts +++ b/types/fabric/fabric-impl.d.ts @@ -851,6 +851,12 @@ interface IStaticCanvasOptions { * Indicates whether the browser can be scrolled when using a touchscreen and dragging on the canvas */ allowTouchScrolling?: boolean; + + /** + * When true, canvas is scaled by devicePixelRatio for better rendering on retina screens + */ + enableRetinaScaling?: boolean; + /** * Indicates whether this canvas will use image smoothing, this is on by default in browsers */ @@ -1644,11 +1650,6 @@ export class Group { * @chainable */ destroy(): Group; - /** - * Returns requested property - * @param prop Property to get - */ - get(prop: string): any; /** * Checks whether this group was moved (since `saveCoords` was called last) * @return true if an object was moved (since fabric.Group#saveCoords was called) @@ -1867,7 +1868,7 @@ export class Image { * @param [callback] Callback to invoke when image is created (newly created image is passed as a first argument) * @param [imgOptions] Options object */ - static fromURL(url: string, callback?: (image: Image) => void, objObjects?: IObjectOptions): Image; + static fromURL(url: string, callback?: (image: Image) => void, imgOptions?: IImageOptions): Image; /** * Creates an instance of fabric.Image from its object representation * @param object Object to create an instance from @@ -1997,7 +1998,17 @@ interface IObjectOptions { */ scaleY?: number; - /** + /** + * Object skew factor (horizontal) + */ + skewX?: number; + + /** + * Object skew factor (vertical) + */ + skewY?: number; + + /** * When true, an object is rendered as flipped horizontally */ flipX?: boolean; @@ -2307,7 +2318,13 @@ export class Object { getScaleY(): number; setScaleY(value: number): Object; - setShadow(options: any): Object; + getSkewX(): number; + setSkewX(value: number): Object; + + getSkewY(): number; + setSkewY(value: number): Object; + + setShadow(options: any): Object; getShadow(): Object; stateProperties: any[]; @@ -2678,9 +2695,11 @@ export class Object { setCoords(): this; /** * Returns coordinates of object's bounding rectangle (left, top, width, height) + * @param absoluteopt use coordinates without viewportTransform + * @param calculateopt use coordinates of current position instead of .oCoords / .aCoords * @return Object with left, top, width, height properties */ - getBoundingRect(): { left: number; top: number; width: number; height: number }; + getBoundingRect(absoluteopt?: boolean, calculateopt?: boolean): { left: number; top: number; width: number; height: number }; /** * Checks if object is fully contained within area of another object * @param other Object to test diff --git a/types/fabric/test/index.ts b/types/fabric/test/index.ts index 1060525a00..9a5c0b24d2 100644 --- a/types/fabric/test/index.ts +++ b/types/fabric/test/index.ts @@ -872,7 +872,7 @@ laboris nisi ut aliquip ex ea commodo consequat.`; const activeObject = canvas.getActiveObject(); if (activeObject && activeObject.type === 'text') { activeObject.textDecoration = (activeObject.textDecoration === 'underline' ? '' : 'underline'); - this.className = activeObject.textDecoration ? 'selected' : ''; + (this as HTMLElement).className = activeObject.textDecoration ? 'selected' : ''; canvas.renderAll(); } }; @@ -885,7 +885,7 @@ laboris nisi ut aliquip ex ea commodo consequat.`; const activeObject = canvas.getActiveObject(); if (activeObject && activeObject.type === 'text') { activeObject.textDecoration = (activeObject.textDecoration === 'line-through' ? '' : 'line-through'); - this.className = activeObject.textDecoration ? 'selected' : ''; + (this as HTMLElement).className = activeObject.textDecoration ? 'selected' : ''; canvas.renderAll(); } }; @@ -898,7 +898,7 @@ laboris nisi ut aliquip ex ea commodo consequat.`; const activeObject = canvas.getActiveObject(); if (activeObject && activeObject.type === 'text') { activeObject.textDecoration = (activeObject.textDecoration === 'overline' ? '' : 'overline'); - this.className = activeObject.textDecoration ? 'selected' : ''; + (this as HTMLElement).className = activeObject.textDecoration ? 'selected' : ''; canvas.renderAll(); } }; @@ -911,7 +911,7 @@ laboris nisi ut aliquip ex ea commodo consequat.`; const activeObject = canvas.getActiveObject(); if (activeObject && activeObject.type === 'text') { activeObject.fontWeight = (activeObject.fontWeight === 'bold' ? '' : 'bold'); - this.className = activeObject.fontWeight ? 'selected' : ''; + (this as HTMLElement).className = activeObject.fontWeight ? 'selected' : ''; canvas.renderAll(); } }; @@ -924,7 +924,7 @@ laboris nisi ut aliquip ex ea commodo consequat.`; const activeObject = canvas.getActiveObject(); if (activeObject && activeObject.type === 'text') { activeObject.fontStyle = (activeObject.fontStyle === 'italic' ? '' : 'italic'); - this.className = activeObject.fontStyle ? 'selected' : ''; + (this as HTMLElement).className = activeObject.fontStyle ? 'selected' : ''; canvas.renderAll(); } }; @@ -937,7 +937,7 @@ laboris nisi ut aliquip ex ea commodo consequat.`; const activeObject = canvas.getActiveObject(); if (activeObject && activeObject.type === 'text') { activeObject.shadow = !activeObject.shadow ? 'rgba(0,0,0,0.2) 2px 2px 10px' : ''; - this.className = activeObject.shadow ? 'selected' : ''; + (this as HTMLElement).className = activeObject.shadow ? 'selected' : ''; canvas.renderAll(); } }; diff --git a/types/facebook-js-sdk/facebook-js-sdk-tests.ts b/types/facebook-js-sdk/facebook-js-sdk-tests.ts index 9652dbb86f..6b400a10a7 100644 --- a/types/facebook-js-sdk/facebook-js-sdk-tests.ts +++ b/types/facebook-js-sdk/facebook-js-sdk-tests.ts @@ -8,25 +8,22 @@ FB.init({ xfbml: true }); -FB.getLoginStatus(function(response: fb.AuthResponse) { +FB.getLoginStatus(function(response: fb.StatusResponse) { console.log(response); console.log(response.status); console.log(response.authResponse.accessToken); }); -FB.getLoginStatus(function(response: fb.AuthResponse) { +FB.getLoginStatus(function(response: fb.StatusResponse) { console.log(response); console.log(response.status); console.log(response.authResponse.accessToken); }, true); -FB.getAuthResponse(function(response: fb.AuthResponse) { - console.log(response); - console.log(response.status); - console.log(response.authResponse.accessToken); -}); +const authResponse: fb.AuthResponse = FB.getAuthResponse(); +console.log(authResponse.accessToken); -FB.login(function(response: fb.AuthResponse) { +FB.login(function(response: fb.StatusResponse) { console.log(response); console.log(response.status); console.log(response.authResponse.accessToken); @@ -34,7 +31,7 @@ FB.login(function(response: fb.AuthResponse) { scope: 'public_profile' }); -FB.logout(function(response: fb.AuthResponse) { +FB.logout(function(response: fb.StatusResponse) { console.log(response); console.log(response.status); console.log(response.authResponse.accessToken); diff --git a/types/facebook-js-sdk/index.d.ts b/types/facebook-js-sdk/index.d.ts index be9f71f6c9..8a635d8995 100644 --- a/types/facebook-js-sdk/index.d.ts +++ b/types/facebook-js-sdk/index.d.ts @@ -1,12 +1,14 @@ // Type definitions for the Facebook Javascript SDK 2.8 // Project: https://developers.facebook.com/docs/javascript -// Definitions by: Amrit Kahlon +// Definitions by: Amrit Kahlon +// Mahmoud Zohdi // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped import fb = facebook; declare var FB: fb.FacebookStatic; declare namespace facebook { - + + interface FacebookStatic { api: any; AppEvents: any; @@ -18,15 +20,17 @@ declare namespace facebook { * The synchronous nature of this method is what sets it apart from the other login methods. * * @param callback function to handle the response. + * + * This method is similar in nature to FB.getLoginStatus(), but it returns just the authResponse object. */ - getAuthResponse(callback: (response: AuthResponse) => void): void; + getAuthResponse(): AuthResponse; /** * FB.getLoginStatus() allows you to determine if a user is * logged in to Facebook and has authenticated your app. * * @param callback function to handle the response. */ - getLoginStatus(callback: (response: AuthResponse) => void, roundtrip?: boolean ): void; + getLoginStatus(callback: (response: StatusResponse) => void, roundtrip?: boolean ): void; /** * The method FB.init() is used to initialize and setup the SDK. * @@ -43,13 +47,13 @@ declare namespace facebook { * @param callback function to handle the response. * @param options optional ILoginOption to add params such as scope. */ - login(callback: (response: AuthResponse) => void, options?: LoginOptions): void; + login(callback: (response: StatusResponse) => void, options?: LoginOptions): void; /** * The method FB.logout() logs the user out of your site and, in some cases, Facebook. * * @param callback function to handle the response */ - logout(callback: (response: AuthResponse) => void): void; + logout(callback: (response: StatusResponse) => void): void; /** * @see https://developers.facebook.com/docs/sharing/reference/share-dialog @@ -180,16 +184,17 @@ declare namespace facebook { // RESPONSES // //////////////////////// - interface AuthResponse { + accessToken: string; + expiresIn: number; + signedRequest: string; + userID: string; + grantedScopes?: string; + } + + interface StatusResponse { status: string; - authResponse: { - accessToken: string; - expiresIn: number; - grantedScopes: string; - signedRequest: string; - userID: string; - }; + authResponse: AuthResponse; } interface ShareDialogResponse { diff --git a/types/faker/index.d.ts b/types/faker/index.d.ts index 552e7d3eeb..248a0ba96c 100644 --- a/types/faker/index.d.ts +++ b/types/faker/index.d.ts @@ -11,7 +11,8 @@ declare const fakerStatic: Faker.FakerStatic; declare namespace Faker { interface FakerStatic { locale: string; - + setLocale(locale: string): void; + address: { zipCode(format?: string): string; city(format?: number): string; diff --git a/types/feathersjs__authentication-client/index.d.ts b/types/feathersjs__authentication-client/index.d.ts index 9d1972bebc..6594fb7e95 100644 --- a/types/feathersjs__authentication-client/index.d.ts +++ b/types/feathersjs__authentication-client/index.d.ts @@ -53,7 +53,7 @@ export interface Passport { getJWT(): Promise; - verifyJWT(token: string): Promise; + verifyJWT(token: string): Promise; payloadIsValid(payload: string): boolean; diff --git a/types/feathersjs__authentication-jwt/index.d.ts b/types/feathersjs__authentication-jwt/index.d.ts index ab6a7f6dbe..7a555071d9 100644 --- a/types/feathersjs__authentication-jwt/index.d.ts +++ b/types/feathersjs__authentication-jwt/index.d.ts @@ -8,7 +8,7 @@ import { Application } from '@feathersjs/feathers'; import { Request } from 'express'; import * as self from '@feathersjs/authentication-jwt'; -declare const feathersAuthenticationJwt: ((options?: FeathersAuthenticationJWTOptions) => () => void) & typeof self; +declare const feathersAuthenticationJwt: ((options?: Partial) => () => void) & typeof self; export default feathersAuthenticationJwt; export interface FeathersAuthenticationJWTOptions { @@ -43,10 +43,10 @@ export interface FeathersAuthenticationJWTOptions { /** * A Verifier class. Defaults to the built-in one but can be a custom one. See below for details. */ - Verifier: JWTVerifier; + Verifier: typeof Verifier; } -export class JWTVerifier { +export class Verifier { constructor(app: Application, options: any); // the class constructor verify(req: Request, payload: any, done: (error: any, user?: any, info?: any) => void): void; diff --git a/types/feathersjs__feathers/index.d.ts b/types/feathersjs__feathers/index.d.ts index b3a0f60667..1e448dbf4f 100644 --- a/types/feathersjs__feathers/index.d.ts +++ b/types/feathersjs__feathers/index.d.ts @@ -14,6 +14,7 @@ declare const feathers: (() => Application) & typeof self; export default feathers; export const version: string; +export const SKIP: SkipSymbol; export type Id = number | string; export type NullableId = Id | null; @@ -45,7 +46,9 @@ export interface Paginated { } // tslint:disable-next-line void-return -export type Hook = (hook: HookContext) => (Promise | void); +export type Hook = (hook: HookContext) => (Promise | HookContext | SkipSymbol | void); + +export type SkipSymbol = symbol | '__feathersSkipHooks'; export interface HookContext { app?: Application; diff --git a/types/ffi-napi/ffi-napi-tests.ts b/types/ffi-napi/ffi-napi-tests.ts new file mode 100644 index 0000000000..5965e23e12 --- /dev/null +++ b/types/ffi-napi/ffi-napi-tests.ts @@ -0,0 +1,106 @@ +import ffi = require('ffi-napi'); +import ref = require('ref-napi'); +import Struct = require('ref-struct-di'); +import Union = require('ref-union-di'); +import TArray = require('ref-array-di'); + +{ + const sqlite3 = ref.types.void; + const sqlite3Ptr = ref.refType(sqlite3); + const sqlite3PtrPtr = ref.refType(sqlite3Ptr); + const stringPtr = ref.refType(ref.types.CString); + + const libsqlite3 = ffi.Library('libsqlite3', { + sqlite3_open: [ 'int', [ 'string', sqlite3PtrPtr ] ], + sqlite3_close: [ 'int', [ sqlite3PtrPtr ] ], + sqlite3_exec: [ 'int', [ sqlite3PtrPtr, 'string', 'pointer', 'pointer', stringPtr ] ], + sqlite3_changes: [ 'int', [ sqlite3PtrPtr ]] + }); + + const dbPtrPtr = ref.alloc(sqlite3PtrPtr); + libsqlite3.sqlite3_open("test.sqlite3", dbPtrPtr); +} +{ + const func = ffi.ForeignFunction(new Buffer(10), 'int', [ 'int' ]); + func(-5); + func.async(-5, (err: any, res: any) => {}); +} +{ + const funcPtr = ffi.Callback('int', [ 'int' ], Math.abs); + const func = ffi.ForeignFunction(funcPtr, 'int', [ 'int' ]); +} +{ + const printfPointer = ffi.DynamicLibrary().get('printf'); + const printfGen = ffi.VariadicForeignFunction(printfPointer, 'void', [ 'string' ]); + printfGen()('Hello World!\n'); + printfGen('int')('This is an int: %d\n', 10); + printfGen('string')('This is a string: %s\n', 'hello'); +} +{ + ref.address(new Buffer(1)); + const intBuf = ref.alloc(ref.types.int); + const intWith4 = ref.alloc(ref.types.int, 4); + const buf0 = ref.allocCString('hello world'); + const type = ref.coerceType('int **'); + const val = ref.deref(intBuf); +} +{ + ref.isNull(new Buffer(1)); +} +{ + const str = ref.readCString(new Buffer('hello\0world\0'), 0); + const buf = ref.alloc('int64'); + ref.writeInt64BE(buf, 0, '9223372036854775807'); + const val = ref.readInt64BE(buf, 0); +} +{ + const voidPtrType = ref.refType(ref.types.void); + const buf = ref.alloc('int64'); + ref.writeInt64LE(buf, 0, '9223372036854775807'); +} +{ + const S1 = Struct({ a: ref.types.int }); + const S2 = new Struct({ a: 'int' }); +} +{ + const P = new Struct(); + P.defineProperty('a', ref.types.int); + P.defineProperty('d', 'long'); +} +{ + const SimpleStruct = Struct({ + first : ref.types.byte, + last : ref.types.byte + }); + + const ss = new SimpleStruct({ first: 50, last: 100 }); + ss.first += 200; +} +{ + const ST = Struct(); + const test: ref.Type = ST.fields['t'].type; +} +{ + const CharArray = TArray('char'); + const b = new Buffer('hello', 'ascii'); + const a = new CharArray(b); +} +{ + const Int32Array = TArray(ref.types.int32); + const input = [1, 4, 91, 123123, 5123512, 0, -1]; + const a = new Int32Array(input); +} +{ + const int = ref.types.int; + const IntArray = TArray(int); + + const buf = new Buffer(int.size * 3); + int.set(buf, int.size * 0, 5); + int.set(buf, int.size * 1, 8); + int.set(buf, int.size * 2, 0); + + const array = IntArray.untilZeros(buf); +} +{ + const refCharArr = TArray('char')([1, 3, 5], 2).ref(); +} diff --git a/types/ffi-napi/index.d.ts b/types/ffi-napi/index.d.ts new file mode 100644 index 0000000000..6cfd439e13 --- /dev/null +++ b/types/ffi-napi/index.d.ts @@ -0,0 +1,186 @@ +// Type definitions for node-ffi-napi 2.4 +// Project: https://github.com/node-ffi/node-ffi +// Definitions by: Keerthi Niranjan , Kiran Niranjan +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.2 + +/// + + +import ref = require('ref-napi'); +import StructType = require('ref-struct-di'); + +/** Provides a friendly API on-top of `DynamicLibrary` and `ForeignFunction`. */ +export interface Library { + /** The extension to use on libraries. */ + EXT: string; + + /** + * @param libFile name of library + * @param funcs hash of [retType, [...argType], opts?: {abi?, async?, varargs?}] + * @param lib hash that will be extended + */ + new (libFile: string, funcs?: {[key: string]: any[]}, lib?: object): any; + + /** + * @param libFile name of library + * @param funcs hash of [retType, [...argType], opts?: {abi?, async?, varargs?}] + * @param lib hash that will be extended + */ + (libFile: string, funcs?: {[key: string]: any[]}, lib?: object): any; +} +export const Library: Library; + +/** Get value of errno. */ +export function errno(): number; + +export interface Function extends ref.Type { + /** The type of return value. */ + retType: ref.Type; + /** The type of arguments. */ + argTypes: ref.Type[]; + /** Is set for node-ffi functions. */ + ffi_type: Buffer; + abi: number; + + /** Get a `Callback` pointer of this function type. */ + toPointer(fn: (...args: any[]) => any): Buffer; + /** Get a `ForeignFunction` of this function type. */ + toFunction(buf: Buffer): ForeignFunction; +} + +/** Creates and returns a type for a C function pointer. */ +export const Function: { + new (retType: ref.Type | string, argTypes: any[], abi?: number): Function; + (retType: ref.Type | string, argTypes: any[], abi?: number): Function; +}; + +export interface ForeignFunction { + (...args: any[]): any; + async(...args: any[]): void; +} + +/** + * Represents a foreign function in another library. Manages all of the aspects + * of function execution, including marshalling the data parameters for the + * function into native types and also unmarshalling the return from function + * execution. + */ +export const ForeignFunction: { + new (ptr: Buffer, retType: ref.Type | string, argTypes: any[], abi?: number): ForeignFunction; + (ptr: Buffer, retType: ref.Type | string, argTypes: any[], abi?: number): ForeignFunction; +}; + +export interface VariadicForeignFunction { + /** + * What gets returned is another function that needs to be invoked with the rest + * of the variadic types that are being invoked from the function. + */ + (...args: any[]): ForeignFunction; + + /** + * Return type as a property of the function generator to + * allow for monkey patching the return value in the very rare case where the + * return type is variadic as well + */ + returnType: any; +} + +/** + * For when you want to call to a C function with variable amount of arguments. + * i.e. `printf`. + * + * This function takes care of caching and reusing `ForeignFunction` instances that + * contain the same ffi_type argument signature. + */ +export const VariadicForeignFunction: { + new (ptr: Buffer, ret: ref.Type | string, fixedArgs: any[], abi?: number): VariadicForeignFunction; + (ptr: Buffer, ret: ref.Type | string, fixedArgs: any[], abi?: number): VariadicForeignFunction; +}; + +export interface DynamicLibrary { + /** Close library, returns the result of the `dlclose` system function. */ + close(): number; + /** Get a symbol from this library. */ + get(symbol: string): Buffer; + /** Get the result of the `dlerror` system function. */ + error(): string; +} + +/** + * This class loads and fetches function pointers for dynamic libraries + * (.so, .dylib, etc). After the libray's function pointer is acquired, then you + * call `get(symbol)` to retreive a pointer to an exported symbol. You need to + * call `get___` on the pointer to dereference it into its actual value, or + * turn the pointer into a callable function with `ForeignFunction`. + */ +export const DynamicLibrary: { + FLAGS: { + RTLD_LAZY: number; + RTLD_NOW: number; + RTLD_LOCAL: number; + RTLD_GLOBAL: number; + RTLD_NOLOAD: number; + RTLD_NODELETE: number; + RTLD_NEXT: Buffer; + RTLD_DEFAUL: Buffer; + } + + new (path?: string, mode?: number): DynamicLibrary; + (path?: string, mode?: number): DynamicLibrary; +}; + +/** + * Turns a JavaScript function into a C function pointer. + * The function pointer may be used in other C functions that + * accept C callback functions. + */ +export interface Callback { + new (retType: any, argTypes: any[], abi: number, fn: any): Buffer; + new (retType: any, argTypes: any[], fn: any): Buffer; + (retType: any, argTypes: any[], abi: number, fn: any): Buffer; + (retType: any, argTypes: any[], fn: any): Buffer; +} +export const Callback: Callback; + +export const ffiType: { + /** Get a `ffi_type *` Buffer appropriate for the given type. */ + (type: ref.Type | string): Buffer + FFI_TYPE: StructType; +}; + +export function CIF(retType: any, types: any[], abi?: any): Buffer; +export function CIF_var(retType: any, types: any[], numFixedArgs: number, abi?: any): Buffer; +export const HAS_OBJC: boolean; +export const FFI_TYPES: {[key: string]: Buffer}; +export const FFI_OK: number; +export const FFI_BAD_TYPEDEF: number; +export const FFI_BAD_ABI: number; +export const FFI_DEFAULT_ABI: number; +export const FFI_FIRST_ABI: number; +export const FFI_LAST_ABI: number; +export const FFI_SYSV: number; +export const FFI_UNIX64: number; +export const RTLD_LAZY: number; +export const RTLD_NOW: number; +export const RTLD_LOCAL: number; +export const RTLD_GLOBAL: number; +export const RTLD_NOLOAD: number; +export const RTLD_NODELETE: number; +export const RTLD_NEXT: Buffer; +export const RTLD_DEFAULT: Buffer; +export const LIB_EXT: string; +export const FFI_TYPE: StructType; + +/** Default types. */ +export const types: { + void: ref.Type; int64: ref.Type; ushort: ref.Type; + int: ref.Type; uint64: ref.Type; float: ref.Type; + uint: ref.Type; long: ref.Type; double: ref.Type; + int8: ref.Type; ulong: ref.Type; Object: ref.Type; + uint8: ref.Type; longlong: ref.Type; CString: ref.Type; + int16: ref.Type; ulonglong: ref.Type; bool: ref.Type; + uint16: ref.Type; char: ref.Type; byte: ref.Type; + int32: ref.Type; uchar: ref.Type; size_t: ref.Type; + uint32: ref.Type; short: ref.Type; +}; diff --git a/types/ffi-napi/node-ffi-napi-buffer.d.ts b/types/ffi-napi/node-ffi-napi-buffer.d.ts new file mode 100644 index 0000000000..fa817e1662 --- /dev/null +++ b/types/ffi-napi/node-ffi-napi-buffer.d.ts @@ -0,0 +1,50 @@ +// DefinitelyTyped: partial + +interface Buffer { + /** Shorthand for `ref.address`. */ + address(): number; + /** Shorthand for `ref.deref`. */ + deref(): any; + /** Shorthand for `ref.isNull`. */ + isNull(): boolean; + /** Shorthand for `ref.readCString`. */ + readCString(offset?: number): string; + /** Shorthand for `ref.readInt64BE`. */ + readInt64BE(offset?: number): string; + /** Shorthand for `ref.readInt64LE`. */ + readInt64LE(offset?: number): string; + /** Shorthand for `ref.readObject`. */ + readObject(offset?: number): string; + /** Shorthand for `ref.readPointer`. */ + readPointer(offset?: number): string; + /** Shorthand for `ref.readUInt64BE`. */ + readUInt64BE(offset?: number): string; + /** Shorthand for `ref.readUInt64LE`. */ + readUInt64LE(offset?: number): string; + /** Shorthand for `ref.ref`. */ + ref(): Buffer; + /** Shorthand for `ref.reinterpret`. */ + reinterpret(size: number, offset?: number): Buffer; + /** Shorthand for `ref.reinterpretUntilZeros`. */ + reinterpretUntilZeros(size: number, offset?: number): Buffer; + /** Shorthand for `ref.writeCString`. */ + writeCString(offset: number, input: string, encoding?: string): void; + /** Shorthand for `ref.writeInt64BE`. */ + writeInt64BE(offset: number, input: number | string): any; + /** Shorthand for `ref.writeInt64LE`. */ + writeInt64LE(offset: number, input: number | string): any; + /** Shorthand for `ref.writeObject`. */ + writeObject(offset: number, object: object): void; + /** Shorthand for `ref.writePointer`. */ + writePointer(offset: number, pointer: Buffer): void; + /** Shorthand for `ref.writeUInt64BE`. */ + writeUInt64BE(offset: number, input: number | string): any; + /** Shorthand for `ref.writeUInt64LE`. */ + writeUInt64LE(offset: number, input: number | string): any; + + /** + * Generate string for inspecting. + * String includes the hex-encoded memory address of the Buffer instance. + */ + inspect(): string; +} diff --git a/types/ffi-napi/tsconfig.json b/types/ffi-napi/tsconfig.json new file mode 100644 index 0000000000..c914c55679 --- /dev/null +++ b/types/ffi-napi/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 + }, + "files": [ + "index.d.ts", + "node-ffi-napi-buffer.d.ts", + "ffi-napi-tests.ts" + ] +} diff --git a/types/ffi-napi/tslint.json b/types/ffi-napi/tslint.json new file mode 100644 index 0000000000..c5fa24ca82 --- /dev/null +++ b/types/ffi-napi/tslint.json @@ -0,0 +1,8 @@ +{ + "extends": "dtslint/dt.json", + + "rules": { + "no-consecutive-blank-lines": [true, 3], + "ban-types": [false] + } +} diff --git a/types/ffi/index.d.ts b/types/ffi/index.d.ts index 76e197e841..cf562cea06 100644 --- a/types/ffi/index.d.ts +++ b/types/ffi/index.d.ts @@ -1,6 +1,6 @@ -// Type definitions for node-ffi 0.1 +// Type definitions for node-ffi 0.2 // Project: https://github.com/rbranson/node-ffi -// Definitions by: Paul Loyd +// Definitions by: Paul Loyd , Waiting Song // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.2 @@ -135,12 +135,13 @@ export const DynamicLibrary: { * The function pointer may be used in other C functions that * accept C callback functions. */ -export const Callback: { +export interface Callback { new (retType: any, argTypes: any[], abi: number, fn: any): Buffer; new (retType: any, argTypes: any[], fn: any): Buffer; (retType: any, argTypes: any[], abi: number, fn: any): Buffer; (retType: any, argTypes: any[], fn: any): Buffer; -}; +} +export const Callback: Callback; export const ffiType: { /** Get a `ffi_type *` Buffer appropriate for the given type. */ diff --git a/types/fibjs/UNUSED_FILES.txt b/types/fibjs/UNUSED_FILES.txt new file mode 100644 index 0000000000..2a6c4b5a1c --- /dev/null +++ b/types/fibjs/UNUSED_FILES.txt @@ -0,0 +1 @@ +declare/_test_env.d.ts \ No newline at end of file diff --git a/types/fibjs/declare/Buffer.d.ts b/types/fibjs/declare/Buffer.d.ts new file mode 100644 index 0000000000..867283e703 --- /dev/null +++ b/types/fibjs/declare/Buffer.d.ts @@ -0,0 +1,1131 @@ +/*************************************************************************** + * * + * This file was automatically generated with idlc.js * + * build info: * + * - fibjs : 0.25.0 * + * - date : Jun 12 2018 07:22:40 * + * * + ***************************************************************************/ + +/** + * @author Richard + * + */ +/// + + + + +/** module Or Internal Object */ +/** + * @brief 二进制数据缓存对象,用于 io 读写的数据处理 + * @detail Buffer 对象为全局基础类,在任何时候都可以直接以 new Buffer(...) 创建:,```JavaScript,var buf = new Buffer();,``` + */ + +declare class Class_Buffer extends Class__object { + + /** + * class prop + * + * + * @brief 获取缓存对象的尺寸 + * + * @readonly + * @type Integer + */ + + length: number + + + + /** + * + * @brief 缓存对象构造函数 + * @param datas 初始化数据数组 + * + * + * + */ + constructor(datas: any[]); + + /** + * + * @brief 缓存对象构造函数 + * @param datas 初始化数据数组 + * + * + * + */ + constructor(datas: ArrayBuffer); + + /** + * + * @brief 缓存对象构造函数 + * @param datas 初始化数据数组 + * + * + * + */ + constructor(datas: ArrayLike); + + /** + * + * @brief 缓存对象构造函数 + * @param datas 初始化数据数组 + * + * + * + */ + constructor(datas: ArrayBufferView); + + /** + * + * @brief 缓存对象构造函数 + * @param buffer 初始化Buffer对象 + * + * + * + */ + constructor(buffer: Class_Buffer); + + /** + * + * @brief 缓存对象构造函数 + * @param str 初始化字符串,字符串将以 utf-8 格式写入,缺省则创建一个空对象 + * @param codec 指定编码格式,允许值为:"hex", "base64", "utf8", 或者系统支持的字符集 + * + * + * + */ + constructor(str: string, codec?: string/** = "utf8"*/); + + /** + * + * @brief 缓存对象构造函数 + * @param size 初始化缓冲区大小 + * + * + * + */ + constructor(size?: number/** = 0*/); + + /** + * + * @brief 检测给定的变量是否是 Buffer 对象 + * @param v 给定需要检测的变量 + * @return 传入对象是否 Buffer 对象 + * + * + * + */ + static isBuffer(v: any): boolean; + + /** + * + * @brief 通过其他 Buffer 创建 Buffer 对象 + * @param buffer 给定 Buffer 类型变量用于创建 Buffer 对象 + * @param byteOffset 指定数据起始位置,起始为 0 + * @param length 指定数据长度,起始位 -1,表示剩余所有数据 + * @return 返回 Buffer 实例 + * + * + * + */ + static from(buffer: Class_Buffer, byteOffset?: number/** = 0*/, length?: number/** = -1*/): Class_Buffer; + + /** + * + * @brief 通过字符串创建 Buffer 对象 + * @param str 初始化字符串,字符串将以 utf-8 格式写入 + * @param byteOffset 指定数据起始位置,起始为 0 + * @param length 指定数据长度,起始位 -1,表示剩余所有数据 + * @return 返回 Buffer 实例 + * + * + * + */ + static from(str: string, byteOffset?: number/** = 0*/, length?: number/** = -1*/): Class_Buffer; + + /** + * + * @brief 通过字符串创建 Buffer 对象 + * @param str 初始化字符串,字符串将以 utf-8 格式写入,缺省则创建一个空对象 + * @param codec 指定编码格式,允许值为:"hex", "base64", "utf8", 或者系统支持的字符集 + * @return 返回 Buffer 实例 + * + * + * + */ + static from(str: string, codec?: string/** = "utf8"*/): Class_Buffer; + + /** + * + * @brief 拼接多个缓存区中的数据 + * @param buflist 待拼接的Buffer数组 + * @param cutLength 截取多少个Buffer对象 + * @return 拼接后产生的新 Buffer 对象 + * + * + * + */ + static concat(buflist: any[], cutLength?: number/** = -1*/): Class_Buffer; + + /** + * + * @brief 分配一个指定长度的新缓存区。如果大小为0,将创建一个零长度的缓存区。 + * @param size 缓冲区的所需长度 + * @param fill 预先填充新缓冲区的值,可使用 string/buffer/integer 值类型。 默认值:0 + * @param codec 指定编码格式,允许值为:"hex", "base64", "utf8", 或者系统支持的字符集 + * @return 填充好的新 Buffer 对象 + * + * + * + */ + static alloc(size: number, fill?: number/** = 0*/, codec?: string/** = "utf8"*/): Class_Buffer; + + /** + * + * @brief 分配一个指定长度的新缓存区。如果大小为0,将创建一个零长度的缓存区。 + * @param size 缓冲区的所需长度 + * @param fill 预先填充新缓冲区的值,可使用 string/buffer/integer 值类型。 默认值:0 + * @param codec 指定编码格式,允许值为:"hex", "base64", "utf8", 或者系统支持的字符集 + * @return 填充好的新 Buffer 对象 + * + * + * + */ + static alloc(size: number, fill?: string/** = ""*/, codec?: string/** = "utf8"*/): Class_Buffer; + + /** + * + * @brief 分配一个指定长度的新缓存区。如果大小为0,将创建一个零长度的缓存区。 + * @param size 缓冲区的所需长度 + * @param fill 预先填充新缓冲区的值,可使用 string/buffer/integer 值类型。 默认值:0 + * @param codec 指定编码格式,允许值为:"hex", "base64", "utf8", 或者系统支持的字符集 + * @return 填充好的新 Buffer 对象 + * + * + * + */ + static alloc(size: number, fill: Class_Buffer, codec?: string/** = "utf8"*/): Class_Buffer; + + /** + * + * @brief 分配一个指定长度的新缓存区。如果大小为0,将创建一个零长度的缓存区。 + * @param size 缓冲区的所需长度 + * @return 指定尺寸的新 Buffer 对象 + * + * + * + */ + static allocUnsafe(size: number): Class_Buffer; + + /** + * + * @brief 分配一个指定长度的新缓存区。如果大小为0,将创建一个零长度的缓存区。 + * @param size 缓冲区的所需长度 + * @return 指定尺寸的新 Buffer 对象 + * + * + * + */ + static allocUnsafeSlow(size: number): Class_Buffer; + + /** + * + * @brief 返回字符串的实际字节长度 + * @param str 待取字节的字符串,如果str为 ArrayBuffer/TypedArray/DataView/Buffer 对象,则返回它们的实际长度 + * @param codec 指定编码格式,允许值为:"hex", "base64", "utf8", 或者系统支持的字符集 + * @return 返回实际字节长度 + * + * + * + */ + static byteLength(str: string, codec?: string/** = "utf8"*/): number; + + /** + * + * @brief 返回字符串的实际字节长度 + * @param str 待取字节的字符串,如果str为 ArrayBuffer/TypedArray/DataView/Buffer 对象,则返回它们的实际长度 + * @param codec 指定编码格式,允许值为:"hex", "base64", "utf8", 或者系统支持的字符集 + * @return 返回实际字节长度 + * + * + * + */ + static byteLength(str: ArrayBuffer, codec?: string/** = "utf8"*/): number; + + /** + * + * @brief 返回字符串的实际字节长度 + * @param str 待取字节的字符串,如果 str 为 ArrayBuffer/TypedArray/DataView/Buffer 对象,则返回它们的实际长度 + * @param codec 指定编码格式,允许值为:"hex", "base64", "utf8", 或者系统支持的字符集 + * @return 返回实际字节长度 + * + * + * + */ + static byteLength(str: ArrayBufferView, codec?: string/** = "utf8"*/): number; + + /** + * + * @brief 返回字符串的实际字节长度 + * @param str 待取字节的字符串,如果str为 ArrayBuffer/TypedArray/DataView/Buffer 对象,则返回它们的实际长度 + * @param codec 指定编码格式,允许值为:"hex", "base64", "utf8", 或者系统支持的字符集 + * @return 返回实际字节长度 + * + * + * + */ + static byteLength(str: Class_Buffer, codec?: string/** = "utf8"*/): number; + + /** + * + * @brief 检测编码格式是否被支持 + * @param codec 待检测的编码格式 + * @return 是否支持 + * + * + * + */ + static isEncoding(codec: string): boolean; + + /** + * + * @brief 修改缓存对象尺寸 + * @param sz 指定新尺寸 + * + * + * + */ + resize(sz: number): void; + + /** + * + * @brief 在缓存对象尾部写入一组二进制数据 + * @param data 初始化二进制数据 + * + * + * + */ + append(data: Class_Buffer): void; + + /** + * + * @brief 在缓存对象尾部写入字符串,字符串将以 utf-8 格式写入 + * @param str 要写入的字符串 + * @param codec 指定编码格式,允许值为:"hex", "base64", "utf8", 或者系统支持的字符集 + * + * + * + */ + append(str: string, codec?: string/** = "utf8"*/): void; + + /** + * + * @brief 向缓存对象写入指定字符串,字符串默认为utf-8,越界时只写入部分数据 + * @param str 待写入的字符串 + * @param offset 写入起始位置 + * @param length 写入长度(单位字节,默认值-1),未指定时为待写入字符串的长度 + * @param codec 指定编码格式,允许值为:"hex", "base64", "utf8", 或者系统支持的字符集 + * @return 写入的数据字节长度 + * + * + * + */ + write(str: string, offset?: number/** = 0*/, length?: number/** = -1*/, codec?: string/** = "utf8"*/): number; + + /** + * + * @brief 向缓存对象写入指定字符串,字符串默认为utf-8,越界时只写入部分数据 + * @param str 待写入的字符串 + * @param offset 写入起始位置 + * @param codec 指定编码格式,允许值为:"hex", "base64", "utf8", 或者系统支持的字符集 + * @return 写入的数据字节长度 + * + * + * + */ + write(str: string, offset?: number/** = 0*/, codec?: string/** = "utf8"*/): number; + + /** + * + * @brief 向缓存对象写入指定字符串,字符串默认为utf-8,越界时只写入部分数据 + * @param str 待写入的字符串 + * @param codec 指定编码格式,允许值为:"hex", "base64", "utf8", 或者系统支持的字符集 + * @return 写入的数据字节长度 + * + * + * + */ + write(str: string, codec?: string/** = "utf8"*/): number; + + /** + * + * @brief 为 Buffer 对象填充指定内容数据 + * @param v 需要填充的数据,如果未指定 offset 和 end,将填充满整个 buffer + * @param offset 填充起始位置 + * @param end 填充终止位置 + * @return 返回当前 Buffer 对象 + * + * + * + */ + fill(v: number, offset?: number/** = 0*/, end?: number/** = -1*/): Class_Buffer; + + /** + * + * @brief 为 Buffer 对象填充指定内容数据 + * @param v 需要填充的数据,如果未指定 offset 和 end,将填充满整个 buffer + * @param offset 填充起始位置 + * @param end 填充终止位置 + * @return 返回当前 Buffer 对象 + * + * + * + */ + fill(v: Class_Buffer, offset?: number/** = 0*/, end?: number/** = -1*/): Class_Buffer; + + /** + * + * @brief 为 Buffer 对象填充指定内容数据 + * @param v 需要填充的数据,如果未指定 offset 和 end,将填充满整个 buffer + * @param offset 填充起始位置 + * @param end 填充终止位置 + * @return 返回当前 Buffer 对象 + * + * + * + */ + fill(v: string, offset?: number/** = 0*/, end?: number/** = -1*/): Class_Buffer; + + /** + * + * @brief 返回某个指定数据在 Buffer 中首次出现的位置 + * @param v 待查找数据,如果未指定 offset,默认从起始位开始 + * @param offset 起始查找位置 + * @return 返回查找到的位置,未找到返回 -1 + * + * + * + */ + indexOf(v: number, offset?: number/** = 0*/): number; + + /** + * + * @brief 返回某个指定数据在 Buffer 中首次出现的位置 + * @param v 待查找数据,如果未指定 offset,默认从起始位开始 + * @param offset 起始查找位置 + * @return 返回查找到的位置,未找到返回 -1 + * + * + * + */ + indexOf(v: Class_Buffer, offset?: number/** = 0*/): number; + + /** + * + * @brief 返回某个指定数据在 Buffer 中首次出现的位置 + * @param v 待查找数据,如果未指定 offset,默认从起始位开始 + * @param offset 起始查找位置 + * @return 返回查找到的位置,未找到返回 -1 + * + * + * + */ + indexOf(v: string, offset?: number/** = 0*/): number; + + /** + * + * @brief 比较缓存区的内容 + * @param buf 待比较缓存对象 + * @return 内容比较结果 + * + * + * + */ + compare(buf: Class_Buffer): number; + + /** + * + * @brief 从源缓存对象区域拷贝数据到目标缓存对象区域 + * @param targetBuffer 目标缓存对象 + * @param targetStart 目标缓存对象开始拷贝字节位置,缺省为 0 + * @param sourceStart 源缓存对象开始字节位置, 缺省为 0 + * @param sourceEnd 源缓存对象结束字节位置, 缺省为 -1,表示源数据长度 + * @return 拷贝的数据字节长度 + * + * + * + */ + copy(targetBuffer: Class_Buffer, targetStart?: number/** = 0*/, sourceStart?: number/** = 0*/, sourceEnd?: number/** = -1*/): number; + + /** + * + * @brief 从缓存对象读取一个 8 位无符号整型数值 + * @param offset 指定读取的起始位置,缺省为 0 + * @param noAssert 指定读取越界时不抛出错误,缺省为 flase,抛出 + * @return 返回读取的整型数值 + * + * + * + */ + readUInt8(offset?: number/** = 0*/, noAssert?: boolean/** = false*/): number; + + /** + * + * @brief 从缓存对象读取一个 16 位无符号整型数值,以低字节序的存储方式 + * @param offset 指定读取的起始位置,缺省为 0 + * @param noAssert 指定读取越界时不抛出错误,缺省为 flase,抛出 + * @return 返回读取的整型数值 + * + * + * + */ + readUInt16LE(offset?: number/** = 0*/, noAssert?: boolean/** = false*/): number; + + /** + * + * @brief 从缓存对象读取一个 16 位无符号整型数值,以高字节序的存储方式 + * @param offset 指定读取的起始位置,缺省为 0 + * @param noAssert 指定读取越界时不抛出错误,缺省为 flase,抛出 + * @return 返回读取的整型数值 + * + * + * + */ + readUInt16BE(offset?: number/** = 0*/, noAssert?: boolean/** = false*/): number; + + /** + * + * @brief 从缓存对象读取一个 32 位无符号整型数值,以低字节序的存储方式 + * @param offset 指定读取的起始位置,缺省为 0 + * @param noAssert 指定读取越界时不抛出错误,缺省为 flase,抛出 + * @return 返回读取的整型数值 + * + * + * + */ + readUInt32LE(offset?: number/** = 0*/, noAssert?: boolean/** = false*/): number; + + /** + * + * @brief 从缓存对象读取一个 32 位无符号整型数值,以高字节序的存储方式 + * @param offset 指定读取的起始位置,缺省为 0 + * @param noAssert 指定读取越界时不抛出错误,缺省为 flase,抛出 + * @return 返回读取的整型数值 + * + * + * + */ + readUInt32BE(offset?: number/** = 0*/, noAssert?: boolean/** = false*/): number; + + /** + * + * @brief 从缓存对象读取一个无符号整型数值,最大支持 48 位,以低字节序的存储方式 + * @param offset 指定读取的起始位置,缺省为 0 + * @param noAssert 指定读取越界时不抛出错误,缺省为 flase,抛出 + * @return 返回读取的整型数值 + * + * + * + */ + readUIntLE(offset?: number/** = 0*/, noAssert?: boolean/** = false*/): number; + + /** + * + * @brief 从缓存对象读取一个无符号整型数值,最大支持 48 位,以高字节序的存储方式 + * @param offset 指定读取的起始位置,缺省为 0 + * @param noAssert 指定读取越界时不抛出错误,缺省为 flase,抛出 + * @return 返回读取的整型数值 + * + * + * + */ + readUIntBE(offset?: number/** = 0*/, noAssert?: boolean/** = false*/): number; + + /** + * + * @brief 从缓存对象读取一个 8 位整型数值 + * @param offset 指定读取的起始位置,缺省为 0 + * @param noAssert 指定读取越界时不抛出错误,缺省为 flase,抛出 + * @return 返回读取的整型数值 + * + * + * + */ + readInt8(offset?: number/** = 0*/, noAssert?: boolean/** = false*/): number; + + /** + * + * @brief 从缓存对象读取一个 16 位整型数值,以低字节序的存储方式 + * @param offset 指定读取的起始位置,缺省为 0 + * @param noAssert 指定读取越界时不抛出错误,缺省为 flase,抛出 + * @return 返回读取的整型数值 + * + * + * + */ + readInt16LE(offset?: number/** = 0*/, noAssert?: boolean/** = false*/): number; + + /** + * + * @brief 从缓存对象读取一个 16 位整型数值,以高字节序的存储方式 + * @param offset 指定读取的起始位置,缺省为 0 + * @param noAssert 指定读取越界时不抛出错误,缺省为 flase,抛出 + * @return 返回读取的整型数值 + * + * + * + */ + readInt16BE(offset?: number/** = 0*/, noAssert?: boolean/** = false*/): number; + + /** + * + * @brief 从缓存对象读取一个 32 位整型数值,以低字节序的存储方式 + * @param offset 指定读取的起始位置,缺省为 0 + * @param noAssert 指定读取越界时不抛出错误,缺省为 flase,抛出 + * @return 返回读取的整型数值 + * + * + * + */ + readInt32LE(offset?: number/** = 0*/, noAssert?: boolean/** = false*/): number; + + /** + * + * @brief 从缓存对象读取一个 32 位整型数值,以高字节序的存储方式 + * @param offset 指定读取的起始位置,缺省为 0 + * @param noAssert 指定读取越界时不抛出错误,缺省为 flase,抛出 + * @return 返回读取的整型数值 + * + * + * + */ + readInt32BE(offset?: number/** = 0*/, noAssert?: boolean/** = false*/): number; + + /** + * + * @brief 从缓存对象读取一个整型数值,最大支持 48 位,以低字节序的存储方式 + * @param offset 指定读取的起始位置,缺省为 0 + * @param noAssert 指定读取越界时不抛出错误,缺省为 flase,抛出 + * @return 返回读取的整型数值 + * + * + * + */ + readIntLE(offset?: number/** = 0*/, noAssert?: boolean/** = false*/): number; + + /** + * + * @brief 从缓存对象读取一个整型数值,最大支持 48 位,以高字节序的存储方式 + * @param offset 指定读取的起始位置,缺省为 0 + * @param noAssert 指定读取越界时不抛出错误,缺省为 flase,抛出 + * @return 返回读取的整型数值 + * + * + * + */ + readIntBE(offset?: number/** = 0*/, noAssert?: boolean/** = false*/): number; + + /** + * + * @brief 从缓存对象读取一个 64 位整型数值,以低字节序的存储方式 + * @param offset 指定读取的起始位置,缺省为 0 + * @param noAssert 指定读取越界时不抛出错误,缺省为 flase,抛出 + * @return 返回读取的整型数值 + * + * + * + */ + readInt64LE(offset?: number/** = 0*/, noAssert?: boolean/** = false*/): Class_Int64; + + /** + * + * @brief 从缓存对象读取一个 64 位整型数值,以高字节序的存储方式 + * @param offset 指定读取的起始位置,缺省为 0 + * @param noAssert 指定读取越界时不抛出错误,缺省为 flase,抛出 + * @return 返回读取的整型数值 + * + * + * + */ + readInt64BE(offset?: number/** = 0*/, noAssert?: boolean/** = false*/): Class_Int64; + + /** + * + * @brief 从缓存对象读取一个浮点数,以低字节序的存储方式 + * @param offset 指定读取的起始位置,缺省为 0 + * @param noAssert 指定读取越界时不抛出错误,缺省为 flase,抛出 + * @return 返回读取的浮点数 + * + * + * + */ + readFloatLE(offset?: number/** = 0*/, noAssert?: boolean/** = false*/): number; + + /** + * + * @brief 从缓存对象读取一个浮点数,以高字节序的存储方式 + * @param offset 指定读取的起始位置,缺省为 0 + * @param noAssert 指定读取越界时不抛出错误,缺省为 flase,抛出 + * @return 返回读取的浮点数 + * + * + * + */ + readFloatBE(offset?: number/** = 0*/, noAssert?: boolean/** = false*/): number; + + /** + * + * @brief 从缓存对象读取一个双精度浮点数,以低字节序的存储方式 + * @param offset 指定读取的起始位置,缺省为 0 + * @param noAssert 指定读取越界时不抛出错误,缺省为 flase,抛出 + * @return 返回读取的双精度浮点数 + * + * + * + */ + readDoubleLE(offset?: number/** = 0*/, noAssert?: boolean/** = false*/): number; + + /** + * + * @brief 从缓存对象读取一个双精度浮点数,以高字节序的存储方式 + * @param offset 指定读取的起始位置,缺省为 0 + * @param noAssert 指定读取越界时不抛出错误,缺省为 flase,抛出 + * @return 返回读取的双精度浮点数 + * + * + * + */ + readDoubleBE(offset?: number/** = 0*/, noAssert?: boolean/** = false*/): number; + + /** + * + * @brief 向缓存对象写入一个 8 位无符号整型数值 + * @param value 指定写入的数值 + * @param offset 指定写入的起始位置 + * @param noAssert 指定写入越界时不抛出错误,缺省为 flase,抛出 + * @return offset 加上写入的字节数 + * + * + * + */ + writeUInt8(value: number, offset?: number/** = 0*/, noAssert?: boolean/** = false*/): number; + + /** + * + * @brief 向缓存对象写入一个 16 位无符号整型数值,以低字节序的存储方式 + * @param value 指定写入的数值 + * @param offset 指定写入的起始位置 + * @param noAssert 指定写入越界时不抛出错误,缺省为 flase,抛出 + * @return offset 加上写入的字节数 + * + * + * + */ + writeUInt16LE(value: number, offset?: number/** = 0*/, noAssert?: boolean/** = false*/): number; + + /** + * + * @brief 向缓存对象写入一个 16 位无符号整型数值,以高字节序的存储方式 + * @param value 指定写入的数值 + * @param offset 指定写入的起始位置 + * @param noAssert 指定写入越界时不抛出错误,缺省为 flase,抛出 + * @return offset 加上写入的字节数 + * + * + * + */ + writeUInt16BE(value: number, offset?: number/** = 0*/, noAssert?: boolean/** = false*/): number; + + /** + * + * @brief 向缓存对象写入一个 32 位无符号整型数值,以低字节序的存储方式 + * @param value 指定写入的数值 + * @param offset 指定写入的起始位置 + * @param noAssert 指定写入越界时不抛出错误,缺省为 flase,抛出 + * @return offset 加上写入的字节数 + * + * + * + */ + writeUInt32LE(value: number, offset?: number/** = 0*/, noAssert?: boolean/** = false*/): number; + + /** + * + * @brief 向缓存对象写入一个 32 位无符号整型数值,以高字节序的存储方式 + * @param value 指定写入的数值 + * @param offset 指定写入的起始位置 + * @param noAssert 指定写入越界时不抛出错误,缺省为 flase,抛出 + * @return offset 加上写入的字节数 + * + * + * + */ + writeUInt32BE(value: number, offset?: number/** = 0*/, noAssert?: boolean/** = false*/): number; + + /** + * + * @brief 向缓存对象写入一个无符号整型数值,最大支持 48 位,以低字节序的存储方式 + * @param value 指定写入的数值 + * @param offset 指定写入的起始位置 + * @param noAssert 指定写入越界时不抛出错误,缺省为 flase,抛出 + * @return offset 加上写入的字节数 + * + * + * + */ + writeUIntLE(value: number, offset?: number/** = 0*/, noAssert?: boolean/** = false*/): number; + + /** + * + * @brief 向缓存对象写入一个无符号整型数值,最大支持 48 位,以高字节序的存储方式 + * @param value 指定写入的数值 + * @param offset 指定写入的起始位置 + * @param noAssert 指定写入越界时不抛出错误,缺省为 flase,抛出 + * @return offset 加上写入的字节数 + * + * + * + */ + writeUIntBE(value: number, offset?: number/** = 0*/, noAssert?: boolean/** = false*/): number; + + /** + * + * @brief 向缓存对象写入一个 8 位整型数值 + * @param value 指定写入的数值 + * @param offset 指定写入的起始位置 + * @param noAssert 指定写入越界时不抛出错误,缺省为 flase,抛出 + * @return offset 加上写入的字节数 + * + * + * + */ + writeInt8(value: number, offset?: number/** = 0*/, noAssert?: boolean/** = false*/): number; + + /** + * + * @brief 向缓存对象写入一个 16 位整型数值,以低字节序的存储方式 + * @param value 指定写入的数值 + * @param offset 指定写入的起始位置 + * @param noAssert 指定写入越界时不抛出错误,缺省为 flase,抛出 + * @return offset 加上写入的字节数 + * + * + * + */ + writeInt16LE(value: number, offset?: number/** = 0*/, noAssert?: boolean/** = false*/): number; + + /** + * + * @brief 向缓存对象写入一个 16 位整型数值,以高字节序的存储方式 + * @param value 指定写入的数值 + * @param offset 指定写入的起始位置 + * @param noAssert 指定写入越界时不抛出错误,缺省为 flase,抛出 + * @return offset 加上写入的字节数 + * + * + * + */ + writeInt16BE(value: number, offset?: number/** = 0*/, noAssert?: boolean/** = false*/): number; + + /** + * + * @brief 向缓存对象写入一个 32 位整型数值,以低字节序的存储方式 + * @param value 指定写入的数值 + * @param offset 指定写入的起始位置 + * @param noAssert 指定写入越界时不抛出错误,缺省为 flase,抛出 + * @return offset 加上写入的字节数 + * + * + * + */ + writeInt32LE(value: number, offset?: number/** = 0*/, noAssert?: boolean/** = false*/): number; + + /** + * + * @brief 向缓存对象写入一个 32 位整型数值,以高字节序的存储方式 + * @param value 指定写入的数值 + * @param offset 指定写入的起始位置 + * @param noAssert 指定写入越界时不抛出错误,缺省为 flase,抛出 + * @return offset 加上写入的字节数 + * + * + * + */ + writeInt32BE(value: number, offset?: number/** = 0*/, noAssert?: boolean/** = false*/): number; + + /** + * + * @brief 向缓存对象写入一个整型数值,最大支持 48 位,以低字节序的存储方式 + * @param value 指定写入的数值 + * @param offset 指定写入的起始位置 + * @param noAssert 指定写入越界时不抛出错误,缺省为 flase,抛出 + * @return offset 加上写入的字节数 + * + * + * + */ + writeIntLE(value: number, offset?: number/** = 0*/, noAssert?: boolean/** = false*/): number; + + /** + * + * @brief 向缓存对象写入一个整型数值,最大支持 48 位,以高字节序的存储方式 + * @param value 指定写入的数值 + * @param offset 指定写入的起始位置 + * @param noAssert 指定写入越界时不抛出错误,缺省为 flase,抛出 + * @return offset 加上写入的字节数 + * + * + * + */ + writeIntBE(value: number, offset?: number/** = 0*/, noAssert?: boolean/** = false*/): number; + + /** + * + * @brief 向缓存对象写入一个 64 位整型数值,以低字节序的存储方式 + * @param value 指定写入的数值 + * @param offset 指定写入的起始位置 + * @param noAssert 指定写入越界时不抛出错误,缺省为 flase,抛出 + * @return offset 加上写入的字节数 + * + * + * + */ + writeInt64LE(value: Class_Int64, offset?: number/** = 0*/, noAssert?: boolean/** = false*/): number; + + /** + * + * @brief 向缓存对象写入一个 64 位整型数值,以高字节序的存储方式 + * @param value 指定写入的数值 + * @param offset 指定写入的起始位置 + * @param noAssert 指定写入越界时不抛出错误,缺省为 flase,抛出 + * @return offset 加上写入的字节数 + * + * + * + */ + writeInt64BE(value: Class_Int64, offset?: number/** = 0*/, noAssert?: boolean/** = false*/): number; + + /** + * + * @brief 向缓存对象写入一个浮点数,以低字节序的存储方式 + * @param value 指定写入的数值 + * @param offset 指定写入的起始位置 + * @param noAssert 指定写入越界时不抛出错误,缺省为 flase,抛出 + * @return offset 加上写入的字节数 + * + * + * + */ + writeFloatLE(value: number, offset: number, noAssert?: boolean/** = false*/): number; + + /** + * + * @brief 向缓存对象写入一个浮点数,以高字节序的存储方式 + * @param value 指定写入的数值 + * @param offset 指定写入的起始位置 + * @param noAssert 指定写入越界时不抛出错误,缺省为 flase,抛出 + * @return offset 加上写入的字节数 + * + * + * + */ + writeFloatBE(value: number, offset: number, noAssert?: boolean/** = false*/): number; + + /** + * + * @brief 向缓存对象写入一个双精度浮点数,以低字节序的存储方式 + * @param value 指定写入的数值 + * @param offset 指定写入的起始位置 + * @param noAssert 指定写入越界时不抛出错误,缺省为 flase,抛出 + * @return offset 加上写入的字节数 + * + * + * + */ + writeDoubleLE(value: number, offset: number, noAssert?: boolean/** = false*/): number; + + /** + * + * @brief 向缓存对象写入一个双精度浮点数,以高字节序的存储方式 + * @param value 指定写入的数值 + * @param offset 指定写入的起始位置 + * @param noAssert 指定写入越界时不抛出错误,缺省为 flase,抛出 + * @return offset 加上写入的字节数 + * + * + * + */ + writeDoubleBE(value: number, offset: number, noAssert?: boolean/** = false*/): number; + + /** + * + * @brief 返回一个新缓存对象,包含指定起始到缓存结尾的数据 + * @param start 指定范围的起始,缺省从头开始 + * @return 返回新的缓存对象 + * + * + * + */ + slice(start?: number/** = 0*/): Class_Buffer; + + /** + * + * @brief 返回一个新缓存对象,包含指定范围的数据,若范围超出缓存,则只返回有效部分数据 + * @param start 指定范围的起始 + * @param end 指定范围的结束 + * @return 返回新的缓存对象 + * + * + * + */ + slice(start: number, end: number): Class_Buffer; + + /** + * + * @brief 把当前对象中的所有元素放入一个字符串 + * @param separator 分割字符,缺省为 "," + * @return 返回生成的字符串 + * + * + * + */ + join(separator?: string/** = ","*/): string; + + /** + * + * @brief 返回一个新缓存对象,包含当前对象数据的倒序 + * @return 返回新的缓存对象 + * + * + * + */ + reverse(): Class_Buffer; + + /** + * + * @brief 比较当前对象与给定的对象是否相等 + * @param expected 制定比较的目标对象 + * @return 返回对象比较的结果 + * + * + * + */ + equals(expected: Class__object): boolean; + + /** + * + * @brief 使用 16 进制编码缓存对象内容 + * @return 返回编码字符串 + * + * + * + */ + hex(): string; + + /** + * + * @brief 使用 base64 编码缓存对象内容 + * @return 返回编码字符串 + * + * + * + */ + base64(): string; + + /** + * + * @brief 返回全部二进制数据的数组 + * @return 返回包含对象数据索引的迭代器 + * + * + * + */ + keys(): Iterable; + + /** + * + * @brief 返回全部二进制数据的数组 + * @return 返回包含对象数据值的迭代器 + * + * + * + */ + values(): Iterable; + + /** + * + * @brief 返回包含对象数据 [index, byte] 对的迭代器 + * @return [index, byte] 对的迭代器 + * ```JavaScript + * const buf = Buffer.from('buffer'); + * + * // Prints: + * // [0, 98] + * // [1, 117] + * // [2, 102] + * // [3, 102] + * // [4, 101] + * // [5, 114] + * for (const pair of buf.entries()) { + * console.log(pair); + * } + * ``` + * + * + * + */ + entries(): Iterable; + + /** + * + * @brief 返回全部二进制数据的数组 + * @return 返回包含对象数据的数组 + * + * + * + */ + toArray(): any[]; + + /** + * + * @brief 返回二进制数据的编码字符串 + * @param codec 指定编码格式,允许值为:"hex", "base64", "utf8", 或者系统支持的字符集 + * @param offset 读取起始位置 + * @param end 读取终止位置 + * @return 返回对象的字符串表示 + * + * + * + */ + toString(codec: string, offset?: number/** = 0*/, end?: number): string; + + /** + * + * @brief 返回二进制数据的编码字符串 + * @param codec 指定编码格式,允许值为:"hex", "base64", "utf8", 或者系统支持的字符集 + * @param offset 读取起始位置 + * @return 返回对象的字符串表示 + * + * + * + */ + toString(codec: string, offset?: number/** = 0*/): string; + + /** + * + * @brief 返回二进制数据的 utf8 编码字符串 + * @return 返回对象的字符串表示 + * + * + * + */ + toString(): string; + +} /** endof class */ + +/** endof `module Or Internal Object` */ + + diff --git a/types/fibjs/declare/BufferedStream.d.ts b/types/fibjs/declare/BufferedStream.d.ts new file mode 100644 index 0000000000..fab2dac2b2 --- /dev/null +++ b/types/fibjs/declare/BufferedStream.d.ts @@ -0,0 +1,144 @@ +/*************************************************************************** + * * + * This file was automatically generated with idlc.js * + * build info: * + * - fibjs : 0.25.0 * + * - date : Jun 12 2018 07:22:40 * + * * + ***************************************************************************/ + +/** + * @author Richard + * + */ +/// + + + + +/** module Or Internal Object */ +/** + * @brief 缓存读取对象 + * @detail BufferedReader 对象用于对二进制流对象数据进行缓存,并提供文本读取能力,仅支持 utf-8 格式转换。创建方法:,```JavaScript,var reader = new io.BufferedStream(stream);,``` + */ +/// +declare class Class_BufferedStream extends Class_Stream { + + /** + * class prop + * + * + * @brief 查询创建缓存对象时的流对象 + * + * @readonly + * @type Stream + */ + + stream: Class_Stream + + /** + * class prop + * + * + * @brief 查询和设置当前对象处理文本时的字符集,缺省为 utf-8 + * + * + * @type String + */ + + charset: string + + /** + * class prop + * + * + * @brief 查询和设置行结尾标识,缺省时,posix:\"\\n\";windows:\"\\r\\n\" + * + * + * @type String + */ + + EOL: string + + + + /** + * + * @brief BufferedStream 构造函数 + * @param stm BufferedStream 的二进制基础流对象 + * + * + * + */ + constructor(stm: Class_Stream); + + /** + * + * @brief 读取指定字符的文本 + * @param size 指定读取的文本字符个数,以 utf8 或者指定的编码字节数为准 + * @return 返回读取的文本字符串,若无数据可读,或者连接中断,则返回 null + * + * + * @async + */ + readText(size: number): string; + + /** + * + * @brief 读取一行文本,行结尾标识基于 EOL 属性的设置,缺省时,posix:\"\\n\";windows:\"\\r\\n\" + * @param maxlen 指定此次读取的最大字符串,以 utf8 编码字节数为准,缺省不限制字符数 + * @return 返回读取的文本字符串,若无数据可读,或者连接中断,则返回 null + * + * + * @async + */ + readLine(maxlen?: number/** = -1*/): string; + + /** + * + * @brief 以数组方式读取一组文本行,行结尾标识基于 EOL 属性的设置,缺省时,posix:\"\\n\";windows:\"\\r\\n\" + * @param maxlines 指定此次读取的最大行数,缺省读取全部文本行 + * @return 返回读取的文本行数组,若无数据可读,或者连接中断,空数组 + * + * + * + */ + readLines(maxlines?: number/** = -1*/): any[]; + + /** + * + * @brief 读取一个文本字符串,以指定的字节为结尾 + * @param mk 指定结尾的字符串 + * @param maxlen 指定此次读取的最大字符串,以 utf8 编码字节数为准,缺省不限制字符数 + * @return 返回读取的文本字符串,若无数据可读,或者连接中断,则返回 null + * + * + * @async + */ + readUntil(mk: string, maxlen?: number/** = -1*/): string; + + /** + * + * @brief 写入一个字符串 + * @param txt 指定写入的字符串 + * + * + * @async + */ + writeText(txt: string): void; + + /** + * + * @brief 写入一个字符串,并写入换行符 + * @param txt 指定写入的字符串 + * + * + * @async + */ + writeLine(txt: string): void; + +} /** endof class */ + +/** endof `module Or Internal Object` */ + + diff --git a/types/fibjs/declare/Chain.d.ts b/types/fibjs/declare/Chain.d.ts new file mode 100644 index 0000000000..4a8c89e69c --- /dev/null +++ b/types/fibjs/declare/Chain.d.ts @@ -0,0 +1,63 @@ +/*************************************************************************** + * * + * This file was automatically generated with idlc.js * + * build info: * + * - fibjs : 0.25.0 * + * - date : Jun 12 2018 07:22:40 * + * * + ***************************************************************************/ + +/** + * @author Richard + * + */ +/// + + + + +/** module Or Internal Object */ +/** + * @brief 消息处理器链处理对象 + * @detail 消息处理器链处理对象用于链接一系列消息处理器,按照指定的顺序链式处理。创建方法:,```JavaScript,var chain = new mq.Chain([, func1, func2,]);,``` + */ +/// +declare class Class_Chain extends Class_Handler { + + + + /** + * + * @brief 构造一个消息处理器链处理对象 + * @param hdlrs 处理器数组 + * + * + * + */ + constructor(hdlrs: any[]); + + /** + * + * @brief 添加处理器数组 + * @param hdlrs 处理器数组 + * + * + * + */ + append(hdlrs: any[]): void; + + /** + * + * @brief 添加处理器 + * @param hdlr 内置消息处理器,处理函数,链式处理数组,路由对象,详见 mq.Handler + * + * + * + */ + append(hdlr: Class_Handler): void; + +} /** endof class */ + +/** endof `module Or Internal Object` */ + + diff --git a/types/fibjs/declare/Cipher.d.ts b/types/fibjs/declare/Cipher.d.ts new file mode 100644 index 0000000000..122da7f036 --- /dev/null +++ b/types/fibjs/declare/Cipher.d.ts @@ -0,0 +1,149 @@ +/*************************************************************************** + * * + * This file was automatically generated with idlc.js * + * build info: * + * - fibjs : 0.25.0 * + * - date : Jun 12 2018 07:22:40 * + * * + ***************************************************************************/ + +/** + * @author Richard + * + */ +/// + + + + +/** module Or Internal Object */ +/** + * @brief 对称加密算法对象 + * @detail Cipher 对象属于 crypto 模块,创建:,```JavaScript,var c = new crypto.Cipher(crypto.AES, crypto.ECB, ...);,``` + */ + +declare class Class_Cipher extends Class__object { + + /** + * class prop + * + * + * @brief 返回当前算法名称 + * + * @readonly + * @type String + */ + + name: string + + /** + * class prop + * + * + * @brief 返回当前算法密码长度,以位为单位 + * + * @readonly + * @type Integer + */ + + keySize: number + + /** + * class prop + * + * + * @brief 返回当前算法初始向量长度,以字节为单位 + * + * @readonly + * @type Integer + */ + + ivSize: number + + /** + * class prop + * + * + * @brief 返回当前算法数据块长度,以字节为单位 + * + * @readonly + * @type Integer + */ + + blockSize: number + + + + /** + * + * @brief Cipher 构造函数,仅用于 ARC4 初始化 + * @param provider 指定加密算法 + * @param key 指定加密解密密码 + * + * + * + */ + constructor(provider: number, key: Class_Buffer); + + /** + * + * @brief Cipher 构造函数 + * @param provider 指定加密算法 + * @param mode 指定分组密码工作模式 + * @param key 指定加密解密密码 + * + * + * + */ + constructor(provider: number, mode: number, key: Class_Buffer); + + /** + * + * @brief Cipher 构造函数 + * @param provider 指定加密算法 + * @param mode 指定分组密码工作模式 + * @param key 指定加密解密密码 + * @param iv 指定初始向量 + * + * + * + */ + constructor(provider: number, mode: number, key: Class_Buffer, iv: Class_Buffer); + + /** + * + * @brief 使用填充模式 + * @param mode 指定填充模式,缺省为 PADDING_PKCS7 + * + * + * + */ + paddingMode(mode: number): void; + + /** + * + * @brief 使用当前算法密码加密数据 + * @param data 指定要加密的数据 + * @return 返回加密后的数据 + * + * + * @async + */ + encrypt(data: Class_Buffer): Class_Buffer; + + /** + * + * @brief 使用当前算法密码解密数据 + * @param data 指定要解密的数据 + * @return 返回解密后的数据 + * + * + * @async + */ + decrypt(data: Class_Buffer): Class_Buffer; + +} /** endof class */ + +/** endof `module Or Internal Object` */ + + diff --git a/types/fibjs/declare/Condition.d.ts b/types/fibjs/declare/Condition.d.ts new file mode 100644 index 0000000000..08486086d4 --- /dev/null +++ b/types/fibjs/declare/Condition.d.ts @@ -0,0 +1,75 @@ +/*************************************************************************** + * * + * This file was automatically generated with idlc.js * + * build info: * + * - fibjs : 0.25.0 * + * - date : Jun 12 2018 07:22:40 * + * * + ***************************************************************************/ + +/** + * @author Richard + * + */ +/// + + + + +/** module Or Internal Object */ +/** + * @brief 条件变量对象 + * @detail 条件变量是利用纤程间共享的全局变量来进行同步的一种机制,主要包括两个动作:,1)一个线程等待某个条件成立,而将自己挂起;,2)另一个线程使条件成立,并通知等待的纤程向下执行。,,为了防止竞争,每个条件变量都需要一个Lock的配合(Lock可自行显式创建并传递进来,也可交由fibjs为您创建),,通过使用条件变量,可以利用一个条件变量控制一批纤程的开关;,,以下是两个纤程调度的实例:,```JavaScript,var coroutine = require("coroutine");,var cond = new coroutine.Condition();,var ready = false;,var state = "ready";,,function funcwait() {, cond.acquire();, while (!ready), cond.wait();, state = "go", cond.release();,},,coroutine.start(funcwait);,,cond.acquire();,console.log(state),ready = true;,cond.notify();,coroutine.sleep();,console.log(state);,```,will output:,```sh,ready,go,``` + */ +/// +declare class Class_Condition extends Class_Lock { + + + + /** + * + * @brief 条件变量构造函数(条件变量所需的锁由fibjs内部构造) + * + * + */ + constructor(); + + /** + * + * @brief 条件变量构造函数 + * @param lock 使用自行构造的锁 + * + * + * + */ + constructor(lock: Class_Lock); + + /** + * + * @brief 使纤程进入阻塞状态 + * + * + */ + wait(): void; + + /** + * + * @brief 通知一个被阻塞的纤程(最后加入纤程池的)向下继续执行 + * + * + */ + notify(): void; + + /** + * + * @brief 通知所有被阻塞的纤程向下继续执行 + * + * + */ + notifyAll(): void; + +} /** endof class */ + +/** endof `module Or Internal Object` */ + + diff --git a/types/fibjs/declare/DbConnection.d.ts b/types/fibjs/declare/DbConnection.d.ts new file mode 100644 index 0000000000..62e940687f --- /dev/null +++ b/types/fibjs/declare/DbConnection.d.ts @@ -0,0 +1,119 @@ +/*************************************************************************** + * * + * This file was automatically generated with idlc.js * + * build info: * + * - fibjs : 0.25.0 * + * - date : Jun 12 2018 07:22:40 * + * * + ***************************************************************************/ + +/** + * @author Richard + * + */ +/// + + + + +/** module Or Internal Object */ +/** + * @brief 数据库连接对象,用于建立和维护一个数据库连接会话。 + * @detail + */ + +declare class Class_DbConnection extends Class__object { + + /** + * class prop + * + * + * @brief 查询当前连接数据库类型 + * + * @readonly + * @type String + */ + + type: string + + + + /** + * + * @brief 关闭当前数据库连接 + * + * @async + */ + close(): void; + + /** + * + * @brief 在当前数据库连接上启动一个事务 + * + * @async + */ + begin(): void; + + /** + * + * @brief 提交当前数据库连接上的事务 + * + * @async + */ + commit(): void; + + /** + * + * @brief 回滚当前数据库连接上的事务 + * + * @async + */ + rollback(): void; + + /** + * + * @brief 进入事务执行一个函数,并根据函数执行情况提交或者回滚 + * func 执行有三种结果: + * * 函数正常返回,包括运行结束和主动 return,此时事务将自动提交 + * * 函数返回 false,此时事务将回滚 + * * 函数运行错误,事务自动回滚 + * + * @param func 以事务方式执行的函数 + * @return 返回事务是否提交,正常 commit 时返回 true, rollback 时返回 false,如果事务出错则抛出错误 + * + * + * + */ + trans(func: Function): boolean; + + /** + * + * @brief 执行一个 sql 命令,并返回执行结果,可根据参数格式化字符串 + * + * @param sql 格式化字符串,可选参数用 ? 指定。例如:'SELECT FROM TEST WHERE [id]=?' + * @param args 可选参数列表 + * @return 返回包含结果记录的数组,如果请求是 UPDATE 或者 INSERT,返回结果还会包含 affected 和 insertId,mssql 不支持 insertId。 + * + * + * @async + */ + execute(sql: string, ...args: any[]): any[]; + + /** + * + * @brief 格式化一个 sql 命令,并返回格式化结果 + * + * @param sql 格式化字符串,可选参数用 ? 指定。例如:'SELECT FROM TEST WHERE [id]=?' + * @param args 可选参数列表 + * @return 返回格式化之后的 sql 命令 + * + * + * + */ + format(sql: string, ...args: any[]): string; + +} /** endof class */ + +/** endof `module Or Internal Object` */ + + diff --git a/types/fibjs/declare/DgramSocket.d.ts b/types/fibjs/declare/DgramSocket.d.ts new file mode 100644 index 0000000000..22486d5832 --- /dev/null +++ b/types/fibjs/declare/DgramSocket.d.ts @@ -0,0 +1,180 @@ +/*************************************************************************** + * * + * This file was automatically generated with idlc.js * + * build info: * + * - fibjs : 0.25.0 * + * - date : Jun 12 2018 07:22:40 * + * * + ***************************************************************************/ + +/** + * @author Richard + * + */ +/// + + + + +/** module Or Internal Object */ +/** + * @brief dgram.Socket 对象是一个封装了数据包函数功能的 EventEmitter。 + * @detail DgramSocket 实例是由 dgram.createSocket() 创建的。创建 dgram.Socket 实例不需要使用 new 关键字。,,创建方法:,```JavaScript,var dgram = require('dgram');,var sock = dgram.createSocket('udp4');,```,,## 事件,DgramSocket 继承于 EventEmitter,对象的状态变化,以及数据接受,都是以事件的方式实现。,,### close 事件,** `close` 事件将在使用 `close()` 关闭一个 `socket` 之后触发。该事件一旦触发,这个 `socket` 上将不会触发新的 `message` 事件。**,,### error 事件,** 当有任何错误发生时,`error` 事件将被触发。 **,,### listening 事件,** 当一个 `socket` 开始监听数据包信息时,`listening` 事件将被触发。该事件会在创建 UDP socket 之后被立即触发。 **,,### message 事件,** 当有新的数据包被 `socket` 接收时,`message` 事件会被触发。`msg` 和 `rinfo` 会作为参数传递到该事件的处理函数中。 **,- msg: Buffer,消息,- rinfo: Object,远程地址信息, - address: string,发送方地址, - family: string,地址类型 ('IPv4' or 'IPv6'), - port: number,发送者端口, - size: number,消息大小 + */ +/// +declare class Class_DgramSocket extends Class_EventEmitter { + + + + /** + * + * @brief 该方法会令 dgram.Socket 在指定的 `port` 和 `addr` 上监听数据包信息。绑定完成时会触发一个 `listening` 事件。 + * @param port 指定绑定端口,若 `port` 未指定或为 0,操作系统会尝试绑定一个随机的端口 + * @param addr 指定绑定地址,若 address 未指定,操作系统会尝试在所有地址上监听。 + * + * + * @async + */ + bind(port?: number/** = 0*/, addr?: string/** = ""*/): void; + + /** + * + * @brief 该方法会令 dgram.Socket 在 `opts` 指定的 `port` 和 `address` 上监听数据包信息。绑定完成时会触发一个 `listening` 事件。 + * @param opts 指定绑定参数 + * + * + * @async + */ + bind(opts: object): void; + + /** + * + * @brief 在 socket 上发送一个数据包 + * @param msg 指定发送的数据 + * @param port 指定发送的目的端口 + * @param address 指定发送的目的地址 + * @return 返回发送尺寸 + * + * + * @async + */ + send(msg: Class_Buffer, port: number, address?: string/** = ""*/): number; + + /** + * + * @brief 在 socket 上发送一个数据包 + * @param msg 指定发送的数据 + * @param offset 从指定偏移开始发送 + * @param length 之发送指定长度 + * @param port 指定发送的目的端口 + * @param address 指定发送的目的地址 + * @return 返回发送尺寸 + * + * + * @async + */ + send(msg: Class_Buffer, offset: number, length: number, port: number, address?: string/** = ""*/): number; + + /** + * + * @brief 返回一个包含 socket 地址信息的对象。对于 UDP socket,该对象将包含 address、family 和 port 属性。 + * @return 返回对象绑定地址 + * + * + * + */ + address(): any; + + /** + * + * @brief 关闭当前 socket + * + * + */ + close(): void; + + /** + * + * @brief 关闭当前 socket + * @param callback 关闭完成后的回调函数,它相当于为 `close` 事件添加了一个监听器 + * + * + * + */ + close(callback: Function): void; + + /** + * + * @brief 查询 socket 接收缓冲区大小 + * @return 返回查询结果 + * + * + * + */ + getRecvBufferSize(): number; + + /** + * + * @brief 查询 socket 发送缓冲区大小 + * @return 返回查询结果 + * + * + * + */ + getSendBufferSize(): number; + + /** + * + * @brief 设置 socket 接收缓冲区大小 + * @param size 指定要设置的尺寸 + * + * + * + */ + setRecvBufferSize(size: number): void; + + /** + * + * @brief 设置 socket 发送缓冲区大小 + * @param size 指定要设置的尺寸 + * + * + * + */ + setSendBufferSize(size: number): void; + + /** + * + * @brief 设置或清除 SO_BROADCAST socket 选项 + * @param flag 当设置为 true, UDP包会被发送到一个本地接口的广播地址 + * + * + * + */ + setBroadcast(flag: boolean): void; + + /** + * + * @brief 维持 fibjs 进程不退出,在对象绑定期间阻止 fibjs 进程退出 + * @return 返回当前对象 + * + * + * + */ + ref(): Class_DgramSocket; + + /** + * + * @brief 允许 fibjs 进程退出,在对象绑定期间允许 fibjs 进程退出 + * @return 返回当前对象 + * + * + * + */ + unref(): Class_DgramSocket; + +} /** endof class */ + +/** endof `module Or Internal Object` */ + + diff --git a/types/fibjs/declare/Digest.d.ts b/types/fibjs/declare/Digest.d.ts new file mode 100644 index 0000000000..71c62f0386 --- /dev/null +++ b/types/fibjs/declare/Digest.d.ts @@ -0,0 +1,67 @@ +/*************************************************************************** + * * + * This file was automatically generated with idlc.js * + * build info: * + * - fibjs : 0.25.0 * + * - date : Jun 12 2018 07:22:40 * + * * + ***************************************************************************/ + +/** + * @author Richard + * + */ +/// + + + + +/** module Or Internal Object */ +/** + * @brief 信息摘要对象 + * @detail + */ + +declare class Class_Digest extends Class__object { + + /** + * class prop + * + * + * @brief 查询当前信息摘要算法的摘要字节数 + * + * @readonly + * @type Integer + */ + + size: number + + + + /** + * + * @brief 更新二进制摘要信息 + * @param data 二进制数据块 + * @return 返回信息摘要对象本身 + * + * + * + */ + update(data: Class_Buffer): Class_Digest; + + /** + * + * @brief 计算并返回摘要 + * @param codec 指定编码格式,允许值为:"buffer", "hex", "base64", "utf8", 或者系统支持的字符集 + * @return 返回指定编码的摘要表示 + * + * + * + */ + digest(codec?: string/** = "buffer"*/): any; + +} /** endof class */ + +/** endof `module Or Internal Object` */ + + diff --git a/types/fibjs/declare/Event.d.ts b/types/fibjs/declare/Event.d.ts new file mode 100644 index 0000000000..478967032e --- /dev/null +++ b/types/fibjs/declare/Event.d.ts @@ -0,0 +1,85 @@ +/*************************************************************************** + * * + * This file was automatically generated with idlc.js * + * build info: * + * - fibjs : 0.25.0 * + * - date : Jun 12 2018 07:22:40 * + * * + ***************************************************************************/ + +/** + * @author Richard + * + */ +/// + + + + +/** module Or Internal Object */ +/** + * @brief 事件对象 + * @detail 通过一个事件达到对一组纤程进行控制的目的(事件对象的状态为bool类型) + */ +/// +declare class Class_Event extends Class_Lock { + + + + /** + * + * @brief 事件对象构造函数 + * @param value 指定是否等待,为 true 时等待,缺省为 false + * + * + * + */ + constructor(value?: boolean/** = false*/); + + /** + * + * @brief 判断事件对象是否为真 + * @return 如果事件为真,返回 true + * + * + * + */ + isSet(): boolean; + + /** + * + * @brief 激活事件(将事件状态改为true),并调用pulse() + * + * + */ + set(): void; + + /** + * + * @brief 激活等待该事件的所有纤程 + * + * + */ + pulse(): void; + + /** + * + * @brief 重置事件(将事件状态改为false) + * + * + */ + clear(): void; + + /** + * + * @brief 等待一个事件 + * + * + */ + wait(): void; + +} /** endof class */ + +/** endof `module Or Internal Object` */ + + diff --git a/types/fibjs/declare/EventEmitter.d.ts b/types/fibjs/declare/EventEmitter.d.ts new file mode 100644 index 0000000000..0008b2faa3 --- /dev/null +++ b/types/fibjs/declare/EventEmitter.d.ts @@ -0,0 +1,311 @@ +/*************************************************************************** + * * + * This file was automatically generated with idlc.js * + * build info: * + * - fibjs : 0.25.0 * + * - date : Jun 12 2018 07:22:40 * + * * + ***************************************************************************/ + +/** + * @author Richard + * + */ +/// + + + + +/** module Or Internal Object */ +/** + * @brief 事件触发对象,可用于建立观察者模式,支持事件触发的对象均继承于此,同一事件的同一函数只会产生一次回调 + * @detail Event 对象可独立创建,以用于组建自定义的事件系统:,```JavaScript,var EventEmitter = require('events');,,var e = new EventEmitter();,``` + */ + +declare class Class_EventEmitter extends Class__object { + + /** + * class prop + * + * + * @brief 默认全局最大监听器数 + * @static + * + * @type Integer + */ + + defaultMaxListeners: number + + + + /** + * + * @brief 构造函数 + * + * + */ + constructor(); + + /** + * + * @brief 绑定一个事件处理函数到对象 + * @param ev 指定事件的名称 + * @param func 指定事件处理函数 + * @return 返回成功绑定的数量,如果函数已绑定则返回 0 + * + * + * + */ + on(ev: string, func: Function): object; + + /** + * + * @brief 绑定一个事件处理函数到对象 + * @param map 指定事件映射关系,对象属性名称将作为事件名称,属性的值将作为事件处理函数 + * @return 返回事件对象本身,便于链式调用 + * + * + * + */ + on(map: object): object; + + /** + * + * @brief 绑定一个事件处理函数到对象 + * @param ev 指定事件的名称 + * @param func 指定事件处理函数 + * @return 返回事件对象本身,便于链式调用 + * + * + * + */ + addListener(ev: string, func: Function): object; + + /** + * + * @brief 绑定一个事件处理函数到对象 + * @param map 指定事件映射关系,对象属性名称将作为事件名称,属性的值将作为事件处理函数 + * @return 返回事件对象本身,便于链式调用 + * + * + * + */ + addListener(map: object): object; + + /** + * + * @brief 绑定一个事件处理函数到对象起始 + * @param ev 指定事件的名称 + * @param func 指定事件处理函数 + * @return 返回成功绑定的数量,如果函数已绑定则返回 0 + * + * + * + */ + prependListener(ev: string, func: Function): object; + + /** + * + * @brief 绑定一个事件处理函数到对象起始 + * @param map 指定事件映射关系,对象属性名称将作为事件名称,属性的值将作为事件处理函数 + * @return 返回成功绑定的数量,如果函数已绑定则返回 0 + * + * + * + */ + prependListener(map: object): object; + + /** + * + * @brief 绑定一个一次性事件处理函数到对象,一次性处理函数只会触发一次 + * @param ev 指定事件的名称 + * @param func 指定事件处理函数 + * @return 返回事件对象本身,便于链式调用 + * + * + * + */ + once(ev: string, func: Function): object; + + /** + * + * @brief 绑定一个一次性事件处理函数到对象,一次性处理函数只会触发一次 + * @param map 指定事件映射关系,对象属性名称将作为事件名称,属性的值将作为事件处理函数 + * @return 返回事件对象本身,便于链式调用 + * + * + * + */ + once(map: object): object; + + /** + * + * @brief 绑定一个事件处理函数到对象起始 + * @param ev 指定事件的名称 + * @param func 指定事件处理函数 + * @return 返回成功绑定的数量,如果函数已绑定则返回 0 + * + * + * + */ + prependOnceListener(ev: string, func: Function): object; + + /** + * + * @brief 绑定一个事件处理函数到对象起始 + * @param map 指定事件映射关系,对象属性名称将作为事件名称,属性的值将作为事件处理函数 + * @return 返回成功绑定的数量,如果函数已绑定则返回 0 + * + * + * + */ + prependOnceListener(map: object): object; + + /** + * + * @brief 从对象处理队列中取消指定函数 + * @param ev 指定事件的名称 + * @param func 指定事件处理函数 + * @return 返回事件对象本身,便于链式调用 + * + * + * + */ + off(ev: string, func: Function): object; + + /** + * + * @brief 取消对象处理队列中的全部函数 + * @param ev 指定事件的名称 + * @return 返回事件对象本身,便于链式调用 + * + * + * + */ + off(ev: string): object; + + /** + * + * @brief 从对象处理队列中取消指定函数 + * @param map 指定事件映射关系,对象属性名称作为事件名称,属性的值作为事件处理函数 + * @return 返回事件对象本身,便于链式调用 + * + * + * + */ + off(map: object): object; + + /** + * + * @brief 从对象处理队列中取消指定函数 + * @param ev 指定事件的名称 + * @param func 指定事件处理函数 + * @return 返回事件对象本身,便于链式调用 + * + * + * + */ + removeListener(ev: string, func: Function): object; + + /** + * + * @brief 取消对象处理队列中的全部函数 + * @param ev 指定事件的名称 + * @return 返回事件对象本身,便于链式调用 + * + * + * + */ + removeListener(ev: string): object; + + /** + * + * @brief 从对象处理队列中取消指定函数 + * @param map 指定事件映射关系,对象属性名称作为事件名称,属性的值作为事件处理函数 + * @return 返回事件对象本身,便于链式调用 + * + * + * + */ + removeListener(map: object): object; + + /** + * + * @brief 从对象处理队列中取消所有事件的所有监听器, 如果指定事件,则移除指定事件的所有监听器。 + * @param evs 指定事件的名称 + * @return 返回事件对象本身,便于链式调用 + * + * + * + */ + removeAllListeners(evs?: any[]/** = v8::Array::New(isolate)*/): object; + + /** + * + * 监听器的默认限制的数量,仅用于兼容 + * @param n 指定事件的数量 + * + * + * + */ + setMaxListeners(n: number): void; + + /** + * + * 获取监听器的默认限制的数量,仅用于兼容 + * @return 返回默认限制数量 + * + * + * + */ + getMaxListeners(): number; + + /** + * + * @brief 查询对象指定事件的监听器数组 + * @param ev 指定事件的名称 + * @return 返回指定事件的监听器数组 + * + * + * + */ + listeners(ev: string): any[]; + + /** + * + * @brief 查询对象指定事件的监听器数量 + * @param ev 指定事件的名称 + * @return 返回指定事件的监听器数量 + * + * + * + */ + listenerCount(ev: string): number; + + /** + * + * @brief 查询监听器事件名称 + * @return 返回事件名称数组 + * + * + * + */ + eventNames(): any[]; + + /** + * + * @brief 主动触发一个事件 + * @param ev 事件名称 + * @param args 事件参数,将会传递给事件处理函数 + * @return 返回事件触发状态,有响应事件返回 true,否则返回 false + * + * + * + */ + emit(ev: string, ...args: any[]): boolean; + +} /** endof class */ + +/** endof `module Or Internal Object` */ + + diff --git a/types/fibjs/declare/EventInfo.d.ts b/types/fibjs/declare/EventInfo.d.ts new file mode 100644 index 0000000000..f60190d315 --- /dev/null +++ b/types/fibjs/declare/EventInfo.d.ts @@ -0,0 +1,81 @@ +/*************************************************************************** + * * + * This file was automatically generated with idlc.js * + * build info: * + * - fibjs : 0.25.0 * + * - date : Jun 12 2018 07:22:40 * + * * + ***************************************************************************/ + +/** + * @author Richard + * + */ +/// + + + + +/** module Or Internal Object */ +/** + * @brief 事件信息对象,用于在事件中传递信息 + * @detail + */ + +declare class Class_EventInfo extends Class__object { + + /** + * class prop + * + * + * 查询事件错误编码 + * + * @readonly + * @type Integer + */ + + code: number + + /** + * class prop + * + * + * 查询事件错误信息 + * + * @readonly + * @type String + */ + + reason: string + + /** + * class prop + * + * + * 查询事件类型 + * + * @readonly + * @type String + */ + + type: string + + /** + * class prop + * + * + * 查询触发事件的对象 + * + * @readonly + * @type Object + */ + + target: object + + + +} /** endof class */ + +/** endof `module Or Internal Object` */ + + diff --git a/types/fibjs/declare/Fiber.d.ts b/types/fibjs/declare/Fiber.d.ts new file mode 100644 index 0000000000..1ddf81a548 --- /dev/null +++ b/types/fibjs/declare/Fiber.d.ts @@ -0,0 +1,77 @@ +/*************************************************************************** + * * + * This file was automatically generated with idlc.js * + * build info: * + * - fibjs : 0.25.0 * + * - date : Jun 12 2018 07:22:40 * + * * + ***************************************************************************/ + +/** + * @author Richard + * + */ +/// + + + + +/** module Or Internal Object */ +/** + * @brief 纤程操作对象,此对象不可直接创建 + * @detail 使用 coroutine.start 创建纤程后,将返回此对象,用于纤程处理和纤程间通信。,纤程主函数可以通过 this 访问本纤程对象,也可通过 coroutine.current 获取当前纤程。,```JavaScript,function func(v1),{, console.log(v1 + this.v);,},,var fb = coroutine.start(func,100);,,fb.v = 123;,,fb.join();,```,,纤程局部存储通过共享的 Fiber 对象完成,通过 coroutine.current 获取当前纤程,通过修改和查询其变量达到共享数据的目的。,,```JavaScript,function func(),{, console.log(coroutine.current().v);,},,coroutine.current().v = 100;,,func();,```,,纤程在创建时,会自动复制当前纤程的局部变量到新的纤程,之后,各自的局部变量的修改不会相互影响,除非变量本身为对象引用。,,```JavaScript,function func(),{, console.log(coroutine.current().v);,},,coroutine.current().v = 100;,,var fb = coroutine.start(func);,,coroutine.current().v = 200;,,fb.join();,``` + */ + +declare class Class_Fiber extends Class__object { + + /** + * class prop + * + * + * @brief 查询纤程的唯一 id + * + * @readonly + * @type Long + */ + + id: number + + /** + * class prop + * + * + * @brief 查询纤程的调用纤程 + * + * @readonly + * @type Fiber + */ + + caller: Class_Fiber + + /** + * class prop + * + * + * @brief 查询纤程的调用堆栈 + * + * @readonly + * @type String + */ + + stack: string + + + + /** + * + * @brief 等待纤程结束 + * + * + */ + join(): void; + +} /** endof class */ + +/** endof `module Or Internal Object` */ + + diff --git a/types/fibjs/declare/File.d.ts b/types/fibjs/declare/File.d.ts new file mode 100644 index 0000000000..11b5e7391f --- /dev/null +++ b/types/fibjs/declare/File.d.ts @@ -0,0 +1,67 @@ +/*************************************************************************** + * * + * This file was automatically generated with idlc.js * + * build info: * + * - fibjs : 0.25.0 * + * - date : Jun 12 2018 07:22:40 * + * * + ***************************************************************************/ + +/** + * @author Richard + * + */ +/// + + + + +/** module Or Internal Object */ +/** + * @brief 文件操作对象,用于二进制文件读写 + * @detail 文件操作对象用于对二进制文件进行操作,可使用 fs 模块打开和创建文件:,```JavaScript,var f = fs.openFile('test.txt');,``` + */ +/// +declare class Class_File extends Class_SeekableStream { + + /** + * class prop + * + * + * @brief 查询当前文件名 + * + * @readonly + * @type String + */ + + name: string + + /** + * class prop + * + * + * @brief 查询当前文件描述符 + * + * @readonly + * @type Integer + */ + + fd: number + + + + /** + * + * @brief 查询当前文件的访问权限,Windows 不支持此方法 + * @param mode 指定设定的访问权限 + * + * + * @async + */ + chmod(mode: number): void; + +} /** endof class */ + +/** endof `module Or Internal Object` */ + + diff --git a/types/fibjs/declare/Handler.d.ts b/types/fibjs/declare/Handler.d.ts new file mode 100644 index 0000000000..df2ef6463f --- /dev/null +++ b/types/fibjs/declare/Handler.d.ts @@ -0,0 +1,74 @@ +/*************************************************************************** + * * + * This file was automatically generated with idlc.js * + * build info: * + * - fibjs : 0.25.0 * + * - date : Jun 12 2018 07:22:40 * + * * + ***************************************************************************/ + +/** + * @author Richard + * + */ +/// + + + + +/** module Or Internal Object */ +/** + * @brief 消息处理器接口 + * @detail + */ + +declare class Class_Handler extends Class__object { + + + + /** + * + * @brief 构造一个消息处理器链处理对象 + * @param hdlrs 处理器数组 + * + * + * + */ + constructor(hdlrs: any[]); + + /** + * + * @brief 创建一个消息处理器路由对象 + * @param map 初始化路由参数 + * + * + * + */ + constructor(map: object); + + /** + * + * @brief 创建一个 JavaSvript 消息处理器 + * @param hdlr JavaScript 处理器函数 + * + * + * + */ + constructor(hdlr: Function); + + /** + * + * @brief 处理一个消息或对象 + * @param v 指定处理的消息或对象 + * @return 返回下一步的处理器 + * + * + * @async + */ + invoke(v: Class__object): Class_Handler; + +} /** endof class */ + +/** endof `module Or Internal Object` */ + + diff --git a/types/fibjs/declare/HandlerEx.d.ts b/types/fibjs/declare/HandlerEx.d.ts new file mode 100644 index 0000000000..22bca1ce76 --- /dev/null +++ b/types/fibjs/declare/HandlerEx.d.ts @@ -0,0 +1,90 @@ +/*************************************************************************** + * * + * This file was automatically generated with idlc.js * + * build info: * + * - fibjs : 0.25.0 * + * - date : Jun 12 2018 07:22:40 * + * * + ***************************************************************************/ + +/** + * @author Richard + * + */ +/// + + + + +/** module Or Internal Object */ +/** + * @brief 扩展消息处理器接口 + * @detail + */ +/// +declare class Class_HandlerEx extends Class_Handler { + + /** + * class prop + * + * + * @brief WebSocket 协议转换处理器当前事件处理接口对象 + * + * + * @type Handler + */ + + handler: Class_Handler + + /** + * class prop + * + * + * @brief 查询 WebSocket 包协议转换处理器的工作状态 + * + * 返回的结果为一个 Stats 对象,结构如下: + * ```JavaScript + * { + * total : 1000, // 总计处理的请求 + * pendding : 100, // 当前正在处理的请求 + * request : 10, // 新建的请求 + * response : 10, // 发送的响应 + * error : 100 // 发生的错误 + * } + * ``` + * + * + * @readonly + * @type Stats + */ + + stats: Class_Stats + + + + /** + * + * @brief 设置错误处理器 + * + * 使用方式: + * ```JavaScript + * hdlr.onerror({ + * "404": function(v) + * { + * ... + * }, + * "500": new mq.Routing(...) + * }) + * ``` + * @param hdlrs 指定不同的错误的处理器,key 是错误号,value 是处理器,可以是内置消息处理器,处理函数,链式处理数组,路由对象,详见 mq.Handler + * + * + * + */ + onerror(hdlrs: object): void; + +} /** endof class */ + +/** endof `module Or Internal Object` */ + + diff --git a/types/fibjs/declare/HeapGraphEdge.d.ts b/types/fibjs/declare/HeapGraphEdge.d.ts new file mode 100644 index 0000000000..87a144c664 --- /dev/null +++ b/types/fibjs/declare/HeapGraphEdge.d.ts @@ -0,0 +1,97 @@ +/*************************************************************************** + * * + * This file was automatically generated with idlc.js * + * build info: * + * - fibjs : 0.25.0 * + * - date : Jun 12 2018 07:22:40 * + * * + ***************************************************************************/ + +/** + * @author Richard + * + */ +/// + + + + +/** module Or Internal Object */ +/** + * @brief HeapGraphEdge表示两个HeapGraphNode节点间的关联,从上游节点到下游节点 + * @detail + */ + +declare class Class_HeapGraphEdge extends Class__object { + + /** + * class prop + * + * + * @brief 下游节点的链接方式,可能的值: + * - profiler.Edge_ContextVariable, 函数中的变量 + * - profiler.Edge_Element, 数组中的元素 + * - profiler.Edge_Property, 有名对象的属性 + * - profiler.Edge_Internal, JS无法进入的链接 + * - profiler.Edge_Hidden, 指向需要事先计算出空间大小的节点 + * - profiler.Edge_Shortcut, 指向无法事先计算出空间大小的节点 + * - profiler.Edge_Weak, 一个弱引用(被GC忽视) + * + * + * @readonly + * @type Integer + */ + + type: number + + /** + * class prop + * + * + * @brief 链接名称 + * + * @readonly + * @type String + */ + + name: string + + /** + * class prop + * + * + * @brief 链接的描述 + * + * @readonly + * @type String + */ + + description: string + + + + /** + * + * @brief 获取HeapGraphEdge的上游HeapGraphNode节点 + * @return 返回源HeapGraphNode节点 + * + * + * + */ + getFromNode(): Class_HeapGraphNode; + + /** + * + * @brief 获取HeapGraphEdge的下游HeapGraphNode节点 + * @return 返回目的HeapGraphNode节点 + * + * + * + */ + getToNode(): Class_HeapGraphNode; + +} /** endof class */ + +/** endof `module Or Internal Object` */ + + diff --git a/types/fibjs/declare/HeapGraphNode.d.ts b/types/fibjs/declare/HeapGraphNode.d.ts new file mode 100644 index 0000000000..5ff54d1fd6 --- /dev/null +++ b/types/fibjs/declare/HeapGraphNode.d.ts @@ -0,0 +1,120 @@ +/*************************************************************************** + * * + * This file was automatically generated with idlc.js * + * build info: * + * - fibjs : 0.25.0 * + * - date : Jun 12 2018 07:22:40 * + * * + ***************************************************************************/ + +/** + * @author Richard + * + */ +/// + + + + +/** module Or Internal Object */ +/** + * @brief HeapGraphNode表示堆视图中的一个节点 + * @detail + */ + +declare class Class_HeapGraphNode extends Class__object { + + /** + * class prop + * + * + * @brief 节点类型,可能的值: + * - profiler.Node_Hidden, 隐藏节点,当显示给用户时可以被过滤掉 + * - profiler.Node_Array, 数组 + * - profiler.Node_String, 字符串 + * - profiler.Node_Object, JS对象(字符串和数组除外) + * - profiler.Node_Code, 编译后的代码 + * - profiler.Node_Closure, 函数闭包 + * - profiler.Node_RegExp, 正则表达式 + * - profiler.Node_HeapNumber, 堆中排好序的数字 + * - profiler.Node_Native, Native对象(非v8堆上的) + * - profiler.Node_Synthetic, Synthetic对象 + * - profiler.Node_ConsString, 拼接的字符串 + * - profiler.Node_SlicedString, 分割的字符串 + * - profiler.Node_Symbol, 符号(ES6) + * - profiler.Node_SimdValue, 堆中排好序的SIMD值(ES7) + * + * + * @readonly + * @type Integer + */ + + type: number + + /** + * class prop + * + * + * @brief 节点名称 + * + * @readonly + * @type String + */ + + name: string + + /** + * class prop + * + * + * @brief 节点的描述 + * + * @readonly + * @type String + */ + + description: string + + /** + * class prop + * + * + * @brief 节点ID + * + * @readonly + * @type Integer + */ + + id: number + + /** + * class prop + * + * + * @brief 节点大小,单位为字节 + * + * @readonly + * @type Integer + */ + + shallowSize: number + + /** + * class prop + * + * + * @brief 子节点列表,由HeapGraphEdge类型对象组成 + * + * @readonly + * @type NArray + */ + + childs: any[] + + + +} /** endof class */ + +/** endof `module Or Internal Object` */ + + diff --git a/types/fibjs/declare/HeapSnapshot.d.ts b/types/fibjs/declare/HeapSnapshot.d.ts new file mode 100644 index 0000000000..0a10a6b68f --- /dev/null +++ b/types/fibjs/declare/HeapSnapshot.d.ts @@ -0,0 +1,101 @@ +/*************************************************************************** + * * + * This file was automatically generated with idlc.js * + * build info: * + * - fibjs : 0.25.0 * + * - date : Jun 12 2018 07:22:40 * + * * + ***************************************************************************/ + +/** + * @author Richard + * + */ +/// + + + + +/** module Or Internal Object */ +/** + * @brief HeapSnapshots记录JS堆在某个时刻的状态 + * @detail + */ + +declare class Class_HeapSnapshot extends Class__object { + + /** + * class prop + * + * + * @brief 时间信息 + * + * @readonly + * @type Date + */ + + time: Date + + /** + * class prop + * + * + * @brief 堆视图的根节点 + * + * @readonly + * @type HeapGraphNode + */ + + root: Class_HeapGraphNode + + /** + * class prop + * + * + * @brief 堆视图节点组成的列表 + * + * @readonly + * @type NArray + */ + + nodes: any[] + + + + /** + * + * @brief 和指定的堆快照进行比较 + * @param before 待比较的堆快照 + * @return 返回堆快照的比较结果 + * + * + * + */ + diff(before: Class_HeapSnapshot): object; + + /** + * + * @brief 根据ID获取堆视图节点 + * @param id 数字类型的节点ID + * @return 返回获取到的堆视图节点 + * + * + * + */ + getNodeById(id: number): Class_HeapGraphNode; + + /** + * + * @brief 根据指定名称保存HeapSnapshot + * @param fname 快照名称 + * + * + * @async + */ + save(fname: string): void; + +} /** endof class */ + +/** endof `module Or Internal Object` */ + + diff --git a/types/fibjs/declare/HttpClient.d.ts b/types/fibjs/declare/HttpClient.d.ts new file mode 100644 index 0000000000..7c9f6c073f --- /dev/null +++ b/types/fibjs/declare/HttpClient.d.ts @@ -0,0 +1,282 @@ +/*************************************************************************** + * * + * This file was automatically generated with idlc.js * + * build info: * + * - fibjs : 0.25.0 * + * - date : Jun 12 2018 07:22:40 * + * * + ***************************************************************************/ + +/** + * @author Richard + * + */ +/// + + + + +/** module Or Internal Object */ +/** + * @brief http客户端对象 + * @detail http客户端对象模拟浏览器环境缓存cookie,并在访问url的时候携带对应的cookie,不同的http客户端对象是相互隔离的,提供http的request、get、post等方法。,用法如下:,,```JavaScript,var http = require('http');,var httpClient = new http.Client();,httpClient.request('GET', 'http://fibjs.org');,``` + */ + +declare class Class_HttpClient extends Class__object { + + /** + * class prop + * + * + * @brief 返回http客户端的 HttpCookie 对象列表 + * + * @readonly + * @type NArray + */ + + cookies: any[] + + /** + * class prop + * + * + * @brief 查询和设置超时时间 单位毫秒 + * + * + * @type Integer + */ + + timeout: number + + /** + * class prop + * + * + * @brief 查询和设置 body 最大尺寸,以 MB 为单位,缺省为 -1,不限制尺寸 + * + * + * @type Integer + */ + + maxBodySize: number + + /** + * class prop + * + * + * @brief cookie功能开关,默认开启 + * + * + * @type Boolean + */ + + enableCookie: boolean + + /** + * class prop + * + * + * @brief 自动redirect功能开关,默认开启 + * + * + * @type Boolean + */ + + autoRedirect: boolean + + /** + * class prop + * + * + * @brief 查询和设置 http 请求中的浏览器标识 + * + * + * @type String + */ + + userAgent: string + + /** + * class prop + * + * + * @brief 查询和设置 keep-alive 最大缓存连接数,缺省 128 + * + * + * @type Integer + */ + + poolSize: number + + /** + * class prop + * + * + * @brief 查询和设置 keep-alive 缓存连接超时时间,缺省 10000 ms + * + * + * @type Integer + */ + + poolTimeout: number + + + + /** + * + * @brief HttpClient 构造函数,创建一个新的HttpClient对象 + * + * + */ + constructor(); + + /** + * + * @brief 发送 http 请求到指定的流对象,并返回结果 + * @param conn 指定处理请求的流对象 + * @param req 要发送的 HttpRequest 对象 + * @return 返回服务器响应 + * + * + * @async + */ + request(conn: Class_Stream, req: Class_HttpRequest): Class_HttpResponse; + + /** + * + * @brief 请求指定的 url,并返回结果 + * opts 包含请求的附加选项,支持的内容如下: + * ```JavaScript + * { + * "query": {}, + * "body": SeekedStream | Buffer | String | {}, + * "json": {}, + * "headers": {} + * } + * ``` + * 其中 body,json 不得同时出现。缺省为 {},不包含任何附加信息 + * @param method 指定 http 请求方法:GET, POST 等 + * @param url 指定 url,必须是包含主机的完整 url + * @param opts 指定附加信息 + * @return 返回服务器响应 + * + * + * @async + */ + request(method: string, url: string, opts?: object/** = v8::Object::New(isolate)*/): Class_HttpResponse; + + /** + * + * @brief 用 GET 方法请求指定的 url,并返回结果,等同于 request("GET", ...) + * opts 包含请求的附加选项,支持的内容如下: + * ```JavaScript + * { + * "query": {}, + * "body": SeekedStream | Buffer | String | {}, + * "json": {}, + * "headers": {} + * } + * ``` + * 其中 body,json 不得同时出现。缺省为 {},不包含任何附加信息 + * @param url 指定 url,必须是包含主机的完整 url + * @param opts 指定附加信息 + * @return 返回服务器响应 + * + * + * @async + */ + get(url: string, opts?: object/** = v8::Object::New(isolate)*/): Class_HttpResponse; + + /** + * + * @brief 用 POST 方法请求指定的 url,并返回结果,等同于 request("POST", ...) + * opts 包含请求的附加选项,支持的内容如下: + * ```JavaScript + * { + * "query": {}, + * "body": SeekedStream | Buffer | String | {}, + * "json": {}, + * "headers": {} + * } + * ``` + * 其中 body,json 不得同时出现。缺省为 {},不包含任何附加信息 + * @param url 指定 url,必须是包含主机的完整 url + * @param opts 指定附加信息 + * @return 返回服务器响应 + * + * + * @async + */ + post(url: string, opts?: object/** = v8::Object::New(isolate)*/): Class_HttpResponse; + + /** + * + * @brief 用 DELETE 方法请求指定的 url,并返回结果,等同于 request("DELETE", ...) + * opts 包含请求的附加选项,支持的内容如下: + * ```JavaScript + * { + * "query": {}, + * "body": SeekedStream | Buffer | String | {}, + * "json": {}, + * "headers": {} + * } + * ``` + * 其中 body,json 不得同时出现。缺省为 {},不包含任何附加信息 + * @param url 指定 url,必须是包含主机的完整 url + * @param opts 指定附加信息 + * @return 返回服务器响应 + * + * + * @async + */ + del(url: string, opts?: object/** = v8::Object::New(isolate)*/): Class_HttpResponse; + + /** + * + * @brief 用 PUT 方法请求指定的 url,并返回结果,等同于 request("PUT", ...) + * opts 包含请求的附加选项,支持的内容如下: + * ```JavaScript + * { + * "query": {}, + * "body": SeekedStream | Buffer | String | {}, + * "json": {}, + * "headers": {} + * } + * ``` + * 其中 body,json 不得同时出现。缺省为 {},不包含任何附加信息 + * @param url 指定 url,必须是包含主机的完整 url + * @param opts 指定附加信息 + * @return 返回服务器响应 + * + * + * @async + */ + put(url: string, opts?: object/** = v8::Object::New(isolate)*/): Class_HttpResponse; + + /** + * + * @brief 用 PATCH 方法请求指定的 url,并返回结果,等同于 request("PATCH", ...) + * opts 包含请求的附加选项,支持的内容如下: + * ```JavaScript + * { + * "query": {}, + * "body": SeekedStream | Buffer | String | {}, + * "json": {}, + * "headers": {} + * } + * ``` + * 其中 body,json 不得同时出现。缺省为 {},不包含任何附加信息 + * @param url 指定 url,必须是包含主机的完整 url + * @param opts 指定附加信息 + * @return 返回服务器响应 + * + * + * @async + */ + patch(url: string, opts?: object/** = v8::Object::New(isolate)*/): Class_HttpResponse; + +} /** endof class */ + +/** endof `module Or Internal Object` */ + + diff --git a/types/fibjs/declare/HttpCollection.d.ts b/types/fibjs/declare/HttpCollection.d.ts new file mode 100644 index 0000000000..1936011e1d --- /dev/null +++ b/types/fibjs/declare/HttpCollection.d.ts @@ -0,0 +1,126 @@ +/*************************************************************************** + * * + * This file was automatically generated with idlc.js * + * build info: * + * - fibjs : 0.25.0 * + * - date : Jun 12 2018 07:22:40 * + * * + ***************************************************************************/ + +/** + * @author Richard + * + */ +/// + + + + +/** module Or Internal Object */ +/** + * @brief http 容器对象,用于 http header,cookie,query,form,等数据的存储与组织 + * @detail + */ + +declare class Class_HttpCollection extends Class__object { + + + + /** + * + * @brief 清除容器数据 + * + * + */ + clear(): void; + + /** + * + * @brief 检查容器内是否存在指定键值的数据 + * @param name 指定要检查的键值 + * @return 返回键值是否存在 + * + * + * + */ + has(name: string): boolean; + + /** + * + * @brief 查询指定键值的第一个值 + * @param name 指定要查询的键值 + * @return 返回键值所对应的值,若不存在,则返回 undefined + * + * + * + */ + first(name: string): any; + + /** + * + * @brief 查询指定键值的全部值 + * @param name 指定要查询的键值 + * @return 返回键值所对应全部值的数组,若数据不存在,则返回 null + * + * + * + */ + all(name: string): any[]; + + /** + * + * @brief 添加一个键值数据,添加数据并不修改已存在的键值的数据 + * @param map 指定要添加的键值数据字典 + * + * + * + */ + add(map: object): void; + + /** + * + * @brief 添加一个键值数据,添加数据并不修改已存在的键值的数据 + * @param name 指定要添加的键值 + * @param value 指定要添加的数据 + * + * + * + */ + add(name: string, value: any): void; + + /** + * + * @brief 设定一个键值数据,设定数据将修改键值所对应的第一个数值,并清除相同键值的其余数据 + * @param map 指定要设定的键值数据字典 + * + * + * + */ + set(map: object): void; + + /** + * + * @brief 设定一个键值数据,设定数据将修改键值所对应的第一个数值,并清除相同键值的其余数据 + * @param name 指定要设定的键值 + * @param value 指定要设定的数据 + * + * + * + */ + set(name: string, value: any): void; + + /** + * + * @brief 删除指定键值的全部值 + * @param name 指定要删除的键值 + * + * + * + */ + remove(name: string): void; + +} /** endof class */ + +/** endof `module Or Internal Object` */ + + diff --git a/types/fibjs/declare/HttpCookie.d.ts b/types/fibjs/declare/HttpCookie.d.ts new file mode 100644 index 0000000000..b7c3980150 --- /dev/null +++ b/types/fibjs/declare/HttpCookie.d.ts @@ -0,0 +1,160 @@ +/*************************************************************************** + * * + * This file was automatically generated with idlc.js * + * build info: * + * - fibjs : 0.25.0 * + * - date : Jun 12 2018 07:22:40 * + * * + ***************************************************************************/ + +/** + * @author Richard + * + */ +/// + + + + +/** module Or Internal Object */ +/** + * @brief http Cookie 对象,用于添加和处理 cookie + * @detail + */ + +declare class Class_HttpCookie extends Class__object { + + /** + * class prop + * + * + * @brief 查询和设置 cookie 名称 + * + * + * @type String + */ + + name: string + + /** + * class prop + * + * + * @brief 查询和设置 cookie 的值 + * + * + * @type String + */ + + value: string + + /** + * class prop + * + * + * @brief 查询和设置 cookie 的域名范围 + * + * + * @type String + */ + + domain: string + + /** + * class prop + * + * + * @brief 查询和设置 cookie 的路径范围 + * + * + * @type String + */ + + path: string + + /** + * class prop + * + * + * @brief 查询和设置 cookie 的过期时间 + * + * + * @type Date + */ + + expires: Date + + /** + * class prop + * + * + * @brief 查询和设置 cookie 是否仅允许 http 请求,缺省 false + * + * + * @type Boolean + */ + + httpOnly: boolean + + /** + * class prop + * + * + * @brief 查询和设置 cookie 是否仅通过 https 传递,缺省 false + * + * + * @type Boolean + */ + + secure: boolean + + + + /** + * + * @brief HttpCookie 构造函数,创建一个新的 HttpCookie 对象 + * @param opts 指定创建的 cookie 的属性 + * + * + * + */ + constructor(opts?: object/** = v8::Object::New(isolate)*/); + + /** + * + * @brief HttpCookie 构造函数,创建一个新的 HttpCookie 对象 + * @param name 指定创建的 cookie 名称 + * @param value 指定创建的 cookie 值 + * @param opts 指定创建的 cookie 的其它属性 + * + * + * + */ + constructor(name: string, value: string, opts?: object/** = v8::Object::New(isolate)*/); + + /** + * + * @brief 解析给定的字符串,填充 cookie 对象 + * @param header 指定需要解析的 header 字符串 + * + * + * + */ + parse(header: string): void; + + /** + * + * @brief 检测给定的 url 是否匹配当前设置 + * @param url 指定测试的 url + * @return 匹配成功返回 true + * + * + * + */ + match(url: string): boolean; + +} /** endof class */ + +/** endof `module Or Internal Object` */ + + diff --git a/types/fibjs/declare/HttpHandler.d.ts b/types/fibjs/declare/HttpHandler.d.ts new file mode 100644 index 0000000000..4f412cb31f --- /dev/null +++ b/types/fibjs/declare/HttpHandler.d.ts @@ -0,0 +1,101 @@ +/*************************************************************************** + * * + * This file was automatically generated with idlc.js * + * build info: * + * - fibjs : 0.25.0 * + * - date : Jun 12 2018 07:22:40 * + * * + ***************************************************************************/ + +/** + * @author Richard + * + */ +/// + + + + +/** module Or Internal Object */ +/** + * @brief http 协议转换处理器 + * @detail 用以将数据流转换为 http 协议消息,创建方式:,```JavaScript,var hdlr = new mq.HttpHandler(...);,```,或者:,```JavaScript,var hdlr = new http.Handler(...);,``` + */ +/// +declare class Class_HttpHandler extends Class_HandlerEx { + + /** + * class prop + * + * + * @brief 查询和设置是否允强制使用 gzip 压缩输出,缺省为 false + * + * + * @type Boolean + */ + + forceGZIP: boolean + + /** + * class prop + * + * + * @brief 查询和设置最大请求头个数,缺省为 128 + * + * + * @type Integer + */ + + maxHeadersCount: number + + /** + * class prop + * + * + * @brief 查询和设置 body 最大尺寸,以 MB 为单位,缺省为 64 + * + * + * @type Integer + */ + + maxBodySize: number + + /** + * class prop + * + * + * @brief 查询和设置服务器名称,缺省为:fibjs/0.x.0 + * + * + * @type String + */ + + serverName: string + + + + /** + * + * @brief 创建一个 http 协议处理器对象,将流对象的数据转变为 http 消息对象 + * @param hdlr 内置消息处理器,处理函数,链式处理数组,路由对象,详见 mq.Handler + * + * + * + */ + constructor(hdlr: Class_Handler); + + /** + * + * @brief 允许跨域请求 + * @param allowHeaders 指定接受的 http 头字段 + * + * + * + */ + enableCrossOrigin(allowHeaders?: string/** = "Content-Type"*/): void; + +} /** endof class */ + +/** endof `module Or Internal Object` */ + + diff --git a/types/fibjs/declare/HttpMessage.d.ts b/types/fibjs/declare/HttpMessage.d.ts new file mode 100644 index 0000000000..1d64ba5c5f --- /dev/null +++ b/types/fibjs/declare/HttpMessage.d.ts @@ -0,0 +1,202 @@ +/*************************************************************************** + * * + * This file was automatically generated with idlc.js * + * build info: * + * - fibjs : 0.25.0 * + * - date : Jun 12 2018 07:22:40 * + * * + ***************************************************************************/ + +/** + * @author Richard + * + */ +/// + + + + +/** module Or Internal Object */ +/** + * @brief http 基础消息对象 + * @detail + */ +/// +declare class Class_HttpMessage extends Class_Message { + + /** + * class prop + * + * + * @brief 协议版本信息,允许的格式为:HTTP/#.# + * + * + * @type String + */ + + protocol: string + + /** + * class prop + * + * + * @brief 包含消息中 http 消息头的容器,只读属性 + * + * @readonly + * @type HttpCollection + */ + + headers: Class_HttpCollection + + /** + * class prop + * + * + * @brief 查询和设定是否保持连接 + * + * + * @type Boolean + */ + + keepAlive: boolean + + /** + * class prop + * + * + * @brief 查询和设定是否是升级协议 + * + * + * @type Boolean + */ + + upgrade: boolean + + /** + * class prop + * + * + * @brief 查询和设置最大请求头个数,缺省为 128 + * + * + * @type Integer + */ + + maxHeadersCount: number + + /** + * class prop + * + * + * @brief 查询和设置 body 最大尺寸,以 MB 为单位,缺省为 64 + * + * + * @type Integer + */ + + maxBodySize: number + + /** + * class prop + * + * + * @brief 查询当前对象的来源 socket + * + * @readonly + * @type Stream + */ + + socket: Class_Stream + + + + /** + * + * @brief 检查是否存在指定键值的消息头 + * @param name 指定要检查的键值 + * @return 返回键值是否存在 + * + * + * + */ + hasHeader(name: string): boolean; + + /** + * + * @brief 查询指定键值的第一个消息头 + * @param name 指定要查询的键值 + * @return 返回键值所对应的值,若不存在,则返回 undefined + * + * + * + */ + firstHeader(name: string): any; + + /** + * + * @brief 查询指定键值的全部消息头 + * @param name 指定要查询的键值 + * @return 返回键值所对应全部值的数组,若数据不存在,则返回 null + * + * + * + */ + allHeader(name: string): any[]; + + /** + * + * @brief 添加一个消息头,添加数据并不修改已存在的键值的消息头 + * @param map 指定要添加的键值数据字典 + * + * + * + */ + addHeader(map: object): void; + + /** + * + * @brief 添加一个消息头,添加数据并不修改已存在的键值的消息头 + * @param name 指定要添加的键值 + * @param value 指定要添加的数据 + * + * + * + */ + addHeader(name: string, value: any): void; + + /** + * + * @brief 设定一个消息头,设定数据将修改键值所对应的第一个数值,并清除相同键值的其余消息头 + * @param map 指定要设定的键值数据字典 + * + * + * + */ + setHeader(map: object): void; + + /** + * + * @brief 设定一个消息头,设定数据将修改键值所对应的第一个数值,并清除相同键值的其余消息头 + * @param name 指定要设定的键值 + * @param value 指定要设定的数据 + * + * + * + */ + setHeader(name: string, value: any): void; + + /** + * + * @brief 删除指定键值的全部消息头 + * @param name 指定要删除的键值 + * + * + * + */ + removeHeader(name: string): void; + +} /** endof class */ + +/** endof `module Or Internal Object` */ + + diff --git a/types/fibjs/declare/HttpRequest.d.ts b/types/fibjs/declare/HttpRequest.d.ts new file mode 100644 index 0000000000..b7116f8673 --- /dev/null +++ b/types/fibjs/declare/HttpRequest.d.ts @@ -0,0 +1,125 @@ +/*************************************************************************** + * * + * This file was automatically generated with idlc.js * + * build info: * + * - fibjs : 0.25.0 * + * - date : Jun 12 2018 07:22:40 * + * * + ***************************************************************************/ + +/** + * @author Richard + * + */ +/// + + + + +/** module Or Internal Object */ +/** + * @brief http 请求消息对象 + * @detail + */ +/// +declare class Class_HttpRequest extends Class_HttpMessage { + + /** + * class prop + * + * + * @brief 获取响应消息对象 + * + * @readonly + * @type HttpResponse + */ + + response: Class_HttpResponse + + /** + * class prop + * + * + * @brief 查询和设置请求方法 + * + * + * @type String + */ + + method: string + + /** + * class prop + * + * + * @brief 查询和设置请求地址 + * + * + * @type String + */ + + address: string + + /** + * class prop + * + * + * @brief 查询和设置请求查询字符串 + * + * + * @type String + */ + + queryString: string + + /** + * class prop + * + * + * @brief 获取包含消息 cookies 的容器 + * + * @readonly + * @type HttpCollection + */ + + cookies: Class_HttpCollection + + /** + * class prop + * + * + * @brief 获取包含消息 form 的容器 + * + * @readonly + * @type HttpCollection + */ + + form: Class_HttpCollection + + /** + * class prop + * + * + * @brief 获取包含消息 query 的容器 + * + * @readonly + * @type HttpCollection + */ + + query: Class_HttpCollection + + + + /** + * + * @brief HttpRequest 构造函数,创建一个新的 HttpRequest 对象 + * + * + */ + constructor(); + +} /** endof class */ + +/** endof `module Or Internal Object` */ + + diff --git a/types/fibjs/declare/HttpResponse.d.ts b/types/fibjs/declare/HttpResponse.d.ts new file mode 100644 index 0000000000..7f69b8509a --- /dev/null +++ b/types/fibjs/declare/HttpResponse.d.ts @@ -0,0 +1,130 @@ +/*************************************************************************** + * * + * This file was automatically generated with idlc.js * + * build info: * + * - fibjs : 0.25.0 * + * - date : Jun 12 2018 07:22:40 * + * * + ***************************************************************************/ + +/** + * @author Richard + * + */ +/// + + + + +/** module Or Internal Object */ +/** + * @brief http 响应消息对象 + * @detail + */ +/// +declare class Class_HttpResponse extends Class_HttpMessage { + + /** + * class prop + * + * + * @brief 查询和设置响应消息的返回状态 + * + * + * @type Integer + */ + + statusCode: number + + /** + * class prop + * + * + * @brief 查询和设置响应消息的返回消息 + * + * + * @type String + */ + + statusMessage: string + + /** + * class prop + * + * + * @brief 返回当前消息的 HttpCookie 对象列表 + * + * @readonly + * @type NArray + */ + + cookies: any[] + + + + /** + * + * @brief HttpResponse 构造函数,创建一个新的 HttpResponse 对象 + * + * + */ + constructor(); + + /** + * + * @brief 设置响应消息的返回状态,返回消息,并添加响应头 + * @param statusCode 指定响应消息的返回状态 + * @param statusMessage 指定响应消息的返回消息 + * @param headers 指定响应消息添加的响应头 + * + * + * + */ + writeHead(statusCode: number, statusMessage: string, headers?: object/** = v8::Object::New(isolate)*/): void; + + /** + * + * @brief 设置响应消息的返回状态,返回消息,并添加响应头 + * @param statusCode 指定响应消息的返回状态 + * @param headers 指定响应消息添加的响应头 + * + * + * + */ + writeHead(statusCode: number, headers?: object/** = v8::Object::New(isolate)*/): void; + + /** + * + * @brief 向 cookies 添加一个 HttpCookie 对象 + * @param cookie 指定要添加的 HttpCookie 对象 + * + * + * + */ + addCookie(cookie: Class_HttpCookie): void; + + /** + * + * @brief 发送重定向到客户端 + * @param url 重定向的地址 + * + * + * + */ + redirect(url: string): void; + + /** + * + * @brief 仅发送格式化 http 头到给定的流对象 + * @param stm 指定接收格式化消息的流对象 + * + * + * @async + */ + sendHeader(stm: Class_Stream): void; + +} /** endof class */ + +/** endof `module Or Internal Object` */ + + diff --git a/types/fibjs/declare/HttpServer.d.ts b/types/fibjs/declare/HttpServer.d.ts new file mode 100644 index 0000000000..75ba24c290 --- /dev/null +++ b/types/fibjs/declare/HttpServer.d.ts @@ -0,0 +1,162 @@ +/*************************************************************************** + * * + * This file was automatically generated with idlc.js * + * build info: * + * - fibjs : 0.25.0 * + * - date : Jun 12 2018 07:22:40 * + * * + ***************************************************************************/ + +/** + * @author Richard + * + */ +/// + + + + +/** module Or Internal Object */ +/** + * @brief http 服务器对象 + * @detail http 服务器对象是将 TcpServer 和 HttpHandler 组合封装的对象,方便快速搭建服务器,逻辑上相当于:,```JavaScript,var svr = new net.TcpServer(addr, port, new http.Handler(function(req){, ...,}));,```,,创建方法:,```JavaScript,var http = require("http");,var svr = new http.Server(80, function(req){, ...,});,``` + */ +/// +declare class Class_HttpServer extends Class_TcpServer { + + /** + * class prop + * + * + * @brief 查询和设置是否允强制使用 gzip 压缩输出,缺省为 false + * + * + * @type Boolean + */ + + forceGZIP: boolean + + /** + * class prop + * + * + * @brief 查询和设置最大请求头个数,缺省为 128 + * + * + * @type Integer + */ + + maxHeadersCount: number + + /** + * class prop + * + * + * @brief 查询和设置 body 最大尺寸,以 MB 为单位,缺省为 64 + * + * + * @type Integer + */ + + maxBodySize: number + + /** + * class prop + * + * + * @brief 查询和设置服务器名称,缺省为:fibjs/0.x.0 + * + * + * @type String + */ + + serverName: string + + /** + * class prop + * + * + * @brief 查询 http 协议转换处理器的工作状态 + * + * 返回的结果为一个 Stats 对象,结构如下: + * ```JavaScript + * { + * total : 1000, // 总计处理的请求 + * pendding : 100, // 当前正在处理的请求 + * request : 10, // 新建的请求 + * response : 10, // 发送的响应 + * error : 100, // 发生的错误(不计入 404) + * error_400 : 10, // 发生的请求错误 + * error_404 : 12, // 文件未找到的数量 + * error_500 : 2 // 内部处理错误 + * } + * ``` + * + * + * @readonly + * @type Stats + */ + + httpStats: Class_Stats + + + + /** + * + * @brief HttpServer 构造函数,在所有本机地址侦听 + * @param port 指定 http 服务器侦听端口 + * @param hdlr http 内置消息处理器,处理函数,链式处理数组,路由对象,详见 mq.Handler + * + * + * + */ + constructor(port: number, hdlr: Class_Handler); + + /** + * + * @brief HttpServer 构造函数 + * @param addr 指定 http 服务器侦听地址,为 "" 则在本机所有地址侦听 + * @param port 指定 http 服务器侦听端口 + * @param hdlr http 内置消息处理器,处理函数,链式处理数组,路由对象,详见 mq.Handler + * + * + * + */ + constructor(addr: string, port: number, hdlr: Class_Handler); + + /** + * + * @brief 设置错误处理器 + * + * 使用方式: + * ```JavaScript + * hdlr.onerror({ + * "404": function(v) + * { + * ... + * }, + * "500": new mq.Routing(...) + * }) + * ``` + * @param hdlrs 指定不同的错误的处理器,key 是错误号,value 是处理器,可以是内置消息处理器,处理函数,链式处理数组,路由对象,详见 mq.Handler + * + * + * + */ + onerror(hdlrs: object): void; + + /** + * + * @brief 允许跨域请求 + * @param allowHeaders 指定接受的 http 头字段 + * + * + * + */ + enableCrossOrigin(allowHeaders?: string/** = "Content-Type"*/): void; + +} /** endof class */ + +/** endof `module Or Internal Object` */ + + diff --git a/types/fibjs/declare/HttpUploadData.d.ts b/types/fibjs/declare/HttpUploadData.d.ts new file mode 100644 index 0000000000..9b3679c51b --- /dev/null +++ b/types/fibjs/declare/HttpUploadData.d.ts @@ -0,0 +1,81 @@ +/*************************************************************************** + * * + * This file was automatically generated with idlc.js * + * build info: * + * - fibjs : 0.25.0 * + * - date : Jun 12 2018 07:22:40 * + * * + ***************************************************************************/ + +/** + * @author Richard + * + */ +/// + + + + +/** module Or Internal Object */ +/** + * @brief 包含 multipart 的一个条目数据 + * @detail + */ + +declare class Class_HttpUploadData extends Class__object { + + /** + * class prop + * + * + * @brief 包含本条目数据的文件名 + * + * @readonly + * @type String + */ + + fileName: string + + /** + * class prop + * + * + * @brief 包含本条目数据的类型 + * + * @readonly + * @type String + */ + + contentType: string + + /** + * class prop + * + * + * @brief 包含本条目数据的传输编码类型 + * + * @readonly + * @type String + */ + + contentTransferEncoding: string + + /** + * class prop + * + * + * @brief 包含本条目数据部分的流对象 + * + * @readonly + * @type SeekableStream + */ + + body: Class_SeekableStream + + + +} /** endof class */ + +/** endof `module Or Internal Object` */ + + diff --git a/types/fibjs/declare/HttpsServer.d.ts b/types/fibjs/declare/HttpsServer.d.ts new file mode 100644 index 0000000000..d5f391c1b6 --- /dev/null +++ b/types/fibjs/declare/HttpsServer.d.ts @@ -0,0 +1,137 @@ +/*************************************************************************** + * * + * This file was automatically generated with idlc.js * + * build info: * + * - fibjs : 0.25.0 * + * - date : Jun 12 2018 07:22:40 * + * * + ***************************************************************************/ + +/** + * @author Richard + * + */ +/// + + + + +/** module Or Internal Object */ +/** + * @brief https 服务器对象 + * @detail https 服务器对象是将 SslServer 和 HttpHandler 组合封装的对象,方便快速搭建服务器,逻辑上相当于:,```JavaScript,var svr = new net.SslServer(crt, key, addr, port, new http.Handler(function(req){, ...,}));,```,,创建方法:,```JavaScript,var http = require("http");,var svr = new http.HttpsServer(crt, key, 443, function(req){, ...,});,``` + */ +/// +declare class Class_HttpsServer extends Class_HttpServer { + + /** + * class prop + * + * + * @brief 设定证书验证模式,缺省为 VERIFY_NONE + * + * + * @type Integer + */ + + verification: number + + /** + * class prop + * + * + * @brief 客户端证书验证 ca + * + * @readonly + * @type X509Cert + */ + + ca: Class_X509Cert + + + + /** + * + * @brief HttpsServer 构造函数,在所有本机地址侦听 + * + * certs 格式为: + * ```JavaScript + * [ + * { + * crt: [X509Cert object], + * key: [PKey object] + * }, + * { + * crt: [X509Cert object], + * key: [PKey object] + * } + * ] + * ``` + * @param certs 服务器证书列表 + * @param port 指定 http 服务器侦听端口 + * @param hdlr http 内置消息处理器,处理函数,链式处理数组,路由对象,详见 + * + * + * + */ + constructor(certs: any[], port: number, hdlr: Class_Handler); + + /** + * + * @brief HttpsServer 构造函数 + * + * certs 格式为: + * ```JavaScript + * [ + * { + * crt: [X509Cert object], + * key: [PKey object] + * }, + * { + * crt: [X509Cert object], + * key: [PKey object] + * } + * ] + * ``` + * @param certs 服务器证书列表 + * @param addr 指定 http 服务器侦听地址,为 "" 则在本机所有地址侦听 + * @param port 指定 http 服务器侦听端口 + * @param hdlr http 内置消息处理器,处理函数,链式处理数组,路由对象,详见 + * + * + * + */ + constructor(certs: any[], addr: string, port: number, hdlr: Class_Handler); + + /** + * + * @brief HttpsServer 构造函数,在所有本机地址侦听 + * @param crt X509Cert 证书,用于客户端验证服务器 + * @param key PKey 私钥,用于与客户端会话 + * @param port 指定 http 服务器侦听端口 + * @param hdlr http 内置消息处理器,处理函数,链式处理数组,路由对象,详见 + * + * + * + */ + constructor(crt: Class_X509Cert, key: Class_PKey, port: number, hdlr: Class_Handler); + + /** + * + * @brief HttpsServer 构造函数 + * @param crt X509Cert 证书,用于客户端验证服务器 + * @param key PKey 私钥,用于与客户端会话 + * @param addr 指定 http 服务器侦听地址,为 "" 则在本机所有地址侦听 + * @param port 指定 http 服务器侦听端口 + * @param hdlr http 内置消息处理器,处理函数,链式处理数组,路由对象,详见 + * + * + * + */ + constructor(crt: Class_X509Cert, key: Class_PKey, addr: string, port: number, hdlr: Class_Handler); + +} /** endof class */ + +/** endof `module Or Internal Object` */ + + diff --git a/types/fibjs/declare/Image.d.ts b/types/fibjs/declare/Image.d.ts new file mode 100644 index 0000000000..272eb49505 --- /dev/null +++ b/types/fibjs/declare/Image.d.ts @@ -0,0 +1,856 @@ +/*************************************************************************** + * * + * This file was automatically generated with idlc.js * + * build info: * + * - fibjs : 0.25.0 * + * - date : Jun 12 2018 07:22:40 * + * * + ***************************************************************************/ + +/** + * @author Richard + * + */ +/// + + + + + + +/** module Or Internal Object */ +/** + * @brief 图像处理对象,用以对图像进行转换,绘制,存储等操作 + * @detail Image 对象属于 gd 模块,创建:,```JavaScript,var img = gd.create(640, 480);,var img1 = gd.load(data);,``` + */ + +declare class Class_Image extends Class__object { + + /** + * class prop + * + * + * @brief 查询图像宽度 + * + * @readonly + * @type Integer + */ + + width: number + + /** + * class prop + * + * + * @brief 查询图像高度 + * + * @readonly + * @type Integer + */ + + height: number + + /** + * class prop + * + * + * @brief 查询图像来源格式,结果为 gd.PNG, gd.JPEG, gd.GIF, gd.BMP, gd.WEBP + * + * @readonly + * @type Integer + */ + + format: number + + /** + * class prop + * + * + * @brief 查询图像类型,结果为 gd.TRUECOLOR, gd.PALETTE + * + * @readonly + * @type Integer + */ + + type: number + + /** + * class prop + * + * + * @brief 查询图像颜色表内的颜色总数 + * + * @readonly + * @type Integer + */ + + colorsTotal: number + + /** + * class prop + * + * + * @brief 查询和设定指定的颜色为透明色 + * + * + * @type Integer + */ + + transparent: number + + /** + * class prop + * + * + * @brief 查询和设定图像是否渐进式,仅支持 jpeg 格式时 + * + * + * @type Boolean + */ + + progressive: boolean + + /** + * class prop + * + * + * @brief查询和设定绘图时是否计算 alpha 层,缺省为 true + * + * + * @type Boolean + */ + + alphaBlending: boolean + + + + /** + * + * @brief 按照指定的格式返回图像数据 + * @param format 指定返回数据的格式,允许值为 gd.PNG, gd.JPEG, gd.GIF, gd.BMP, gd.WEBP, 缺省为 gd.PNG + * @param quality 当格式为 gd.JPEG 或 gd.WEBP 时用于指定压缩质量,缺省为 85,其他格式忽略此参数 + * @return 返回格式化的数据 + * + * + * @async + */ + getData(format?: number/** = undefined*/, quality?: number/** = 85*/): Class_Buffer; + + /** + * + * @brief 按照指定的格式将图像数据存入流对象 + * @param stm 指定要存入的流对象 + * @param format 指定返回数据的格式,允许值为 gd.PNG, gd.JPEG, gd.GIF, gd.BMP, gd.WEBP, 缺省为 gd.PNG + * @param quality 当格式为 gd.JPEG 或 gd.WEBP 时用于指定压缩质量,缺省为 85,其他格式忽略此参数 + * + * + * @async + */ + save(stm: Class_Stream, format?: number/** = undefined*/, quality?: number/** = 85*/): void; + + /** + * + * @brief 按照指定的格式将图像数据存入指定文件,文件将被强制覆盖 + * @param fname 指定文件名 + * @param format 指定返回数据的格式,允许值为 gd.PNG, gd.JPEG, gd.GIF, gd.BMP, gd.WEBP, 缺省为 gd.PNG + * @param quality 当格式为 gd.JPEG 时用于指定压缩质量,缺省为 85,其他格式忽略此参数 + * + * + * @async + */ + save(fname: string, format?: number/** = undefined*/, quality?: number/** = 85*/): void; + + /** + * + * @brief 为指定的颜色申请一个颜色号,对于 gd.PALETTE 图像,颜色号为调色板索引,对于 gd.TRUECOLOR 图像,颜色号为 rgb 编码数值 + * @param red 红色分量,范围为 0-255 + * @param green 绿色分量,范围为 0-255 + * @param blue 蓝色分量,范围为 0-255 + * @return 返回颜色号,不成功返回 -1 + * + * + * + */ + colorAllocate(red: number, green: number, blue: number): number; + + /** + * + * @brief 为指定的颜色申请一个颜色号,对于 gd.PALETTE 图像,颜色号为调色板索引,对于 gd.TRUECOLOR 图像,颜色号为 rgb 编码数值 + * @param color 组合颜色值,可由 gd.color, gb.rgb, gd.rgba 等函数生成 + * @return 返回颜色号,不成功返回 -1 + * + * + * + */ + colorAllocate(color: number): number; + + /** + * + * @brief 为指定的颜色及透明申请一个颜色号,对于 gd.PALETTE 图像,颜色号为调色板索引,对于 gd.TRUECOLOR 图像,颜色号为 rgba 编码数值 + * @param red 红色分量,范围为 0-255 + * @param green 绿色分量,范围为 0-255 + * @param blue 蓝色分量,范围为 0-255 + * @param alpha 透明分量,范围为 0-1.0 + * @return 返回颜色号,不成功返回 -1 + * + * + * + */ + colorAllocateAlpha(red: number, green: number, blue: number, alpha: number): number; + + /** + * + * @brief 为指定的颜色及透明申请一个颜色号,对于 gd.PALETTE 图像,颜色号为调色板索引,对于 gd.TRUECOLOR 图像,颜色号为 rgba 编码数值 + * @param color 组合颜色值,可由 gd.color, gb.rgb, gd.rgba 等函数生成 + * @return 返回颜色号,不成功返回 -1 + * + * + * + */ + colorAllocateAlpha(color: number): number; + + /** + * + * @brief 为指定的颜色查找一个最接近的颜色号,对于 gd.PALETTE 图像,颜色号为调色板索引,对于 gd.TRUECOLOR 图像,颜色号为 rgb 编码数值 + * @param red 红色分量,范围为 0-255 + * @param green 绿色分量,范围为 0-255 + * @param blue 蓝色分量,范围为 0-255 + * @return 返回颜色号,不成功返回 -1 + * + * + * + */ + colorClosest(red: number, green: number, blue: number): number; + + /** + * + * @brief 为指定的颜色查找一个最接近的颜色号,对于 gd.PALETTE 图像,颜色号为调色板索引,对于 gd.TRUECOLOR 图像,颜色号为 rgb 编码数值 + * @param color 组合颜色值,可由 gd.color, gb.rgb, gd.rgba 等函数生成 + * @return 返回颜色号,不成功返回 -1 + * + * + * + */ + colorClosest(color: number): number; + + /** + * + * @brief 为指定的颜色查找一个最接近的颜色号,此方法使用 Hue/White/Black 计算查找最接近颜色,对于 gd.PALETTE 图像,颜色号为调色板索引,对于 gd.TRUECOLOR 图像,颜色号为 rgb 编码数值 + * @param red 红色分量,范围为 0-255 + * @param green 绿色分量,范围为 0-255 + * @param blue 蓝色分量,范围为 0-255 + * @return 返回颜色号,不成功返回 -1 + * + * + * + */ + colorClosestHWB(red: number, green: number, blue: number): number; + + /** + * + * @brief 为指定的颜色查找一个最接近的颜色号,此方法使用 Hue/White/Black 计算查找最接近颜色,对于 gd.PALETTE 图像,颜色号为调色板索引,对于 gd.TRUECOLOR 图像,颜色号为 rgb 编码数值 + * @param color 组合颜色值,可由 gd.color, gb.rgb, gd.rgba 等函数生成 + * @return 返回颜色号,不成功返回 -1 + * + * + * + */ + colorClosestHWB(color: number): number; + + /** + * + * @brief 为指定的颜色及透明查找一个最接近的颜色号,对于 gd.PALETTE 图像,颜色号为调色板索引,对于 gd.TRUECOLOR 图像,颜色号为 rgba 编码数值 + * @param red 红色分量,范围为 0-255 + * @param green 绿色分量,范围为 0-255 + * @param blue 蓝色分量,范围为 0-255 + * @param alpha 透明分量,范围为 0-1.0 + * @return 返回颜色号,不成功返回 -1 + * + * + * + */ + colorClosestAlpha(red: number, green: number, blue: number, alpha: number): number; + + /** + * + * @brief 为指定的颜色及透明查找一个最接近的颜色号,对于 gd.PALETTE 图像,颜色号为调色板索引,对于 gd.TRUECOLOR 图像,颜色号为 rgba 编码数值 + * @param color 组合颜色值,可由 gd.color, gb.rgb, gd.rgba 等函数生成 + * @return 返回颜色号,不成功返回 -1 + * + * + * + */ + colorClosestAlpha(color: number): number; + + /** + * + * @brief 查找指定的颜色对应的颜色号,对于 gd.PALETTE 图像,颜色号为调色板索引,对于 gd.TRUECOLOR 图像,颜色号为 rgb 编码数值 + * @param red 红色分量,范围为 0-255 + * @param green 绿色分量,范围为 0-255 + * @param blue 蓝色分量,范围为 0-255 + * @return 返回颜色号,不成功返回 -1 + * + * + * + */ + colorExact(red: number, green: number, blue: number): number; + + /** + * + * @brief 查找指定的颜色对应的颜色号,对于 gd.PALETTE 图像,颜色号为调色板索引,对于 gd.TRUECOLOR 图像,颜色号为 rgb 编码数值 + * @param color 组合颜色值,可由 gd.color, gb.rgb, gd.rgba 等函数生成 + * @return 返回颜色号,不成功返回 -1 + * + * + * + */ + colorExact(color: number): number; + + /** + * + * @brief 查找指定的颜色及透明对应的颜色号,对于 gd.PALETTE 图像,颜色号为调色板索引,对于 gd.TRUECOLOR 图像,颜色号为 rgba 编码数值 + * @param red 红色分量,范围为 0-255 + * @param green 绿色分量,范围为 0-255 + * @param blue 蓝色分量,范围为 0-255 + * @param alpha 透明分量,范围为 0-1.0 + * @return 返回颜色号,不成功返回 -1 + * + * + * + */ + colorExactAlpha(red: number, green: number, blue: number, alpha: number): number; + + /** + * + * @brief 查找指定的颜色及透明对应的颜色号,对于 gd.PALETTE 图像,颜色号为调色板索引,对于 gd.TRUECOLOR 图像,颜色号为 rgba 编码数值 + * @param color 组合颜色值,可由 gd.color, gb.rgb, gd.rgba 等函数生成 + * @return 返回颜色号,不成功返回 -1 + * + * + * + */ + colorExactAlpha(color: number): number; + + /** + * + * @brief 查找指定的颜色对应的颜色号,如果颜色不存在,则为其申请一个新颜色号,对于 gd.PALETTE 图像,颜色号为调色板索引,对于 gd.TRUECOLOR 图像,颜色号为 rgb 编码数值 + * @param red 红色分量,范围为 0-255 + * @param green 绿色分量,范围为 0-255 + * @param blue 蓝色分量,范围为 0-255 + * @return 返回颜色号,不成功返回 -1 + * + * + * + */ + colorResolve(red: number, green: number, blue: number): number; + + /** + * + * @brief 查找指定的颜色对应的颜色号,如果颜色不存在,则为其申请一个新颜色号,对于 gd.PALETTE 图像,颜色号为调色板索引,对于 gd.TRUECOLOR 图像,颜色号为 rgb 编码数值 + * @param color 组合颜色值,可由 gd.color, gb.rgb, gd.rgba 等函数生成 + * @return 返回颜色号,不成功返回 -1 + * + * + * + */ + colorResolve(color: number): number; + + /** + * + * @brief 查找指定的颜色及透明对应的颜色号,如果颜色不存在,则为其申请一个新颜色号,对于 gd.PALETTE 图像,颜色号为调色板索引,对于 gd.TRUECOLOR 图像,颜色号为 rgba 编码数值 + * @param red 红色分量,范围为 0-255 + * @param green 绿色分量,范围为 0-255 + * @param blue 蓝色分量,范围为 0-255 + * @param alpha 透明分量,范围为 0-1.0 + * @return 返回颜色号,不成功返回 -1 + * + * + * + */ + colorResolveAlpha(red: number, green: number, blue: number, alpha: number): number; + + /** + * + * @brief 查找指定的颜色及透明对应的颜色号,如果颜色不存在,则为其申请一个新颜色号,对于 gd.PALETTE 图像,颜色号为调色板索引,对于 gd.TRUECOLOR 图像,颜色号为 rgba 编码数值 + * @param color 组合颜色值,可由 gd.color, gb.rgb, gd.rgba 等函数生成 + * @return 返回颜色号,不成功返回 -1 + * + * + * + */ + colorResolveAlpha(color: number): number; + + /** + * + * @brief 释放指定的颜色号,释放的颜色号将会被再次申请后替换 + * @param color 指定要释放的颜色号 + * + * + * + */ + colorDeallocate(color: number): void; + + /** + * + * @brief 设定绘图的剪切窗口,设定后,所有的绘制将被剪切在窗口内部 + * @param x1 剪切窗口的左上 x 坐标 + * @param y1 剪切窗口的左上 y 坐标 + * @param x2 剪切窗口的右下 x 坐标 + * @param y2 剪切窗口的右下 y 坐标 + * + * + * + */ + clip(x1: number, y1: number, x2: number, y2: number): void; + + /** + * + * @brief 查询指定位置点的颜色 + * @param x 指定查询的 x 坐标 + * @param y 指定查询的 y 坐标 + * @return 返回指定点的颜色号 + * + * + * + */ + getPixel(x: number, y: number): number; + + /** + * + * @brief 查询指定位置点的真彩色颜色 + * @param x 指定查询的 x 坐标 + * @param y 指定查询的 y 坐标 + * @return 返回指定点的颜色号 + * + * + * + */ + getTrueColorPixel(x: number, y: number): number; + + /** + * + * @brief 在指定位置画一个点 + * @param x 指定画点的 x 坐标 + * @param y 指定画点的 y 坐标 + * @param color 指定画点的颜色号 + * + * + * + */ + setPixel(x: number, y: number, color: number): void; + + /** + * + * @brief 设定画线的宽度,line, rectangle, arc 等方法画线时缺省宽度为一个像素,可使用此方法改变线的宽度 + * @param thickness 画线的宽度 + * + * + * + */ + setThickness(thickness: number): void; + + /** + * + * @brief 在指定的位置画一条线 + * @param x1 指定画线的起始 x 坐标 + * @param y1 指定画线的起始 y 坐标 + * @param x2 指定画线的结束 x 坐标 + * @param y2 指定画线的结束 y 坐标 + * @param color 指定画线的颜色号 + * + * + * + */ + line(x1: number, y1: number, x2: number, y2: number, color: number): void; + + /** + * + * @brief 在指定的位置画一个矩形 + * @param x1 指定左上角 x 坐标 + * @param y1 指定左上角 y 坐标 + * @param x2 指定右下角 x 坐标 + * @param y2 指定右下角 y 坐标 + * @param color 指定矩形的颜色号 + * + * + * + */ + rectangle(x1: number, y1: number, x2: number, y2: number, color: number): void; + + /** + * + * @brief 在指定的位置画一个填充的矩形 + * @param x1 指定左上角 x 坐标 + * @param y1 指定左上角 y 坐标 + * @param x2 指定右下角 x 坐标 + * @param y2 指定右下角 y 坐标 + * @param color 指定矩形的颜色号 + * + * + * + */ + filledRectangle(x1: number, y1: number, x2: number, y2: number, color: number): void; + + /** + * + * @brief 根据给定的点绘制一个多边形 + * @param points 包含多边形点的数组,如 [[1, 1], [1, 10], [10, 15], [10, 20]] + * @param color 指定矩形的颜色号 + * + * + * + */ + polygon(points: any[], color: number): void; + + /** + * + * @brief 根据给定的点绘制一个开放多边形 + * @param points 包含多边形点的数组,如 [[1, 1], [1, 10], [10, 15], [10, 20]] + * @param color 指定矩形的颜色号 + * + * + * + */ + openPolygon(points: any[], color: number): void; + + /** + * + * @brief 根据给定的点绘制一个填充多边形 + * @param points 包含多边形点的数组,如 [[1, 1], [1, 10], [10, 15], [10, 20]] + * @param color 指定矩形的颜色号 + * + * + * + */ + filledPolygon(points: any[], color: number): void; + + /** + * + * @brief 画一个椭圆 + * @param x 椭圆中心的 x 坐标 + * @param y 椭圆中心的 y 坐标 + * @param width 椭圆的宽度 + * @param height 椭圆的高度 + * @param color 指定矩形的颜色号 + * + * + * + */ + ellipse(x: number, y: number, width: number, height: number, color: number): void; + + /** + * + * @brief 画一个填充的椭圆 + * @param x 椭圆中心的 x 坐标 + * @param y 椭圆中心的 y 坐标 + * @param width 椭圆的宽度 + * @param height 椭圆的高度 + * @param color 指定矩形的颜色号 + * + * + * + */ + filledEllipse(x: number, y: number, width: number, height: number, color: number): void; + + /** + * + * @brief 画一个扇形 + * @param x 扇形中心的 x 坐标 + * @param y 扇形中心的 y 坐标 + * @param width 扇形所在椭圆的宽度 + * @param height 扇形所在椭圆的高度 + * @param start 扇形开始的角度,范围为 0-360 + * @param end 扇形结束的角度,范围为 0-360 + * @param color 指定矩形的颜色号 + * + * + * + */ + arc(x: number, y: number, width: number, height: number, start: number, end: number, color: number): void; + + /** + * + * @brief 画一个填充扇形 + * @param x 扇形中心的 x 坐标 + * @param y 扇形中心的 y 坐标 + * @param width 扇形所在椭圆的宽度 + * @param height 扇形所在椭圆的高度 + * @param start 扇形开始的角度,范围为 0-360 + * @param end 扇形结束的角度,范围为 0-360 + * @param color 指定矩形的颜色号 + * @param style 指定扇形的样式,允许的值有 gd.ARC, gd.CHORD, gd.NOFILL, gd.EDGED 及其组合 + * + * + * + */ + filledArc(x: number, y: number, width: number, height: number, start: number, end: number, color: number, style?: number/** = undefined*/): void; + + /** + * + * @brief 从指定的点开始填充封闭区域 + * @param x 开始填充的 x 坐标 + * @param y 开始填充的 y 坐标 + * @param color 指定填充的颜色号 + * + * + * + */ + fill(x: number, y: number, color: number): void; + + /** + * + * @brief 从指定的点开始在指定颜色的边框内填充封闭区域 + * @param x 开始填充的 x 坐标 + * @param y 开始填充的 y 坐标 + * @param borderColor 指定边框的颜色号 + * @param color 指定填充的颜色号 + * + * + * + */ + fillToBorder(x: number, y: number, borderColor: number, color: number): void; + + /** + * + * @brief 替换图像中指定的颜色为新颜色 + * @param src 指定要替换的颜色 + * @param dst 指定新颜色 + * + * + * @async + */ + colorReplace(src: number, dst: number): void; + + /** + * + * @brief 复制当前图像为一个新图像 + * @return 返回复制的新图像对象 + * + * + * @async + */ + clone(): Class_Image; + + /** + * + * @brief 根据图像拉伸生成一个新尺寸的图像 + * @param width 指定拉伸的宽度 + * @param height 指定拉伸的高度 + * @return 返回新图像对象 + * + * + * @async + */ + resample(width: number, height: number): Class_Image; + + /** + * + * @brief 剪切图像的一部分为一个新的图像 + * @param x 剪切窗口的左上 x 坐标 + * @param y 剪切窗口的左上 y 坐标 + * @param width 剪切窗口的宽度 + * @param height 剪切窗口的高度 + * @return 返回剪切出的图像 + * + * + * @async + */ + crop(x: number, y: number, width: number, height: number): Class_Image; + + /** + * + * @brief 镜像当前图像 + * @param dir 镜像方向,允许值为 gd.BOTH,gd.HORIZONTAL, gd.VERTICAL, 缺省为 gd.HORIZONTAL + * + * + * @async + */ + flip(dir?: number/** = undefined*/): void; + + /** + * + * @brief 旋转当前图像 + * @param dir 旋转方向,允许值为 gd.LEFT, gd.RIGHT + * + * + * @async + */ + rotate(dir: number): void; + + /** + * + * @brief 转换当前图像类型 + * @param color 指定图像类型,允许值为 gd.TRUECOLOR 或 gd.PALETTE + * + * + * @async + */ + convert(color?: number/** = undefined*/): void; + + /** + * + * @brief 从一个图像中复制一个区域到指定的位置 + * @param source 源图像对象 + * @param dstX 指定复制目标的 x 坐标 + * @param dstY 指定复制目标的 y 坐标 + * @param srcX 指定复制源左上角的 x 坐标 + * @param srcY 指定复制源左上角的 y 坐标 + * @param width 指定复制的宽度 + * @param height 指定复制的高度 + * + * + * @async + */ + copy(source: Class_Image, dstX: number, dstY: number, srcX: number, srcY: number, width: number, height: number): void; + + /** + * + * @brief 从一个图像中复制一个区域覆盖到指定的位置 + * @param source 源图像对象 + * @param dstX 指定复制目标的 x 坐标 + * @param dstY 指定复制目标的 y 坐标 + * @param srcX 指定复制源左上角的 x 坐标 + * @param srcY 指定复制源左上角的 y 坐标 + * @param width 指定复制的宽度 + * @param height 指定复制的高度 + * @param percent 指定覆盖的透明度 + * + * + * @async + */ + copyMerge(source: Class_Image, dstX: number, dstY: number, srcX: number, srcY: number, width: number, height: number, percent: number): void; + + /** + * + * @brief 从一个图像中复制一个区域的灰度覆盖到指定的位置 + * @param source 源图像对象 + * @param dstX 指定复制目标的 x 坐标 + * @param dstY 指定复制目标的 y 坐标 + * @param srcX 指定复制源左上角的 x 坐标 + * @param srcY 指定复制源左上角的 y 坐标 + * @param width 指定复制的宽度 + * @param height 指定复制的高度 + * @param percent 指定覆盖的透明度 + * + * + * @async + */ + copyMergeGray(source: Class_Image, dstX: number, dstY: number, srcX: number, srcY: number, width: number, height: number, percent: number): void; + + /** + * + * @brief 将一个图像中的一个区域拉伸后复制到指定的位置 + * @param source 源图像对象 + * @param dstX 指定复制目标的 x 坐标 + * @param dstY 指定复制目标的 y 坐标 + * @param srcX 指定复制源左上角的 x 坐标 + * @param srcY 指定复制源左上角的 y 坐标 + * @param dstW 指定复制的拉伸宽度 + * @param dstH 指定复制的拉伸高度 + * @param srcW 指定复制的源宽度 + * @param srcH 指定复制的源高度 + * + * + * @async + */ + copyResized(source: Class_Image, dstX: number, dstY: number, srcX: number, srcY: number, dstW: number, dstH: number, srcW: number, srcH: number): void; + + /** + * + * @brief 将一个图像中的一个区域拉伸后复制到指定的位置,不同与 copyResized,此方法拉伸时会对图像进行抖动 + * @param source 源图像对象 + * @param dstX 指定复制目标的 x 坐标 + * @param dstY 指定复制目标的 y 坐标 + * @param srcX 指定复制源左上角的 x 坐标 + * @param srcY 指定复制源左上角的 y 坐标 + * @param dstW 指定复制的拉伸宽度 + * @param dstH 指定复制的拉伸高度 + * @param srcW 指定复制的源宽度 + * @param srcH 指定复制的源高度 + * + * + * @async + */ + copyResampled(source: Class_Image, dstX: number, dstY: number, srcX: number, srcY: number, dstW: number, dstH: number, srcW: number, srcH: number): void; + + /** + * + * @brief 将一个图像中的一个区域旋转后复制到指定的位置 + * @param source 源图像对象 + * @param dstX 指定复制目标的 x 坐标 + * @param dstY 指定复制目标的 y 坐标 + * @param srcX 指定复制源左上角的 x 坐标 + * @param srcY 指定复制源左上角的 y 坐标 + * @param width 指定复制的宽度 + * @param height 指定复制的高度 + * @param angle 指定旋转的角度 + * + * + * @async + */ + copyRotated(source: Class_Image, dstX: number, dstY: number, srcX: number, srcY: number, width: number, height: number, angle: number): void; + + /** + * + * @brief 把过滤器 filterType应用到图像上,根据过滤器类型传入所需参数 + * + * 参数 filterType 可以为以下数值: + * - MEAN_REMOVAL, 用平均移除法来达到轮廓效果 + * - EDGEDETECT, 用边缘检测来突出图像的边缘 + * - EMBOSS, 使图像浮雕化 + * - SELECTIVE_BLUR, 模糊图像 + * - GAUSSIAN_BLUR, 用高斯算法模糊图像 + * - NEGATE, 将图像中所有颜色反转 + * - GRAYSCALE, 将图像转换为灰度图 + * - SMOOTH, 使图像更柔滑,用arg1设定柔滑级别 + * - BRIGHTNESS, 改变图像的亮度,用arg1设定亮度级别,取值范围是-255~255 + * - CONTRAST, 改变图像的对比度,用arg1设定对比度级别,取值范围是0~100 + * - COLORIZE, 改变图像的色调,用arg1、arg2、arg3分别指定red、blue、green分值,每种颜色范围是0~255,arg4为透明度,取值返回是0~127 + * @param filterType 过滤器类型 + * @param arg1 过滤器所需参数: SMOOTH 的平滑级别、BRIGHTNESS 的亮度级别、CONTRAST 的对比度级别、COLORIZE 的 red 分值 + * @param arg2 过滤器所需参数: COLORIZE 的 green 分值 + * @param arg3 过滤器所需参数: COLORIZE 的 blue 分值 + * @param arg4 过滤器所需参数: COLORIZE 的透明度 alpha 分值 + * + * + * @async + */ + filter(filterType: number, arg1?: number/** = 0*/, arg2?: number/** = 0*/, arg3?: number/** = 0*/, arg4?: number/** = 0*/): void; + + /** + * + * @brief 根据给定的矩阵,对当前图像进行仿射 + * + * 参数 affine 是一个数组: + * ```JavaScript + * affine = [ a0, a1, b0, b1, a2, b2 ]; + * x' = a0x + a1y + a2; + * y' = b0x + b1y + b2; + * ``` + * @param affine 仿射矩阵,由 6 个 double 类型的数字组成 + * @param x 可选剪切区域的原点 x 坐标 + * @param y 可选剪切区域的原点 y 坐标 + * @param width 可选剪切区域的的宽度 + * @param height 可选剪切区域的的高度 + * @return 返回仿射后的图像 + * + * + * @async + */ + affine(affine: any[], x?: number/** = -1*/, y?: number/** = -1*/, width?: number/** = -1*/, height?: number/** = -1*/): Class_Image; + + /** + * + * @brief 对当前图像进行高斯模糊处理 + * @param radius 模糊半径 + * + * + * @async + */ + gaussianBlur(radius: number): void; + +} /** endof class */ + +/** endof `module Or Internal Object` */ + + diff --git a/types/fibjs/declare/Int64.d.ts b/types/fibjs/declare/Int64.d.ts new file mode 100644 index 0000000000..898fe5c675 --- /dev/null +++ b/types/fibjs/declare/Int64.d.ts @@ -0,0 +1,241 @@ +/*************************************************************************** + * * + * This file was automatically generated with idlc.js * + * build info: * + * - fibjs : 0.25.0 * + * - date : Jun 12 2018 07:22:40 * + * * + ***************************************************************************/ + +/** + * @author Richard + * + */ +/// + + + + +/** module Or Internal Object */ +/** + * @brief 64位整数对象 + * @detail 创建方法:,```JavaScript,var n = new Int64(123);,``` + */ + +declare class Class_Int64 extends Class__object { + + /** + * class prop + * + * + * @brief 高 32 位数值 + * + * + * @type Long + */ + + hi: number + + /** + * class prop + * + * + * @brief 低 32 位数值 + * + * + * @type Long + */ + + lo: number + + + + /** + * + * @brief Int64 构造函数 + * @param num 初始化的值 + * + * + * + */ + constructor(num?: number/** = 0*/); + + /** + * + * @brief Int64 构造函数 + * @param hi 高32位数 + * @param lo 低32位数 + * + * + * + */ + constructor(hi: number, lo: number); + + /** + * + * @brief Int64 构造函数 + * @param num 初始化的值 + * + * + * + */ + constructor(num: Class_Int64); + + /** + * + * @brief Int64 构造函数 + * @param num 数字字符串 + * @param base 数字字符串的编码方式,可以接受 2-16, 32, 64,默认为 10,为 10 时自动识别 0x 编码 + * + * + * + */ + constructor(num: string, base?: number/** = 10*/); + + /** + * + * @brief 将 Int64 内的数值与给定数值比较大小 + * @param num 指定比较的数值 + * @return 返回 1 表示 Int64 内的数值比指定数值更大,0 表示相等,-1 表示更小 + * + * + * + */ + compare(num: Class_Int64): number; + + /** + * + * @brief 将 Int64 内的数值左移相应的位数,此操作不影响 Int64 原有数值 + * @param bits 指定移动的位数 + * @return 返回包含移位以后数值的对象 + * + * + * + */ + shiftLeft(bits: number): Class_Int64; + + /** + * + * @brief 将 Int64 内的数值右移相应的位数,此操作不影响 Int64 原有数值 + * @param bits 指定移动的位数 + * @return 返回包含移位以后数值的对象 + * + * + * + */ + shiftRight(bits: number): Class_Int64; + + /** + * + * @brief 将 Int64 内的数值与给定的数值进行按位 and 操作,此操作不影响 Int64 原有数值 + * @param num 指定运算的数值 + * @return 返回包含预算以后数值的对象 + * + * + * + */ + and(num: Class_Int64): Class_Int64; + + /** + * + * @brief 将 Int64 内的数值与给定的数值进行按位 or 操作,此操作不影响 Int64 原有数值 + * @param num 指定运算的数值 + * @return 返回包含预算以后数值的对象 + * + * + * + */ + or(num: Class_Int64): Class_Int64; + + /** + * + * @brief 将 Int64 内的数值与给定的数值进行按位 xor 操作,此操作不影响 Int64 原有数值 + * @param num 指定运算的数值 + * @return 返回包含预算以后数值的对象 + * + * + * + */ + xor(num: Class_Int64): Class_Int64; + + /** + * + * @brief 将 Int64 内的数值与给定的数值进行加操作,此操作不影响 Int64 原有数值 + * @param num 指定运算的数值 + * @return 返回包含预算以后数值的对象 + * + * + * + */ + add(num: Class_Int64): Class_Int64; + + /** + * + * @brief 将 Int64 内的数值与给定的数值进行减操作,此操作不影响 Int64 原有数值 + * @param num 指定运算的数值 + * @return 返回包含预算以后数值的对象 + * + * + * + */ + sub(num: Class_Int64): Class_Int64; + + /** + * + * @brief 将 Int64 内的数值与给定的数值进行乘操作,此操作不影响 Int64 原有数值 + * @param num 指定运算的数值 + * @return 返回包含预算以后数值的对象 + * + * + * + */ + multi(num: Class_Int64): Class_Int64; + + /** + * + * @brief 将 Int64 内的数值与给定的数值进行除操作,此操作不影响 Int64 原有数值 + * @param num 指定运算的数值 + * @return 返回包含预算以后数值的对象 + * + * + * + */ + div(num: Class_Int64): Class_Int64; + + /** + * + * @brief 比较当前对象与给定的对象是否相等 + * @param expected 制定比较的目标对象 + * @return 返回对象比较的结果 + * + * + * + */ + equals(expected: Class__object): boolean; + + /** + * + * @brief 转换成数字类型 + * @return 返回转换后的数字 + * + * + * + */ + toNumber(): number; + + /** + * + * @brief 转换成字符串类型 + * @param base 字符串进制数,可以接受 2-16, 32, 64,默认为 10 + * @return 返回转换后的字符串 + * + * + * + */ + toString(base?: number/** = 10*/): string; + +} /** endof class */ + +/** endof `module Or Internal Object` */ + + diff --git a/types/fibjs/declare/LevelDB.d.ts b/types/fibjs/declare/LevelDB.d.ts new file mode 100644 index 0000000000..c9721bf337 --- /dev/null +++ b/types/fibjs/declare/LevelDB.d.ts @@ -0,0 +1,176 @@ +/*************************************************************************** + * * + * This file was automatically generated with idlc.js * + * build info: * + * - fibjs : 0.25.0 * + * - date : Jun 12 2018 07:22:40 * + * * + ***************************************************************************/ + +/** + * @author Richard + * + */ +/// + + + + +/** module Or Internal Object */ +/** + * @brief LevelDB 数据库对象 + * @detail 用以创建和管理字典对象,创建方法:,```JavaScript,var db = require("db");,var test = new db.openLevelDB("test.db");,``` + */ + +declare class Class_LevelDB extends Class__object { + + + + /** + * + * @brief 检查数据库内是否存在指定键值的数据 + * @param key 指定要检查的键值 + * @return 返回键值是否存在 + * + * + * @async + */ + has(key: Class_Buffer): boolean; + + /** + * + * @brief 查询指定键值的值 + * @param key 指定要查询的键值 + * @return 返回键值所对应的值,若不存在,则返回 null + * + * + * @async + */ + get(key: Class_Buffer): Class_Buffer; + + /** + * + * @brief 查询一组指定键值的值 + * @param keys 指定要查询的键值数组 + * @return 返回包含键值得数组 + * + * + * + */ + mget(keys: any[]): any[]; + + /** + * + * @brief 设定一个键值数据,键值不存在则插入新数据 + * @param key 指定要设定的键值 + * @param value 指定要设定的数据 + * + * + * @async + */ + set(key: Class_Buffer, value: Class_Buffer): void; + + /** + * + * @brief 设定一组键值数据,键值不存在则插入新数据 + * @param map 指定要设定的键值数据字典 + * + * + * + */ + mset(map: object): void; + + /** + * + * @brief 删除一组指定键值的值 + * @param keys 指定要删除的键值数组 + * + * + * + */ + mremove(keys: any[]): void; + + /** + * + * @brief 删除指定键值的全部值 + * @param key 指定要删除的键值 + * + * + * @async + */ + remove(key: Class_Buffer): void; + + /** + * + * @brief 枚举数据库中所有的键值对 + * + * 回调函数有两个参数,(value, key) + * + * ```JavaScript + * var db = require("db"); + * var test = new db.openLevelDB("test.db"); + * + * test.forEach(function(value, key){ + * ... + * }); + * ``` + * @param func 枚举回调函数 + * + * + * + */ + forEach(func: Function): void; + + /** + * + * @brief 枚举数据库中键值在 from 和 to 之间的键值对 + * + * 回调函数有两个参数,(value, key) + * + * ```JavaScript + * var db = require("db"); + * var test = new db.openLevelDB("test.db"); + * + * test.between("aaa", "bbb", function(value, key){ + * ... + * }); + * ``` + * @param from 枚举的最小键值,枚举时包含此键值 + * @param to 枚举的最大键值,枚举时不包含此键值 + * @param func 枚举回调函数 + * + * + * + */ + between(from: Class_Buffer, to: Class_Buffer, func: Function): void; + + /** + * + * @brief 在当前数据库上开启一个事务 + * @return 返回一个开启的事务对象 + * + * + */ + begin(): Class_LevelDB; + + /** + * + * @brief 提交当前事务 + * + * + */ + commit(): void; + + /** + * + * @brief 关闭当前数据库连接或事务 + * + * @async + */ + close(): void; + +} /** endof class */ + +/** endof `module Or Internal Object` */ + + diff --git a/types/fibjs/declare/Lock.d.ts b/types/fibjs/declare/Lock.d.ts new file mode 100644 index 0000000000..cb8a7d38d8 --- /dev/null +++ b/types/fibjs/declare/Lock.d.ts @@ -0,0 +1,79 @@ +/*************************************************************************** + * * + * This file was automatically generated with idlc.js * + * build info: * + * - fibjs : 0.25.0 * + * - date : Jun 12 2018 07:22:40 * + * * + ***************************************************************************/ + +/** + * @author Richard + * + */ +/// + + + + +/** module Or Internal Object */ +/** + * @brief 纤程锁对象 + * @detail 不同于操作系统的锁,纤程锁是纯逻辑实现,加锁与解锁负荷很小,```JavaScript,var l = new coroutine.Lock();,l.acquire();,.....,l.release();,``` + */ + +declare class Class_Lock extends Class__object { + + + + /** + * + * @brief 构造函数 + * + * + */ + constructor(); + + /** + * + * @brief 获取锁的拥有权 + * + * acquire 方法用于获取锁的拥有权,当锁处于可获取状态时,此方法立即返回 true。 + * + * 当锁不可获取,且 blocking 为 true,则当前纤程进入休眠,当其他纤程释放锁后,此方法返回 true。 + * + * 当锁不可获取,且 blocking 为 false,则方法返回 false。 + * @param blocking 指定是否等待,为 true 时等待,缺省为真 + * @return 返回是否成功获取锁,为 true 表示成功获取 + * + * + * + */ + acquire(blocking?: boolean/** = true*/): boolean; + + /** + * + * @brief 释放锁的拥有权 + * + * 此方法将释放对锁的拥有权,如果当前纤程未拥有锁,此方法将抛出错误。 + * + * + * + */ + release(): void; + + /** + * + * @brief 查询当前等待任务数 + * @return 返回任务数 + * + * + * + */ + count(): number; + +} /** endof class */ + +/** endof `module Or Internal Object` */ + + diff --git a/types/fibjs/declare/LruCache.d.ts b/types/fibjs/declare/LruCache.d.ts new file mode 100644 index 0000000000..f68ac413cd --- /dev/null +++ b/types/fibjs/declare/LruCache.d.ts @@ -0,0 +1,163 @@ +/*************************************************************************** + * * + * This file was automatically generated with idlc.js * + * build info: * + * - fibjs : 0.25.0 * + * - date : Jun 12 2018 07:22:40 * + * * + ***************************************************************************/ + +/** + * @author Richard + * + */ +/// + + + + +/** module Or Internal Object */ +/** + * @brief LRU(least recently used) 缓存对象 + * @detail LruCache 用以维护一个 LRU 缓存,创建方法:,```JavaScript,var util = require("util");,var c = new util.LruCache(10, 100);,``` + */ +/// +declare class Class_LruCache extends Class_EventEmitter { + + /** + * class prop + * + * + * @brief 查询容器内数值个数 + * + * @readonly + * @type Integer + */ + + size: number + + /** + * class prop + * + * + * @brief 查询和设置容器内元素失效时间,单位是 ms,小于等于 0 不失效 + * + * + * @type Integer + */ + + timeout: number + + /** + * class prop + * + * + * @brief 查询和绑定数据超时事件,相当于 on("expire", func); + * + * + * @type Function + */ + + onexpire: Function + + + + /** + * + * @brief LruCache 对象构造函数 + * @param size 缓存最大尺寸 + * @param timeout 元素失效时间,单位是 ms,小于等于 0 不失效,缺省为 0 + * + * + * + */ + constructor(size: number, timeout?: number/** = 0*/); + + /** + * + * @brief 清除容器数据 + * + * + */ + clear(): void; + + /** + * + * @brief 检查容器内是否存在指定键值的数据 + * @param name 指定要检查的键值 + * @return 返回键值是否存在 + * + * + * + */ + has(name: string): boolean; + + /** + * + * @brief 查询指定键值的值 + * @param name 指定要查询的键值 + * @return 返回键值所对应的值,若不存在,则返回 undefined + * + * + * + */ + get(name: string): any; + + /** + * + * @brief 查询指定键值的值,若不存在或过期,则调用回调函数更新数据 + * @param name 指定要查询的键值 + * @param updater 指定更新函数 + * @return 返回键值所对应的值 + * + * + * + */ + get(name: string, updater: Function): any; + + /** + * + * @brief 设定一个键值数据,键值不存在则插入一条新数据 + * @param name 指定要设定的键值 + * @param value 指定要设定的数据 + * + * + * + */ + set(name: string, value: any): void; + + /** + * + * @brief 设定一个键值数据,键值不存在则插入新数据 + * @param map 指定要设定的键值数据字典 + * + * + * + */ + set(map: object): void; + + /** + * + * @brief 删除指定键值的全部值 + * @param name 指定要删除的键值 + * + * + * + */ + remove(name: string): void; + + /** + * + * @brief 检查容器是否为空 + * @return 容器内无数值则返回 true + * + * + * + */ + isEmpty(): boolean; + +} /** endof class */ + +/** endof `module Or Internal Object` */ + + diff --git a/types/fibjs/declare/MSSQL.d.ts b/types/fibjs/declare/MSSQL.d.ts new file mode 100644 index 0000000000..722ebbf448 --- /dev/null +++ b/types/fibjs/declare/MSSQL.d.ts @@ -0,0 +1,43 @@ +/*************************************************************************** + * * + * This file was automatically generated with idlc.js * + * build info: * + * - fibjs : 0.25.0 * + * - date : Jun 12 2018 07:22:40 * + * * + ***************************************************************************/ + +/** + * @author Richard + * + */ +/// + + + + +/** module Or Internal Object */ +/** + * @brief SQL Server 数据库连接对象 + * @detail 使用 db.open 或 db.openMySQL 创建,创建方式:,```JavaScript,var sql = db.openMSSQL("mssql://user:pass@host/db");,``` + */ +/// +declare class Class_MSSQL extends Class_DbConnection { + + + + /** + * + * @brief 选择当前数据库连接的缺省数据库 + * @param dbName 指定数据库名 + * + * + * @async + */ + use(dbName: string): void; + +} /** endof class */ + +/** endof `module Or Internal Object` */ + + diff --git a/types/fibjs/declare/MemoryStream.d.ts b/types/fibjs/declare/MemoryStream.d.ts new file mode 100644 index 0000000000..2d707f48a9 --- /dev/null +++ b/types/fibjs/declare/MemoryStream.d.ts @@ -0,0 +1,69 @@ +/*************************************************************************** + * * + * This file was automatically generated with idlc.js * + * build info: * + * - fibjs : 0.25.0 * + * - date : Jun 12 2018 07:22:40 * + * * + ***************************************************************************/ + +/** + * @author Richard + * + */ +/// + + + + +/** module Or Internal Object */ +/** + * @brief 内存流对象 + * @detail MemoryStream 对象创建一个基于内存的流对象,创建方法:,```JavaScript,var ms = new io.MemoryStream();,``` + */ +/// +declare class Class_MemoryStream extends Class_SeekableStream { + + + + /** + * + * @brief MemoryStream 构造函数 + * + * + */ + constructor(); + + /** + * + * @brief 强制设定内存流对象的最后更新时间 + * @param d 指定要设定的时间 + * + * + * + */ + setTime(d: Date): void; + + /** + * + * @brief 创建当前内存流的一个只读副本 + * @return 返回只读的内存流对象 + * + * + * + */ + clone(): Class_MemoryStream; + + /** + * + * @brief 清空内存文件数据,复位指针 + * + * + */ + clear(): void; + +} /** endof class */ + +/** endof `module Or Internal Object` */ + + diff --git a/types/fibjs/declare/Message.d.ts b/types/fibjs/declare/Message.d.ts new file mode 100644 index 0000000000..efefee9105 --- /dev/null +++ b/types/fibjs/declare/Message.d.ts @@ -0,0 +1,235 @@ +/*************************************************************************** + * * + * This file was automatically generated with idlc.js * + * build info: * + * - fibjs : 0.25.0 * + * - date : Jun 12 2018 07:22:40 * + * * + ***************************************************************************/ + +/** + * @author Richard + * + */ +/// + + + + +/** module Or Internal Object */ +/** + * @brief 基础消息对象 + * @detail Message 对象兼容于 mq 各个模块,可用于构建自定义消息处理系统,创建方法:,```JavaScript,var mq = require("mq");,var m = new mq.Message();,``` + */ + +declare class Class_Message extends Class__object { + + /** + * class prop + * + * + * @brief 消息的基本内容 + * + * + * @type String + */ + + value: string + + /** + * class prop + * + * + * @brief 消息的基本参数 + * + * @readonly + * @type NArray + */ + + params: any[] + + /** + * class prop + * + * + * @brief 消息类型 + * + * + * @type Integer + */ + + type: number + + /** + * class prop + * + * + * @brief 查询消息的数据 + * + * @readonly + * @type Value + */ + + data: any + + /** + * class prop + * + * + * @brief 包含消息数据部分的流对象 + * + * + * @type SeekableStream + */ + + body: Class_SeekableStream + + /** + * class prop + * + * + * @brief 消息数据部分的长度 + * + * @readonly + * @type Long + */ + + length: number + + /** + * class prop + * + * + * @brief 查询消息 readFrom 时的流对象 + * + * @readonly + * @type Stream + */ + + stream: Class_Stream + + /** + * class prop + * + * + * @brief 查询和设置消息处理的最后错误 + * + * + * @type String + */ + + lastError: string + + + + /** + * + * @brief 消息对象构造函数 + * + * + */ + constructor(); + + /** + * + * @brief 从流内读取指定大小的数据,此方法为 body 相应方法的别名 + * @param bytes 指定要读取的数据量,缺省为读取随机大小的数据块,读出的数据尺寸取决于设备 + * @return 返回从流内读取的数据,若无数据可读,或者连接中断,则返回 null + * + * + * @async + */ + read(bytes?: number/** = -1*/): Class_Buffer; + + /** + * + * @brief 从流内读取剩余的全部数据,此方法为 body 相应方法的别名 + * @return 返回从流内读取的数据,若无数据可读,或者连接中断,则返回 null + * + * + * @async + */ + readAll(): Class_Buffer; + + /** + * + * @brief 写入给定的数据,此方法为 body 相应方法的别名 + * @param data 给定要写入的数据 + * + * + * @async + */ + write(data: Class_Buffer): void; + + /** + * + * @brief 以 JSON 编码写入给定的数据 + * @param data 给定要写入的数据 + * @return 此方法不会返回数据 + * + * + * + */ + json(data: any): any; + + /** + * + * @brief 以 JSON 编码解析消息中的数据 + * @return 返回解析的结果 + * + * + * + */ + json(): any; + + /** + * + * @brief 设置当前消息处理结束,Chain 处理器不再继续后面的事务 + * + * + */ + end(): void; + + /** + * + * @brief 查询当前消息是否结束 + * @return 结束则返回 true + * + * + * + */ + isEnded(): boolean; + + /** + * + * @brief 清除消息的内容 + * + * + */ + clear(): void; + + /** + * + * @brief 发送格式化消息到给定的流对象 + * @param stm 指定接收格式化消息的流对象 + * + * + * @async + */ + sendTo(stm: Class_Stream): void; + + /** + * + * @brief 从给定的缓存流对象中读取格式化消息,并解析填充对象 + * @param stm 指定读取格式化消息的流对象 + * + * + * @async + */ + readFrom(stm: Class_Stream): void; + +} /** endof class */ + +/** endof `module Or Internal Object` */ + + diff --git a/types/fibjs/declare/MongoCollection.d.ts b/types/fibjs/declare/MongoCollection.d.ts new file mode 100644 index 0000000000..e721feabcd --- /dev/null +++ b/types/fibjs/declare/MongoCollection.d.ts @@ -0,0 +1,227 @@ +/*************************************************************************** + * * + * This file was automatically generated with idlc.js * + * build info: * + * - fibjs : 0.25.0 * + * - date : Jun 12 2018 07:22:40 * + * * + ***************************************************************************/ + +/** + * @author Richard + * + */ +/// + + + + +/** module Or Internal Object */ +/** + * @brief mongodb 数据库数据集对象 + * @detail 使用 MongoDB.getCollection 创建:,```JavaScript,var col1 = mdb.getCollection('test');,var col = mdb.test;,``` + */ + +declare class Class_MongoCollection extends Class__object { + + + + /** + * + * @brief 根据给定的查询条件和返回字段设定,建立游标对象 + * @param query 指定查询条件的对象 + * @param projection 指定返回字段的对象 + * @return 返回游标对象 + * + * + * + */ + find(query?: object/** = v8::Object::New(isolate)*/, projection?: object/** = v8::Object::New(isolate)*/): Class_MongoCursor; + + /** + * + * @brief 根据给定的查询条件和返回字段设定,查询一条结果 + * @param query 指定查询条件的对象 + * @param projection 指定返回字段的对象 + * @return 返回第一条结果 + * + * + * + */ + findOne(query?: object/** = v8::Object::New(isolate)*/, projection?: object/** = v8::Object::New(isolate)*/): object; + + /** + * + * @brief 查询并修改 + * @param query 指定查询条件,修改数据 + * @return 返回修改前的结果及其他信息 + * + * + * + */ + findAndModify(query: object): object; + + /** + * + * @brief 插入一组数据 + * @param documents 指定要插入的数据数组 + * + * + * + */ + insert(documents: any[]): void; + + /** + * + * @brief 插入一条数据 + * @param document 指定要插入的数据 + * + * + * + */ + insert(document: object): void; + + /** + * + * @brief 保存一条数据,若数据包含 _id 字段,则为更新,否则为插入 + * @param document 指定要保存的数据 + * + * + * + */ + save(document: object): void; + + /** + * + * @brief 根据给定的查询条件更新数据 + * @param query 指定查询条件的对象 + * @param document 指定要更新的数据 + * @param upsert 数据不存在时,插入一条新数据,缺省为 false,不插入 + * @param multi 当符合条件的数据多于一条时,更新所有数据,缺省为 false,只更新第一条 + * + * + * + */ + update(query: object, document: object, upsert?: boolean/** = false*/, multi?: boolean/** = false*/): void; + + /** + * + * @brief 根据给定的查询条件更新数据 + * @param query 指定查询条件的对象 + * @param document 指定要更新的数据 + * @param options 以对象字段传递的 upsert 和 multi 选项 + * + * + * + */ + update(query: object, document: object, options: object): void; + + /** + * + * @brief 根据给定的查询条件删除数据 + * @param query 指定查询条件的对象 + * + * + * + */ + remove(query: object): void; + + /** + * + * @brief 执行数据库命令 + * @param cmd 给定命令对象 + * @return 返回命令返回结果 + * + * + * + */ + runCommand(cmd: object): object; + + /** + * + * @brief 执行数据库命令 + * @param cmd 给定命令名称 + * @param arg 给定命令参数选项 + * @return 返回命令返回结果 + * + * + * + */ + runCommand(cmd: string, arg?: object/** = v8::Object::New(isolate)*/): object; + + /** + * + * @brief 删除当前集合 + * + * + */ + drop(): void; + + /** + * + * @brief 在当前集合上创建索引 + * @param keys 给定索引字段、顺序和方向 + * @param options 给定索引的选项,唯一索引等 + * + * + * + */ + ensureIndex(keys: object, options?: object/** = v8::Object::New(isolate)*/): void; + + /** + * + * @brief 重建当前集合的索引 + * @return 返回命令执行结果 + * + * + * + */ + reIndex(): object; + + /** + * + * @brief 删除当前集合指定名称的索引 + * @param name 给定要删除的索引名称 + * @return 返回命令执行结果 + * + * + * + */ + dropIndex(name: string): object; + + /** + * + * @brief 删除当前集合全部索引 + * @return 返回命令执行结果 + * + * + * + */ + dropIndexes(): object; + + /** + * + * @brief 查询当前集合全部索引 + * @return 返回包含索引的结果集 + * + * + * + */ + getIndexes(): Class_MongoCursor; + + /** + * + * @brief 获取当前集合子命名空间的集合对象 + * @param name 子命名空间名称 + * @return 返回新集合对象 + * + * + * + */ + getCollection(name: string): Class_MongoCollection; + +} /** endof class */ + +/** endof `module Or Internal Object` */ + + diff --git a/types/fibjs/declare/MongoCursor.d.ts b/types/fibjs/declare/MongoCursor.d.ts new file mode 100644 index 0000000000..2dc99b5e96 --- /dev/null +++ b/types/fibjs/declare/MongoCursor.d.ts @@ -0,0 +1,149 @@ +/*************************************************************************** + * * + * This file was automatically generated with idlc.js * + * build info: * + * - fibjs : 0.25.0 * + * - date : Jun 12 2018 07:22:40 * + * * + ***************************************************************************/ + +/** + * @author Richard + * + */ +/// + + + + +/** module Or Internal Object */ +/** + * @brief mongodb 数据库数据游标对象 + * @detail + */ + +declare class Class_MongoCursor extends Class__object { + + + + /** + * + * @brief 指定返回结果时跳过的记录数 + * @param num 记录数 + * @return 返回游标对象本身便于链式调用 + * + * + * @async + */ + skip(num: number): Class_MongoCursor; + + /** + * + * @brief 指定返回结果的最大记录数 + * @param size 记录数 + * @return 返回游标对象本身便于链式调用 + * + * + * @async + */ + limit(size: number): Class_MongoCursor; + + /** + * + * @brief 设定返回结果的排序 + * @param opts 指定排序条件 + * @return 返回游标对象本身便于链式调用 + * + * + * + */ + sort(opts: object): Class_MongoCursor; + + /** + * + * @brief 查询当前游标是否有下一条记录 + * @return 有记录则返回 true + * + * + * + */ + hasNext(): boolean; + + /** + * + * @brief 返回当前游标的下一条记录 + * @return 记录对象,无记录则返回 null + * + * + * + */ + next(): object; + + /** + * + * @brief 查询游标的记录总数 + * @param applySkipLimit 指定是否查询 skip 和 limit 后的记录数,缺省为 false,查询全部记录数 + * @return 返回记录总数 + * + * + * + */ + count(applySkipLimit?: boolean/** = false*/): number; + + /** + * + * @brief 查询游标的记录总数,相当于 count(true) + * @return 返回记录总数 + * + * + * + */ + size(): number; + + /** + * + * @brief 遍历全部记录并回调处理函数 + * @param func 指定处理函数 + * + * + * + */ + forEach(func: Function): void; + + /** + * + * @brief 遍历处理全部记录,并返回处理结果 + * @param func 指定处理函数 + * @return 返回处理结果数组 + * + * + * + */ + map(func: Function): any[]; + + /** + * + * @brief 返回当前游标全部记录的数组 + * @return 返回包含全部数据的 Javascript 数组 + * + * + * + */ + toArray(): any[]; + + /** + * + * @brief 修改 mongodb 服务器缺省索引策略,使用指定的索引进行查询 + * @param opts 指定强制使用的索引 + * @return 返回游标对象本身便于链式调用 + * + * + * + */ + hint(opts: object): Class_MongoCursor; + +} /** endof class */ + +/** endof `module Or Internal Object` */ + + diff --git a/types/fibjs/declare/MongoDB.d.ts b/types/fibjs/declare/MongoDB.d.ts new file mode 100644 index 0000000000..11bcf1456d --- /dev/null +++ b/types/fibjs/declare/MongoDB.d.ts @@ -0,0 +1,86 @@ +/*************************************************************************** + * * + * This file was automatically generated with idlc.js * + * build info: * + * - fibjs : 0.25.0 * + * - date : Jun 12 2018 07:22:40 * + * * + ***************************************************************************/ + +/** + * @author Richard + * + */ +/// + + + + +/** module Or Internal Object */ +/** + * @brief mongodb 数据库连接对象 + * @detail 使用 db.open 或 db.openMongoDB 创建,创建方式:,```JavaScript,var mdb = db.openMongoDB("mongodb://host/db");,``` + */ + +declare class Class_MongoDB extends Class__object { + + + + /** + * + * @brief 获取指定集合访问对象 + * @param name 指定集合的名称 + * @return 返回指定的集合对象 + * + * + * + */ + getCollection(name: string): Class_MongoCollection; + + /** + * + * @brief 指定一个 MongoDB 数据库命令 + * @param cmd 指定命令和参数的字典对象 + * @return 返回命令执行结果 + * + * + * + */ + runCommand(cmd: object): object; + + /** + * + * @brief 指定一个简单的 MongoDB 数据库命令 + * @param cmd 指定命令名 + * @param arg 指定命令参数 + * @return 返回命令执行结果 + * + * + * + */ + runCommand(cmd: string, arg: any): object; + + /** + * + * @brief 生成一个 mongodb _objectid 对象 + * @param hexStr 初始化 16 进制字符串,缺省生成新的 id + * @return 新 _objectid 对象 + * + * + * + */ + oid(hexStr?: string/** = ""*/): Class_MongoID; + + /** + * + * @brief 关闭当前数据库连接 + * + * @async + */ + close(): void; + +} /** endof class */ + +/** endof `module Or Internal Object` */ + + diff --git a/types/fibjs/declare/MongoID.d.ts b/types/fibjs/declare/MongoID.d.ts new file mode 100644 index 0000000000..372b0fa30b --- /dev/null +++ b/types/fibjs/declare/MongoID.d.ts @@ -0,0 +1,33 @@ +/*************************************************************************** + * * + * This file was automatically generated with idlc.js * + * build info: * + * - fibjs : 0.25.0 * + * - date : Jun 12 2018 07:22:40 * + * * + ***************************************************************************/ + +/** + * @author Richard + * + */ +/// + + + + +/** module Or Internal Object */ +/** + * @brief mongodb 数据库数据唯一标识对象,用于存储传递 oid + * @detail + */ + +declare class Class_MongoID extends Class__object { + + + +} /** endof class */ + +/** endof `module Or Internal Object` */ + + diff --git a/types/fibjs/declare/MySQL.d.ts b/types/fibjs/declare/MySQL.d.ts new file mode 100644 index 0000000000..a23f9615e4 --- /dev/null +++ b/types/fibjs/declare/MySQL.d.ts @@ -0,0 +1,67 @@ +/*************************************************************************** + * * + * This file was automatically generated with idlc.js * + * build info: * + * - fibjs : 0.25.0 * + * - date : Jun 12 2018 07:22:40 * + * * + ***************************************************************************/ + +/** + * @author Richard + * + */ +/// + + + + +/** module Or Internal Object */ +/** + * @brief mysql 数据库连接对象 + * @detail 使用 db.open 或 db.openMySQL 创建,创建方式:,```JavaScript,var msql = db.openMySQL("mysql://user:pass@host/db");,``` + */ +/// +declare class Class_MySQL extends Class_DbConnection { + + /** + * class prop + * + * + * @brief 数据库连接接收缓存尺寸 + * + * + * @type Integer + */ + + rxBufferSize: number + + /** + * class prop + * + * + * @brief 数据库连接发送缓存尺寸 + * + * + * @type Integer + */ + + txBufferSize: number + + + + /** + * + * @brief 选择当前数据库连接的缺省数据库 + * @param dbName 指定数据库名 + * + * + * @async + */ + use(dbName: string): void; + +} /** endof class */ + +/** endof `module Or Internal Object` */ + + diff --git a/types/fibjs/declare/PKey.d.ts b/types/fibjs/declare/PKey.d.ts new file mode 100644 index 0000000000..297cfb2a13 --- /dev/null +++ b/types/fibjs/declare/PKey.d.ts @@ -0,0 +1,355 @@ +/*************************************************************************** + * * + * This file was automatically generated with idlc.js * + * build info: * + * - fibjs : 0.25.0 * + * - date : Jun 12 2018 07:22:40 * + * * + ***************************************************************************/ + +/** + * @author Richard + * + */ +/// + + + + +/** module Or Internal Object */ +/** + * @brief 不对称加密算法对象 + * @detail PKey 对象属于 crypto 模块,创建:,```JavaScript,var k = new crypto.PKey();,``` + */ + +declare class Class_PKey extends Class__object { + + /** + * class prop + * + * + * @brief 返回当前算法名称 + * + * @readonly + * @type String + */ + + name: string + + /** + * class prop + * + * + * @brief 返回当前算法密码长度,以位为单位 + * + * @readonly + * @type Integer + */ + + keySize: number + + /** + * class prop + * + * + * @brief 返回当前密钥的公钥 + * @return 当前密钥的公钥 + * + * + * @readonly + * @type PKey + */ + + publicKey: Class_PKey + + + + /** + * + * @brief PKey 构造函数 + * + * + */ + constructor(); + + /** + * + * @brief 通过 DER 格式的密钥构造 PKey + * @param DerKey DER 格式的密钥 + * @param password 解密密码 + * + * + * + */ + constructor(DerKey: Class_Buffer, password?: string/** = ""*/); + + /** + * + * @brief 通过 PEM 格式的密钥构造 PKey + * @param pemKey PEM 格式的密钥 + * @param password 解密密码 + * + * + * + */ + constructor(pemKey: string, password?: string/** = ""*/); + + /** + * + * @brief 通过 JSON 格式的密钥构造 PKey + * + * jsonKey 的格式支持以下四种,RSA 私钥: + * ```JavaScript + * { + * "kty": "RSA", + * "n": "0m5lvKpWqy9JS7tV2HIPqHCYHLquSuxIC3F8strIQLJKO3rZmTT96KTnhsOfBO7Y1bI7mnT0PB3_vcHd9ekWMEoZJQw7MuB8KeM_Wn54-elJr5DNLk5bMppSGxX7ZnumiXGG51_X3Yp-_EbGtDG80GxXXix7Mucyo7K25uE0uW8=", + * "e": "AQAB", + * "d": "agN2O9NxMHL1MTMi75WfL9Pxvl-KWXKqZSF6mjzAsF9iKI8euyHIXYFepzU8kual1RsjDhCnzvWqFvZplW8lXqrHf_P-rS_9Y4gBUw6pjnI_DnFIRwWHRvrUHHSCfWOdTCIKdOTkgLZuGFuhEY3RMIW0WSYejjLtftwy0RVxAzk=", + * "p": "6a4G1qmfwWmn1biigN7IVFlkbLf9oVe6g7rOmHxI-hn1GRxKDSVuAUrmR1IhuAnca9M0y7SD-7TUs6wjOxWxaw==", + * "q": "5ofkxFKdPBD0CQHMb9q13AMHUVe0rJ-hSjqqIBrmqApUOneyAcMV76M0QyIQnI2p3POa4Qu_7XChDwRVl7LlDQ==", + * "dp": "2mXGiGwCHl8j-FBWuID-1C6z-BRB3MBEVoeKPOOzxOPruatB3mWEGXsqG7A8SWgV9URxTI2K6P3J6Z7RUpBkvw==", + * "dq": "oagn5vfb5NQqnOpS9xkSsD67cfIj821ZSFlNFYhnuOzNVda7z_qCtnHm4zDPH0lEFXoKYMfBhfqWJpaugttjPQ==", + * "qi": "dqEQgxNmOVFrF4s776hTqeC6oEDila8EvpVb2F2ZvwAOLjCQ66OiAZK1BiYGHqUy0NeqNmtlsLSuBEZQZvqZwg==" + * } + * ``` + * RSA 公钥: + * ```JavaScript + * { + * "kty": "RSA", + * "n": "0m5lvKpWqy9JS7tV2HIPqHCYHLquSuxIC3F8strIQLJKO3rZmTT96KTnhsOfBO7Y1bI7mnT0PB3_vcHd9ekWMEoZJQw7MuB8KeM_Wn54-elJr5DNLk5bMppSGxX7ZnumiXGG51_X3Yp-_EbGtDG80GxXXix7Mucyo7K25uE0uW8=", + * "e": "AQAB" + * } + * ``` + * EC 私钥: + * ```JavaScript + * { + * "kty": "EC", + * "crv": "P-521", + * "x": "ATfNNFuuvlGxrTGoXgyfSAGgRNNDnO3rN3k74urKJdVS14RYhdnSwm91Bm-F1l-T1XKlAY2yRnzG9w1Ukvo8c0wL", + * "y": "ASBHqrruB6kdkEUB3vlW3-UIkk4HtKdUeTwN-7m3j2rgZvYR1ffRAapDvWqKGiBjomqWafxokBkbDI0c95f6f4XU", + * "d": "AfkIbUHXfW41njdpoKuqqKludcoLJS8D_oMEwkj-GVaXFNKccIoF5iKGu2c69kNDjo83R_7wyGlfRczsklkik1ST" + * } + * ``` + * EC 公钥: + * ```JavaScript + * { + * "kty": "EC", + * "crv": "P-521", + * "x": "ATfNNFuuvlGxrTGoXgyfSAGgRNNDnO3rN3k74urKJdVS14RYhdnSwm91Bm-F1l-T1XKlAY2yRnzG9w1Ukvo8c0wL", + * "y": "ASBHqrruB6kdkEUB3vlW3-UIkk4HtKdUeTwN-7m3j2rgZvYR1ffRAapDvWqKGiBjomqWafxokBkbDI0c95f6f4XU" + * } + * ``` + * @param jsonKey JSON 格式的密钥 + * + * + * + */ + constructor(jsonKey: object); + + /** + * + * @brief 生成一个 RSA 私钥 + * @param size 指定 RSA 密钥长度,bit 为单位 + * + * + * @async + */ + genRsaKey(size: number): void; + + /** + * + * @brief 生成一个 EC 私钥 + * @param curve 指定预置椭圆曲线,可选值为:"secp521r1", "brainpoolP512r1", "secp384r1", "brainpoolP384r1", "secp256r1", "secp256k1", "brainpoolP256r1", "secp224r1", "secp224k1", "secp192r1", "secp192k1" + * + * + * @async + */ + genEcKey(curve?: string/** = "secp521r1"*/): void; + + /** + * + * @brief 查询当前密钥是否为私钥 + * @return 为 True 表示为私钥 + * + * + * + */ + isPrivate(): boolean; + + /** + * + * @brief 复制当前密钥 + * @return 当前密钥的复制对象 + * + * + * + */ + clone(): Class_PKey; + + /** + * + * @brief 加载一个 DER 格式的密钥 + * @param DerKey DER 格式的密钥 + * @param password 解密密码 + * + * + * + */ + importKey(DerKey: Class_Buffer, password?: string/** = ""*/): void; + + /** + * + * @brief 加载一个 PEM 格式的密钥 + * @param pemKey PEM 格式的密钥 + * @param password 解密密码 + * + * + * + */ + importKey(pemKey: string, password?: string/** = ""*/): void; + + /** + * + * @brief 加载一个 JSON 格式的密钥 + * + * jsonKey 的格式支持以下四种,RSA 私钥: + * ```JavaScript + * { + * "kty": "RSA", + * "n": "0m5lvKpWqy9JS7tV2HIPqHCYHLquSuxIC3F8strIQLJKO3rZmTT96KTnhsOfBO7Y1bI7mnT0PB3_vcHd9ekWMEoZJQw7MuB8KeM_Wn54-elJr5DNLk5bMppSGxX7ZnumiXGG51_X3Yp-_EbGtDG80GxXXix7Mucyo7K25uE0uW8=", + * "e": "AQAB", + * "d": "agN2O9NxMHL1MTMi75WfL9Pxvl-KWXKqZSF6mjzAsF9iKI8euyHIXYFepzU8kual1RsjDhCnzvWqFvZplW8lXqrHf_P-rS_9Y4gBUw6pjnI_DnFIRwWHRvrUHHSCfWOdTCIKdOTkgLZuGFuhEY3RMIW0WSYejjLtftwy0RVxAzk=", + * "p": "6a4G1qmfwWmn1biigN7IVFlkbLf9oVe6g7rOmHxI-hn1GRxKDSVuAUrmR1IhuAnca9M0y7SD-7TUs6wjOxWxaw==", + * "q": "5ofkxFKdPBD0CQHMb9q13AMHUVe0rJ-hSjqqIBrmqApUOneyAcMV76M0QyIQnI2p3POa4Qu_7XChDwRVl7LlDQ==", + * "dp": "2mXGiGwCHl8j-FBWuID-1C6z-BRB3MBEVoeKPOOzxOPruatB3mWEGXsqG7A8SWgV9URxTI2K6P3J6Z7RUpBkvw==", + * "dq": "oagn5vfb5NQqnOpS9xkSsD67cfIj821ZSFlNFYhnuOzNVda7z_qCtnHm4zDPH0lEFXoKYMfBhfqWJpaugttjPQ==", + * "qi": "dqEQgxNmOVFrF4s776hTqeC6oEDila8EvpVb2F2ZvwAOLjCQ66OiAZK1BiYGHqUy0NeqNmtlsLSuBEZQZvqZwg==" + * } + * ``` + * RSA 公钥: + * ```JavaScript + * { + * "kty": "RSA", + * "n": "0m5lvKpWqy9JS7tV2HIPqHCYHLquSuxIC3F8strIQLJKO3rZmTT96KTnhsOfBO7Y1bI7mnT0PB3_vcHd9ekWMEoZJQw7MuB8KeM_Wn54-elJr5DNLk5bMppSGxX7ZnumiXGG51_X3Yp-_EbGtDG80GxXXix7Mucyo7K25uE0uW8=", + * "e": "AQAB" + * } + * ``` + * EC 私钥: + * ```JavaScript + * { + * "kty": "EC", + * "crv": "P-521", + * "x": "ATfNNFuuvlGxrTGoXgyfSAGgRNNDnO3rN3k74urKJdVS14RYhdnSwm91Bm-F1l-T1XKlAY2yRnzG9w1Ukvo8c0wL", + * "y": "ASBHqrruB6kdkEUB3vlW3-UIkk4HtKdUeTwN-7m3j2rgZvYR1ffRAapDvWqKGiBjomqWafxokBkbDI0c95f6f4XU", + * "d": "AfkIbUHXfW41njdpoKuqqKludcoLJS8D_oMEwkj-GVaXFNKccIoF5iKGu2c69kNDjo83R_7wyGlfRczsklkik1ST" + * } + * ``` + * EC 公钥: + * ```JavaScript + * { + * "kty": "EC", + * "crv": "P-521", + * "x": "ATfNNFuuvlGxrTGoXgyfSAGgRNNDnO3rN3k74urKJdVS14RYhdnSwm91Bm-F1l-T1XKlAY2yRnzG9w1Ukvo8c0wL", + * "y": "ASBHqrruB6kdkEUB3vlW3-UIkk4HtKdUeTwN-7m3j2rgZvYR1ffRAapDvWqKGiBjomqWafxokBkbDI0c95f6f4XU" + * } + * ``` + * @param jsonKey JSON 格式的密钥 + * + * + * + */ + importKey(jsonKey: object): void; + + /** + * + * @brief 加载一个 PEM/DER 格式的密钥文件 + * @param filename 密钥文件名 + * @param password 解密密码 + * + * + * + */ + importFile(filename: string, password?: string/** = ""*/): void; + + /** + * + * @brief 返回当前 key 的 PEM 格式编码 + * @return 当前 key 的 PEM 格式编码 + * + * + * + */ + exportPem(): string; + + /** + * + * @brief 返回当前 key 的 DER 格式编码 + * @return 当前 key 的 DER 格式编码 + * + * + * + */ + exportDer(): Class_Buffer; + + /** + * + * @brief 返回当前 key 的 DER 格式编码 + * @return 当前 key 的 DER 格式编码 + * + * + * + */ + exportJson(): object; + + /** + * + * @brief 使用当前算法密码公钥加密数据 + * @param data 指定要加密的数据 + * @return 返回加密后的数据 + * + * + * @async + */ + encrypt(data: Class_Buffer): Class_Buffer; + + /** + * + * @brief 使用当前算法密码私钥解密数据 + * @param data 指定要解密的数据 + * @return 返回解密后的数据 + * + * + * @async + */ + decrypt(data: Class_Buffer): Class_Buffer; + + /** + * + * @brief 使用当前算法密码私钥签名数据 + * @param data 指定要签名的数据 + * @param alg 指定要签名的算法, 默认0. 支持算法: 0=NONE,1=MD2,2=MD4,3=MD5,4=SHA1,5=SHA224,6=SHA256,7=SHA384,8=SHA512,9=RIPEMD160 + * @return 返回签名后的数据 + * + * + * @async + */ + sign(data: Class_Buffer, alg?: number/** = 0*/): Class_Buffer; + + /** + * + * @brief 使用当前算法密码公钥验证数据 + * @param data 指定要验证的数据 + * @param sign 指定要验证的签名 + * @param alg 指定要签名的算法, 默认0. 支持算法: 0=NONE,1=MD2,2=MD4,3=MD5,4=SHA1,5=SHA224,6=SHA256,7=SHA384,8=SHA512,9=RIPEMD160 + * @return 返回验证后的结果 + * + * + * @async + */ + verify(data: Class_Buffer, sign: Class_Buffer, alg?: number/** = 0*/): boolean; + +} /** endof class */ + +/** endof `module Or Internal Object` */ + + diff --git a/types/fibjs/declare/Redis.d.ts b/types/fibjs/declare/Redis.d.ts new file mode 100644 index 0000000000..384e0e4d80 --- /dev/null +++ b/types/fibjs/declare/Redis.d.ts @@ -0,0 +1,576 @@ +/*************************************************************************** + * * + * This file was automatically generated with idlc.js * + * build info: * + * - fibjs : 0.25.0 * + * - date : Jun 12 2018 07:22:40 * + * * + ***************************************************************************/ + +/** + * @author Richard + * + */ +/// + + + + +/** module Or Internal Object */ +/** + * @brief Redis 数据库客户端对象 + * @detail 用以创建和管理 Redis 数据库,创建方法:,```JavaScript,var db = require("db");,var test = new db.openRedis("redis-server");,``` + */ + +declare class Class_Redis extends Class__object { + + /** + * class prop + * + * + * @brief 查询和设置错误处理函数,当 sub 出现错误或者网络中断时回调,当回调发生后,本对象的一切 sub 都将中止 + * + * + * + * @type Function + */ + + onsuberror: Function + + + + /** + * + * @brief redis 基础命令方法 + * @param cmd 指定发送的命令 + * @param args 指定发送的参数 + * @return 返回服务器返回的结果 + * + * + */ + command(cmd: string, ...args: any[]): any; + + /** + * + * @brief 将字符串值 value 关联到 key,如果 key 已经持有其他值, SET 就覆写旧值,无视类型 + * @param key 指定要关联的 key + * @param value 指定要关联的数据 + * @param ttl 以毫秒为单位为 key 设置生存时间;如果 ttl 为 0 ,那么不设置生存时间 + * + * + */ + set(key: Class_Buffer, value: Class_Buffer, ttl?: number/** = 0*/): void; + + /** + * + * @brief 将 key 的值设为 value ,当且仅当 key 不存在。若给定的 key 已经存在,则 SETNX 不做任何动作。 + * @param key 指定要关联的 key + * @param value 指定要关联的数据 + * @param ttl 以毫秒为单位为 key 设置生存时间;如果 ttl 为 0 ,那么不设置生存时间 + * + * + */ + setNX(key: Class_Buffer, value: Class_Buffer, ttl?: number/** = 0*/): void; + + /** + * + * @brief 将 key 的值设为 value,只在键已经存在时,才对键进行设置操作。 + * @param key 指定要关联的 key + * @param value 指定要关联的数据 + * @param ttl 以毫秒为单位为 key 设置生存时间;如果 ttl 为 0 ,那么不设置生存时间 + * + * + */ + setXX(key: Class_Buffer, value: Class_Buffer, ttl?: number/** = 0*/): void; + + /** + * + * @brief 同时设置一个或多个 key-value 对。如果某个给定 key 已经存在,那么 MSET 会用新值覆盖原来的旧值 + * @param kvs 指定要设置的 key/value 对象 + * + * + */ + mset(kvs: object): void; + + /** + * + * @brief 同时设置一个或多个 key-value 对。如果某个给定 key 已经存在,那么 MSET 会用新值覆盖原来的旧值 + * @param kvs 指定要设置的 key/value 列表 + * + * + */ + mset(...kvs: any[]): void; + + /** + * + * @brief 同时设置一个或多个 key-value 对,当且仅当所有给定 key 都不存在 + * @param kvs 指定要设置的 key/value 对象 + * + * + */ + msetNX(kvs: object): void; + + /** + * + * @brief 同时设置一个或多个 key-value 对,当且仅当所有给定 key 都不存在 + * @param kvs 指定要设置的 key/value 列表 + * + * + */ + msetNX(...kvs: any[]): void; + + /** + * + * @brief 如果 key 已经存在并且是一个字符串,append 命令将 value 追加到 key 原来的值的末尾。如果 key 不存在,append 就简单地将给定 key 设为 value + * @param key 指定要追加的 key + * @param value 指定要追加的数据 + * @return 追加 value 之后, key 中字符串的长度 + * + * + */ + append(key: Class_Buffer, value: Class_Buffer): number; + + /** + * + * @brief 用 value 参数覆写给定 key 所储存的字符串值,从偏移量 offset 开始 + * @param key 指定要修改的 key + * @param offset 指定修改的字节偏移 + * @param value 指定要覆盖的数据 + * @return 被修改之后,字符串的长度 + * + * + */ + setRange(key: Class_Buffer, offset: number, value: Class_Buffer): number; + + /** + * + * @brief 返回 key 中字符串值的子字符串,字符串的截取范围由 start 和 end 两个偏移量决定(包括 start 和 end 在内) + * @param key 指定要查询的 key + * @param start 指定查询的起始字节偏移 + * @param end 指定查询的结束字节偏移 + * @return 截取得出的子字符串 + * + * + */ + getRange(key: Class_Buffer, start: number, end: number): Class_Buffer; + + /** + * + * @brief 返回 key 所储存的字符串值的长度。当 key 储存的不是字符串值时,返回一个错误 + * @param key 指定要计算的 key + * @return 字符串值的长度。当 key 不存在时,返回 0 + * + * + */ + strlen(key: Class_Buffer): number; + + /** + * + * @brief 计算给定字符串中,被设置为 1 的比特位的数量 + * @param key 指定要计算的 key + * @param start 指定要计算的起始字节,可以使用负数值,-1 表示最后一个字节,而 -2 表示倒数第二个字节,以此类推 + * @param end 指定要计算的结束字节,可以使用负数值,-1 表示最后一个字节,而 -2 表示倒数第二个字节,以此类推 + * @return 被设置为 1 的位的数量 + * + * + */ + bitcount(key: Class_Buffer, start?: number/** = 0*/, end?: number/** = -1*/): number; + + /** + * + * @brief 返回 key 所关联的字符串值,如果 key 不存在那么返回特殊值 Null + * @param key 指定要关联的 key + * @return 当 key 不存在时,返回 Null ,否则,返回 key 的值 + * + * + */ + get(key: Class_Buffer): Class_Buffer; + + /** + * + * @brief 返回所有(一个或多个)给定 key 的值。如果给定的 key 里面,有某个 key 不存在,那么这个 key 返回特殊值 nil 。 + * @param keys 指定要查询的 key 数组 + * @return 一个包含所有给定 key 的值的列表 + * + * + */ + mget(keys: any[]): any[]; + + /** + * + * @brief 返回所有(一个或多个)给定 key 的值。如果给定的 key 里面,有某个 key 不存在,那么这个 key 返回特殊值 nil 。 + * @param keys 指定要查询的 key 列表 + * @return 一个包含所有给定 key 的值的列表 + * + * + */ + mget(...keys: any[]): any[]; + + /** + * + * @brief 将给定 key 的值设为 value ,并返回 key 的旧值(old value) + * @param key 指定要查询修改的 key + * @param value 指定修改的数值 + * @return 返回给定 key 的旧值 + * + * + */ + getset(key: Class_Buffer, value: Class_Buffer): Class_Buffer; + + /** + * + * @brief 将 key 所储存的值减去减量 + * @param key 指定要修改的 key + * @param num 指定要减去的数值 + * @return 减去 num 之后,key 的值 + * + * + */ + decr(key: Class_Buffer, num?: number/** = 1*/): number; + + /** + * + * @brief 将 key 所储存的值加上增量 + * @param key 指定要修改的 key + * @param num 指定要加上的数值 + * @return 加上 num 之后,key 的值 + * + * + */ + incr(key: Class_Buffer, num?: number/** = 1*/): number; + + /** + * + * @brief 对 key 所储存的字符串值,设置或清除指定偏移量上的位(bit) + * @param key 指定要修改的 key + * @param offset 指定修改的位偏移 + * @param value 指定设置或清除的参数,可以是 0 也可以是 1 + * @return 指定偏移量原来储存的位 + * + * + */ + setBit(key: Class_Buffer, offset: number, value: number): number; + + /** + * + * @brief 对 key 所储存的字符串值,获取指定偏移量上的位(bit) + * @param key 指定要查询的 key + * @param offset 指定查询的位偏移 + * @return 字符串值指定偏移量上的位(bit) + * + * + */ + getBit(key: Class_Buffer, offset: number): number; + + /** + * + * @brief 检查给定 key 是否存在 + * @param key 指定要关联的 key + * @return 若 key 存在,返回 True,否则返回 False + * + * + */ + exists(key: Class_Buffer): boolean; + + /** + * + * @brief 返回 key 所储存的值的类型 + * @param key 指定要查询的 key + * @return 返回 key 所储存的值的类型,可能的值为 none(key不存在) string(字符串) list(列表) set(集合) zset(有序集) hash(哈希表) + * + * + */ + type(key: Class_Buffer): string; + + /** + * + * @brief 查找所有符合给定模式 pattern 的 key + * @param pattern 指定查询模式 + * @return 符合给定模式的 key 列表 + * + * + */ + keys(pattern: string): any[]; + + /** + * + * @brief 删除给定的一个或多个 key,不存在的 key 会被忽略 + * @param keys 指定要删除的 key 数组 + * @return 被删除 key 的数量 + * + * + */ + del(keys: any[]): number; + + /** + * + * @brief 删除给定的一个或多个 key,不存在的 key 会被忽略 + * @param keys 指定要删除的 key 列表 + * @return 被删除 key 的数量 + * + * + */ + del(...keys: any[]): number; + + /** + * + * @brief 为给定 key 设置生存时间,当 key 过期时,它会被自动删除 + * @param key 指定要设定的 key + * @param ttl 以毫秒为单位为 key 设置生存时间 + * @return 若 key 存在,返回 True,否则返回 False + * + * + */ + expire(key: Class_Buffer, ttl: number): boolean; + + /** + * + * @brief 返回给定 key 的剩余生存时间 + * @param key 指定要查询的 key + * @return 以毫秒为单位,返回 key 的剩余生存时间,当 key 不存在时,返回 -2,当 key 存在但没有设置剩余生存时间时,返回 -1 + * + * + */ + ttl(key: Class_Buffer): number; + + /** + * + * @brief 移除给定 key 的生存时间,将这个 key 从『易失的』(带生存时间 key )转换成『持久的』(一个不带生存时间、永不过期的 key) + * @param key 指定要设定的 key + * @return 若 key 存在,返回 True,否则返回 False + * + * + */ + persist(key: Class_Buffer): boolean; + + /** + * + * @brief 将 key 改名为 newkey,当 key 和 newkey 相同,或者 key 不存在时,返回一个错误 + * @param key 指定要改名的 key + * @param newkey 指定要改名的目的 key + * + * + */ + rename(key: Class_Buffer, newkey: Class_Buffer): void; + + /** + * + * @brief 当且仅当 newkey 不存在时,将 key 改名为 newkey,当 key 不存在时,返回一个错误 + * @param key 指定要改名的 key + * @param newkey 指定要改名的目的 key + * @return 修改成功时,返回 True,如果 newkey 已经存在,返回 False + * + * + */ + renameNX(key: Class_Buffer, newkey: Class_Buffer): boolean; + + /** + * + * @brief 订阅给定的一个频道的信息,当消息发生时自动调用 func,func 包含两个参数,依次为 channel 和 message,同一频道同一函数只会回调一次 + * @param channel 指定订阅的频道名称 + * @param func 指定回调函数 + * + * + * + */ + sub(channel: Class_Buffer, func: Function): void; + + /** + * + * @brief 订阅给定的一组频道的信息,当消息发生时自动调用相应的回调函数,同一频道同一函数只会回调一次 + * @param map 指定频道映射关系,对象属性名称将作为频道名称,属性的值将作为回调函数 + * + * + * + */ + sub(map: object): void; + + /** + * + * @brief 退订给定的频道的全部回调 + * @param channel 指定退订的频道名称 + * + * + * + */ + unsub(channel: Class_Buffer): void; + + /** + * + * @brief 退订给定的频道的指定回调函数 + * @param channel 指定退订的频道名称 + * @param func 指定退订的回调函数 + * + * + * + */ + unsub(channel: Class_Buffer, func: Function): void; + + /** + * + * @brief 退订一组给定的频道的全部回调 + * @param channels 指定退订的频道数组 + * + * + * + */ + unsub(channels: any[]): void; + + /** + * + * @brief 退订给定的一组频道的指定回调函数 + * @param map 指定频道映射关系,对象属性名称将作为频道名称,属性的值将作为回调函数 + * + * + * + */ + unsub(map: object): void; + + /** + * + * @brief 按照模板订阅一组频道的信息,当消息发生时自动调用 func,func 包含三个参数,依次为 channel,message 和 pattern,同一模板同一函数只会回调一次 + * @param pattern 指定订阅的频道模板 + * @param func 指定回调函数 + * + * + * + */ + psub(pattern: string, func: Function): void; + + /** + * + * @brief 订阅给定的一组频道模板的信息,当消息发生时自动调用相应的 func,同一频道同一函数只会回调一次 + * @param map 指定频道映射关系,对象属性名称将作为频道模板,属性的值将作为回调函数 + * + * + * + */ + psub(map: object): void; + + /** + * + * @brief 退订给定模板的频道的全部回调 + * @param pattern 指定退订的频道模板 + * + * + * + */ + unpsub(pattern: string): void; + + /** + * + * @brief 退订给定模板的频道的指定回调函数 + * @param pattern 指定退订的频道模板 + * @param func 指定退订的回调函数 + * + * + * + */ + unpsub(pattern: string, func: Function): void; + + /** + * + * @brief 退订一组给定模板的频道的全部回调 + * @param patterns 指定发布的频道模板数组 + * + * + * + */ + unpsub(patterns: any[]): void; + + /** + * + * @brief 退订一组模板的频道的指定回调函数 + * @param map 指定频道映射关系,对象属性名称将作为频道模板,属性的值将作为回调函数 + * + * + * + */ + unpsub(map: object): void; + + /** + * + * @brief 将信息 message 发送到指定的频道 channel + * @param channel 指定发布的频道 + * @param message 指定发布的消息 + * @return 接收此消息的客户端数量 + * + * + * + */ + pub(channel: Class_Buffer, message: Class_Buffer): number; + + /** + * + * @brief 获取指定 key 的 Hash 对象,此对象为包含指定 key 的客户端,只有调用其方法才会操作数据库 + * @param key 指定要获取的 key + * @return 返回包含指定 key 的 Hash 对象 + * + * + */ + getHash(key: Class_Buffer): Class_RedisHash; + + /** + * + * @brief 获取指定 key 的 List 对象,此对象为包含指定 key 的客户端,只有调用其方法才会操作数据库 + * @param key 指定要获取的 key + * @return 返回包含指定 key 的 List 对象 + * + * + */ + getList(key: Class_Buffer): Class_RedisList; + + /** + * + * @brief 获取指定 key 的 Set 对象,此对象为包含指定 key 的客户端,只有调用其方法才会操作数据库 + * @param key 指定要获取的 key + * @return 返回包含指定 key 的 Set 对象 + * + * + */ + getSet(key: Class_Buffer): Class_RedisSet; + + /** + * + * @brief 获取指定 key 的 SortedSet 对象,此对象为包含指定 key 的客户端,只有调用其方法才会操作数据库 + * @param key 指定要获取的 key + * @return 返回包含指定 key 的 SortedSet 对象 + * + * + */ + getSortedSet(key: Class_Buffer): Class_RedisSortedSet; + + /** + * + * @brief 序列化给定 key ,并返回被序列化的值,使用 restore 命令可以将这个值反序列化为 Redis 键 + * @param key 指定要序列化的 key + * @return 返回序列化之后的值,如果 key 不存在,那么返回 null + * + * + */ + dump(key: Class_Buffer): Class_Buffer; + + /** + * + * @brief 反序列化给定的序列化值,并将它和给定的 key 关联 + * @param key 指定要反序列化的 key + * @param data 指定要反序列化的数据 + * @param ttl 以毫秒为单位为 key 设置生存时间;如果 ttl 为 0 ,那么不设置生存时间 + * + * + */ + restore(key: Class_Buffer, data: Class_Buffer, ttl?: number/** = 0*/): void; + + /** + * + * @brief 关闭当前数据库连接或事务 + * + * + */ + close(): void; + +} /** endof class */ + +/** endof `module Or Internal Object` */ + + diff --git a/types/fibjs/declare/RedisHash.d.ts b/types/fibjs/declare/RedisHash.d.ts new file mode 100644 index 0000000000..0c16eef47d --- /dev/null +++ b/types/fibjs/declare/RedisHash.d.ts @@ -0,0 +1,169 @@ +/*************************************************************************** + * * + * This file was automatically generated with idlc.js * + * build info: * + * - fibjs : 0.25.0 * + * - date : Jun 12 2018 07:22:40 * + * * + ***************************************************************************/ + +/** + * @author Richard + * + */ +/// + + + + +/** module Or Internal Object */ +/** + * @brief Redis 数据库客户端 Hash 对象,此对象为包含指定 key 的客户端,只有调用其方法才会操作数据库 + * @detail 用以操作 Redis 的 Hash 对象,创建方法:,```JavaScript,var db = require("db");,var rdb = new db.openRedis("redis-server");,var hash = rdb.getHash("test");,``` + */ + +declare class Class_RedisHash extends Class__object { + + + + /** + * + * @brief 将哈希表中的域 field 的值设为 value,如果域 field 已经存在于哈希表中,旧值将被覆盖 + * @param field 指定要修改的 field + * @param value 指定要修改的数据 + * + * + */ + set(field: Class_Buffer, value: Class_Buffer): void; + + /** + * + * @brief 将哈希表中的域 field 的值设置为 value ,当且仅当域 field 不存在。若域 field 已经存在,该操作无效 + * @param field 指定要修改的 field + * @param value 指定要修改的数据 + * + * + */ + setNX(field: Class_Buffer, value: Class_Buffer): void; + + /** + * + * @brief 同时将多个 field-value (域-值)对设置到哈希表中,此命令会覆盖哈希表中已存在的域 + * @param kvs 指定要设置的 field/value 对象 + * + * + */ + mset(kvs: object): void; + + /** + * + * @brief 同时将多个 field-value (域-值)对设置到哈希表中,此命令会覆盖哈希表中已存在的域 + * @param kvs 指定要设置的 field/value 列表 + * + * + */ + mset(...kvs: any[]): void; + + /** + * + * @brief 返回哈希表中给定域 field 的值 + * @param field 指定要查询的 field + * @return 给定域的值,当给定域不存在或是给定 key 不存在时,返回 null + * + * + */ + get(field: Class_Buffer): Class_Buffer; + + /** + * + * @brief 返回哈希表中,一个或多个给定域的值 + * @param fields 指定要查询的域数组 + * @return 一个包含所有给定域的值的列表 + * + * + */ + mget(fields: any[]): any[]; + + /** + * + * @brief 返回哈希表中,一个或多个给定域的值 + * @param fields 指定要查询的域列表 + * @return 一个包含所有给定域的值的列表 + * + * + */ + mget(...fields: any[]): any[]; + + /** + * + * @brief 将域所储存的值加上增量 + * @param field 指定要修改的域 + * @param num 指定要加上的数值 + * @return 加上 num 之后,域的值 + * + * + */ + incr(field: Class_Buffer, num?: number/** = 1*/): number; + + /** + * + * @brief 返回哈希表中,所有的域和值 + * @return 返回一个包含哈希表中所有域的列表 + * + * + */ + getAll(): any[]; + + /** + * + * @brief 返回哈希表中的所有域 + * @return 返回值里,紧跟每个域名(field name)之后是域的值(value),所以返回值的长度是哈希表大小的两倍 + * + * + */ + keys(): any[]; + + /** + * + * @brief 返回哈希表中域的数量 + * @return 返回哈希表中域的数量 + * + * + */ + len(): number; + + /** + * + * @brief 查看哈希表中,给定域 field 是否存在 + * @param field 指定要查询的 field + * @return 如果哈希表含有给定域,返回 true,如果哈希表不含有给定域,或 key 不存在,返回 false + * + * + */ + exists(field: Class_Buffer): boolean; + + /** + * + * @brief 删除哈希表中的一个或多个指定域,不存在的域将被忽略 + * @param fields 指定要删除的域数组 + * @return 被删除域的数量 + * + * + */ + del(fields: any[]): number; + + /** + * + * @brief 删除哈希表中的一个或多个指定域,不存在的域将被忽略 + * @param fields 指定要删除的域列表 + * @return 被删除域的数量 + * + * + */ + del(...fields: any[]): number; + +} /** endof class */ + +/** endof `module Or Internal Object` */ + + diff --git a/types/fibjs/declare/RedisList.d.ts b/types/fibjs/declare/RedisList.d.ts new file mode 100644 index 0000000000..f752f8fd1a --- /dev/null +++ b/types/fibjs/declare/RedisList.d.ts @@ -0,0 +1,174 @@ +/*************************************************************************** + * * + * This file was automatically generated with idlc.js * + * build info: * + * - fibjs : 0.25.0 * + * - date : Jun 12 2018 07:22:40 * + * * + ***************************************************************************/ + +/** + * @author Richard + * + */ +/// + + + + +/** module Or Internal Object */ +/** + * @brief Redis 数据库客户端 List 对象,此对象为包含指定 key 的客户端,只有调用其方法才会操作数据库 + * @detail 用以操作 Redis 的 List 对象,创建方法:,```JavaScript,var db = require("db");,var rdb = new db.openRedis("redis-server");,var list = rdb.getList("test");,``` + */ + +declare class Class_RedisList extends Class__object { + + + + /** + * + * @brief 将一个或多个值 value 插入到列表的表头 + * @param values 指定要插入的数据 + * @return 插入后,列表的长度 + * + * + */ + push(values: any[]): number; + + /** + * + * @brief 将一个或多个值 value 插入到列表的表头 + * @param values 指定要插入的数据 + * @return 插入后,列表的长度 + * + * + */ + push(...values: any[]): number; + + /** + * + * @brief 移除并返回列表 key 的头元素 + * @return 列表的头元素,如果列表为空则返回 null + * + * + */ + pop(): Class_Buffer; + + /** + * + * @brief 将一个或多个值 value 插入到列表的表尾(最右边) + * @param values 指定要插入的数据 + * @return 插入后,列表的长度 + * + * + */ + rpush(values: any[]): number; + + /** + * + * @brief 将一个或多个值 value 插入到列表的表尾(最右边) + * @param values 指定要插入的数据 + * @return 插入后,列表的长度 + * + * + */ + rpush(...values: any[]): number; + + /** + * + * @brief 移除并返回列表 key 的表尾(最右边)元素 + * @return 列表的头元素,如果列表为空则返回 null + * + * + */ + rpop(): Class_Buffer; + + /** + * + * @brief 将列表下标为 index 的元素的值设置为 value + * @param index 指定要修改的下标 + * @param value 指定要修改的数据 + * + * + */ + set(index: number, value: Class_Buffer): void; + + /** + * + * @brief 返回列表中,下标为 index 的元素 + * @param index 指定要查询的下标 + * @return 列表中下标为 index 的元素 + * + * + */ + get(index: number): Class_Buffer; + + /** + * + * @brief 将值 value 插入到列表当中,位于值 pivot 之前 + * @param pivot 指定插入时查找的数据 + * @param value 指定要插入的数据 + * @return 插入后,列表的长度 + * + * + */ + insertBefore(pivot: Class_Buffer, value: Class_Buffer): number; + + /** + * + * @brief 将值 value 插入到列表当中,位于值 pivot 之后 + * @param pivot 指定插入时查找的数据 + * @param value 指定要插入的数据 + * @return 插入后,列表的长度 + * + * + */ + insertAfter(pivot: Class_Buffer, value: Class_Buffer): number; + + /** + * + * @brief 根据参数 count 的值,移除列表中与参数 value 相等的元素 + * @param count 指定删除的元素数量 + * @param value 指定要删除的数值 + * @return 被移除元素的数量 + * + * + */ + remove(count: number, value: Class_Buffer): number; + + /** + * + * @brief 对一个列表进行修剪(trim),就是说,让列表只保留指定区间内的元素,不在指定区间之内的元素都将被删除 + * @param start 指定修剪的起始下标,0 表示第一个元素,-1 表示最后一个元素 + * @param stop 指定修剪的结束下标,0 表示第一个元素,-1 表示最后一个元素 + * + * + */ + trim(start: number, stop: number): void; + + /** + * + * @brief 返回列表的长度 + * @return 返回列表的长度 + * + * + */ + len(): number; + + /** + * + * @brief 返回列表中指定区间内的元素,区间以偏移量 start 和 stop 指定,包含 start 和 stop 的元素 + * @param start 指定查询的起始下标,0 表示第一个元素,-1 表示最后一个元素 + * @param stop 指定查询的结束下标,0 表示第一个元素,-1 表示最后一个元素 + * @return 包含指定区间内的元素的数组 + * + * + */ + range(start: number, stop: number): any[]; + +} /** endof class */ + +/** endof `module Or Internal Object` */ + + diff --git a/types/fibjs/declare/RedisSet.d.ts b/types/fibjs/declare/RedisSet.d.ts new file mode 100644 index 0000000000..571869a8d5 --- /dev/null +++ b/types/fibjs/declare/RedisSet.d.ts @@ -0,0 +1,129 @@ +/*************************************************************************** + * * + * This file was automatically generated with idlc.js * + * build info: * + * - fibjs : 0.25.0 * + * - date : Jun 12 2018 07:22:40 * + * * + ***************************************************************************/ + +/** + * @author Richard + * + */ +/// + + + + +/** module Or Internal Object */ +/** + * @brief Redis 数据库客户端 Set 对象,此对象为包含指定 key 的客户端,只有调用其方法才会操作数据库 + * @detail 用以操作 Redis 的 Set 对象,创建方法:,```JavaScript,var db = require("db");,var rdb = new db.openRedis("redis-server");,var set = rdb.getSet("test");,``` + */ + +declare class Class_RedisSet extends Class__object { + + + + /** + * + * @brief 将一个或多个 member 元素加入到集合 key 当中,已经存在于集合的 member 元素将被忽略 + * @param members 指定要添加的元素数组 + * @return 被添加到集合中的新元素的数量,不包括被忽略的元素 + * + * + */ + add(members: any[]): number; + + /** + * + * @brief 同时将多个 field-value (域-值)对设置到哈希表中,此命令会覆盖哈希表中已存在的域 + * @param members 指定要添加的元素列表 + * @return 被添加到集合中的新元素的数量,不包括被忽略的元素 + * + * + */ + add(...members: any[]): number; + + /** + * + * @brief 移除集合中的一个或多个 member 元素 + * @param members 指定要移除的元素数组 + * @return 被成功移除的元素的数量,不包括被忽略的元素 + * + * + */ + remove(members: any[]): number; + + /** + * + * @brief 移除集合中的一个或多个 member 元素 + * @param members 指定要移除的元素列表 + * @return 被成功移除的元素的数量,不包括被忽略的元素 + * + * + */ + remove(...members: any[]): number; + + /** + * + * @brief 返回集合中元素的数量 + * @return 返回集合的长度 + * + * + */ + len(): number; + + /** + * + * @brief 判断 member 元素是否集合的成员 + * @param member 指定检查的 member + * @return 如果 member 元素是集合的成员,返回 true + * + * + */ + exists(member: Class_Buffer): boolean; + + /** + * + * @brief 返回集合中的所有成员 + * @return 集合中所有成员的列表 + * + * + */ + members(): any[]; + + /** + * + * @brief 移除并返回集合中的一个随机元素 + * @return 被移除的随机元素。当集合是空集时,返回 null + * + * + */ + pop(): Class_Buffer; + + /** + * + * @brief 从集合中获取随机的一个元素 + * @return 返回一个元素;如果集合为空,返回 null + * + * + */ + randMember(): any; + + /** + * + * @brief 从集合中获取随机的若干元素 + * @param count 指定返回的元素个数。正数,返回一个包含 count 个元素的数组;负数,返回一个数组,数组中的元素可能会重复出现多次,而数组的长度为 count 的绝对值 + * @return 返回一个列表;如果集合为空,返回空列表 + * + * + */ + randMember(count: number): any; + +} /** endof class */ + +/** endof `module Or Internal Object` */ + + diff --git a/types/fibjs/declare/RedisSortedSet.d.ts b/types/fibjs/declare/RedisSortedSet.d.ts new file mode 100644 index 0000000000..1769fb0a79 --- /dev/null +++ b/types/fibjs/declare/RedisSortedSet.d.ts @@ -0,0 +1,158 @@ +/*************************************************************************** + * * + * This file was automatically generated with idlc.js * + * build info: * + * - fibjs : 0.25.0 * + * - date : Jun 12 2018 07:22:40 * + * * + ***************************************************************************/ + +/** + * @author Richard + * + */ +/// + + + + +/** module Or Internal Object */ +/** + * @brief Redis 数据库客户端 SortedSet 对象,此对象为包含指定 key 的客户端,只有调用其方法才会操作数据库 + * @detail 用以操作 Redis 的 SortedSet 对象,创建方法:,```JavaScript,var db = require("db");,var rdb = new db.openRedis("redis-server");,var set = rdb.getSortedSet("test");,``` + */ + +declare class Class_RedisSortedSet extends Class__object { + + + + /** + * + * @brief 将一个或多个 member 元素及其 score 值加入到有序集当中 + * @param sms 指定要添加的 member/score 对象 + * @return 被成功添加的新成员的数量,不包括那些被更新的、已经存在的成员 + * + * + */ + add(sms: object): number; + + /** + * + * @brief 将一个或多个 member 元素及其 score 值加入到有序集当中 + * @param sms 指定要添加的 member/score 列表 + * @return 被成功添加的新成员的数量,不包括那些被更新的、已经存在的成员 + * + * + */ + add(...sms: any[]): number; + + /** + * + * @brief 返回有序集中,成员 member 的 score 值 + * @param member 指定要查询的 member + * @return member 成员的 score 值,以字符串形式表示 + * + * + */ + score(member: Class_Buffer): Class_Buffer; + + /** + * + * @brief 为有序集的成员 member 的 score 值加上增量 num + * @param member 指定要修改的 member + * @param num 指定要加上的数值 + * @return member 成员的新 score 值,以字符串形式表示 + * + * + */ + incr(member: Class_Buffer, num?: number/** = 1*/): Class_Buffer; + + /** + * + * @brief 移除有序集中的一个或多个 member 元素 + * @param members 指定要移除的元素数组 + * @return 被成功移除的元素的数量,不包括被忽略的元素 + * + * + */ + remove(members: any[]): number; + + /** + * + * @brief 移除有序集中的一个或多个 member 元素 + * @param members 指定要移除的元素列表 + * @return 被成功移除的元素的数量,不包括被忽略的元素 + * + * + */ + remove(...members: any[]): number; + + /** + * + * @brief 返回有序集中元素的数量 + * @return 返回有序集的长度 + * + * + */ + len(): number; + + /** + * + * @brief 返回有序集中, score 值在 min 和 max 之间(默认包括 score 值等于 min 或 max )的成员的数量 + * @param min 指定统计的最小 score + * @param max 指定统计的最大 score + * @return score 值在 min 和 max 之间的成员的数量 + * + * + */ + count(min: number, max: number): number; + + /** + * + * @brief 返回有序集中,指定区间内的成员,成员的位置按 score 值递增(从小到大)来排序 + * @param start 指定查询的起始下标,0 表示第一个元素,-1 表示最后一个元素 + * @param stop 指定查询的结束下标,0 表示第一个元素,-1 表示最后一个元素 + * @param withScores 指定是否在结果中包含 score + * @return 指定区间内,带有 score 值(可选)的有序集成员的列表 + * + * + */ + range(start: number, stop: number, withScores?: boolean/** = false*/): any[]; + + /** + * + * @brief 返回有序集中,指定区间内的成员,成员的位置按 score 值递减(从大到小)来排序 + * @param start 指定查询的起始下标,0 表示第一个元素,-1 表示最后一个元素 + * @param stop 指定查询的结束下标,0 表示第一个元素,-1 表示最后一个元素 + * @param withScores 指定是否在结果中包含 score + * @return 指定区间内,带有 score 值(可选)的有序集成员的列表 + * + * + */ + rangeRev(start: number, stop: number, withScores?: boolean/** = false*/): any[]; + + /** + * + * @brief 有序集中成员 member 的排名。其中有序集成员按 score 值递增(从小到大)顺序排列 + * @param member 指定要查询的 member + * @return member 如果 member 是有序集 key 的成员,返回 member 的排名。如果 member 不是有序集 key 的成员,返回 nil + * + * + */ + rank(member: Class_Buffer): number; + + /** + * + * @brief 有序集中成员 member 的排名。其中有序集成员按 score 值递减(从大到小)顺序排列 + * @param member 指定要查询的 member + * @return member 如果 member 是有序集 key 的成员,返回 member 的排名。如果 member 不是有序集 key 的成员,返回 nil + * + * + */ + rankRev(member: Class_Buffer): number; + +} /** endof class */ + +/** endof `module Or Internal Object` */ + + diff --git a/types/fibjs/declare/Routing.d.ts b/types/fibjs/declare/Routing.d.ts new file mode 100644 index 0000000000..aef820feae --- /dev/null +++ b/types/fibjs/declare/Routing.d.ts @@ -0,0 +1,262 @@ +/*************************************************************************** + * * + * This file was automatically generated with idlc.js * + * build info: * + * - fibjs : 0.25.0 * + * - date : Jun 12 2018 07:22:40 * + * * + ***************************************************************************/ + +/** + * @author Richard + * + */ +/// + + + + +/** module Or Internal Object */ +/** + * @brief 消息处理器路由对象 + * @detail 路由对象是 http 消息处理的核心对象,服务器根据路由的设定,匹配 url 和 method,并将 http 消息转发到相应的处理器,以完成不同的事务。,,一个简单的路由,可以直接以 JSON 对象的形式提供,比如:,```JavaScript,var http = require('http');,,var svr = new http.Server(8080, {, '/': r => r.response.write('home'),, '/help': r => r.response.write('help'),});,,svr.run();,```,如果需要更复杂的路由定制,可以自行创建 Routing 对象并根据需要处理路由策略:,```JavaScript,var http = require('http');,var mq = require('mq');,,var app = new mq.Routing();,,app.get('/', r => r.response.write('home'));,app.get('/help', r => r.response.write('help'));,,app.post('/help', r => r.response.write('post a help.'));,,app.get('/home/:user', (r, user) => r.response.write('hello ' + user));,,app.get('/user/:id(\\d+)', (r, id) => r.response.write('get ' + id));,,app.get('/actions', {, '/run': r => r.response.write('running'),, '/sleep': r => r.response.write('sleeping'),, '(.*)': r => r.response.write('........'),});,,var svr = new http.Server(8080, app);,svr.run();,```,路由对象根据设定的规则匹配消息,将消息传递给符合规则的第一个处理器。后加入的路由规则优先匹配。创建方法:,```JavaScript,var routing = new mq.Routing({, "^/func1(/.*)$": func1,, "^/func2(/.*)$": func2,});,```,正则表达式匹配的项目修改消息的 value 属性,子项目存入消息的 params 属性。例如:,```JavaScript,var routing = new mq.Routing({, "^/func1(/([0-9]+)/([0-9]+)\.html)$": func1,,});,```,匹配消息 "/func1/123/456.html" 后,value == "/123/456.html",params == ["123", "456"];,,如果匹配的结果没有子项,则 value 为空,params 为空。例如:,```JavaScript,var routing = new mq.Routing({, "^/func1/[0-9]+/[0-9]+\.html$": func1,,});,```,匹配消息 "/func1/123/456.html" 后,value == "",params == [];,,如果匹配的结果第一级有多个子项,则 value 为空,params 为第一级子项。例如:,```JavaScript,var routing = new mq.Routing({, "^/func1/([0-9]+)/([0-9]+)\.html$": func1,,});,```,匹配消息 "/func1/123/456.html" 后,value == "",params == ["123", "456"];,,如果匹配的结果只有一个子项,并且无下级子项,则 value 和 params 均为此子项。例如:,```JavaScript,var routing = new mq.Routing({, "^/func1/([0-9]+)/[0-9]+\.html$": func1,,});,```,匹配消息 "/func1/123/456.html" 后,value == "123",params == ["123"]; + */ +/// +declare class Class_Routing extends Class_Handler { + + + + /** + * + * @brief 创建一个消息处理器路由对象 + * @param map 初始化路由参数 + * + * + * + */ + constructor(map?: object/** = v8::Object::New(isolate)*/); + + /** + * + * @brief 创建一个消息处理器路由对象 + * @param method 指定 http 请求方法,"*" 接受所有方法 + * @param map 初始化路由参数 + * + * + * + */ + constructor(method: string, map: object); + + /** + * + * @brief 从已有路由对象中添加规则,添加后原路由将被清空 + * @param route 已经初始化的路由对象 + * @return 返回路由对象本身 + * + * + * + */ + append(route: Class_Routing): Class_Routing; + + /** + * + * @brief 添加一组路由规则 + * @param map 路由参数 + * @return 返回路由对象本身 + * + * + * + */ + append(map: object): Class_Routing; + + /** + * + * @brief 添加一条路由规则 + * @param pattern 消息匹配格式 + * @param hdlr 内置消息处理器,处理函数,链式处理数组,路由对象,详见 mq.Handler + * @return 返回路由对象本身 + * + * + * + */ + append(pattern: string, hdlr: Class_Handler): Class_Routing; + + /** + * + * @brief 添加一条路由规则 + * @param method 指定 http 请求方法,"*" 接受所有方法 + * @param pattern 消息匹配格式 + * @param hdlr 内置消息处理器,处理函数,链式处理数组,路由对象,详见 mq.Handler + * @return 返回路由对象本身 + * + * + * + */ + append(method: string, pattern: string, hdlr: Class_Handler): Class_Routing; + + /** + * + * @brief 添加一组接受所有 http 方法路由规则 + * @param map 路由参数 + * @return 返回路由对象本身 + * + * + * + */ + all(map: object): Class_Routing; + + /** + * + * @brief 添加一条接受所有 http 方法路由规则 + * @param pattern 消息匹配格式 + * @param hdlr 内置消息处理器,处理函数,链式处理数组,路由对象,详见 mq.Handler + * @return 返回路由对象本身 + * + * + * + */ + all(pattern: string, hdlr: Class_Handler): Class_Routing; + + /** + * + * @brief 添加一组 GET 方法路由规则 + * @param map 路由参数 + * @return 返回路由对象本身 + * + * + * + */ + get(map: object): Class_Routing; + + /** + * + * @brief 添加一条接受 http GET 方法路由规则 + * @param pattern 消息匹配格式 + * @param hdlr 内置消息处理器,处理函数,链式处理数组,路由对象,详见 mq.Handler + * @return 返回路由对象本身 + * + * + * + */ + get(pattern: string, hdlr: Class_Handler): Class_Routing; + + /** + * + * @brief 添加一组接受 http POST 方法路由规则 + * @param map 路由参数 + * @return 返回路由对象本身 + * + * + * + */ + post(map: object): Class_Routing; + + /** + * + * @brief 添加一条接受 http POST 方法路由规则 + * @param pattern 消息匹配格式 + * @param hdlr 内置消息处理器,处理函数,链式处理数组,路由对象,详见 mq.Handler + * @return 返回路由对象本身 + * + * + * + */ + post(pattern: string, hdlr: Class_Handler): Class_Routing; + + /** + * + * @brief 添加一组接受 http DELETE 方法路由规则 + * @param map 路由参数 + * @return 返回路由对象本身 + * + * + * + */ + del(map: object): Class_Routing; + + /** + * + * @brief 添加一条接受 http DELETE 方法路由规则 + * @param pattern 消息匹配格式 + * @param hdlr 内置消息处理器,处理函数,链式处理数组,路由对象,详见 mq.Handler + * @return 返回路由对象本身 + * + * + * + */ + del(pattern: string, hdlr: Class_Handler): Class_Routing; + + /** + * + * @brief 添加一组 PUT 方法路由规则 + * @param map 路由参数 + * @return 返回路由对象本身 + * + * + * + */ + put(map: object): Class_Routing; + + /** + * + * @brief 添加一条接受 http PUT 方法路由规则 + * @param pattern 消息匹配格式 + * @param hdlr 内置消息处理器,处理函数,链式处理数组,路由对象,详见 mq.Handler + * @return 返回路由对象本身 + * + * + * + */ + put(pattern: string, hdlr: Class_Handler): Class_Routing; + + /** + * + * @brief 添加一组 PATCH 方法路由规则 + * @param map 路由参数 + * @return 返回路由对象本身 + * + * + * + */ + patch(map: object): Class_Routing; + + /** + * + * @brief 添加一条接受 http PATCH 方法路由规则 + * @param pattern 消息匹配格式 + * @param hdlr 内置消息处理器,处理函数,链式处理数组,路由对象,详见 mq.Handler + * @return 返回路由对象本身 + * + * + * + */ + patch(pattern: string, hdlr: Class_Handler): Class_Routing; + + /** + * + * @brief 添加一组 FIND 方法路由规则 + * @param map 路由参数 + * @return 返回路由对象本身 + * + * + * + */ + find(map: object): Class_Routing; + + /** + * + * @brief 添加一条接受 http FIND 方法路由规则 + * @param pattern 消息匹配格式 + * @param hdlr 内置消息处理器,处理函数,链式处理数组,路由对象,详见 mq.Handler + * @return 返回路由对象本身 + * + * + * + */ + find(pattern: string, hdlr: Class_Handler): Class_Routing; + +} /** endof class */ + +/** endof `module Or Internal Object` */ + + diff --git a/types/fibjs/declare/SQLite.d.ts b/types/fibjs/declare/SQLite.d.ts new file mode 100644 index 0000000000..af499cfd03 --- /dev/null +++ b/types/fibjs/declare/SQLite.d.ts @@ -0,0 +1,66 @@ +/*************************************************************************** + * * + * This file was automatically generated with idlc.js * + * build info: * + * - fibjs : 0.25.0 * + * - date : Jun 12 2018 07:22:40 * + * * + ***************************************************************************/ + +/** + * @author Richard + * + */ +/// + + + + +/** module Or Internal Object */ +/** + * @brief sqlite 数据库连接对象 + * @detail 使用 db.open 或 db.openSQLite 创建,创建方式:,```JavaScript,var slite = db.openSQLite("sqlite:/path/to/db");,``` + */ +/// +declare class Class_SQLite extends Class_DbConnection { + + /** + * class prop + * + * + * @brief 当前数据库文件名 + * + * @readonly + * @type String + */ + + fileName: string + + /** + * class prop + * + * + * @brief 查询和设置数据库超时时间,以毫秒为单位 + * + * + * @type Integer + */ + + timeout: number + + + + /** + * + * @brief 备份当前数据库到新文件 + * @param fileName 指定备份的数据库文件名 + * + * @async + */ + backup(fileName: string): void; + +} /** endof class */ + +/** endof `module Or Internal Object` */ + + diff --git a/types/fibjs/declare/SandBox.d.ts b/types/fibjs/declare/SandBox.d.ts new file mode 100644 index 0000000000..fc3152b232 --- /dev/null +++ b/types/fibjs/declare/SandBox.d.ts @@ -0,0 +1,255 @@ +/*************************************************************************** + * * + * This file was automatically generated with idlc.js * + * build info: * + * - fibjs : 0.25.0 * + * - date : Jun 12 2018 07:22:40 * + * * + ***************************************************************************/ + +/** + * @author Richard + * + */ +/// + + + + +/** module Or Internal Object */ +/** + * @brief 安全沙箱对象,用于管理一个独立的运行空间 + * @detail 所有的代码都运行在自己的沙箱中,全局的 require 会调用当前沙箱加载模块,沙箱会通过 require 传递给加载的沙箱。下面的示例创建一个沙箱,限制只允许访问全局基础模块中的 assert 模块,并添加 a 和 b 两个定制模块:,```JavaScript,var vm = require('vm');,var sbox = new vm.SandBox({, a: 100,, b: 200,, assert: require('assert'),});,,var mod_in_sbox = sbox.require('./path/to/mod');,``` + */ + +declare class Class_SandBox extends Class__object { + + /** + * class prop + * + * + * @brief 查询沙箱的 global 对象 + * + * @readonly + * @type Object + */ + + global: object + + /** + * class prop + * + * + * @brief 查询沙箱中现存的所有模块的字典对象 + * + * + * @readonly + * @type Object + */ + + modules: object + + + + /** + * + * @brief 构造一个新的安全沙箱对象,并初始化基础模块 + * @param mods 指定要添加的模块对象字典 + * + * + * + */ + constructor(mods: object); + + /** + * + * @brief 构造一个新的安全沙箱对象,并初始化基础模块 + * @param mods 指定要添加的模块对象字典 + * @param require 自定义 require 函数,当模块不存在时,先调用自定义函数,无返回再从文件中加载 + * + * + * + */ + constructor(mods: object, require: Function); + + /** + * + * @brief 构造一个独立 Global 新的安全沙箱对象,并初始化基础模块 + * @param mods 指定要添加的模块对象字典 + * @param global 指定初始化的 Global 属性 + * + * + * + */ + constructor(mods: object, global: object); + + /** + * + * @brief 构造一个独立 Global 新的安全沙箱对象,并初始化基础模块 + * @param mods 指定要添加的模块对象字典 + * @param require 自定义 require 函数,当模块不存在时,先调用自定义函数,无返回再从文件中加载 + * @param global 指定初始化的 Global 属性 + * + * + * + */ + constructor(mods: object, require: Function, global: object); + + /** + * + * @brief 向沙箱中添加一个基础模块 + * @param id 指定要添加的模块名称,此路径与当前运行脚本无关,必须为绝对路径或者模块名 + * @param mod 指定要添加的模块对象 + * + * + * + */ + add(id: string, mod: any): void; + + /** + * + * @brief 向沙箱中添加一组基础模块 + * @param mods 指定要添加的模块对象字典,添加的 javascript 模块将会生成一份复制,以避免沙箱修改对象产生互相干扰 + * + * + * + */ + add(mods: object): void; + + /** + * + * @brief 向沙箱中添加一个脚本模块 + * @param srcname 指定要添加的脚本名称,srcname 必须包含扩展名,比如 json 或者 js, jsc + * @param script 指定要添加的二进制代码 + * @return 返回加载的模块对象 + * + * + * + */ + addScript(srcname: string, script: Class_Buffer): any; + + /** + * + * @brief 从沙箱中删除指定的基础模块 + * @param id 指定要删除的模块名称,此路径与当前运行脚本无关,必须为绝对路径或者模块名 + * + * + * + */ + remove(id: string): void; + + /** + * + * @brief 从沙箱中检测基础模块是否存在 + * @param id 指定要检测的模块名称,此路径与当前运行脚本无关,必须为绝对路径或者模块名 + * @return 是否存在 + * + * + * + */ + has(id: string): boolean; + + /** + * + * @brief 复制当前沙箱,新沙箱包含当前沙箱的模块,以及相同的名称和 require 函数 + * @return 复制的新沙箱 + * + * + * + */ + clone(): Class_SandBox; + + /** + * + * @brief 冻结当前沙箱,冻结后的沙箱,对 global 所做的修改将被忽略 + * + * + */ + freeze(): void; + + /** + * + * @brief 重新加载沙箱内的模块,此操作只会重新初始化模块,复位模块内的变量,不更新模块代码 + * + * + */ + refresh(): void; + + /** + * + * @brief 运行一个脚本 + * @param fname 指定要运行的脚本路径,此路径与当前运行脚本无关,必须为绝对路径 + * @param argv 指定要运行的参数,此参数可在脚本内使用 argv 获取 + * + * + * + */ + run(fname: string, argv?: any[]/** = v8::Array::New(isolate)*/): void; + + /** + * + * @brief 查询一个模块并返回模块完整文件名 + * @param id 指定要加载的模块名称 + * @param base 指定查找路径 + * @return 返回加载的模块完整文件名 + * + * + * + */ + resolve(id: string, base: string): string; + + /** + * + * @brief 加载一个模块并返回模块对象 + * @param id 指定要加载的模块名称 + * @param base 指定查找路径 + * @return 返回加载的模块对象 + * + * + * + */ + require(id: string, base: string): any; + + /** + * + * @brief 对指定的 extname 添加 compiler, extname 不可为系统内置扩展名 (包括 {'.js', '.json', '.jsc', '.wasm'}), compiler 需返回有效的 javascript 脚本. + * + * ```JavaScript + * var vm = require('vm'); + * var sbox = new vm.SandBox({ + * }); + * + * // 编译 typescript 脚本为 js 并加载 + * sbox.setModuleCompiler('.ts', tsCompiler); + * var mod_ts = sbox.require('./a.ts'); + * + * // 编译 coffee 脚本为 js 并加载 + * sbox.setModuleCompiler('.coffee', cafeCompiler); + * var mod_coffee = sbox.require('./a.coffee'); + * + * // 编译 jsx 脚本为 js 并加载 + * sbox.setModuleCompiler('.jsx', reactCompiler); + * var mod_react = sbox.require('./a.jsx'); + * + * // 编译 yml 脚本为自定义的内容(如 API 集合) 并加载 + * sbox.setModuleCompiler('.yml', yaml2Rest) + * sbox.setModuleCompiler('.yaml', yaml2Rest) + * + * // 编译 markdown 为自定义的内容(如 html 字符串或 XmlDocument 对象) 并加载 + * sbox.setModuleCompiler('.md', mdCompiler) + * sbox.setModuleCompiler('.markdown', mdCompiler) + * ``` + * + * @param extname 指定的 extname, 必须以 '.' 开头, 且为非系统内置扩展名 + * @param compiler 编译回调函数, 所有带 extname 的文件仅会 require 一次. 该回调函数格式为 `compiler(buf, requireInfo)`, buf 为读取到的文件 Buffer, requireInfo 结构为 `{filename: string}`. + * + * + * + */ + setModuleCompiler(extname: string, compiler: Function): void; + +} /** endof class */ + +/** endof `module Or Internal Object` */ + + diff --git a/types/fibjs/declare/SeekableStream.d.ts b/types/fibjs/declare/SeekableStream.d.ts new file mode 100644 index 0000000000..06e0ae7aa2 --- /dev/null +++ b/types/fibjs/declare/SeekableStream.d.ts @@ -0,0 +1,112 @@ +/*************************************************************************** + * * + * This file was automatically generated with idlc.js * + * build info: * + * - fibjs : 0.25.0 * + * - date : Jun 12 2018 07:22:40 * + * * + ***************************************************************************/ + +/** + * @author Richard + * + */ +/// + + + + +/** module Or Internal Object */ +/** + * @brief 可移动当前指针的流对象接口 + * @detail + */ +/// +declare class Class_SeekableStream extends Class_Stream { + + + + /** + * + * @brief 移动文件当前操作位置 + * @param offset 指定新的位置 + * @param whence 指定位置基准,允许的值为:SEEK_SET, SEEK_CUR, SEEK_END + * + * + * + */ + seek(offset: number, whence: number): void; + + /** + * + * @brief 查询流当前位置 + * @return 返回流当前位置 + * + * + * + */ + tell(): number; + + /** + * + * @brief 移动当前位置到流开头 + * + * + */ + rewind(): void; + + /** + * + * @brief 查询流尺寸 + * @return 返回流尺寸 + * + * + * + */ + size(): number; + + /** + * + * @brief 从流内读取剩余的全部数据 + * @return 返回从流内读取的数据,若无数据可读,或者连接中断,则返回 null + * + * + * @async + */ + readAll(): Class_Buffer; + + /** + * + * @brief 修改文件尺寸,如果新尺寸小于原尺寸,则文件被截断 + * @param bytes 新的文件尺寸 + * + * + * @async + */ + truncate(bytes: number): void; + + /** + * + * @brief 查询文件是否到结尾 + * @return 返回 True 表示结尾 + * + * + * + */ + eof(): boolean; + + /** + * + * @brief 查询当前文件的基础信息 + * @return 返回 Stat 对象描述文件信息 + * + * + * @async + */ + stat(): Class_Stat; + +} /** endof class */ + +/** endof `module Or Internal Object` */ + + diff --git a/types/fibjs/declare/Semaphore.d.ts b/types/fibjs/declare/Semaphore.d.ts new file mode 100644 index 0000000000..ac99421d88 --- /dev/null +++ b/types/fibjs/declare/Semaphore.d.ts @@ -0,0 +1,69 @@ +/*************************************************************************** + * * + * This file was automatically generated with idlc.js * + * build info: * + * - fibjs : 0.25.0 * + * - date : Jun 12 2018 07:22:40 * + * * + ***************************************************************************/ + +/** + * @author Richard + * + */ +/// + + + + +/** module Or Internal Object */ +/** + * @brief 纤程信号量对象 + * @detail 信号量对象管理一个内部计数器,此计数器调用 acquire 或者 wait 后减一,调用 release 或者 post 后加一。,计数器不会减至负数,因为 acquire 和 wait 在发现数值为 0 的时候,会休眠当前纤程,直至其它纤程通过 release 或 post 增加计数器的值。,,信号量常用的场合是限制资源并发使用,以及生产者/消费者模式的应用。,,以数据库请求为例,限制资源并发使用的情形:,```JavaScript,var maxconnections = 5;,var l = new coroutine.Semaphore(maxconnections);,,......,,l.acquire();,var conn = connectdb(),.....,conn.close();,l.release();,```,,生产者/消费者模式通常则将信号量与队列配合使用。生产者向队列中加入数据,并 post 一个信号,消费者则先 wait 信号,获取信号后去队查询取数据。 + */ +/// +declare class Class_Semaphore extends Class_Lock { + + + + /** + * + * @brief 信号量构造函数 + * @param value 计数器初始数值 + * + * + * + */ + constructor(value?: number/** = 1*/); + + /** + * + * @brief 等待一个信号量,等同于 acquire(true) + * + * + */ + wait(): void; + + /** + * + * @brief 释放一个信号量,等同于 release() + * + * + */ + post(): void; + + /** + * + * @brief 尝试获取一个信号,如不能获取,则立即返回并返回 false,等同于 acquire(false) + * @return 获取成功则返回 true + * + * + * + */ + trywait(): boolean; + +} /** endof class */ + +/** endof `module Or Internal Object` */ + + diff --git a/types/fibjs/declare/Service.d.ts b/types/fibjs/declare/Service.d.ts new file mode 100644 index 0000000000..7816e2d8bc --- /dev/null +++ b/types/fibjs/declare/Service.d.ts @@ -0,0 +1,176 @@ +/*************************************************************************** + * * + * This file was automatically generated with idlc.js * + * build info: * + * - fibjs : 0.25.0 * + * - date : Jun 12 2018 07:22:40 * + * * + ***************************************************************************/ + +/** + * @author Richard + * + */ +/// + + + + +/** module Or Internal Object */ +/** + * @brief 系统服务管理对象 + * @detail + */ +/// +declare class Class_Service extends Class_EventEmitter { + + /** + * class prop + * + * + * @brief 查询和设置服务名称 + * + * + * @type String + */ + + name: string + + /** + * class prop + * + * + * @brief 查询和绑定服务停止事件,相当于 on("stop", func); + * + * + * @type Function + */ + + onstop: Function + + /** + * class prop + * + * + * @brief 查询和绑定服务暂停事件,相当于 on("pause", func); + * + * + * @type Function + */ + + onpause: Function + + /** + * class prop + * + * + * @brief 查询和绑定服务恢复事件,相当于 on("continue", func); + * + * + * @type Function + */ + + oncontinue: Function + + + + /** + * + * @brief 系统服务管理对象构造函数 + * @param name 服务名称 + * @param worker 服务运行函数 + * @param event 服务事件处理 + * + * + * + */ + constructor(name: string, worker: Function, event?: object/** = v8::Object::New(isolate)*/); + + /** + * + * @brief 开始运行服务实体 + * + * @async + */ + run(): void; + + /** + * + * @brief 安装服务到系统 + * @param name 服务名称 + * @param cmd 服务命令行 + * @param displayName 服务显示名称 + * @param description 服务描述信息 + * + * + * + */ + static install(name: string, cmd: string, displayName?: string/** = ""*/, description?: string/** = ""*/): void; + + /** + * + * @brief 从系统中卸载服务 + * @param name 服务名称 + * + * + * + */ + static remove(name: string): void; + + /** + * + * @brief 启动服务 + * @param name 服务名称 + * + * + * + */ + static start(name: string): void; + + /** + * + * @brief 停止服务 + * @param name 服务名称 + * + * + * + */ + static stop(name: string): void; + + /** + * + * @brief 重启服务 + * @param name 服务名称 + * + * + * + */ + static restart(name: string): void; + + /** + * + * @brief 检测服务是否安装 + * @param name 服务名称 + * @return 服务安装返回 True + * + * + * + */ + static isInstalled(name: string): boolean; + + /** + * + * @brief 检测服务是否运行 + * @param name 服务名称 + * @return 服务运行返回 True + * + * + * + */ + static isRunning(name: string): boolean; + +} /** endof class */ + +/** endof `module Or Internal Object` */ + + diff --git a/types/fibjs/declare/Smtp.d.ts b/types/fibjs/declare/Smtp.d.ts new file mode 100644 index 0000000000..584513c533 --- /dev/null +++ b/types/fibjs/declare/Smtp.d.ts @@ -0,0 +1,146 @@ +/*************************************************************************** + * * + * This file was automatically generated with idlc.js * + * build info: * + * - fibjs : 0.25.0 * + * - date : Jun 12 2018 07:22:40 * + * * + ***************************************************************************/ + +/** + * @author Richard + * + */ +/// + + + + +/** module Or Internal Object */ +/** + * @brief Smtp对象 + * @detail + */ + +declare class Class_Smtp extends Class__object { + + /** + * class prop + * + * + * @brief 查询和设置超时时间 单位毫秒 + * + * + * @type Integer + */ + + timeout: number + + /** + * class prop + * + * + * @brief 查询 Smtp 对象当前连接的 Socket + * + * @readonly + * @type Stream + */ + + socket: Class_Stream + + + + /** + * + * @brief Smtp 对象构造函数 + * + * + */ + constructor(); + + /** + * + * @brief 建立到指定的服务器 + * @param url 指定连接的协议,可以是:tcp://host:port 或者 ssl://host:port + * + * + * @async + */ + connect(url: string): void; + + /** + * + * @brief 发送指定命令,并返回响应,服务器报错则抛出错误 + * @param cmd 命令名 + * @param arg 参数 + * @return 如果成功,返回服务器响应 + * + * + * @async + */ + command(cmd: string, arg: string): string; + + /** + * + * @brief 发送 HELO 命令,服务器报错则抛出错误 + * @param hostname 主机名,缺省为“localhost” + * + * + * @async + */ + hello(hostname?: string/** = "localhost"*/): void; + + /** + * + * @brief 用指定的用户及密码登录服务器,服务器报错则抛出错误 + * @param username 用户名 + * @param password 密码 + * + * + * @async + */ + login(username: string, password: string): void; + + /** + * + * @brief 指定发件人信箱,服务器报错则抛出错误 + * @param address 发件人信箱 + * + * + * @async + */ + from(address: string): void; + + /** + * + * @brief 指定收件人信箱,服务器报错则抛出错误 + * @param address 收件人信箱 + * + * + * @async + */ + to(address: string): void; + + /** + * + * @brief 发送文本到收件人,服务器报错则抛出错误 + * @param txt 要发送的文本 + * + * + * @async + */ + data(txt: string): void; + + /** + * + * @brief 退出并关闭连接,服务器报错则抛出错误 + * + * @async + */ + quit(): void; + +} /** endof class */ + +/** endof `module Or Internal Object` */ + + diff --git a/types/fibjs/declare/Socket.d.ts b/types/fibjs/declare/Socket.d.ts new file mode 100644 index 0000000000..0e44b2e41d --- /dev/null +++ b/types/fibjs/declare/Socket.d.ts @@ -0,0 +1,232 @@ +/*************************************************************************** + * * + * This file was automatically generated with idlc.js * + * build info: * + * - fibjs : 0.25.0 * + * - date : Jun 12 2018 07:22:40 * + * * + ***************************************************************************/ + +/** + * @author Richard + * + */ +/// + + + + + + +/** module Or Internal Object */ +/** + * @brief 网络套接口对象 + * @detail Socket 属于 net 模块,创建方法,```JavaScript,var s = new net.Socket();,``` + */ +/// +declare class Class_Socket extends Class_Stream { + + /** + * class prop + * + * + * @brief 查询当前 Socket 对象的地址集 + * + * @readonly + * @type Integer + */ + + family: number + + /** + * class prop + * + * + * @brief 查询当前 Socket 对象的协议族 + * + * @readonly + * @type Integer + */ + + type: number + + /** + * class prop + * + * + * @brief 查询当前连接的对方地址 + * + * @readonly + * @type String + */ + + remoteAddress: string + + /** + * class prop + * + * + * @brief 查询当前连接的对方端口 + * + * @readonly + * @type Integer + */ + + remotePort: number + + /** + * class prop + * + * + * @brief 查询当前连接的本地地址 + * + * @readonly + * @type String + */ + + localAddress: string + + /** + * class prop + * + * + * @brief 查询当前连接的本地端口 + * + * @readonly + * @type Integer + */ + + localPort: number + + /** + * class prop + * + * + * @brief 查询和设置超时时间 单位毫秒 + * + * + * @type Integer + */ + + timeout: number + + + + /** + * + * @brief Socket 构造函数,创建一个新的 Socket 对象 + * @param family 指定地址集,缺省为 AF_INET,ipv4 + * @param type 指定协议族,缺省为 SOCK_STREAM,tcp + * + * + * + */ + constructor(family?: number/** = undefined*/, type?: number/** = undefined*/); + + /** + * + * @brief 建立一个 tcp 连接 + * @param host 指定对方地址或主机名 + * @param port 指定对方端口 + * + * + * @async + */ + connect(host: string, port: number): void; + + /** + * + * @brief 将当前 Socket 绑定至本地所有地址的指定端口 + * @param port 指定绑定的端口 + * @param allowIPv4 指定是否接受 ipv4 连接,缺省为 true。本参数在 ipv6 时有效,并依赖于操作系统 + * + * + * + */ + bind(port: number, allowIPv4?: boolean/** = true*/): void; + + /** + * + * @brief 将当前 Socket 绑定至指定地址的指定端口 + * @param addr 指定绑定的地址 + * @param port 指定绑定的端口 + * @param allowIPv4 指定是否接受 ipv4 连接,缺省为 true。本参数在 ipv6 时有效,并依赖于操作系统 + * + * + * + */ + bind(addr: string, port: number, allowIPv4?: boolean/** = true*/): void; + + /** + * + * @brief 开始监听连接请求 + * @param backlog 指定请求队列长度,超出的请求将被拒绝,缺省为 120 + * + * + * + */ + listen(backlog?: number/** = 120*/): void; + + /** + * + * @brief 等待并接受一个连接 + * @return 返回接收到得连接对象 + * + * + * @async + */ + accept(): Class_Socket; + + /** + * + * @brief 从连接读取指定大小的数据,不同于 read 方法,recv 并不保证读完要求的数据,而是在读取到数据后立即返回 + * @param bytes 指定要读取的数据量,缺省读取任意尺寸的数据 + * @return 返回从连接读取的数据 + * + * + * @async + */ + recv(bytes?: number/** = -1*/): Class_Buffer; + + /** + * + * @brief 读取一个 UDP 包 + * recvfrom 返回结果中包含以下内容: + * - data: 接收到的二进制数据块 + * - address: 发送方的地址 + * - port: 发送方的端口 + * @param bytes 指定要读取的数据量,缺省读取任意尺寸的数据 + * @return 返回从连接读取的数据包 + * + * + * @async + */ + recvfrom(bytes?: number/** = -1*/): any; + + /** + * + * @brief 将给定的数据写入连接,此方法等效于 write 方法 + * @param data 给定要写入的数据 + * + * + * @async + */ + send(data: Class_Buffer): void; + + /** + * + * @brief 向给定 ip:port 发送一个 UDP 包 + * @param data 给定要写入的数据 + * @param host 指定目标 ip 或主机名 + * @param port 指定目标端口 + * + * + * @async + */ + sendto(data: Class_Buffer, host: string, port: number): void; + +} /** endof class */ + +/** endof `module Or Internal Object` */ + + diff --git a/types/fibjs/declare/SslHandler.d.ts b/types/fibjs/declare/SslHandler.d.ts new file mode 100644 index 0000000000..9b5e6364c6 --- /dev/null +++ b/types/fibjs/declare/SslHandler.d.ts @@ -0,0 +1,106 @@ +/*************************************************************************** + * * + * This file was automatically generated with idlc.js * + * build info: * + * - fibjs : 0.25.0 * + * - date : Jun 12 2018 07:22:40 * + * * + ***************************************************************************/ + +/** + * @author Richard + * + */ +/// + + + + +/** module Or Internal Object */ +/** + * @brief ssl 协议转换处理器 + * @detail 用以将数据流转换为 ssl 流协议。SslHandler 是对 SslSocket 的封装,用于构建服务器,逻辑上相当于:,```JavaScript,var ss = new ssl.Socket(crt, key);,,function(s){, var s1 = ss.accept(s);, hdlr.invoke(s1);, s1.close();,},``` + */ +/// +declare class Class_SslHandler extends Class_Handler { + + /** + * class prop + * + * + * @brief 设定证书验证模式,缺省为 VERIFY_NONE + * + * + * @type Integer + */ + + verification: number + + /** + * class prop + * + * + * @brief 客户端证书验证证书链 + * + * @readonly + * @type X509Cert + */ + + ca: Class_X509Cert + + /** + * class prop + * + * + * @brief ssl 协议转换处理器当前事件处理接口对象 + * + * + * @type Handler + */ + + handler: Class_Handler + + + + /** + * + * @brief SslHandler 构造函数,创建一个新的 SslHandler 对象 + * + * certs 格式为: + * ```JavaScript + * [ + * { + * crt: [X509Cert object], + * key: [PKey object] + * }, + * { + * crt: [X509Cert object], + * key: [PKey object] + * } + * ] + * ``` + * @param certs 服务器证书列表 + * @param hdlr 内置消息处理器,处理函数,链式处理数组,路由对象,详见 mq.Handler + * + * + * + */ + constructor(certs: any[], hdlr: Class_Handler); + + /** + * + * @brief SslHandler 构造函数,创建一个新的 SslHandler 对象 + * @param crt X509Cert 证书,用于客户端验证服务器 + * @param key PKey 私钥,用于与客户端会话 + * @param hdlr 内置消息处理器,处理函数,链式处理数组,路由对象,详见 mq.Handler + * + * + * + */ + constructor(crt: Class_X509Cert, key: Class_PKey, hdlr: Class_Handler); + +} /** endof class */ + +/** endof `module Or Internal Object` */ + + diff --git a/types/fibjs/declare/SslServer.d.ts b/types/fibjs/declare/SslServer.d.ts new file mode 100644 index 0000000000..79b732600b --- /dev/null +++ b/types/fibjs/declare/SslServer.d.ts @@ -0,0 +1,137 @@ +/*************************************************************************** + * * + * This file was automatically generated with idlc.js * + * build info: * + * - fibjs : 0.25.0 * + * - date : Jun 12 2018 07:22:40 * + * * + ***************************************************************************/ + +/** + * @author Richard + * + */ +/// + + + + +/** module Or Internal Object */ +/** + * @brief ssl 服务器对象,可方便创建一个标准多纤程 ssl 服务器 + * @detail SslServer 对象是将 TcpServer 和 SslHandler 组合封装的对象,方便快速搭建服务器,逻辑上相当于:,```JavaScript,var svr = new net.SslServer(addr, port, new ssl.Handler(crt, key, function(req){, ...,}));,```,,创建方法:,```JavaScript,var ssl = require("ssl");,var svr = new http.Server(crt, key, function(req){, ...,});,``` + */ +/// +declare class Class_SslServer extends Class_TcpServer { + + /** + * class prop + * + * + * @brief 设定证书验证模式,缺省为 VERIFY_NONE + * + * + * @type Integer + */ + + verification: number + + /** + * class prop + * + * + * @brief 客户端证书验证证书链 + * + * @readonly + * @type X509Cert + */ + + ca: Class_X509Cert + + + + /** + * + * @brief SslServer 构造函数,在所有本机地址侦听 + * + * certs 格式为: + * ```JavaScript + * [ + * { + * crt: [X509Cert object], + * key: [PKey object] + * }, + * { + * crt: [X509Cert object], + * key: [PKey object] + * } + * ] + * ``` + * @param certs 服务器证书列表 + * @param port 指定 ssl 服务器侦听端口 + * @param listener 指定 ssl 接收到的内置消息处理器,处理函数,链式处理数组,路由对象,详见 mq.Handler + * + * + * + */ + constructor(certs: any[], port: number, listener: Class_Handler); + + /** + * + * @brief SslServer 构造函数 + * + * certs 格式为: + * ```JavaScript + * [ + * { + * crt: [X509Cert object], + * key: [PKey object] + * }, + * { + * crt: [X509Cert object], + * key: [PKey object] + * } + * ] + * ``` + * @param certs 服务器证书列表 + * @param addr 指定 ssl 服务器侦听地址,为 "" 则在本机所有地址侦听 + * @param port 指定 ssl 服务器侦听端口 + * @param listener 指定 ssl 接收到的连接的内置消息处理器,处理函数,链式处理数组,路由对象,详见 mq.Handler + * + * + * + */ + constructor(certs: any[], addr: string, port: number, listener: Class_Handler); + + /** + * + * @brief SslServer 构造函数,在所有本机地址侦听 + * @param crt X509Cert 证书,用于客户端验证服务器 + * @param key PKey 私钥,用于与客户端会话 + * @param port 指定 ssl 服务器侦听端口 + * @param listener 指定 ssl 接收到的内置消息处理器,处理函数,链式处理数组,路由对象,详见 mq.Handler + * + * + * + */ + constructor(crt: Class_X509Cert, key: Class_PKey, port: number, listener: Class_Handler); + + /** + * + * @brief SslServer 构造函数 + * @param crt X509Cert 证书,用于客户端验证服务器 + * @param key PKey 私钥,用于与客户端会话 + * @param addr 指定 ssl 服务器侦听地址,为 "" 则在本机所有地址侦听 + * @param port 指定 ssl 服务器侦听端口 + * @param listener 指定 ssl 接收到的连接的内置消息处理器,处理函数,链式处理数组,路由对象,详见 mq.Handler + * + * + * + */ + constructor(crt: Class_X509Cert, key: Class_PKey, addr: string, port: number, listener: Class_Handler); + +} /** endof class */ + +/** endof `module Or Internal Object` */ + + diff --git a/types/fibjs/declare/SslSocket.d.ts b/types/fibjs/declare/SslSocket.d.ts new file mode 100644 index 0000000000..7406b0d2f3 --- /dev/null +++ b/types/fibjs/declare/SslSocket.d.ts @@ -0,0 +1,139 @@ +/*************************************************************************** + * * + * This file was automatically generated with idlc.js * + * build info: * + * - fibjs : 0.25.0 * + * - date : Jun 12 2018 07:22:40 * + * * + ***************************************************************************/ + +/** + * @author Richard + * + */ +/// + + + + +/** module Or Internal Object */ +/** + * @brief ssl 网络套接口对象 + * @detail SslSocket 属于 ssl 模块,创建方法,```JavaScript,var s = new ssl.Socket();,``` + */ +/// +declare class Class_SslSocket extends Class_Stream { + + /** + * class prop + * + * + * @brief 设定证书验证模式,缺省为 VERIFY_REQUIRED + * + * + * @type Integer + */ + + verification: number + + /** + * class prop + * + * + * @brief 证书链,客户端模式 connect 时自动引用 ssl.ca,服务器模式 accept 生成 SslSocket 自动引用当前 SslSocket 的 ca + * + * @readonly + * @type X509Cert + */ + + ca: Class_X509Cert + + /** + * class prop + * + * + * @brief 连接对方的证书 + * + * @readonly + * @type X509Cert + */ + + peerCert: Class_X509Cert + + /** + * class prop + * + * + * @brief 查询消息 ssl 建立时的下层流对象 + * + * @readonly + * @type Stream + */ + + stream: Class_Stream + + + + /** + * + * @brief SslSocket 构造函数,创建一个新的 SslSocket 对象 + * + * certs 格式为: + * ```JavaScript + * [ + * { + * crt: [X509Cert object], + * key: [PKey object] + * }, + * { + * crt: [X509Cert object], + * key: [PKey object] + * } + * ] + * ``` + * @param certs 服务器证书列表 + * + * + * + */ + constructor(certs?: any[]/** = v8::Array::New(isolate)*/); + + /** + * + * @brief SslSocket 构造函数,创建一个新的 SslSocket 对象 + * @param crt X509Cert 证书,用于客户端验证服务器 + * @param key PKey 私钥,用于与客户端会话 + * + * + * + */ + constructor(crt: Class_X509Cert, key: Class_PKey); + + /** + * + * @brief 在给定的连接上连接 ssl 连接,客户端模式 + * @param s 给定的底层连接 + * @param server_name 指定服务器名称,可缺省 + * @return 连接成功返回 0,证书可选验证时,验证不成功则返回非 0,详细错误见 ssl 模块 + * + * + * @async + */ + connect(s: Class_Stream, server_name?: string/** = ""*/): number; + + /** + * + * @brief 在给定的连接上接收一个 ssl 连接,并生成一个新的 SslSocket + * @param s 给定的底层连接 + * @return 返回新建立的 SslSocket 对象 + * + * + * @async + */ + accept(s: Class_Stream): Class_SslSocket; + +} /** endof class */ + +/** endof `module Or Internal Object` */ + + diff --git a/types/fibjs/declare/Stat.d.ts b/types/fibjs/declare/Stat.d.ts new file mode 100644 index 0000000000..545a9c8e1d --- /dev/null +++ b/types/fibjs/declare/Stat.d.ts @@ -0,0 +1,219 @@ +/*************************************************************************** + * * + * This file was automatically generated with idlc.js * + * build info: * + * - fibjs : 0.25.0 * + * - date : Jun 12 2018 07:22:40 * + * * + ***************************************************************************/ + +/** + * @author Richard + * + */ +/// + + + + +/** module Or Internal Object */ +/** + * @brief 文件的基础信息对象 + * @detail Stat 对象通过 fs.stat, File.stat, fs.readdir 查询,不可独立创建 + */ + +declare class Class_Stat extends Class__object { + + /** + * class prop + * + * + * @brief 文件名称 + * + * @readonly + * @type String + */ + + name: string + + /** + * class prop + * + * + * @brief 文件尺寸 + * + * @readonly + * @type Long + */ + + size: number + + /** + * class prop + * + * + * @brief 文件权限,Windows 不支持此属性 + * + * @readonly + * @type Integer + */ + + mode: number + + /** + * class prop + * + * + * @brief 文件最后修改时间 + * + * @readonly + * @type Date + */ + + mtime: Date + + /** + * class prop + * + * + * @brief 文件最后访问时间 + * + * @readonly + * @type Date + */ + + atime: Date + + /** + * class prop + * + * + * @brief 文件创建时间 + * + * @readonly + * @type Date + */ + + ctime: Date + + /** + * class prop + * + * + * @brief 文件拥有者的id + * + * @readonly + * @type Integer + */ + + uid: number + + /** + * class prop + * + * + * @brief 文件所属的组id + * + * @readonly + * @type Integer + */ + + gid: number + + + + /** + * + * @brief 查询文件是否有写入权限 + * @return 为 true 则有写入权限 + * + * + * + */ + isWritable(): boolean; + + /** + * + * @brief 查询文件是否有读权限 + * @return 为 true 则有读权限 + * + * + * + */ + isReadable(): boolean; + + /** + * + * @brief 查询文件是否有执行权限 + * @return 为 true 则有执行权限 + * + * + * + */ + isExecutable(): boolean; + + /** + * + * @brief 查询文件是否隐藏 + * @return 为 true 则隐藏 + * + * + * + */ + isHidden(): boolean; + + /** + * + * @brief 查询文件是否是目录 + * @return 为 true 则是目录 + * + * + * + */ + isDirectory(): boolean; + + /** + * + * @brief 查询文件是否是文件 + * @return 为 true 则是文件 + * + * + * + */ + isFile(): boolean; + + /** + * + * @brief 查询文件是否是符号链接 + * @return 为 true 则是符号链接 + * + * + * + */ + isSymbolicLink(): boolean; + + /** + * + * @brief 查询文件是否是内存文件 + * @return 为 true 则是内存文件 + * + * + * + */ + isMemory(): boolean; + + /** + * + * @brief 查询文件是否是 Socket + * @return 为 true 则是 Socket + * + * + * + */ + isSocket(): boolean; + +} /** endof class */ + +/** endof `module Or Internal Object` */ + + diff --git a/types/fibjs/declare/Stats.d.ts b/types/fibjs/declare/Stats.d.ts new file mode 100644 index 0000000000..291795b34a --- /dev/null +++ b/types/fibjs/declare/Stats.d.ts @@ -0,0 +1,103 @@ +/*************************************************************************** + * * + * This file was automatically generated with idlc.js * + * build info: * + * - fibjs : 0.25.0 * + * - date : Jun 12 2018 07:22:40 * + * * + ***************************************************************************/ + +/** + * @author Richard + * + */ +/// + + + + +/** module Or Internal Object */ +/** + * @brief 数据统计对象,用以构建应用运行时数据收集 + * @detail 创建方法:,```JavaScript,var util = require("util");,var stats = new util.Stats(["begin", "end", "error"]);,```,一些内部对象会提供预先定义的的统计对象 + */ + +declare class Class_Stats extends Class__object { + + + + /** + * + * @brief 数据统计对象构造方法 + * @param keys 指定计数器的名称 + * + * + * + */ + constructor(keys: any[]); + + /** + * + * @brief 数据统计对象构造方法 + * @param staticKeys 指定静态计数器的名称,静态计数器不会被 reset + * @param keys 指定计数器的名称 + * + * + * + */ + constructor(staticKeys: any[], keys: any[]); + + /** + * + * @brief 指定的计数器增一 + * @param key 指定计数器名称 + * + * + * + */ + inc(key: string): void; + + /** + * + * @brief 指定的计数器减一 + * @param key 指定计数器名称 + * + * + * + */ + dec(key: string): void; + + /** + * + * @brief 指定的计数器加指定值 + * @param key 指定计数器名称 + * @param value 指定数值 + * + * + * + */ + add(key: string, value: number): void; + + /** + * + * @brief 初始化计数器,除 staticKeys 指定的计数器全部清零 + * + * + */ + reset(): void; + + /** + * + * @brief 查询上次 reset 到现在的运行时间 + * @return 返回上次 reset 到现在的运行时间 + * + * + * + */ + uptime(): number; + +} /** endof class */ + +/** endof `module Or Internal Object` */ + + diff --git a/types/fibjs/declare/Stream.d.ts b/types/fibjs/declare/Stream.d.ts new file mode 100644 index 0000000000..301d422e91 --- /dev/null +++ b/types/fibjs/declare/Stream.d.ts @@ -0,0 +1,82 @@ +/*************************************************************************** + * * + * This file was automatically generated with idlc.js * + * build info: * + * - fibjs : 0.25.0 * + * - date : Jun 12 2018 07:22:40 * + * * + ***************************************************************************/ + +/** + * @author Richard + * + */ +/// + + + + +/** module Or Internal Object */ +/** + * @brief 流操作对象,用于二进制数据流读写 + * @detail Stream 为基础对象,用于为流处理定义标准借口,不能独立创建 + */ + +declare class Class_Stream extends Class__object { + + + + /** + * + * @brief 从流内读取指定大小的数据 + * @param bytes 指定要读取的数据量,缺省为读取随机大小的数据块,读出的数据尺寸取决于设备 + * @return 返回从流内读取的数据,若无数据可读,或者连接中断,则返回 null + * + * + * @async + */ + read(bytes?: number/** = -1*/): Class_Buffer; + + /** + * + * @brief 将给定的数据写入流 + * @param data 给定要写入的数据 + * + * + * @async + */ + write(data: Class_Buffer): void; + + /** + * + * @brief 将文件缓冲区内容写入物理设备 + * + * @async + */ + flush(): void; + + /** + * + * @brief 关闭当前流对象 + * + * @async + */ + close(): void; + + /** + * + * @brief 复制流数据到目标流中 + * @param stm 目标流对象 + * @param bytes 复制的字节数 + * @return 返回复制的字节数 + * + * + * @async + */ + copyTo(stm: Class_Stream, bytes?: number/** = -1*/): number; + +} /** endof class */ + +/** endof `module Or Internal Object` */ + + diff --git a/types/fibjs/declare/StringDecoder.d.ts b/types/fibjs/declare/StringDecoder.d.ts new file mode 100644 index 0000000000..a03c9ccadc --- /dev/null +++ b/types/fibjs/declare/StringDecoder.d.ts @@ -0,0 +1,146 @@ +/*************************************************************************** + * * + * This file was automatically generated with idlc.js * + * build info: * + * - fibjs : 0.25.0 * + * - date : Jun 12 2018 07:22:40 * + * * + ***************************************************************************/ + +/** + * @author Richard + * + */ +/// + + + + +/** module Or Internal Object */ +/** + * @brief 流解码对象 + * @detail + */ + +declare class Class_StringDecoder extends Class__object { + + /** + * class prop + * + * + * @brief 内部使用。 + * + * + * @type Integer + */ + + lastNeed: number + + /** + * class prop + * + * + * @brief 内部使用。 + * + * + * @type Integer + */ + + lastTotal: number + + /** + * class prop + * + * + * @brief 内部使用。 + * + * + * @type Buffer + */ + + lastChar: Class_Buffer + + /** + * class prop + * + * + * @brief 解码编码.内部使用。 + * + * + * @type String + */ + + encoding: string + + + + /** + * + * @brief 解码器构造函数 + * @param encoding 解码编码. 默认 'utf8'. + * + * + * + */ + constructor(encoding?: string/** = "utf8"*/); + + /** + * + * @brief 将内部存留的 buffer 作为字符返回。不完整的 UTF-8 和 UTF-16 字节会尝试补全。 + * @return 解码后的字符串. + * + * + * + */ + end(): string; + + /** + * + * @brief 将内部存留的 buffer 作为字符返回。不完整的 UTF-8 和 UTF-16 字节会尝试补全。 + * @param buf 需要解码的 Buffer. 在执行 end 之前,会先调用 write 将 buffer 写入。 + * @return 解码后的字符串. + * + * + * + */ + end(buf: Class_Buffer): string; + + /** + * + * @brief 返回一个解码后的字符串, 确保任何非完整的末尾字符被省略此次不返回,并被存储在内部供下一次的 write 或者 end 方法使用。 + * @param buf 需要解码的 Buffer。 + * @return 解码后的字符串. + * + * + * + */ + write(buf: Class_Buffer): string; + + /** + * + * @brief 内部使用。. + * @param buf 需要解码的 Buffer。 + * @param offset 解码偏移量 + * @return 解码后的字符串. + * + * + * + */ + text(buf: Class_Buffer, offset: number): string; + + /** + * + * @brief 内部使用。. + * @param buf A Buffer containing the bytes to decode. + * @return 解码后的字符串. + * + * + * + */ + fillLast(buf: Class_Buffer): string; + +} /** endof class */ + +/** endof `module Or Internal Object` */ + + diff --git a/types/fibjs/declare/SubProcess.d.ts b/types/fibjs/declare/SubProcess.d.ts new file mode 100644 index 0000000000..59fe0da0c3 --- /dev/null +++ b/types/fibjs/declare/SubProcess.d.ts @@ -0,0 +1,103 @@ +/*************************************************************************** + * * + * This file was automatically generated with idlc.js * + * build info: * + * - fibjs : 0.25.0 * + * - date : Jun 12 2018 07:22:40 * + * * + ***************************************************************************/ + +/** + * @author Richard + * + */ +/// + + + + +/** module Or Internal Object */ +/** + * @brief 子进程对象 + * @detail ```JavaScript,var process = require("process");,var sub = process.open("ls");,``` + */ +/// +declare class Class_SubProcess extends Class_BufferedStream { + + /** + * class prop + * + * + * @brief 读取当前对象指向的进程的 id + * + * + * @readonly + * @type Integer + */ + + pid: number + + /** + * class prop + * + * + * @brief 读取当前对象指向的进程的标准输入对象 + * + * + * @readonly + * @type BufferedStream + */ + + stdin: Class_BufferedStream + + /** + * class prop + * + * + * @brief 读取当前对象指向的进程的标准输出对象 + * + * + * @readonly + * @type BufferedStream + */ + + stdout: Class_BufferedStream + + + + /** + * + * @brief 杀掉当前对象指向的进程,并传递信号 + * @param signal 传递的信号 + * + * + * + */ + kill(signal: number): void; + + /** + * + * @brief 等待当前对象指向的进程结束,并返回进程结束代码 + * @return 进程的结束代码 + * + * + * @async + */ + wait(): number; + + /** + * + * @brief 查询当前对象所指向的进程是否存在指定名称的窗口,仅限 windows + * @param name 窗口名称 + * @return 窗口存在则返回窗口的 rect,否则返回 undefined + * + * + * + */ + findWindow(name: string): any; + +} /** endof class */ + +/** endof `module Or Internal Object` */ + + diff --git a/types/fibjs/declare/TcpServer.d.ts b/types/fibjs/declare/TcpServer.d.ts new file mode 100644 index 0000000000..19d9ddcfb9 --- /dev/null +++ b/types/fibjs/declare/TcpServer.d.ts @@ -0,0 +1,127 @@ +/*************************************************************************** + * * + * This file was automatically generated with idlc.js * + * build info: * + * - fibjs : 0.25.0 * + * - date : Jun 12 2018 07:22:40 * + * * + ***************************************************************************/ + +/** + * @author Richard + * + */ +/// + + + + +/** module Or Internal Object */ +/** + * @brief tcp 服务器对象,可方便创建一个标准多纤程 tcp 服务器 + * @detail 使用 TcpServer 对象可以迅速创建一个多纤程并发处理的 tcp 服务器。,```JavaScript,function func(conn),{, var data;,, while(data = conn.read()), conn.write(data);,, conn.close();,},,new net.TcpServer(8080, func).run();,``` + */ + +declare class Class_TcpServer extends Class__object { + + /** + * class prop + * + * + * @brief 服务器当前侦听的 Socket 对象 + * + * @readonly + * @type Socket + */ + + socket: Class_Socket + + /** + * class prop + * + * + * @brief 服务器当前事件处理接口对象 + * + * + * @type Handler + */ + + handler: Class_Handler + + /** + * class prop + * + * + * @brief 查询当前服务器运行状态 + * + * 返回的结果为一个 Stats 对象,初始化计数器如下: + * ```JavaScript + * { + * total : 1000, // 总计处理的连接 + * connections : 100, // 当前正在处理的连接 + * accept : 10, // 上次查询后新建的连接 + * close : 10 // 上次查询后关闭的连接 + * } + * ``` + * + * + * @readonly + * @type Stats + */ + + stats: Class_Stats + + + + /** + * + * @brief TcpServer 构造函数,在所有本机地址侦听 + * @param port 指定 tcp 服务器侦听端口 + * @param listener 指定 tcp 接收到的内置消息处理器,处理函数,链式处理数组,路由对象,详见 mq.Handler + * + * + * + */ + constructor(port: number, listener: Class_Handler); + + /** + * + * @brief TcpServer 构造函数 + * @param addr 指定 tcp 服务器侦听地址,为 "" 则在本机所有地址侦听 + * @param port 指定 tcp 服务器侦听端口 + * @param listener 指定 tcp 接收到的连接的内置消息处理器,处理函数,链式处理数组,路由对象,详见 mq.Handler + * + * + * + */ + constructor(addr: string, port: number, listener: Class_Handler); + + /** + * + * @brief 运行服务器并开始接收和分发连接,此函数不会返回 + * + * @async + */ + run(): void; + + /** + * + * @brief 异步运行服务器并开始接收和分发连接,调用后立即返回,服务器在后台运行 + * + * + */ + asyncRun(): void; + + /** + * + * @brief 关闭 socket中止正在运行的服务器 + * + * @async + */ + stop(): void; + +} /** endof class */ + +/** endof `module Or Internal Object` */ + + diff --git a/types/fibjs/declare/Timer.d.ts b/types/fibjs/declare/Timer.d.ts new file mode 100644 index 0000000000..c18b313cc9 --- /dev/null +++ b/types/fibjs/declare/Timer.d.ts @@ -0,0 +1,73 @@ +/*************************************************************************** + * * + * This file was automatically generated with idlc.js * + * build info: * + * - fibjs : 0.25.0 * + * - date : Jun 12 2018 07:22:40 * + * * + ***************************************************************************/ + +/** + * @author Richard + * + */ +/// + + + + +/** module Or Internal Object */ +/** + * @brief 定时器处理器对象 + * @detail + */ + +declare class Class_Timer extends Class__object { + + /** + * class prop + * + * + * @brief 查询当前定时器是否已经终止 + * + * @readonly + * @type Boolean + */ + + stopped: boolean + + + + /** + * + * @brief 维持 fibjs 进程不退出,在定时器等待期间阻止 fibjs 进程退出 + * @return 返回定时器对象 + * + * + * + */ + ref(): Class_Timer; + + /** + * + * @brief 允许 fibjs 进程退出,在定时器等待期间允许 fibjs 进程退出 + * @return 返回定时器对象 + * + * + * + */ + unref(): Class_Timer; + + /** + * + * @brief 取消当前定时器 + * + * + */ + clear(): void; + +} /** endof class */ + +/** endof `module Or Internal Object` */ + + diff --git a/types/fibjs/declare/UrlObject.d.ts b/types/fibjs/declare/UrlObject.d.ts new file mode 100644 index 0000000000..5baa5b2d7d --- /dev/null +++ b/types/fibjs/declare/UrlObject.d.ts @@ -0,0 +1,279 @@ +/*************************************************************************** + * * + * This file was automatically generated with idlc.js * + * build info: * + * - fibjs : 0.25.0 * + * - date : Jun 12 2018 07:22:40 * + * * + ***************************************************************************/ + +/** + * @author Richard + * + */ +/// + + + + +/** module Or Internal Object */ +/** + * @brief Url 处理对象 + * @detail 基础模块。提供 url 的格式化,解析与拼装,```JavaScript,var url = new net.Url('http://www.xici.net/');,var url = new net.Url({protocol: 'http:', hostname:'www.xici.net', pathname:'/'});,``` + */ + +declare class Class_UrlObject extends Class__object { + + /** + * class prop + * + * + * @brief 查询和设置当前 UrlObject 对象中的完整 url 地址描述,此描述由其他所有属性组装而成 + * + * + * + * @type String + */ + + href: string + + /** + * class prop + * + * + * @brief 查询和设置当前 UrlObject 对象中的协议名称 + * + * + * + * @type String + */ + + protocol: string + + /** + * class prop + * + * + * @brief 查询和设置当前 UrlObject 对象是否包含双斜杠 + * + * + * + * @type Boolean + */ + + slashes: boolean + + /** + * class prop + * + * + * @brief 查询和设置当前 UrlObject 对象中的完整验证字符串,由 username 和 password 属性组装而成 + * + * + * + * @type String + */ + + auth: string + + /** + * class prop + * + * + * @brief 查询和设置当前 UrlObject 对象中的验证用户 + * + * + * + * @type String + */ + + username: string + + /** + * class prop + * + * + * @brief 查询和设置当前 UrlObject 对象中的验证密码 + * + * + * + * @type String + */ + + password: string + + /** + * class prop + * + * + * @brief 查询和设置当前 UrlObject 对象中的完整主机描述,由 hastname 和 port 组装而成 + * + * + * + * @type String + */ + + host: string + + /** + * class prop + * + * + * @brief 查询和设置当前 UrlObject 对象中的主机名 + * + * + * + * @type String + */ + + hostname: string + + /** + * class prop + * + * + * @brief 查询和设置当前 UrlObject 对象中的端口号 + * + * + * + * @type String + */ + + port: string + + /** + * class prop + * + * + * @brief 查询和设置当前 UrlObject 对象中的请求完整路径(含请求),由 pathname 和 query 组装而成 + * + * + * + * @type String + */ + + path: string + + /** + * class prop + * + * + * @brief 查询和设置当前 UrlObject 对象中的路径 + * + * + * + * @type String + */ + + pathname: string + + /** + * class prop + * + * + * @brief 查询和设置当前 UrlObject 对象中的请求字符串(含“?”),等效于“?”+query + * + * + * + * @type String + */ + + search: string + + /** + * class prop + * + * + * @brief 查询和设置当前 UrlObject 对象中的请求字符串( 不含“?”) + * + * + * + * @type Value + */ + + query: any + + /** + * class prop + * + * + * @brief 查询和设置当前 UrlObject 对象中的请求锚点(含“\#”) + * + * + * + * @type String + */ + + hash: string + + + + /** + * + * @brief UrlObject 对象构造函数,使用参数构造 + * @param args 指定构造参数的字典对象,支持的字段有:protocol, slashes, username, password, hostname, port, pathname, query, hash + * + * + * + */ + constructor(args: object); + + /** + * + * @brief UrlObject 对象构造函数,使用 url 字符串构造 + * @param url 指定构造 url 字符串 + * @param parseQueryString 指定是否解析 query + * @param slashesDenoteHost 默认为false, 如果设置为true,则从字符串'//'之后到下一个'/'之前的字符串会被解析为host,例如'//foo/bar', 结果应该是{host: 'foo', pathname: '/bar'}而不是{pathname: '//foo/bar'} + * + * + * + */ + constructor(url?: string/** = ""*/, parseQueryString?: boolean/** = false*/, slashesDenoteHost?: boolean/** = false*/); + + /** + * + * @brief 解析一个 url 字符串 + * @param url 指定需要解析的 url 字符串 + * @param parseQueryString 指定是否解析 query + * @param slashesDenoteHost 默认为false, 如果设置为true,则从字符串'//'之后到下一个'/'之前的字符串会被解析为host,例如'//foo/bar', 结果应该是{host: 'foo', pathname: '/bar'}而不是{pathname: '//foo/bar'} + * + * + * + */ + parse(url: string, parseQueryString?: boolean/** = false*/, slashesDenoteHost?: boolean/** = false*/): void; + + /** + * + * @brief 使用指定的参数构造 UrlObject + * @param args 指定构造参数的字典对象,支持的字段有:protocol, slashes, username, password, hostname, port, pathname, query, hash + * + * + * + */ + format(args: object): void; + + /** + * + * @brief 重定位 url 路径,自动识别新路径为相对路径还是绝对路径 + * @param url 指定新的路径 + * @return 返回包含重定位数据的对象 + * + * + * + */ + resolve(url: string): Class_UrlObject; + + /** + * + * @brief 标准化路径 + * + * + * + */ + normalize(): void; + +} /** endof class */ + +/** endof `module Or Internal Object` */ + + diff --git a/types/fibjs/declare/WebSocket.d.ts b/types/fibjs/declare/WebSocket.d.ts new file mode 100644 index 0000000000..3054397004 --- /dev/null +++ b/types/fibjs/declare/WebSocket.d.ts @@ -0,0 +1,192 @@ +/*************************************************************************** + * * + * This file was automatically generated with idlc.js * + * build info: * + * - fibjs : 0.25.0 * + * - date : Jun 12 2018 07:22:40 * + * * + ***************************************************************************/ + +/** + * @author Richard + * + */ +/// + + + + +/** module Or Internal Object */ +/** + * @brief WebSocket 包协议转换处理器 + * @detail 用以将 Http 协议转换为 WebSocket 包协议消息。创建方式:,```JavaScript,var ws = require('ws');,var http = require('http');,,var serv = new http.Server(8811, ws.upgrade((conn) => {,conn.onmessage = msg => {, conn.send(new Date());,};,}));,,serv.run(r => 0);,,var sock = new ws.Socket('ws://127.0.0.1:8811');,sock.on('open', () => {, setInterval(() => {, sock.send('get date');, }, 1000);,});,,sock.onmessage = evt => {, console.log(evt.data);,},``` + */ +/// +declare class Class_WebSocket extends Class_EventEmitter { + + /** + * class prop + * + * + * @brief 查询当前对象连接的服务器 + * + * @readonly + * @type String + */ + + url: string + + /** + * class prop + * + * + * @brief 查询当前对象连接时的协议 + * + * @readonly + * @type String + */ + + protocol: string + + /** + * class prop + * + * + * @brief 查询当前对象连接的源 + * + * @readonly + * @type String + */ + + origin: string + + /** + * class prop + * + * + * @brief 查询当前对象的连接状态,参见 ws + * + * @readonly + * @type Integer + */ + + readyState: number + + /** + * class prop + * + * + * @brief 查询和绑定连接成功事件,相当于 on("open", func); + * + * + * @type Function + */ + + onopen: Function + + /** + * class prop + * + * + * @brief 查询和绑定接受到对方消息的事件,相当于 on("message", func); + * + * + * @type Function + */ + + onmessage: Function + + /** + * class prop + * + * + * @brief 查询和绑定连接关闭的事件,相当于 on("close", func); + * + * + * @type Function + */ + + onclose: Function + + /** + * class prop + * + * + * @brief 查询和绑定错误发生的事件,相当于 on("error", func); + * + * + * @type Function + */ + + onerror: Function + + + + /** + * + * @brief WebSocket 构造函数 + * @param url 指定连接的服务器 + * @param protocol 指定握手协议,缺省为 "" + * @param origin 指定握手时模拟的源 + * + * + * + */ + constructor(url: string, protocol?: string/** = ""*/, origin?: string/** = ""*/); + + /** + * + * @brief 关闭当前连接,此操作会向对方发送 CLOSE 数据包,并等待对方响应 + * @param code 指定关闭的代码,允许值为 3000-4999 或者 1000,缺省为 1000 + * @param reason 指定关闭的原因,缺省为 "" + * + * + * + */ + close(code?: number/** = 1000*/, reason?: string/** = ""*/): void; + + /** + * + * @brief 向对方发送一段文本 + * @param data 指定发送的文本 + * + * + * + */ + send(data: string): void; + + /** + * + * @brief 向对方发送一段二进制数据 + * @param data 指定发送的二进制数据 + * + * + * + */ + send(data: Class_Buffer): void; + + /** + * + * @brief 维持 fibjs 进程不退出,在对象绑定期间阻止 fibjs 进程退出 + * @return 返回当前对象 + * + * + * + */ + ref(): Class_WebSocket; + + /** + * + * @brief 允许 fibjs 进程退出,在对象绑定期间允许 fibjs 进程退出 + * @return 返回当前对象 + * + * + * + */ + unref(): Class_WebSocket; + +} /** endof class */ + +/** endof `module Or Internal Object` */ + + diff --git a/types/fibjs/declare/WebSocketMessage.d.ts b/types/fibjs/declare/WebSocketMessage.d.ts new file mode 100644 index 0000000000..14008263b7 --- /dev/null +++ b/types/fibjs/declare/WebSocketMessage.d.ts @@ -0,0 +1,84 @@ +/*************************************************************************** + * * + * This file was automatically generated with idlc.js * + * build info: * + * - fibjs : 0.25.0 * + * - date : Jun 12 2018 07:22:40 * + * * + ***************************************************************************/ + +/** + * @author Richard + * + */ +/// + + + + + + +/** module Or Internal Object */ +/** + * @brief websocket 消息对象 + * @detail 创建方法:,```JavaScript,var ws = require("ws");,,var msg = new ws.Message();,``` + */ +/// +declare class Class_WebSocketMessage extends Class_Message { + + /** + * class prop + * + * + * @brief 查询和读取 websocket 掩码标记,缺省为 true + * + * + * @type Boolean + */ + + masked: boolean + + /** + * class prop + * + * + * @brief 查询和读取 websocket 压缩状态,缺省为 false + * + * + * @type Boolean + */ + + compress: boolean + + /** + * class prop + * + * + * @brief 查询和设置最大包尺寸,以字节为单位,缺省为 67108864(64M) + * + * + * @type Integer + */ + + maxSize: number + + + + /** + * + * @brief 包处理消息对象构造函数 + * @param type websocket 消息类型,缺省为 websocket.BINARY + * @param masked websocket 消息掩码,缺省为 true + * @param compress 标记消息是否压缩,缺省为 false + * @param maxSize 最大包尺寸,以 MB 为单位,缺省为 67108864(64M) + * + * + * + */ + constructor(type?: number/** = undefined*/, masked?: boolean/** = true*/, compress?: boolean/** = false*/, maxSize?: number/** = 67108864*/); + +} /** endof class */ + +/** endof `module Or Internal Object` */ + + diff --git a/types/fibjs/declare/WebView.d.ts b/types/fibjs/declare/WebView.d.ts new file mode 100644 index 0000000000..a5035b662e --- /dev/null +++ b/types/fibjs/declare/WebView.d.ts @@ -0,0 +1,172 @@ +/*************************************************************************** + * * + * This file was automatically generated with idlc.js * + * build info: * + * - fibjs : 0.25.0 * + * - date : Jun 12 2018 07:22:40 * + * * + ***************************************************************************/ + +/** + * @author Richard + * + */ +/// + + + + +/** module Or Internal Object */ +/** + * @brief 浏览器窗口对象 + * @detail WebView 是一个嵌入浏览器的窗口组件,目前仅支持 windows ie。,,由于 WebView 内的 JavaScript 程序与 fibjs 并不在同一个引擎内,所以如果需要与宿主程序进行通讯,需要通过消息进行。,,WebView 用于通讯的对象是 external,external 支持一个方法 postMessage 和两个事件 onmessage、onclose。,,一个简单的通讯示例代码如下:,```JavaScript,// index.js,var gui = require('gui');,var webview = gui.open('fs:index.html');,,webview.onmessage = msg => console.log(msg);,,webview.onload = evt => webview.postMessage("hello from fibjs");,,webview.wait();,```,,index.html 的内容如下:,```html,,```, 在用户窗口关闭之前,会触发 external.onclose 事件,external.onclose 可以决定是否关闭。如果 external.onclose 返回 false,则此次操作取消,否则将关闭窗口。,,以下的例子,会在用户点关闭后等待 5 秒后再关闭窗口。,```html,,```,上面的代码中,因为 window.close 本身也会触发 onclose 事件,所以需要增加一个开关变量,用于识别是否需要处理此次事件。 + */ +/// +declare class Class_WebView extends Class_EventEmitter { + + /** + * class prop + * + * + * @brief 查询和设置窗口是否显示 + * + * + * @type Boolean + */ + + visible: boolean + + /** + * class prop + * + * + * @brief 查询和绑定加载成功事件,相当于 on("load", func); + * + * + * @type Function + */ + + onload: Function + + /** + * class prop + * + * + * @brief 查询和绑定窗口移动事件,相当于 on("move", func); + * + * 以下示例会在窗口移动时输出窗口的左上角坐标: + * ```JavaScript + * var gui = require('gui'); + * var webview = gui.open('fs:index.html'); + * + * webview.onmove = evt => console.log(evt.left, evt.top); + * ``` + * + * + * + * @type Function + */ + + onmove: Function + + /** + * class prop + * + * + * @brief 查询和绑定窗口尺寸改变事件,相当于 on("size", func); + * + * 以下示例会在窗口改变大小时输出窗口的尺寸: + * ```JavaScript + * var gui = require('gui'); + * var webview = gui.open('fs:index.html'); + * + * webview.onresize = evt => console.log(evt.width, evt.height); + * ``` + * + * + * + * @type Function + */ + + onresize: Function + + /** + * class prop + * + * + * @brief 查询和绑定窗口关闭事件,WebView 关闭后会触发此时间,相当于 on("closed", func); + * + * + * @type Function + */ + + onclosed: Function + + /** + * class prop + * + * + * @brief 查询和绑定接受 webview 内 postMessage 消息事件,相当于 on("message", func); + * + * + * @type Function + */ + + onmessage: Function + + + + /** + * + * @brief 设置 webview 的页面 html + * @param html 设置的 html + * + * + * @async + */ + setHtml(html: string): void; + + /** + * + * @brief 打印当前窗口文档 + * @param mode 打印参数,0: 快速打印; 1: 标准打印; 2: 打印预览。缺省为 1 + * + * + * @async + */ + print(mode?: number/** = 1*/): void; + + /** + * + * @brief 关闭当前窗口 + * + * @async + */ + close(): void; + + /** + * + * @brief 等待当前窗口关闭 + * 宿主程序在创建窗口后,需要进入等待,否则随着宿主程序的退出,窗口将自动关闭。同时 wait 的调用也并不是必须的,你可以在打开窗口后处理其它业务,只需要保证程序不会自行退出即可。 + * + * + * @async + */ + wait(): void; + + /** + * + * @brief 向 webview 内发送消息 + * postMessage 需要在窗口加载完成后发送消息,在此之前发送的消息会丢失。因此建议在 onload 事件触发后再调用此方法。 + * @param msg 要发送的消息 + * + * + * @async + */ + postMessage(msg: string): void; + +} /** endof class */ + +/** endof `module Or Internal Object` */ + + diff --git a/types/fibjs/declare/Worker.d.ts b/types/fibjs/declare/Worker.d.ts new file mode 100644 index 0000000000..c427f6f41c --- /dev/null +++ b/types/fibjs/declare/Worker.d.ts @@ -0,0 +1,66 @@ +/*************************************************************************** + * * + * This file was automatically generated with idlc.js * + * build info: * + * - fibjs : 0.25.0 * + * - date : Jun 12 2018 07:22:40 * + * * + ***************************************************************************/ + +/** + * @author Richard + * + */ +/// + + + + +/** module Or Internal Object */ +/** + * @brief 独立线程工作对象 + * @detail + */ +/// +declare class Class_Worker extends Class_EventEmitter { + + /** + * class prop + * + * + * @brief 查询和绑定接受 postMessage 消息事件,相当于 on("message", func); + * + * + * @type Function + */ + + onmessage: Function + + + + /** + * + * @brief Worker 对象构造函数 + * @param path 指定 Worker 入口脚本,只接受绝对路径 + * @param opts 构造选项,暂未支持 + * + * + * + */ + constructor(path: string, opts?: object/** = v8::Object::New(isolate)*/); + + /** + * + * @brief 向 Master 或 Worker 发送消息, + * @param data 指定发送的消息内容 + * + * + * + */ + postMessage(data: any): void; + +} /** endof class */ + +/** endof `module Or Internal Object` */ + + diff --git a/types/fibjs/declare/X509Cert.d.ts b/types/fibjs/declare/X509Cert.d.ts new file mode 100644 index 0000000000..5090f422cf --- /dev/null +++ b/types/fibjs/declare/X509Cert.d.ts @@ -0,0 +1,263 @@ +/*************************************************************************** + * * + * This file was automatically generated with idlc.js * + * build info: * + * - fibjs : 0.25.0 * + * - date : Jun 12 2018 07:22:40 * + * * + ***************************************************************************/ + +/** + * @author Richard + * + */ +/// + + + + +/** module Or Internal Object */ +/** + * @brief x509 证书对象 + * @detail X509Cert 对象属于 crypto 模块,创建:,```JavaScript,var k = new crypto.X509Cert();,``` + */ + +declare class Class_X509Cert extends Class__object { + + /** + * class prop + * + * + * @brief 获取证书的版本 + * + * @readonly + * @type Integer + */ + + version: number + + /** + * class prop + * + * + * @brief 获取证书的序列号 + * + * @readonly + * @type String + */ + + serial: string + + /** + * class prop + * + * + * @brief 获取证书颁发者的可分辨名称 + * + * @readonly + * @type String + */ + + issuer: string + + /** + * class prop + * + * + * @brief 获取证书的主题可分辨名称 + * + * @readonly + * @type String + */ + + subject: string + + /** + * class prop + * + * + * @brief 获取证书的生效时间 + * + * @readonly + * @type Date + */ + + notBefore: Date + + /** + * class prop + * + * + * @brief 获取证书的到期时间 + * + * @readonly + * @type Date + */ + + notAfter: Date + + /** + * class prop + * + * + * @brief 获取证书是否是 ca 证书 + * + * @readonly + * @type Boolean + */ + + ca: boolean + + /** + * class prop + * + * + * @brief 获取证书的 pathlen + * + * @readonly + * @type Integer + */ + + pathlen: number + + /** + * class prop + * + * + * @brief 获取证书的使用范围 + * + * 结果为全部或部分以下内容:digitalSignature, nonRepudiation, keyEncipherment, dataEncipherment, keyAgreement, keyCertSign, cRLSign + * + * + * @readonly + * @type String + */ + + usage: string + + /** + * class prop + * + * + * @brief 获取证书的 Netscape 证书类型 + * + * 结果为全部或部分以下内容:client, server, email, objsign, reserved, sslCA, emailCA, objCA + * + * + * @readonly + * @type String + */ + + type: string + + /** + * class prop + * + * + * @brief 获取证书的公钥 + * + * @readonly + * @type PKey + */ + + publicKey: Class_PKey + + /** + * class prop + * + * + * @brief 获取证书链中得下一个证书 + * + * @readonly + * @type X509Cert + */ + + next: Class_X509Cert + + + + /** + * + * @brief X509Cert 构造函数 + * + * + */ + constructor(); + + /** + * + * @brief 加载一个 DER 格式的证书,可多次调用 + * @param derCert DER 格式的证书 + * + * + * + */ + load(derCert: Class_Buffer): void; + + /** + * + * @brief 加载一个 CRT/PEM/TXT 格式的证书,可多次调用 + * + * load 加载 mozilla 的 certdata,txt, 可于 http://hg.mozilla.org/releases/mozilla-release/raw-file/default/security/nss/lib/ckfw/builtins/certdata.txt 下载使用 + * @param txtCert PEM 格式的证书 + * + * + * + */ + load(txtCert: string): void; + + /** + * + * @brief 加载一个 CRT/PEM/DER/TXT 格式的证书,可多次调用 + * + * loadFile 加载 mozilla 的 certdata,txt, 可于 http://hg.mozilla.org/releases/mozilla-release/raw-file/default/security/nss/lib/ckfw/builtins/certdata.txt 下载使用 + * @param filename 证书文件名 + * + * + * + */ + loadFile(filename: string): void; + + /** + * + * @brief 加载自带的缺省根证书 + * 此证书内容源自:http://hg.mozilla.org/releases/mozilla-release/raw-file/default/security/nss/lib/ckfw/builtins/certdata.txt + * + * + */ + loadRootCerts(): void; + + /** + * + * @brief 使用当前证书链验证给定的证书 + * @param cert 给定需要验证的证书 + * @return 如果验证成功则返回 True + * + * + * @async + */ + verify(cert: Class_X509Cert): boolean; + + /** + * + * @brief 导出已经加载的证书 + * @return 以数组方式导出证书链 + * + * + * + */ + dump(): any[]; + + /** + * + * @brief 清空已经加载的证书 + * + * + */ + clear(): void; + +} /** endof class */ + +/** endof `module Or Internal Object` */ + + diff --git a/types/fibjs/declare/X509Crl.d.ts b/types/fibjs/declare/X509Crl.d.ts new file mode 100644 index 0000000000..22c0b1f99a --- /dev/null +++ b/types/fibjs/declare/X509Crl.d.ts @@ -0,0 +1,90 @@ +/*************************************************************************** + * * + * This file was automatically generated with idlc.js * + * build info: * + * - fibjs : 0.25.0 * + * - date : Jun 12 2018 07:22:40 * + * * + ***************************************************************************/ + +/** + * @author Richard + * + */ +/// + + + + +/** module Or Internal Object */ +/** + * @brief x509 撤销证书对象 + * @detail X509Crl 对象属于 crypto 模块,创建:,```JavaScript,var k = new crypto.X509Crl();,``` + */ + +declare class Class_X509Crl extends Class__object { + + + + /** + * + * @brief X509Crl 构造函数 + * + * + */ + constructor(); + + /** + * + * @brief 加载一个 DER 格式的撤销证书,可多次调用 + * @param derCrl DER 格式的撤销证书 + * + * + * + */ + load(derCrl: Class_Buffer): void; + + /** + * + * @brief 加载一个 PEM 格式的撤销证书,可多次调用 + * @param pemCrl PEM 格式的撤销证书 + * + * + * + */ + load(pemCrl: string): void; + + /** + * + * @brief 加载一个 PEM/DER 格式的撤销证书,可多次调用 + * @param filename 撤销证书文件名 + * + * + * + */ + loadFile(filename: string): void; + + /** + * + * @brief 导出已经加载的撤销证书 + * @return 以数组方式导出撤销证书链 + * + * + * + */ + dump(): any[]; + + /** + * + * @brief 清空已经加载的撤销证书 + * + * + * + */ + clear(): void; + +} /** endof class */ + +/** endof `module Or Internal Object` */ + + diff --git a/types/fibjs/declare/X509Req.d.ts b/types/fibjs/declare/X509Req.d.ts new file mode 100644 index 0000000000..502c078402 --- /dev/null +++ b/types/fibjs/declare/X509Req.d.ts @@ -0,0 +1,155 @@ +/*************************************************************************** + * * + * This file was automatically generated with idlc.js * + * build info: * + * - fibjs : 0.25.0 * + * - date : Jun 12 2018 07:22:40 * + * * + ***************************************************************************/ + +/** + * @author Richard + * + */ +/// + + + + + + +/** module Or Internal Object */ +/** + * @brief x509 证书请求对象 + * @detail X509Req 对象属于 crypto 模块,创建:,```JavaScript,var k = new crypto.X509Req();,``` + */ + +declare class Class_X509Req extends Class__object { + + /** + * class prop + * + * + * @brief 获取证书的主题可分辨名称 + * + * @readonly + * @type String + */ + + subject: string + + /** + * class prop + * + * + * @brief 获取证书的公钥 + * + * @readonly + * @type PKey + */ + + publicKey: Class_PKey + + + + /** + * + * @brief X509Req 构造函数 + * + * + */ + constructor(); + + /** + * + * @brief X509Req 构造函数,根据给定的信息创建一个证书请求 + * + * @param subject 证书的主题可分辨名称 + * @param key 证书的公钥 + * @param hash 证书摘要算法,缺省为 hash.SHA1 + * + * + * + */ + constructor(subject: string, key: Class_PKey, hash?: number/** = undefined*/); + + /** + * + * @brief 加载一个 DER 格式的证书请求 + * @param derReq DER 格式的证书请求 + * + * + * + */ + load(derReq: Class_Buffer): void; + + /** + * + * @brief 加载一个 PEM 格式的证书请求 + * @param pemReq PEM 格式的证书请求 + * + * + * + */ + load(pemReq: string): void; + + /** + * + * @brief 加载一个 PEM/DER 格式的证书请求,可多次调用 + * @param filename 证书请求文件名 + * + * + * + */ + loadFile(filename: string): void; + + /** + * + * @brief 返回当前证书请求的 PEM 格式编码 + * @return 当前证书请求的 PEM 格式编码 + * + * + * + */ + exportPem(): string; + + /** + * + * @brief 返回当前证书请求的 DER 格式编码 + * @return 当前证书请求的 DER 格式编码 + * + * + * + */ + exportDer(): Class_Buffer; + + /** + * + * @brief 签名当前证书请求为正式证书 + * + * opts 接收的字段如下: + * ```JavaScript + * { + * ca: false, // 证书为 ca,缺省为 false + * pathlen: -1, // 证书深度,缺省为 -1 + * notBefore: "", // 证书生效时间,缺省为当前时间 + * notAfter: "", // 证书失效时间,缺省为 notBefore 后一年 + * usage: "", // 证书使用范围,接收:digitalSignature, nonRepudiation, keyEncipherment, dataEncipherment, keyAgreement, keyCertSign, cRLSign + * type: "" // 证书 Netscape 证书类型,接收:client, server, email, objsign, reserved, sslCA, emailCA, objCA + * } + * ``` + * @param issuer 签名机构的可分辨名称 + * @param key 签名机构的私钥 + * @param opts 其他可选参数 + * @return 返回签名后的正式证书 + * + * + * @async + */ + sign(issuer: string, key: Class_PKey, opts?: object/** = v8::Object::New(isolate)*/): Class_X509Cert; + +} /** endof class */ + +/** endof `module Or Internal Object` */ + + diff --git a/types/fibjs/declare/XmlAttr.d.ts b/types/fibjs/declare/XmlAttr.d.ts new file mode 100644 index 0000000000..82659f536a --- /dev/null +++ b/types/fibjs/declare/XmlAttr.d.ts @@ -0,0 +1,124 @@ +/*************************************************************************** + * * + * This file was automatically generated with idlc.js * + * build info: * + * - fibjs : 0.25.0 * + * - date : Jun 12 2018 07:22:40 * + * * + ***************************************************************************/ + +/** + * @author Richard + * + */ +/// + + + + +/** module Or Internal Object */ +/** + * @brief XmlAttr 对象表示 XmlElement 对象的属性 + * @detail + */ + +declare class Class_XmlAttr extends Class__object { + + /** + * class prop + * + * + * @brief 查询元素的本地名称。如果选定的节点无命名空间,则该属性等同于 nodeName + * + * + * @readonly + * @type String + */ + + localName: string + + /** + * class prop + * + * + * @brief 属性的值 + * + * + * + * @type String + */ + + value: string + + /** + * class prop + * + * + * @brief 属性的名称 + * + * + * @readonly + * @type String + */ + + name: string + + /** + * class prop + * + * + * @brief 查询元素的命名空间的 URI。如果选定的节点无命名空间,则该属性返回 NULL + * + * + * @readonly + * @type String + */ + + namespaceURI: string + + /** + * class prop + * + * + * @brief 查询和设置元素的命名空间前缀。如果选定的节点无命名空间,则该属性返回 NULL + * + * + * + * @type String + */ + + prefix: string + + /** + * class prop + * + * + * @brief 属性的名称,为兼容的目的 + * + * + * @readonly + * @type String + */ + + nodeName: string + + /** + * class prop + * + * + * @brief 属性的值,为兼容的目的 + * + * + * + * @type String + */ + + nodeValue: string + + + +} /** endof class */ + +/** endof `module Or Internal Object` */ + + diff --git a/types/fibjs/declare/XmlCDATASection.d.ts b/types/fibjs/declare/XmlCDATASection.d.ts new file mode 100644 index 0000000000..4640fc3758 --- /dev/null +++ b/types/fibjs/declare/XmlCDATASection.d.ts @@ -0,0 +1,33 @@ +/*************************************************************************** + * * + * This file was automatically generated with idlc.js * + * build info: * + * - fibjs : 0.25.0 * + * - date : Jun 12 2018 07:22:40 * + * * + ***************************************************************************/ + +/** + * @author Richard + * + */ +/// + + + + +/** module Or Internal Object */ +/** + * @brief XmlCDATASection 对象表示文档中的 CDATA 区段 + * @detail XmlCDATASection 接口是 XmlText 接口的子接口,没有定义任何自己的属性和方法。通过从 XmlNode 接口继承 nodeValue 属性,或通过从 XmlCharacterData 接口继承 data 属性,可以访问 CDATA Section 的文本内容。,,虽然通常可以把 XmlCDATASection 节点作为 XmlText 节点处理,但要注意 XmlNode 的 normalize 方法不并入相邻的 CDATA 部分。,,使用 XmlDocument 的 createXmlCDATASection 方法来创建一个 XmlCDATASection 。,,CDATA 区段包含了不会被解析器解析的文本。CDATA 区段中的标签不会被视为标记,同时实体也不会被展开。主要的目的是为了包含诸如 XML 片段之类的材料,而无需转义所有的分隔符。,,在一个 CDATA 中唯一被识别的分隔符是 "]]>",它可标示 CDATA 区段的结束。CDATA 区段不能进行嵌套。 + */ +/// +declare class Class_XmlCDATASection extends Class_XmlText { + + + +} /** endof class */ + +/** endof `module Or Internal Object` */ + + diff --git a/types/fibjs/declare/XmlCharacterData.d.ts b/types/fibjs/declare/XmlCharacterData.d.ts new file mode 100644 index 0000000000..e1e3b486dd --- /dev/null +++ b/types/fibjs/declare/XmlCharacterData.d.ts @@ -0,0 +1,115 @@ +/*************************************************************************** + * * + * This file was automatically generated with idlc.js * + * build info: * + * - fibjs : 0.25.0 * + * - date : Jun 12 2018 07:22:40 * + * * + ***************************************************************************/ + +/** + * @author Richard + * + */ +/// + + + + +/** module Or Internal Object */ +/** + * @brief XmlCharacterData 接口提供了 XmlText 和 XmlComment 节点的常用功能 + * @detail XmlCharacterData 是 XmlText 和 XmlComment 节点的超接口。文档从不包含 XmlCharacterData 节点,它们只包含 XmlText 节点和 XmlComment 节点。但由于这两种节点具有相似的功能,因此此处定义了这些函数,以便 XmlText 和 XmlComment 可以继承它。 + */ +/// +declare class Class_XmlCharacterData extends Class_XmlNode { + + /** + * class prop + * + * + * @brief 该节点包含的文本 + * + * + * + * @type String + */ + + data: string + + /** + * class prop + * + * + * @brief 该节点包含的字符数 + * + * + * @readonly + * @type Integer + */ + + length: number + + + + /** + * + * @brief 从节点中提取子串 + * @param offset 要返回的第一个字符的位置 + * @param count 要返回的子串中的字符数 + * @return 返回提取的字符串 + * + * + * + */ + substringData(offset: number, count: number): string; + + /** + * + * @brief 把字符串附加到节点上 + * @param arg 要附加到节点的字符串 + * + * + * + */ + appendData(arg: string): void; + + /** + * + * @brief 把字符串插入节点 + * @param offset 要把字符串插入节点的字符位置 + * @param arg 要插入的字符串 + * + * + * + */ + insertData(offset: number, arg: string): void; + + /** + * + * @brief 从节点删除文本 + * @param offset 要删除的第一个字符的位置 + * @param count 要删除的字符的数量 + * + * + * + */ + deleteData(offset: number, count: number): void; + + /** + * + * @brief 用指定的字符串替换节点的字符 + * @param offset 节点要替换的字符位置 + * @param count 要替换的字符的数量 + * @param arg 要插入的字符串 + * + * + * + */ + replaceData(offset: number, count: number, arg: string): void; + +} /** endof class */ + +/** endof `module Or Internal Object` */ + + diff --git a/types/fibjs/declare/XmlComment.d.ts b/types/fibjs/declare/XmlComment.d.ts new file mode 100644 index 0000000000..62f02a1200 --- /dev/null +++ b/types/fibjs/declare/XmlComment.d.ts @@ -0,0 +1,33 @@ +/*************************************************************************** + * * + * This file was automatically generated with idlc.js * + * build info: * + * - fibjs : 0.25.0 * + * - date : Jun 12 2018 07:22:40 * + * * + ***************************************************************************/ + +/** + * @author Richard + * + */ +/// + + + + +/** module Or Internal Object */ +/** + * @brief XmlComment 对象表示文档中注释节点的内容 + * @detail XmlComment 节点表示 XML 文档中的注释。,使用由 XmlCharacterData 接口继承的 data 属性,或使用由 XmlNode 接口继承的 nodeValue 属性,可以访问注释的内容。(即 之间的文本)。使用由 XmlCharacterData 接口继承的各种方法可以操作注释的内容。,,使用 XmlDocument.createComment() 来创建一个注释对象。 + */ +/// +declare class Class_XmlComment extends Class_XmlCharacterData { + + + +} /** endof class */ + +/** endof `module Or Internal Object` */ + + diff --git a/types/fibjs/declare/XmlDocument.d.ts b/types/fibjs/declare/XmlDocument.d.ts new file mode 100644 index 0000000000..a4279dd1ce --- /dev/null +++ b/types/fibjs/declare/XmlDocument.d.ts @@ -0,0 +1,290 @@ +/*************************************************************************** + * * + * This file was automatically generated with idlc.js * + * build info: * + * - fibjs : 0.25.0 * + * - date : Jun 12 2018 07:22:40 * + * * + ***************************************************************************/ + +/** + * @author Richard + * + */ +/// + + + + +/** module Or Internal Object */ +/** + * @brief XmlDocument 对象代表整个 XML 文档 + * @detail XmlDocument 对象是一棵文档树的根,可为我们提供对文档数据的最初(或最顶层)的访问入口。,用于元素节点、文本节点、注释、处理指令等均无法存在于 XmlDocument 之外, XmlDocument 对象同样提供了创建这些对象的方法。 XmlNode 对象提供了一个 ownerDocument 属性,此属性可把它们与在其中创建它们的 XmlDocument 关联起来。 + */ +/// +declare class Class_XmlDocument extends Class_XmlNode { + + /** + * class prop + * + * + * @brief 返回用于文档的编码(在解析时) + * + * + * @readonly + * @type String + */ + + inputEncoding: string + + /** + * class prop + * + * + * @brief 设置或返回文档是否为 standalone + * + * + * + * @type Boolean + */ + + xmlStandalone: boolean + + /** + * class prop + * + * + * @brief 设置或返回文档的 XML 版本 + * + * + * + * @type String + */ + + xmlVersion: string + + /** + * class prop + * + * + * @brief 返回与文档相关的文档类型声明(Document Type Declaration) + * + * 对于没有 DTD 的 XML 文档,则返回 null。此属性可提供对 XmlDocumentType 对象( XmlDocument 的一个子节点)的直接访问。 + * + * + * @readonly + * @type XmlDocumentType + */ + + doctype: Class_XmlDocumentType + + /** + * class prop + * + * + * @brief 返回文档的根节点 + * + * + * @readonly + * @type XmlElement + */ + + documentElement: Class_XmlElement + + /** + * class prop + * + * + * @brief 返回 HTML 文档的 head 节点,仅在 html 模式有效 + * + * + * @readonly + * @type XmlElement + */ + + head: Class_XmlElement + + /** + * class prop + * + * + * @brief 返回 HTML 文档的 title 节点的内容,仅在 html 模式有效 + * + * + * @readonly + * @type String + */ + + title: string + + /** + * class prop + * + * + * @brief 返回 HTML 文档的 body 节点,仅在 html 模式有效 + * + * + * @readonly + * @type XmlElement + */ + + body: Class_XmlElement + + + + /** + * + * @brief 构造一个 XmlDocument 对象 + * @param type 指定文档对象的类型,缺省为 "text/xml",若需要处理 html 则需要指定 "text/html" + * + * + * + */ + constructor(type?: string/** = "text/xml"*/); + + /** + * + * @brief 通过解析一个 XML/HTML 字符串来组成该文档,不支持多语种 + * @param source 要解析的 XML/HTML 文本,取决于文档创建时的类型 + * + * + * + */ + load(source: string): void; + + /** + * + * @brief 通过解析一个二进制 XML/HTML 字符串来组成该文档,并根据语种自动转换 + * @param source 要解析的 XML/HTML 文本,取决于文档创建时的类型 + * + * + * + */ + load(source: Class_Buffer): void; + + /** + * + * @brief 返回带有指定名称的所有元素的一个节点列表 + * + * 该方法将返回一个 XmlNodeList 对象(可以作为只读数组处理),该对象存放文档中具有指定标签名的所有 XmlElement 节点,它们存放的顺序就是在源文档中出现的顺序。 XmlNodeList 对象是“活”的,即如果在文档中添加或删除了指定标签名的元素,它的内容会自动进行必要的更新。 + * @param tagName 需检索的标签名。值 "*" 匹配所有的标签 + * @return 文档树中具有指定标记的 XmlElement 节点的 XmlNodeList 集合。返回的元素节点的顺序就是它们在源文档中出现的顺序。 + * + * + * + */ + getElementsByTagName(tagName: string): Class_XmlNodeList; + + /** + * + * @brief 返回带有指定命名空间和名称的所有元素的一个节点列表 + * + * 该方法与 getElementsByTagName() 方法相似,只是它根据命名空间和名称来检索元素。 + * @param namespaceURI 指定检索的命名空间 URI。值 "*" 可匹配所有的标签 + * @param localName 需检索的标签名。值 "*" 匹配所有的标签 + * @return 文档树中具有指定标记的 XmlElement 节点的 XmlNodeList 集合。返回的元素节点的顺序就是它们在源文档中出现的顺序。 + * + * + * + */ + getElementsByTagNameNS(namespaceURI: string, localName: string): Class_XmlNodeList; + + /** + * + * @brief 返回拥有指定 id 属性的元素 + * + * 该方法将遍历文档的子孙节点,返回一个 XmlElement 节点对象,表示第一个具有指定 id 属性的文档元素。。 + * @param id 需检索的 id + * @return 节点树中具有指定 id 属性的 XmlElement 节点 + * + * + * + */ + getElementById(id: string): Class_XmlElement; + + /** + * + * @brief 返回带有指定 class 名称的所有元素的一个节点列表 + * + * 该方法将返回一个 XmlNodeList 对象(可以作为只读数组处理),该对象存放文档中具有指定 class 名的所有 XmlElement 节点,它们存放的顺序就是在源文档中出现的顺序。 XmlNodeList 对象是“活”的,即如果在文档中添加或删除了指定标签名的元素,它的内容会自动进行必要的更新。 + * @param className 需检索的 class 名称 + * @return 文档树中具有指定 class 名的 XmlElement 节点的 XmlNodeList 集合。返回的元素节点的顺序就是它们在源文档中出现的顺序。 + * + * + * + */ + getElementsByClassName(className: string): Class_XmlNodeList; + + /** + * + * @brief 创建元素节点 + * @param tagName 指定元素节点规定名称 + * @return 返回新创建的 XmlElement 节点,具有指定的标签名 + * + * + * + */ + createElement(tagName: string): Class_XmlElement; + + /** + * + * @brief 创建带有指定命名空间的元素节点 + * @param namespaceURI 指定元素节点命名空间 URI + * @param qualifiedName 指定元素节点规定名称 + * @return 返回新创建的 XmlElement 节点,具有指定的标签名 + * + * + * + */ + createElementNS(namespaceURI: string, qualifiedName: string): Class_XmlElement; + + /** + * + * @brief 创建文本节点 + * @param data 指定此节点的文本 + * @return 返回新创建的 XmlText 节点,表示指定的 data 字符串 + * + * + * + */ + createTextNode(data: string): Class_XmlText; + + /** + * + * @brief 创建注释节点 + * @param data 指定此节点的注释文本 + * @return 返回新创建的 XmlComment 节点,注释文本为指定的 data + * + * + * + */ + createComment(data: string): Class_XmlComment; + + /** + * + * @brief 创建 XmlCDATASection 节点 + * @param data 指定此节点规定 CDATA 数据 + * @return 返回新创建的 XmlCDATASection 节点,内容为指定的 data + * + * + * + */ + createCDATASection(data: string): Class_XmlCDATASection; + + /** + * + * @brief 创建 XmlProcessingInstruction 节点 + * @param target 指定处理指令的目标 + * @param data 指定处理指令的内容文本 + * @return 新创建的 ProcessingInstruction 节点 + * + * + * + */ + createProcessingInstruction(target: string, data: string): Class_XmlProcessingInstruction; + +} /** endof class */ + +/** endof `module Or Internal Object` */ + + diff --git a/types/fibjs/declare/XmlDocumentType.d.ts b/types/fibjs/declare/XmlDocumentType.d.ts new file mode 100644 index 0000000000..f61b5fbfed --- /dev/null +++ b/types/fibjs/declare/XmlDocumentType.d.ts @@ -0,0 +1,72 @@ +/*************************************************************************** + * * + * This file was automatically generated with idlc.js * + * build info: * + * - fibjs : 0.25.0 * + * - date : Jun 12 2018 07:22:40 * + * * + ***************************************************************************/ + +/** + * @author Richard + * + */ +/// + + + + +/** module Or Internal Object */ +/** + * @brief XmlDocumentType 对象用于访问 XML 所定义的实体 + * @detail + */ +/// +declare class Class_XmlDocumentType extends Class_XmlNode { + + /** + * class prop + * + * + * @brief 返回 DTD 的名称 + * + * + * @readonly + * @type String + */ + + name: string + + /** + * class prop + * + * + * @brief 可返回外部 DTD 的公共识别符 + * + * + * @readonly + * @type String + */ + + publicId: string + + /** + * class prop + * + * + * @brief 可返回外部 DTD 的系统识别符 + * + * + * @readonly + * @type String + */ + + systemId: string + + + +} /** endof class */ + +/** endof `module Or Internal Object` */ + + diff --git a/types/fibjs/declare/XmlElement.d.ts b/types/fibjs/declare/XmlElement.d.ts new file mode 100644 index 0000000000..a879cee139 --- /dev/null +++ b/types/fibjs/declare/XmlElement.d.ts @@ -0,0 +1,301 @@ +/*************************************************************************** + * * + * This file was automatically generated with idlc.js * + * build info: * + * - fibjs : 0.25.0 * + * - date : Jun 12 2018 07:22:40 * + * * + ***************************************************************************/ + +/** + * @author Richard + * + */ +/// + + + + +/** module Or Internal Object */ +/** + * @brief XmlElement 对象表示 XML 文档中的元素 + * @detail + */ +/// +declare class Class_XmlElement extends Class_XmlNode { + + /** + * class prop + * + * + * @brief 查询元素的命名空间的 URI。如果选定的节点无命名空间,则该属性返回 NULL + * + * + * @readonly + * @type String + */ + + namespaceURI: string + + /** + * class prop + * + * + * @brief 查询和设置元素的命名空间前缀。如果选定的节点无命名空间,则该属性返回 NULL + * + * + * + * @type String + */ + + prefix: string + + /** + * class prop + * + * + * @brief 查询元素的本地名称。如果选定的节点无命名空间,则该属性等同于 nodeName + * + * + * @readonly + * @type String + */ + + localName: string + + /** + * class prop + * + * + * @brief 返回元素的标签名 + * + * + * @readonly + * @type String + */ + + tagName: string + + /** + * class prop + * + * + * ! 查询和设置元素的 id 属性 + * + * + * + * @type String + */ + + id: string + + /** + * class prop + * + * + * ! 查询和设置选定元素的文本。查询时,返回元素节点内所有文本节点的值;设置时,删除所有子节点,并用单个文本节点来替换它们。 + * + * + * + * @type String + */ + + textContent: string + + /** + * class prop + * + * + * ! 查询和设置选定元素的 HTML 文本,仅在 html 模式有效。查询时,返回元素节点内所有子节点的 HTML 编码;设置时,删除所有子节点,并用指定的 HTML 解码后替换它们。 + * + * + * + * @type String + */ + + innerHTML: string + + /** + * class prop + * + * + * ! 查询和设置元素的 class 属性,仅在 html 模式有效 + * + * + * + * @type String + */ + + className: string + + /** + * class prop + * + * + * @brief 返回包含被选节点属性的 NamedNodeMap。如果被选节点不是元素,则该属性返回 NULL。 + * + * + * @readonly + * @type XmlNamedNodeMap + */ + + attributes: Class_XmlNamedNodeMap + + + + /** + * + * @brief 通过名称查询属性的值 + * @param name 指定查询的属性名 + * @return 返回属性的值 + * + * + * + */ + getAttribute(name: string): string; + + /** + * + * @brief 通过命名空间 URI 和名称来获取属性值 + * @param namespaceURI 指定查询的命名空间 URI + * @param localName 指定查询的属性名 + * @return 返回属性的值 + * + * + * + */ + getAttributeNS(namespaceURI: string, localName: string): string; + + /** + * + * @brief 创建或改变某个新属性 + * + * 该方法把指定的属性设置为指定的值。如果不存在具有指定名称的属性,该方法将创建一个新属性 + * @param name 指定要设置的属性名 + * @param value 指定要设置的属性值 + * + * + * + */ + setAttribute(name: string, value: string): void; + + /** + * + * @brief 创建或改变具有命名空间的属性 + * + * 该方法与 setAttribute 方法类似,只是要创建或设置的属性由命名空间 URI 和限定名(由名字空间前缀、冒号和名字空间中的本地名构成)共同指定。除了可以改变一个属性的值以外,使用该方法还可以改变属性的名字空间前缀 + * @param namespaceURI 指定要设置的命名空间 URI + * @param qualifiedName 指定要设置的属性名 + * @param value 指定要设置的属性值 + * + * + * + */ + setAttributeNS(namespaceURI: string, qualifiedName: string, value: string): void; + + /** + * + * @brief 通过名称删除指定的属性 + * @param name 指定删除的属性名 + * + * + * + */ + removeAttribute(name: string): void; + + /** + * + * @brief 通过命名空间和名称删除指定的属性 + * @param namespaceURI 指定要删除的命名空间 URI + * @param localName 指定删除的属性名 + * + * + * + */ + removeAttributeNS(namespaceURI: string, localName: string): void; + + /** + * + * @brief 查询当前节点是否拥有指定名称的属性 + * @param name 指定查询的属性名称 + * @return 如果当前元素节点拥有指定属性,则返回 true,否则返回 false + * + * + * + */ + hasAttribute(name: string): boolean; + + /** + * + * @brief 查询当前节点是否拥有指定命名空间和名称的属性 + * @param namespaceURI 指定要查询的命名空间 URI + * @param localName 指定查询的属性名称 + * @return 如果当前元素节点拥有指定属性,则返回 true,否则返回 false + * + * + * + */ + hasAttributeNS(namespaceURI: string, localName: string): boolean; + + /** + * + * @brief 返回拥有指定名称的所有元素的 XmlNodeList + * + * 该方法将遍历指定元素的子孙节点,返回一个 XmlElement 节点的 XmlNodeList 对象,表示所有具有指定标签名的文档元素。元素在返回的数组中的顺序就是它们出现在文档源代码中的顺序。 + * + * XmlDocument 接口也定义了 getElementsByTagName 方法,它与该方法相似,但遍历整个文档,而不是遍历某个元素的子孙节点。 + * @param tagName 需检索的标签名。值 "*" 匹配所有的标签 + * @return 节点树中具有指定标记的 XmlElement 节点的 XmlNodeList 集合。返回的元素节点的顺序就是它们在源文档中出现的顺序。 + * + * + * + */ + getElementsByTagName(tagName: string): Class_XmlNodeList; + + /** + * + * @brief 返回拥有指定命名空间和名称的所有元素的 XmlNodeList + * + * 该方法与 getElementsByTagName 方法相似,只是想获取的元素的标记名被指定为命名空间 URI 和在命名空间中定义的本地名的组合。 + * @param namespaceURI 指定要查询的命名空间 URI + * @param localName 需检索的标签名。值 "*" 匹配所有的标签 + * @return 节点树中具有指定标记的 XmlElement 节点的 XmlNodeList 集合。返回的元素节点的顺序就是它们在源文档中出现的顺序。 + * + * + * + */ + getElementsByTagNameNS(namespaceURI: string, localName: string): Class_XmlNodeList; + + /** + * + * @brief 返回拥有指定 id 属性的元素 + * + * 该方法将遍历指定元素的子孙节点,返回一个 XmlElement 节点对象,表示第一个具有指定 id 属性的文档元素。。 + * + * XmlDocument 接口也定义了 getElementsByTagName 方法,它与该方法相似,但遍历整个文档,而不是遍历某个元素的子孙节点。 + * @param id 需检索的 id + * @return 节点树中具有指定 id 属性的 XmlElement 节点 + * + * + * + */ + getElementById(id: string): Class_XmlElement; + + /** + * + * @brief 返回带有指定 class 名称的所有元素的一个节点列表 + * + * 该方法将返回一个 XmlNodeList 对象(可以作为只读数组处理),该对象存放文档中具有指定 class 名的所有 XmlElement 节点,它们存放的顺序就是在源文档中出现的顺序。 XmlNodeList 对象是“活”的,即如果在文档中添加或删除了指定标签名的元素,它的内容会自动进行必要的更新。 + * @param className 需检索的 class 名称 + * @return 文档树中具有指定 class 名的 XmlElement 节点的 XmlNodeList 集合。返回的元素节点的顺序就是它们在源文档中出现的顺序。 + * + * + * + */ + getElementsByClassName(className: string): Class_XmlNodeList; + +} /** endof class */ + +/** endof `module Or Internal Object` */ + + diff --git a/types/fibjs/declare/XmlNamedNodeMap.d.ts b/types/fibjs/declare/XmlNamedNodeMap.d.ts new file mode 100644 index 0000000000..52920576cf --- /dev/null +++ b/types/fibjs/declare/XmlNamedNodeMap.d.ts @@ -0,0 +1,68 @@ +/*************************************************************************** + * * + * This file was automatically generated with idlc.js * + * build info: * + * - fibjs : 0.25.0 * + * - date : Jun 12 2018 07:22:40 * + * * + ***************************************************************************/ + +/** + * @author Richard + * + */ +/// + + + + +/** module Or Internal Object */ +/** + * @brief XmlNamedNodeMap 对象表示一个无顺序的属性列表 + * @detail + */ + +declare class Class_XmlNamedNodeMap extends Class__object { + + /** + * class prop + * + * + * @brief 返回属性列表中的属性数目 + * + * + * @readonly + * @type Integer + */ + + length: number + + + + /** + * + * @brief 返回属性列表中处于指定的索引号的属性 + * @param index 指定要查询的索引 + * @return 指定索引号的属性 + * + * + * + */ + item(index: number): Class_XmlAttr; + + /** + * + * @brief 查询指定名称的属性 + * @param name 指定要查询的名称 + * @return 返回查询出的属性 + * + * + * + */ + getNamedItem(name: string): Class_XmlAttr; + +} /** endof class */ + +/** endof `module Or Internal Object` */ + + diff --git a/types/fibjs/declare/XmlNode.d.ts b/types/fibjs/declare/XmlNode.d.ts new file mode 100644 index 0000000000..def8e0f59c --- /dev/null +++ b/types/fibjs/declare/XmlNode.d.ts @@ -0,0 +1,315 @@ +/*************************************************************************** + * * + * This file was automatically generated with idlc.js * + * build info: * + * - fibjs : 0.25.0 * + * - date : Jun 12 2018 07:22:40 * + * * + ***************************************************************************/ + +/** + * @author Richard + * + */ +/// + + + + +/** module Or Internal Object */ +/** + * @brief XmlNode 对象是整个 DOM 的基础数据类型 + * @detail + */ + +declare class Class_XmlNode extends Class__object { + + /** + * class prop + * + * + * @brief 返回节点的节点类型 + * + * 不同对象的 nodeType 会返回不同的值: + * - XmlElement: ELEMENT_NODE(1) + * - XmlAttr: ATTRIBUTE_NODE(2) + * - XmlText: TEXT_NODE(3) + * - XmlCDATASection: CDATA_SECTION_NODE(4) + * - XmlProcessingInstruction: PROCESSING_INSTRUCTION_NODE(7) + * - XmlComment: COMMENT_NODE(8) + * - XmlDocument: DOCUMENT_NODE(9) + * - XmlDocumentType: DOCUMENT_TYPE_NODE(10) + * + * + * @readonly + * @type Integer + */ + + nodeType: number + + /** + * class prop + * + * + * @brief 返回节点的名称,根据其类型 + * + * 不同对象的 nodeName 会返回不同的值: + * - XmlElement: element name + * - XmlAttr: 属性名称 + * - XmlText: \#text + * - XmlCDATASection: \#cdata-section + * - XmlProcessingInstruction: 返回指定目标 target + * - XmlComment: \#comment + * - XmlDocument: \#document + * - XmlDocumentType: doctype 名称 + * + * + * @readonly + * @type String + */ + + nodeName: string + + /** + * class prop + * + * + * @brief 返回节点的名称,根据其类型 + * + * 不同对象的 nodeName 会返回不同的值: + * - XmlElement: null + * - XmlAttr: 属性的值 + * - XmlText: 节点的内容 + * - XmlCDATASection: 节点的内容 + * - XmlProcessingInstruction: 返回指定内容 data + * - XmlComment: 注释文本 + * - XmlDocument: null + * - XmlDocumentType: null + * + * + * + * @type String + */ + + nodeValue: string + + /** + * class prop + * + * + * @brief 返回节点的根元素(XmlDocument 对象) + * + * + * @readonly + * @type XmlDocument + */ + + ownerDocument: Class_XmlDocument + + /** + * class prop + * + * + * @brief 可返回某节点的父节点 + * + * + * @readonly + * @type XmlNode + */ + + parentNode: Class_XmlNode + + /** + * class prop + * + * + * @brief 返回指定节点的子节点的节点列表 + * + * + * @readonly + * @type XmlNodeList + */ + + childNodes: Class_XmlNodeList + + /** + * class prop + * + * + * @brief 返回节点的首个子节点 + * + * + * @readonly + * @type XmlNode + */ + + firstChild: Class_XmlNode + + /** + * class prop + * + * + * @brief 返回节点的最后一个子节点 + * + * + * @readonly + * @type XmlNode + */ + + lastChild: Class_XmlNode + + /** + * class prop + * + * + * @brief 返回某节点之前紧跟的节点(处于同一树层级),如果没有此节点,那么该属性返回 null + * + * + * @readonly + * @type XmlNode + */ + + previousSibling: Class_XmlNode + + /** + * class prop + * + * + * @brief 返回某个元素之后紧跟的节点(处于同一树层级中),如果无此节点,则属性返回 null + * + * + * @readonly + * @type XmlNode + */ + + nextSibling: Class_XmlNode + + + + /** + * + * @brief 查询是否存在子节点 + * @return 存在任何子节点时返回 true,否则返回 false + * + * + * + */ + hasChildNodes(): boolean; + + /** + * + * @brief 合并相邻的 Text 节点并删除空的 Text 节点 + * + * 这个方法将遍历当前节点的所有子孙节点,通过删除空的 Text 节点,已经合并所有相邻的 Text 节点来规范化文档。该方法在进行节点的插入或删除操作后,对于简化文档树的结构很有用。 + * + * + * + */ + normalize(): void; + + /** + * + * @brief 创建指定的节点的精确拷贝 + * + * 该方法将复制并返回调用它的节点的副本。如果传递给它的参数是 true,它还将递归复制当前节点的所有子孙节点。 否则,它只复制当前节点。返回的节点不属于文档树,它的 parentNode 属性为 null。当复制的是 Element 节点时,它的所有属性都将被复制。 + * @param deep 是否深度拷贝,为 true 时,被克隆的节点会克隆原节点的所有子节点 + * @return 返回所复制的节点 + * + * + * + */ + cloneNode(deep?: boolean/** = true*/): Class_XmlNode; + + /** + * + * @brief 返回在当前节点上匹配指定的命名空间 URI 的前缀 + * @param namespaceURI 指定匹配的命名空间 URI + * @return 返回匹配的前缀,未匹配到返回 null + * + * + * + */ + lookupPrefix(namespaceURI: string): string; + + /** + * + * @brief 返回在当前节点上匹配指定的前缀的命名空间 URI + * @param prefix 指定匹配的前缀 + * @return 返回匹配的命名空间 URI,未匹配到返回 null + * + * + * + */ + lookupNamespaceURI(prefix: string): string; + + /** + * + * @brief 在已有的子节点前插入一个新的子节点 + * + * 如果文档树中已经存在了 newChild,它将从文档树中删除,然后重新插入它的新位置。来自一个文档的节点(或由一个文档创建的节点)不能插入另一个文档。也就是说,newChild 的 ownerDocument 属性必须与当前节点的 ownerDocument 属性相同。 + * @param newChild 插入新的节点 + * @param refChild 在此节点前插入新节点 + * @return 返回新的子节点 + * + * + * + */ + insertBefore(newChild: Class_XmlNode, refChild: Class_XmlNode): Class_XmlNode; + + /** + * + * @brief 在已有的子节点后插入一个新的子节点 + * + * 如果文档树中已经存在了 newChild,它将从文档树中删除,然后重新插入它的新位置。来自一个文档的节点(或由一个文档创建的节点)不能插入另一个文档。也就是说,newChild 的 ownerDocument 属性必须与当前节点的 ownerDocument 属性相同。 + * @param newChild 插入新的节点 + * @param refChild 在此节点后插入新节点 + * @return 返回新的子节点 + * + * + * + */ + insertAfter(newChild: Class_XmlNode, refChild: Class_XmlNode): Class_XmlNode; + + /** + * + * @brief 向节点的子节点列表的末尾添加新的子节点 + * + * 如果文档树中已经存在了 newChild,它将从文档树中删除,然后重新插入它的新位置。来自一个文档的节点(或由一个文档创建的节点)不能插入另一个文档。也就是说,newChild 的 ownerDocument 属性必须与当前节点的 ownerDocument 属性相同。 + * @param newChild 指定添加的节点 + * @return 返回这个新的子节点 + * + * + * + */ + appendChild(newChild: Class_XmlNode): Class_XmlNode; + + /** + * + * @brief 将某个子节点替换为另一个 + * + * 如果文档树中已经存在了 newChild,它将从文档树中删除,然后重新插入它的新位置。来自一个文档的节点(或由一个文档创建的节点)不能插入另一个文档。也就是说,newChild 的 ownerDocument 属性必须与当前节点的 ownerDocument 属性相同。 + * @param newChild 指定新的节点 + * @param oldChild 指定被替换的节点 + * @return 如替换成功,此方法可返回被替换的节点,如替换失败,则返回 null + * + * + * + */ + replaceChild(newChild: Class_XmlNode, oldChild: Class_XmlNode): Class_XmlNode; + + /** + * + * @brief 从子节点列表中删除某个节点 + * @param oldChild 指定被删除的节点 + * @return 如删除成功,此方法可返回被删除的节点,如失败,则返回 null + * + * + * + */ + removeChild(oldChild: Class_XmlNode): Class_XmlNode; + +} /** endof class */ + +/** endof `module Or Internal Object` */ + + diff --git a/types/fibjs/declare/XmlNodeList.d.ts b/types/fibjs/declare/XmlNodeList.d.ts new file mode 100644 index 0000000000..40934cfdc5 --- /dev/null +++ b/types/fibjs/declare/XmlNodeList.d.ts @@ -0,0 +1,57 @@ +/*************************************************************************** + * * + * This file was automatically generated with idlc.js * + * build info: * + * - fibjs : 0.25.0 * + * - date : Jun 12 2018 07:22:40 * + * * + ***************************************************************************/ + +/** + * @author Richard + * + */ +/// + + + + +/** module Or Internal Object */ +/** + * @brief XmlNodeList 对象代表一个有顺序的节点列表 + * @detail + */ + +declare class Class_XmlNodeList extends Class__object { + + /** + * class prop + * + * + * @brief 返回节点列表中的节点数目 + * + * + * @readonly + * @type Integer + */ + + length: number + + + + /** + * + * @brief 返回节点列表中处于指定的索引号的节点 + * @param index 指定要查询的索引 + * @return 指定索引号的节点 + * + * + * + */ + item(index: number): Class_XmlNode; + +} /** endof class */ + +/** endof `module Or Internal Object` */ + + diff --git a/types/fibjs/declare/XmlProcessingInstruction.d.ts b/types/fibjs/declare/XmlProcessingInstruction.d.ts new file mode 100644 index 0000000000..a00cbab76a --- /dev/null +++ b/types/fibjs/declare/XmlProcessingInstruction.d.ts @@ -0,0 +1,59 @@ +/*************************************************************************** + * * + * This file was automatically generated with idlc.js * + * build info: * + * - fibjs : 0.25.0 * + * - date : Jun 12 2018 07:22:40 * + * * + ***************************************************************************/ + +/** + * @author Richard + * + */ +/// + + + + +/** module Or Internal Object */ +/** + * @brief XmlProcessingInstruction 对象表示 xml 处理指令 + * @detail + */ +/// +declare class Class_XmlProcessingInstruction extends Class_XmlNode { + + /** + * class prop + * + * + * @brief 返回此处理指令的目标 + * + * + * @readonly + * @type String + */ + + target: string + + /** + * class prop + * + * + * @brief 设置或返回此处理指令的内容 + * + * + * + * @type String + */ + + data: string + + + +} /** endof class */ + +/** endof `module Or Internal Object` */ + + diff --git a/types/fibjs/declare/XmlText.d.ts b/types/fibjs/declare/XmlText.d.ts new file mode 100644 index 0000000000..4236641c07 --- /dev/null +++ b/types/fibjs/declare/XmlText.d.ts @@ -0,0 +1,48 @@ +/*************************************************************************** + * * + * This file was automatically generated with idlc.js * + * build info: * + * - fibjs : 0.25.0 * + * - date : Jun 12 2018 07:22:40 * + * * + ***************************************************************************/ + +/** + * @author Richard + * + */ +/// + + + + +/** module Or Internal Object */ +/** + * @brief XmlText 对象表示元素或属性的文本内容 + * @detail XmlText 节点表示 XML 文档中的一系列纯文本。因为纯文本出现在 XML 的元素和属性中,所以 XmlText 节点通常作为 XmlElement 节点和 XmlAttr 节点的子节点出现。,,XmlText 节点继承了 XmlCharacterData 接口,通过从 XmlCharacterData 接口继承的 data 属性或从 XmlNode 接口继承的 nadevalue 属性,可以访问 XmlText 节点的文本内容。,,用从 XmlCharacterData 继承的方法或 XmlText 接口自身定义的 splitText() 方法可以操作 XmlText 节点。使用 XmlDocument 的 createTextNode 来创建一个新的 XmlText 节点。,,XmlText 节点没有子节点。,,关于从文档的子树中删除空 XmlText 节点与合并相邻的 XmlText 节点的方法,请参阅 XmlNode.normalize 方法。 + */ +/// +declare class Class_XmlText extends Class_XmlCharacterData { + + + + /** + * + * @brief 按照指定的 offset 把文本节点分割为两个节点 + * + * 该方法将在指定的 offset 处把 XmlText 节点分割成两个节点。原始的 XmlText 节点将被修改,使它包含 offset 指定的位置之前的文本内容(但不包括文本内容)。新的 XmlText 节点将被创建,用于存放从 offset 位置(包括该位置上的字符)到原字符结尾的所有字符。新的 XmlText 节点是该方法的返回值。此外,如果原始的 XmlText 节点具有 parentNode,新的 XmlText 节点将插入这个父节点,紧邻在原始节点之后。 + * + * XmlCDATASection 接口继承了 XmlText 接口, XmlCDATASection 节点也可以使用该方法 ,只是新创建的节点是 XmlCDATASection 节点,而不是 XmlText 节点。 + * @param offset 规定在何处分割文本节点。开始值以 0 开始 + * @return 从当前节点分割出的 Text 节点 + * + * + * + */ + splitText(offset: number): Class_XmlText; + +} /** endof class */ + +/** endof `module Or Internal Object` */ + + diff --git a/types/fibjs/declare/ZipFile.d.ts b/types/fibjs/declare/ZipFile.d.ts new file mode 100644 index 0000000000..842d518382 --- /dev/null +++ b/types/fibjs/declare/ZipFile.d.ts @@ -0,0 +1,168 @@ +/*************************************************************************** + * * + * This file was automatically generated with idlc.js * + * build info: * + * - fibjs : 0.25.0 * + * - date : Jun 12 2018 07:22:40 * + * * + ***************************************************************************/ + +/** + * @author Richard + * + */ +/// + + + + +/** module Or Internal Object */ +/** + * @brief zip 文件访问对象 + * @detail + */ + +declare class Class_ZipFile extends Class__object { + + + + /** + * + * @brief 获取文件名列表 + * @return 返回包含文件名的列表对象 + * + * + * @async + */ + namelist(): any[]; + + /** + * + * @brief 获取文件信息列表 + * 文件信息包含字段有:filename, date, compress_type, compress_size, file_size, password, data + * @return 返回包含文件信息的列表对象 + * + * + * @async + */ + infolist(): any[]; + + /** + * + * @brief 获取文件信息 + * 文件信息包含字段有:filename, date, compress_type, compress_size, file_size, password, data + * @param member 指定要获取信息的文件名 + * @return 返回文件信息对象 + * + * + * @async + */ + getinfo(member: string): any; + + /** + * + * @brief 返回从压缩文件读取的数据 + * @param member 指定要读取的文件名 + * @param password 解压密码, 默认没有密码 + * @return 返回文件的所有数据 + * + * + * @async + */ + read(member: string, password?: string/** = ""*/): Class_Buffer; + + /** + * + * @brief 解压所有文件 + * @param password 解压密码, 默认没有密码 + * @return 包含所有文件数据及信息的列表 + * + * + * @async + */ + readAll(password?: string/** = ""*/): any[]; + + /** + * + * @brief 解压指定文件 + * @param member 指定要解压的文件名 + * @param path 指定要解压到的路径 + * @param password 解压密码, 默认没有密码 + * + * + * @async + */ + extract(member: string, path: string, password?: string/** = ""*/): void; + + /** + * + * @brief 解压指定文件到流 + * @param member 指定要解压的文件名 + * @param strm 指定要解压到的流 + * @param password 解压密码, 默认没有密码 + * + * + * @async + */ + extract(member: string, strm: Class_SeekableStream, password?: string/** = ""*/): void; + + /** + * + * @brief 解压所有文件到指定路径 + * @param path 指定要解压到的路径 + * @param password 解压密码, 默认没有密码 + * + * + * @async + */ + extractAll(path: string, password?: string/** = ""*/): void; + + /** + * + * @brief 写入指定文件到压缩文件 + * @param filename 指定要写入的文件 + * @param inZipName 压缩在zip文件内的文件名 + * @param password 解压密码, 默认没有密码 + * + * + * @async + */ + write(filename: string, inZipName: string, password?: string/** = ""*/): void; + + /** + * + * @brief 写入指定文件到压缩文件 + * @param data 指定要写入的文件数据 + * @param inZipName 压缩在zip文件内的文件名 + * @param password 解压密码, 默认没有密码 + * + * + * @async + */ + write(data: Class_Buffer, inZipName: string, password?: string/** = ""*/): void; + + /** + * + * @brief 写入指定文件到压缩文件 + * @param strm 指定要写入文件数据流 + * @param inZipName 压缩在zip文件内的文件名 + * @param password 解压密码, 默认没有密码 + * + * + * @async + */ + write(strm: Class_SeekableStream, inZipName: string, password?: string/** = ""*/): void; + + /** + * + * @brief 关闭打开的zip文件 + * + * @async + */ + close(): void; + +} /** endof class */ + +/** endof `module Or Internal Object` */ + + diff --git a/types/fibjs/declare/ZmqSocket.d.ts b/types/fibjs/declare/ZmqSocket.d.ts new file mode 100644 index 0000000000..0d2e0707fc --- /dev/null +++ b/types/fibjs/declare/ZmqSocket.d.ts @@ -0,0 +1,105 @@ +/*************************************************************************** + * * + * This file was automatically generated with idlc.js * + * build info: * + * - fibjs : 0.25.0 * + * - date : Jun 12 2018 07:22:40 * + * * + ***************************************************************************/ + +/** + * @author Richard + * + */ +/// + + + + + + +/** module Or Internal Object */ +/** + * @brief ZeroMQ 套接口对象 + * @detail + */ + +declare class Class_ZmqSocket extends Class__object { + + /** + * class prop + * + * + * @brief 查询当前 socket 类型 + * + * @readonly + * @type Integer + */ + + type: number + + + + /** + * + * @brief ZmqSocket 对象构造函数 + * @param type 指定 socket 类型,缺省为 zmq.PAIR + * + * + * + */ + constructor(type?: number/** = undefined*/); + + /** + * + * @brief 绑定指定地址和端口 + * @param addr 指定绑定的地址,如:"tcp://*:3000" + * + * + * + */ + bind(addr: string): void; + + /** + * + * @brief 连接到指定地址的服务器 + * @param addr 指定连接的地址,如:"tcp://*:3000" + * + * + * + */ + connect(addr: string): void; + + /** + * + * @brief 接收一个数据包 + * @return 返回接收到的数据包 + * + * + * @async + */ + recv(): Class_Buffer; + + /** + * + * @brief 发送一个数据包 + * @param data 指定发送的数据包 + * + * + * + */ + send(data: Class_Buffer): void; + + /** + * + * @brief 关闭当前 socket + * + * + */ + close(): void; + +} /** endof class */ + +/** endof `module Or Internal Object` */ + + diff --git a/types/fibjs/declare/_test_env.d.ts b/types/fibjs/declare/_test_env.d.ts new file mode 100644 index 0000000000..83ae06b28d --- /dev/null +++ b/types/fibjs/declare/_test_env.d.ts @@ -0,0 +1,41 @@ +/*************************************************************************** + * * + * This file was automatically generated with idlc.js * + * build info: * + * - fibjs : 0.25.0 * + * - date : Jun 12 2018 07:22:40 * + * * + ***************************************************************************/ + +/** + * @author Richard + * + */ + + + +/// +import test from 'test' + +/// +import _assert from 'assert' + +declare global { + const describe: typeof test.describe + const xdescribe: typeof test.xdescribe + const odescribe: typeof test.odescribe + const it: typeof test.it + const xit: typeof test.xit + const oit: typeof test.oit + const before: typeof test.before + const after: typeof test.after + const beforeEach: typeof test.beforeEach + const afterEach: typeof test.afterEach + const run: typeof test.run + const setup: typeof test.setup + + const assert: typeof _assert +} +/** declare const describe: test.describe; */ + + diff --git a/types/fibjs/declare/assert.d.ts b/types/fibjs/declare/assert.d.ts new file mode 100644 index 0000000000..2b42185436 --- /dev/null +++ b/types/fibjs/declare/assert.d.ts @@ -0,0 +1,794 @@ +/*************************************************************************** + * * + * This file was automatically generated with idlc.js * + * build info: * + * - fibjs : 0.25.0 * + * - date : Jun 12 2018 07:22:40 * + * * + ***************************************************************************/ + +/** + * @author Richard + * + */ + + + + + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + + + +/** module Or Internal Object */ +/** + * @brief 断言测试模块,如果测试值为假,则报错,报错行为可设定继续运行或者错误抛出 + * @detail 引用方法:,```JavaScript,var assert = require('assert');,```,或者通过 test 模块引用:,```JavaScript,var test = require('test');,var assert = test.assert;,```,或者通过 test.setup 配置:,```JavaScript,require("test").setup();,``` + */ +declare module "assert" { + + + module assert { + + + + + + /** + * + * @brief 测试数值为真,为假则断言失败 + * @param actual 要测试的数值 + * @param msg 断言失败时的提示信息 + * + * + * + */ + export function Function(actual?: any/** = v8::Undefined(isolate)*/, msg?: string/** = ""*/): void; + + /** + * + * @brief 测试数值为真,为假则断言失败 + * @param actual 要测试的数值 + * @param msg 断言失败时的提示信息 + * + * + * + */ + export function ok(actual?: any/** = v8::Undefined(isolate)*/, msg?: string/** = ""*/): void; + + /** + * + * @brief 测试数值为假,为真则断言失败 + * @param actual 要测试的数值 + * @param msg 断言失败时的提示信息 + * + * + * + */ + export function notOk(actual?: any/** = v8::Undefined(isolate)*/, msg?: string/** = ""*/): void; + + /** + * + * @brief 测试数值等于预期值,不相等则断言失败 + * @param actual 要测试的数值 + * @param expected 预期的数值 + * @param msg 断言失败时的提示信息 + * + * + * + */ + export function equal(actual?: any/** = v8::Undefined(isolate)*/, expected?: any/** = v8::Undefined(isolate)*/, msg?: string/** = ""*/): void; + + /** + * + * @brief 测试数值不等于预期值,相等则断言失败 + * @param actual 要测试的数值 + * @param expected 预期的数值 + * @param msg 断言失败时的提示信息 + * + * + * + */ + export function notEqual(actual?: any/** = v8::Undefined(isolate)*/, expected?: any/** = v8::Undefined(isolate)*/, msg?: string/** = ""*/): void; + + /** + * + * @brief 测试数值严格等于预期值,不相等则断言失败 + * @param actual 要测试的数值 + * @param expected 预期的数值 + * @param msg 断言失败时的提示信息 + * + * + * + */ + export function strictEqual(actual?: any/** = v8::Undefined(isolate)*/, expected?: any/** = v8::Undefined(isolate)*/, msg?: string/** = ""*/): void; + + /** + * + * @brief 测试数值不严格等于预期值,相等则断言失败 + * @param actual 要测试的数值 + * @param expected 预期的数值 + * @param msg 断言失败时的提示信息 + * + * + * + */ + export function notStrictEqual(actual?: any/** = v8::Undefined(isolate)*/, expected?: any/** = v8::Undefined(isolate)*/, msg?: string/** = ""*/): void; + + /** + * + * @brief 测试数值深度等于预期值,不相等则断言失败 + * @param actual 要测试的数值 + * @param expected 预期的数值 + * @param msg 断言失败时的提示信息 + * + * + * + */ + export function deepEqual(actual?: any/** = v8::Undefined(isolate)*/, expected?: any/** = v8::Undefined(isolate)*/, msg?: string/** = ""*/): void; + + /** + * + * @brief 测试数值不深度等于预期值,相等则断言失败 + * @param actual 要测试的数值 + * @param expected 预期的数值 + * @param msg 断言失败时的提示信息 + * + * + * + */ + export function notDeepEqual(actual?: any/** = v8::Undefined(isolate)*/, expected?: any/** = v8::Undefined(isolate)*/, msg?: string/** = ""*/): void; + + /** + * + * @brief 测试数值近似等于预期值,否则断言失败 + * @param actual 要测试的数值 + * @param expected 预期的数值 + * @param delta 近似的小数精度 + * @param msg 断言失败时的提示信息 + * + * + * + */ + export function closeTo(actual: any, expected: any, delta: any, msg?: string/** = ""*/): void; + + /** + * + * @brief 测试数值不近似等于预期值,否则断言失败 + * @param actual 要测试的数值 + * @param expected 预期的数值 + * @param delta 近似的小数精度 + * @param msg 断言失败时的提示信息 + * + * + * + */ + export function notCloseTo(actual: any, expected: any, delta: any, msg?: string/** = ""*/): void; + + /** + * + * @brief 测试数值小于预期值,大于或等于则断言失败 + * @param actual 要测试的数值 + * @param expected 预期的数值 + * @param msg 断言失败时的提示信息 + * + * + * + */ + export function lessThan(actual: any, expected: any, msg?: string/** = ""*/): void; + + /** + * + * @brief 测试数值不小于预期值,小于则断言失败 + * @param actual 要测试的数值 + * @param expected 预期的数值 + * @param msg 断言失败时的提示信息 + * + * + * + */ + export function notLessThan(actual: any, expected: any, msg?: string/** = ""*/): void; + + /** + * + * @brief 测试数值大于预期值,小于或等于则断言失败 + * @param actual 要测试的数值 + * @param expected 预期的数值 + * @param msg 断言失败时的提示信息 + * + * + * + */ + export function greaterThan(actual: any, expected: any, msg?: string/** = ""*/): void; + + /** + * + * @brief 测试数值不大于预期值,大于则断言失败 + * @param actual 要测试的数值 + * @param expected 预期的数值 + * @param msg 断言失败时的提示信息 + * + * + * + */ + export function notGreaterThan(actual: any, expected: any, msg?: string/** = ""*/): void; + + /** + * + * @brief 测试变量存在,为假则断言失败 + * @param actual 要测试的数值 + * @param msg 断言失败时的提示信息 + * + * + * + */ + export function exist(actual: any, msg?: string/** = ""*/): void; + + /** + * + * @brief 测试变量不存在,为真则断言失败 + * @param actual 要测试的数值 + * @param msg 断言失败时的提示信息 + * + * + * + */ + export function notExist(actual: any, msg?: string/** = ""*/): void; + + /** + * + * @brief 测试数值为布尔值真,否则断言失败 + * @param actual 要测试的数值 + * @param msg 断言失败时的提示信息 + * + * + * + */ + export function isTrue(actual: any, msg?: string/** = ""*/): void; + + /** + * + * @brief 测试数值不为布尔值真,否则断言失败 + * @param actual 要测试的数值 + * @param msg 断言失败时的提示信息 + * + * + * + */ + export function isNotTrue(actual: any, msg?: string/** = ""*/): void; + + /** + * + * @brief 测试数值为布尔值假,否则断言失败 + * @param actual 要测试的数值 + * @param msg 断言失败时的提示信息 + * + * + * + */ + export function isFalse(actual: any, msg?: string/** = ""*/): void; + + /** + * + * @brief 测试数值不为布尔值假,否则断言失败 + * @param actual 要测试的数值 + * @param msg 断言失败时的提示信息 + * + * + * + */ + export function isNotFalse(actual: any, msg?: string/** = ""*/): void; + + /** + * + * @brief 测试数值为 Null,否则断言失败 + * @param actual 要测试的数值 + * @param msg 断言失败时的提示信息 + * + * + * + */ + export function isNull(actual: any, msg?: string/** = ""*/): void; + + /** + * + * @brief 测试数值不为 Null,否则断言失败 + * @param actual 要测试的数值 + * @param msg 断言失败时的提示信息 + * + * + * + */ + export function isNotNull(actual: any, msg?: string/** = ""*/): void; + + /** + * + * @brief 测试数值为 undefined,否则断言失败 + * @param actual 要测试的数值 + * @param msg 断言失败时的提示信息 + * + * + * + */ + export function isUndefined(actual: any, msg?: string/** = ""*/): void; + + /** + * + * @brief 测试数值不为 undefined,否则断言失败 + * @param actual 要测试的数值 + * @param msg 断言失败时的提示信息 + * + * + * + */ + export function isDefined(actual: any, msg?: string/** = ""*/): void; + + /** + * + * @brief 测试数值为函数,否则断言失败 + * @param actual 要测试的数值 + * @param msg 断言失败时的提示信息 + * + * + * + */ + export function isFunction(actual: any, msg?: string/** = ""*/): void; + + /** + * + * @brief 测试数值不为函数,否则断言失败 + * @param actual 要测试的数值 + * @param msg 断言失败时的提示信息 + * + * + * + */ + export function isNotFunction(actual: any, msg?: string/** = ""*/): void; + + /** + * + * @brief 测试数值为对象,否则断言失败 + * @param actual 要测试的数值 + * @param msg 断言失败时的提示信息 + * + * + * + */ + export function isObject(actual: any, msg?: string/** = ""*/): void; + + /** + * + * @brief 测试数值不为对象,否则断言失败 + * @param actual 要测试的数值 + * @param msg 断言失败时的提示信息 + * + * + * + */ + export function isNotObject(actual: any, msg?: string/** = ""*/): void; + + /** + * + * @brief 测试数值为数组,否则断言失败 + * @param actual 要测试的数值 + * @param msg 断言失败时的提示信息 + * + * + * + */ + export function isArray(actual: any, msg?: string/** = ""*/): void; + + /** + * + * @brief 测试数值不为数组,否则断言失败 + * @param actual 要测试的数值 + * @param msg 断言失败时的提示信息 + * + * + * + */ + export function isNotArray(actual: any, msg?: string/** = ""*/): void; + + /** + * + * @brief 测试数值为字符串,否则断言失败 + * @param actual 要测试的数值 + * @param msg 断言失败时的提示信息 + * + * + * + */ + export function isString(actual: any, msg?: string/** = ""*/): void; + + /** + * + * @brief 测试数值不为字符串,否则断言失败 + * @param actual 要测试的数值 + * @param msg 断言失败时的提示信息 + * + * + * + */ + export function isNotString(actual: any, msg?: string/** = ""*/): void; + + /** + * + * @brief 测试数值为数字,否则断言失败 + * @param actual 要测试的数值 + * @param msg 断言失败时的提示信息 + * + * + * + */ + export function isNumber(actual: any, msg?: string/** = ""*/): void; + + /** + * + * @brief 测试数值不为数字,否则断言失败 + * @param actual 要测试的数值 + * @param msg 断言失败时的提示信息 + * + * + * + */ + export function isNotNumber(actual: any, msg?: string/** = ""*/): void; + + /** + * + * @brief 测试数值为布尔,否则断言失败 + * @param actual 要测试的数值 + * @param msg 断言失败时的提示信息 + * + * + * + */ + export function isBoolean(actual: any, msg?: string/** = ""*/): void; + + /** + * + * @brief 测试数值不为布尔,否则断言失败 + * @param actual 要测试的数值 + * @param msg 断言失败时的提示信息 + * + * + * + */ + export function isNotBoolean(actual: any, msg?: string/** = ""*/): void; + + /** + * + * @brief 测试数值为给定类型,否则断言失败 + * @param actual 要测试的数值 + * @param type 指定的类型 + * @param msg 断言失败时的提示信息 + * + * + * + */ + export function typeOf(actual: any, type: string, msg?: string/** = ""*/): void; + + /** + * + * @brief 测试数值不为给定类型,否则断言失败 + * @param actual 要测试的数值 + * @param type 指定的类型 + * @param msg 断言失败时的提示信息 + * + * + * + */ + export function notTypeOf(actual: any, type: string, msg?: string/** = ""*/): void; + + /** + * + * @brief 测试对象中包含指定属性,否则断言失败 + * @param object 要测试的对象 + * @param prop 要测试的属性 + * @param msg 断言失败时的提示信息 + * + * + * + */ + export function property(object: any, prop: any, msg?: string/** = ""*/): void; + + /** + * + * @brief 测试对象中不包含指定属性,否则断言失败 + * @param object 要测试的对象 + * @param prop 要测试的属性 + * @param msg 断言失败时的提示信息 + * + * + * + */ + export function notProperty(object: any, prop: any, msg?: string/** = ""*/): void; + + /** + * + * @brief 深度测试对象中包含指定属性,否则断言失败 + * @param object 要测试的对象 + * @param prop 要测试的属性,以“.”分割 + * @param msg 断言失败时的提示信息 + * + * + * + */ + export function deepProperty(object: any, prop: any, msg?: string/** = ""*/): void; + + /** + * + * @brief 深度测试对象中不包含指定属性,否则断言失败 + * @param object 要测试的对象 + * @param prop 要测试的属性,以“.”分割 + * @param msg 断言失败时的提示信息 + * + * + * + */ + export function notDeepProperty(object: any, prop: any, msg?: string/** = ""*/): void; + + /** + * + * @brief 测试对象中指定属性的值为给定值,否则断言失败 + * @param object 要测试的对象 + * @param prop 要测试的属性 + * @param value 给定的值 + * @param msg 断言失败时的提示信息 + * + * + * + */ + export function propertyVal(object: any, prop: any, value: any, msg?: string/** = ""*/): void; + + /** + * + * @brief 测试对象中指定属性的值不为给定值,否则断言失败 + * @param object 要测试的对象 + * @param prop 要测试的属性 + * @param value 给定的值 + * @param msg 断言失败时的提示信息 + * + * + * + */ + export function propertyNotVal(object: any, prop: any, value: any, msg?: string/** = ""*/): void; + + /** + * + * @brief 深度测试对象中指定属性的值为给定值,否则断言失败 + * @param object 要测试的对象 + * @param prop 要测试的属性,以“.”分割 + * @param value 给定的值 + * @param msg 断言失败时的提示信息 + * + * + * + */ + export function deepPropertyVal(object: any, prop: any, value: any, msg?: string/** = ""*/): void; + + /** + * + * @brief 深度测试对象中指定属性的值不为给定值,否则断言失败 + * @param object 要测试的对象 + * @param prop 要测试的属性,以“.”分割 + * @param value 给定的值 + * @param msg 断言失败时的提示信息 + * + * + * + */ + export function deepPropertyNotVal(object: any, prop: any, value: any, msg?: string/** = ""*/): void; + + /** + * + * @brief 测试给定的代码会抛出错误,未抛出则断言失败 + * @param block 指定测试的代码,以函数形式给出 + * @param msg 断言失败时的提示信息 + * + * + * + */ + export function throws(block: Function, msg?: string/** = ""*/): void; + + /** + * + * @brief 测试给定的代码不会抛出错误,抛出则断言失败 + * @param block 指定测试的代码,以函数形式给出 + * @param msg 断言失败时的提示信息 + * + * + * + */ + export function doesNotThrow(block: Function, msg?: string/** = ""*/): void; + + /** + * + * @brief 如果参数为真,则抛出 + * @param object 参数 + * + * + * + */ + export function ifError(object?: any/** = v8::Undefined(isolate)*/): void; + + } /** end of `module assert` */ + export = assert +} + +/** endof `module Or Internal Object` */ + + diff --git a/types/fibjs/declare/base32.d.ts b/types/fibjs/declare/base32.d.ts new file mode 100644 index 0000000000..516662ba9f --- /dev/null +++ b/types/fibjs/declare/base32.d.ts @@ -0,0 +1,239 @@ +/*************************************************************************** + * * + * This file was automatically generated with idlc.js * + * build info: * + * - fibjs : 0.25.0 * + * - date : Jun 12 2018 07:22:40 * + * * + ***************************************************************************/ + +/** + * @author Richard + * + */ + + + + + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + + + +/** module Or Internal Object */ +/** + * @brief base32 编码与解码模块 + * @detail 引用方式:,```JavaScript,var encoding = require('encoding');,var base32 = encoding.base32;,```,或者,```JavaScript,var base32 = require('base32');,``` + */ +declare module "base32" { + + + module base32 { + + + + + + /** + * + * @brief 以 base32 方式编码数据 + * @param data 要编码的数据 + * @return 返回编码的字符串 + * + * + * + */ + export function encode(data: Class_Buffer): string; + + /** + * + * @brief 以 base32 方式解码字符串为二进制数据 + * @param data 要解码的字符串 + * @return 返回解码的二进制数据 + * + * + * + */ + export function decode(data: string): Class_Buffer; + + } /** end of `module base32` */ + export = base32 +} + +/** endof `module Or Internal Object` */ + + diff --git a/types/fibjs/declare/base64.d.ts b/types/fibjs/declare/base64.d.ts new file mode 100644 index 0000000000..c2316cb06d --- /dev/null +++ b/types/fibjs/declare/base64.d.ts @@ -0,0 +1,240 @@ +/*************************************************************************** + * * + * This file was automatically generated with idlc.js * + * build info: * + * - fibjs : 0.25.0 * + * - date : Jun 12 2018 07:22:40 * + * * + ***************************************************************************/ + +/** + * @author Richard + * + */ + + + + + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + + + +/** module Or Internal Object */ +/** + * @brief base64 编码与解码模块 + * @detail 引用方式:,```JavaScript,var encoding = require('encoding');,var base64 = encoding.base64;,```,或者,```JavaScript,var base64 = require('base64');,``` + */ +declare module "base64" { + + + module base64 { + + + + + + /** + * + * @brief 以 base64 方式编码数据 + * @param data 要编码的数据 + * @param url 指定是否使用 url 安全字符编码 + * @return 返回编码的字符串 + * + * + * + */ + export function encode(data: Class_Buffer, url?: boolean/** = false*/): string; + + /** + * + * @brief 以 base64 方式解码字符串为二进制数据 + * @param data 要解码的字符串 + * @return 返回解码的二进制数据 + * + * + * + */ + export function decode(data: string): Class_Buffer; + + } /** end of `module base64` */ + export = base64 +} + +/** endof `module Or Internal Object` */ + + diff --git a/types/fibjs/declare/base64vlq.d.ts b/types/fibjs/declare/base64vlq.d.ts new file mode 100644 index 0000000000..7deb1bf810 --- /dev/null +++ b/types/fibjs/declare/base64vlq.d.ts @@ -0,0 +1,250 @@ +/*************************************************************************** + * * + * This file was automatically generated with idlc.js * + * build info: * + * - fibjs : 0.25.0 * + * - date : Jun 12 2018 07:22:40 * + * * + ***************************************************************************/ + +/** + * @author Richard + * + */ + + + + + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + + + +/** module Or Internal Object */ +/** + * @brief base64vlq 编码与解码模块 + * @detail 引用方式:,```JavaScript,var encoding = require('encoding');,var base64vlq = encoding.base64vlq;,```,或者,```JavaScript,var base64vlq = require('base64vlq');,``` + */ +declare module "base64vlq" { + + + module base64vlq { + + + + + + /** + * + * @brief 以 base64vlq 方式编码数据 + * @param data 要编码的数据 + * @return 返回编码的字符串 + * + * + * + */ + export function encode(data: number): string; + + /** + * + * @brief 以 base64vlq 方式编码数据 + * @param data 要编码的数据 + * @return 返回编码的字符串 + * + * + * + */ + export function encode(data: any[]): string; + + /** + * + * @brief 以 base64vlq 方式解码字符串为二进制数据 + * @param data 要解码的字符串 + * @return 返回解码的二进制数据 + * + * + * + */ + export function decode(data: string): any[]; + + } /** end of `module base64vlq` */ + export = base64vlq +} + +/** endof `module Or Internal Object` */ + + diff --git a/types/fibjs/declare/bson.d.ts b/types/fibjs/declare/bson.d.ts new file mode 100644 index 0000000000..f9eeab19cb --- /dev/null +++ b/types/fibjs/declare/bson.d.ts @@ -0,0 +1,239 @@ +/*************************************************************************** + * * + * This file was automatically generated with idlc.js * + * build info: * + * - fibjs : 0.25.0 * + * - date : Jun 12 2018 07:22:40 * + * * + ***************************************************************************/ + +/** + * @author Richard + * + */ + + + + + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + + + +/** module Or Internal Object */ +/** + * @brief bson 编码与解码模块 + * @detail 引用方式:,```JavaScript,var encoding = require('encoding');,var bson = encoding.bson;,```,或者,```JavaScript,var bson = require('bson');,``` + */ +declare module "bson" { + + + module bson { + + + + + + /** + * + * @brief 以 bson 格式编码变量 + * @param data 要编码的变量 + * @return 返回编码的二进制数据 + * + * + * + */ + export function encode(data: object): Class_Buffer; + + /** + * + * @brief 以 bson 方式解码字符串为一个变量 + * @param data 要解码的二进制数据 + * @return 返回解码的变量 + * + * + * + */ + export function decode(data: Class_Buffer): object; + + } /** end of `module bson` */ + export = bson +} + +/** endof `module Or Internal Object` */ + + diff --git a/types/fibjs/declare/console.d.ts b/types/fibjs/declare/console.d.ts new file mode 100644 index 0000000000..43f8603c2e --- /dev/null +++ b/types/fibjs/declare/console.d.ts @@ -0,0 +1,917 @@ +/*************************************************************************** + * * + * This file was automatically generated with idlc.js * + * build info: * + * - fibjs : 0.25.0 * + * - date : Jun 12 2018 07:22:40 * + * * + ***************************************************************************/ + +/** + * @author Richard + * + */ + + + + + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + + + +/** module Or Internal Object */ +/** + * @brief 控制台访问对象 + * @detail 全局对象。可用于提示信息,警告和错误记录。通过启动配置文件,可将日志定位到不同的设备,以便于跟踪。日志支持格式化输出,例如:,```JavaScript,console.log("%d + %d = %d", 100, 200, 100 + 200);,```,可以使用的格式化参数如下:,- %s - 字符串,- %d - 数字,包括整数和数字,- %j - 以 JSON 格式输出对象,- %% - 输出字符 '%' 本身 + */ +declare module "console" { + + + module console { + + /** + * + * @brief loglevel 级别常量 + * + * + */ + export const FATAL = 0; + + /** + * + * @brief loglevel 级别常量 + * + * + */ + export const ALERT = 1; + + /** + * + * @brief loglevel 级别常量 + * + * + */ + export const CRIT = 2; + + /** + * + * @brief loglevel 级别常量 + * + * + */ + export const ERROR = 3; + + /** + * + * @brief loglevel 级别常量 + * + * + */ + export const WARN = 4; + + /** + * + * @brief loglevel 级别常量 + * + * + */ + export const NOTICE = 5; + + /** + * + * @brief loglevel 级别常量 + * + * + */ + export const INFO = 6; + + /** + * + * @brief loglevel 级别常量 + * + * + */ + export const DEBUG = 7; + + /** + * + * @brief loglevel 仅用于输出,信息输出后不换行,file 和 syslog 不保存此级别信息 + * + * + */ + export const PRINT = 9; + + /** + * + * @brief loglevel 级别常量 + * + * + */ + export const NOTSET = 10; + + + /** + * + * @brief 输出级别,用以过滤输出信息,缺省为 NOTSET,全部输出。信息过滤之后才会输出给 add 设定的各个设备。 + * + * + * + */ + export const loglevel: number; + + /** + * + * @brief 查询终端每行字符数 + * + * + */ + export const width: number; + + /** + * + * @brief 查询终端行数 + * + * + */ + export const height: number; + + + + + /** + * + * @brief 添加 console 输出系统,支持的设备为 console, syslog, event,最多可以添加 10 个输出 + * + * 通过配置 console,可以将程序输出和系统错误发往不同设备,用于运行环境信息收集。 + * + * type 为配置,为设备名称字符串: + * + * ```JavaScript + * console.add("console"); + * ``` + * + * syslog 仅在 posix 平台有效: + * ```JavaScript + * console.add("syslog"); + * ``` + * + * event 仅在 windows 平台有效: + * ```JavaScript + * console.add("event"); + * ``` + * + * @param type 输出设备 + * + * + * + */ + export function add(type: string): void; + + /** + * + * @brief 添加 console 输出系统,支持的设备为 console, syslog, event 和 file,最多可以添加 10 个输出 + * + * 通过配置 console,可以将程序输出和系统错误发往不同设备,用于运行环境信息收集。 + * + * cfg 可以为一个设备配置对象: + * ```JavaScript + * console.add({ + * type: "console", + * levels: [console.INFO, console.ERROR] // 选项,省略则输出全部级别日志 + * }); + * ``` + * + * syslog 仅在 posix 平台有效: + * ```JavaScript + * console.add({ + * type: "syslog", + * levels: [console.INFO, console.ERROR] + * }); + * ``` + * + * event 仅在 windows 平台有效: + * ```JavaScript + * console.add({ + * type: "event", + * levels: [console.INFO, console.ERROR] + * }); + * ``` + * + * file 日志: + * ```JavaScript + * console.add({ + * type: "file", + * levels: [console.INFO, console.ERROR], + * // 必选项,指定日志输出文件,可使用 s% 指定插入日期位置,不指定则添加在结尾 + * path: "path/to/file_%s.log", + * // 选项,可选值为 "day", "hour", "minute", "###k", "###m", "###g",缺省为 "1m" + * split: "30m", + * // 选项,可选范围为 2-128,缺省为 128 + * count: 10 + * }); + * ``` + * + * @param cfg 输出配置 + * + * + * + */ + export function add(cfg: object): void; + + /** + * + * @brief 批量添加 console 输出系统,支持的设备为 console, syslog, event 和 file,最多可以添加 10 个输出 + * + * 通过配置 console,可以将程序输出和系统错误发往不同设备,用于运行环境信息收集。 + * + * ```JavaScript + * console.add(["console", { + * type: "syslog", + * levels: [console.INFO, console.ERROR] + * }]); + * ``` + * + * @param cfg 输出配置数组 + * + * + * + */ + export function add(cfg: any[]): void; + + /** + * + * @brief 初始化到缺省设置,只在 console 输出信息 + * + * + */ + export function reset(): void; + + /** + * + * @brief 记录普通日志信息,与 info 等同 + * + * 记录一般等级的日志信息。通常用于输出非错误性提示信息。 + * @param fmt 格式化字符串 + * @param args 可选参数列表 + * + * + * + */ + export function log(fmt: string, ...args: any[]): void; + + /** + * + * @brief 记录普通日志信息,与 info 等同 + * + * 记录一般等级的日志信息。通常用于输出非错误性提示信息。 + * @param args 可选参数列表 + * + * + * + */ + export function log(...args: any[]): void; + + /** + * + * @brief 记录调试日志信息 + * + * 记录调试日志信息。通常用于输出调试信息。不重要。 + * @param fmt 格式化字符串 + * @param args 可选参数列表 + * + * + * + */ + export function debug(fmt: string, ...args: any[]): void; + + /** + * + * @brief 记录调试日志信息 + * + * 记录调试日志信息。通常用于输出调试信息。不重要。 + * @param args 可选参数列表 + * + * + * + */ + export function debug(...args: any[]): void; + + /** + * + * @brief 记录普通日志信息,与 log 等同 + * + * 记录一般等级的日志信息。通常用于输出非错误性提示信息。 + * @param fmt 格式化字符串 + * @param args 可选参数列表 + * + * + * + */ + export function info(fmt: string, ...args: any[]): void; + + /** + * + * @brief 记录普通日志信息,与 log 等同 + * + * 记录一般等级的日志信息。通常用于输出非错误性提示信息。 + * @param args 可选参数列表 + * + * + * + */ + export function info(...args: any[]): void; + + /** + * + * @brief 记录警告日志信息 + * + * 记录警告日志信息。通常用于输出提示性调试信息。一般重要。 + * @param fmt 格式化字符串 + * @param args 可选参数列表 + * + * + * + */ + export function notice(fmt: string, ...args: any[]): void; + + /** + * + * @brief 记录警告日志信息 + * + * 记录警告日志信息。通常用于输出提示性调试信息。一般重要。 + * @param args 可选参数列表 + * + * + * + */ + export function notice(...args: any[]): void; + + /** + * + * @brief 记录警告日志信息 + * + * 记录警告日志信息。通常用于输出警告性调试信息。重要。 + * @param fmt 格式化字符串 + * @param args 可选参数列表 + * + * + * + */ + export function warn(fmt: string, ...args: any[]): void; + + /** + * + * @brief 记录警告日志信息 + * + * 记录警告日志信息。通常用于输出警告性调试信息。重要。 + * @param args 可选参数列表 + * + * + * + */ + export function warn(...args: any[]): void; + + /** + * + * @brief 记录错误日志信息 + * + * 记录用于错误日志信息。通常用于输出错误信息。非常重要。系统的出错信息也会以此等级记录。 + * @param fmt 格式化字符串 + * @param args 可选参数列表 + * + * + * + */ + export function error(fmt: string, ...args: any[]): void; + + /** + * + * @brief 记录错误日志信息 + * + * 记录用于错误日志信息。通常用于输出错误信息。非常重要。系统的出错信息也会以此等级记录。 + * @param args 可选参数列表 + * + * + * + */ + export function error(...args: any[]): void; + + /** + * + * @brief 记录关键错误日志信息 + * + * 记录用于关键错误日志信息。通常用于输出关键错误信息。非常重要。 + * @param fmt 格式化字符串 + * @param args 可选参数列表 + * + * + * + */ + export function crit(fmt: string, ...args: any[]): void; + + /** + * + * @brief 记录关键错误日志信息 + * + * 记录用于关键错误日志信息。通常用于输出关键错误信息。非常重要。 + * @param args 可选参数列表 + * + * + * + */ + export function crit(...args: any[]): void; + + /** + * + * @brief 记录警报错误日志信息 + * + * 记录用于警报错误日志信息。通常用于输出警报错误信息。非常重要。为最高级别信息。 + * @param fmt 格式化字符串 + * @param args 可选参数列表 + * + * + * + */ + export function alert(fmt: string, ...args: any[]): void; + + /** + * + * @brief 记录警报错误日志信息 + * + * 记录用于警报错误日志信息。通常用于输出警报错误信息。非常重要。为最高级别信息。 + * @param args 可选参数列表 + * + * + * + */ + export function alert(...args: any[]): void; + + /** + * + * @brief 用 JSON 格式输出对象 + * @param obj 给定要显示的对象 + * + * + * + */ + export function dir(obj: any): void; + + /** + * + * @brief 启动一个计时器 + * + * @param label 标题,缺省为空字符串。 + * + * + * + */ + export function time(label?: string/** = "time"*/): void; + + /** + * + * @brief 输出指定计时器当前计时值 + * + * @param label 标题,缺省为空字符串。 + * + * + * + */ + export function timeElapse(label?: string/** = "time"*/): void; + + /** + * + * @brief 结束指定计时器,并输出最后计时值 + * + * @param label 标题,缺省为空字符串。 + * + * + * + */ + export function timeEnd(label?: string/** = "time"*/): void; + + /** + * + * @brief 输出当前调用堆栈 + * + * 通过日志输出当前调用堆栈。 + * @param label 标题,缺省为空字符串。 + * + * + * + */ + export function trace(label?: string/** = "trace"*/): void; + + /** + * + * @brief 断言测试,如果测试值为假,则报错 + * @param value 测试的数值 + * @param msg 报错信息 + * + * + * + */ + export function assert(value: any, msg?: string/** = ""*/): void; + + /** + * + * @brief 向控制台输出格式化文本,输出内容不会记入日志系统,输出文本后不会自动换行,可连续输出 + * @param fmt 格式化字符串 + * @param args 可选参数列表 + * + * + * + */ + export function print(fmt: string, ...args: any[]): void; + + /** + * + * @brief 向控制台输出格式化文本,输出内容不会记入日志系统,输出文本后不会自动换行,可连续输出 + * @param args 可选参数列表 + * + * + * + */ + export function print(...args: any[]): void; + + /** + * + * @brief 移动控制台光标到指定位置 + * @param row 指定新光标的行坐标 + * @param column 指定新光标的列坐标 + * + * + * + */ + export function moveTo(row: number, column: number): void; + + /** + * + * @brief 隐藏控制台光标 + * + * + */ + export function hideCursor(): void; + + /** + * + * @brief 显示控制台光标 + * + * + */ + export function showCursor(): void; + + /** + * + * @brief 清除控制台 + * + * + */ + export function clear(): void; + + /** + * + * @brief 按下一个按键 + * + * 参数 key 可以使用字符串传入功能键: + * - 功能键:f1 - f12 + * - 方向键:up, down,left, right, home, end, pageup, pagedown + * - 编辑键:backspace, delete, insert, enter, tab, escape, space + * - 控制键:control, alt, shift, command + * @param key 指定按键,单字符直接传入,功能键传入名称 + * @param modifier 指定控制键,可以为:control, alt, shift, command + * + * + * + */ + export function keyDown(key: string, modifier?: string/** = ""*/): void; + + /** + * + * @brief 按下一个按键 + * + * 参数 key 可以使用字符串传入功能键: + * - 功能键:f1 - f12 + * - 方向键:up, down,left, right, home, end, pageup, pagedown + * - 编辑键:backspace, delete, insert, enter, tab, escape, space + * - 控制键:control, alt, shift, command + * @param key 指定按键,单字符直接传入,功能键传入名称 + * @param modifier 指定控制键数组,可以为:control, alt, shift, command + * + * + * + */ + export function keyDown(key: string, modifier: any[]): void; + + /** + * + * @brief 松开一个按键 + * + * 参数 key 可以使用字符串传入功能键: + * - 功能键:f1 - f12 + * - 方向键:up, down,left, right, home, end, pageup, pagedown + * - 编辑键:backspace, delete, insert, enter, tab, escape, space + * - 控制键:control, alt, shift, command + * @param key 指定按键,单字符直接传入,功能键传入名称 + * @param modifier 指定控制键,可以为:control, alt, shift, command + * + * + * + */ + export function keyUp(key: string, modifier?: string/** = ""*/): void; + + /** + * + * @brief 松开一个按键 + * + * 参数 key 可以使用字符串传入功能键: + * - 功能键:f1 - f12 + * - 方向键:up, down,left, right, home, end, pageup, pagedown + * - 编辑键:backspace, delete, insert, enter, tab, escape, space + * - 控制键:control, alt, shift, command + * @param key 指定按键,单字符直接传入,功能键传入名称 + * @param modifier 指定控制键数组,可以为:control, alt, shift, command + * + * + * + */ + export function keyUp(key: string, modifier: any[]): void; + + /** + * + * @brief 点击并松开一个按键 + * + * 参数 key 可以使用字符串传入功能键: + * - 功能键:f1 - f12 + * - 方向键:up, down,left, right, home, end, pageup, pagedown + * - 编辑键:backspace, delete, insert, enter, tab, escape, space + * - 控制键:control, alt, shift, command + * @param key 指定按键,单字符直接传入,功能键传入名称 + * @param modifier 指定控制键,可以为:control, alt, shift, command + * + * + * + */ + export function keyTap(key: string, modifier?: string/** = ""*/): void; + + /** + * + * @brief 点击并松开一个按键 + * + * 参数 key 可以使用字符串传入功能键: + * - 功能键:f1 - f12 + * - 方向键:up, down,left, right, home, end, pageup, pagedown + * - 编辑键:backspace, delete, insert, enter, tab, escape, space + * - 控制键:control, alt, shift, command + * @param key 指定按键,单字符直接传入,功能键传入名称 + * @param modifier 指定控制键数组,可以为:control, alt, shift, command + * + * + * + */ + export function keyTap(key: string, modifier: any[]): void; + + /** + * + * @brief 输入一个字符串 + * @param text 指定输入的字符串 + * + * + * + */ + export function typeString(text: string): void; + + /** + * + * @brief 移动鼠标到指定的位置 + * @param x 指定 x 坐标 + * @param y 指定 y 坐标 + * + * + * + */ + export function moveMouse(x: number, y: number): void; + + /** + * + * @brief 按下一个鼠标键 + * @param button 指定鼠标键名称,允许值为: left, right, moddle + * + * + * + */ + export function mouseUp(button: string): void; + + /** + * + * @brief 放开一个鼠标键 + * @param button 指定鼠标键名称,允许值为: left, right, moddle + * + * + * + */ + export function mouseDown(button: string): void; + + /** + * + * @brief 点击一个鼠标键 + * @param button 指定鼠标键名称,允许值为: left, right, moddle + * @param dbclick 指定是否双击,缺省为 false + * + * + * + */ + export function clickMouse(button: string, dbclick?: boolean/** = false*/): void; + + /** + * + * @brief 从控制台读取用户输入 + * @param msg 提示信息 + * @return 返回用户输入的信息 + * + * + * @async + */ + export function readLine(msg?: string/** = ""*/): string; + + } /** end of `module console` */ + export = console +} + +/** endof `module Or Internal Object` */ + + diff --git a/types/fibjs/declare/constants.d.ts b/types/fibjs/declare/constants.d.ts new file mode 100644 index 0000000000..76997275c9 --- /dev/null +++ b/types/fibjs/declare/constants.d.ts @@ -0,0 +1,217 @@ +/*************************************************************************** + * * + * This file was automatically generated with idlc.js * + * build info: * + * - fibjs : 0.25.0 * + * - date : Jun 12 2018 07:22:40 * + * * + ***************************************************************************/ + +/** + * @author Richard + * + */ + + + + + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + + + +/** module Or Internal Object */ +/** + * @brief 常用常量定义模块 + * @detail 引用方法:,```JavaScript,var constants = require('constants');,``` + */ +declare module "constants" { + + + module constants { + + + + + + } /** end of `module constants` */ + export = constants +} + +/** endof `module Or Internal Object` */ + + diff --git a/types/fibjs/declare/coroutine.d.ts b/types/fibjs/declare/coroutine.d.ts new file mode 100644 index 0000000000..8a4c5ec049 --- /dev/null +++ b/types/fibjs/declare/coroutine.d.ts @@ -0,0 +1,376 @@ +/*************************************************************************** + * * + * This file was automatically generated with idlc.js * + * build info: * + * - fibjs : 0.25.0 * + * - date : Jun 12 2018 07:22:40 * + * * + ***************************************************************************/ + +/** + * @author Richard + * + */ + + + + + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + + + +/** module Or Internal Object */ +/** + * @brief 并发控制模块 + * @detail 引用方法:,```JavaScript,var coroutine = require('coroutine');,``` + */ +declare module "coroutine" { + + + module coroutine { + + + /** + * + * @brief 返回当前正在运行的全部 fiber 数组 + * + * + */ + export const fibers: any[]; + + /** + * + * @brief 查询和设置空闲 Fiber 数量,服务器抖动较大时可适度增加空闲 Fiber 数量。缺省为 256 + * + * + */ + export const spareFibers: number; + + /** + * + * @brief 查询当前 vm 编号 + * + * + */ + export const vmid: number; + + /** + * + * @brief 修改和查询本 vm 的输出级别,用以过滤输出信息,缺省为 console.NOTSET,全部输出 + * + * + * + */ + export const loglevel: number; + + + /** + * + * @brief 锁对象,参见 Lock + * + * + */ + export class Lock extends Class_Lock {} + + + /** + * + * @brief 信号量对象,参见 Semaphore + * + * + */ + export class Semaphore extends Class_Semaphore {} + + + /** + * + * @brief 条件变量对象,参见 Condition + * + * + */ + export class Condition extends Class_Condition {} + + + /** + * + * @brief 事件对象,参见 Event + * + * + */ + export class Event extends Class_Event {} + + + /** + * + * @brief 独立线程工作对象,参见 Worker + * + * + */ + export class Worker extends Class_Worker {} + + + + + /** + * + * @brief 启动一个纤程并返回纤程对象 + * @param func 制定纤程执行的函数 + * @param args 可变参数序列,此序列会在纤程内传递给函数 + * @return 返回纤程对象 + * + * + * + */ + export function start(func: Function, ...args: any[]): Class_Fiber; + + /** + * + * @brief 并行执行一组函数,并等待返回 + * @param funcs 并行执行的函数数组 + * @param fibers 限制并发 fiber 数量,缺省为 -1,启用与 funcs 数量相同 fiber + * @return 返回函数执行结果的数组 + * + * + * + */ + export function parallel(funcs: any[], fibers?: number/** = -1*/): any[]; + + /** + * + * @brief 并行执行一个函数处理一组数据,并等待返回 + * @param datas 并行执行的数据数组 + * @param func 并行执行的函数 + * @param fibers 限制并发 fiber 数量,缺省为 -1,启用与 datas 数量相同 fiber + * @return 返回函数执行结果的数组 + * + * + * + */ + export function parallel(datas: any[], func: Function, fibers?: number/** = -1*/): any[]; + + /** + * + * @brief 并行执行一个函数多次,并等待返回 + * @param func 并行执行的函数数 + * @param num 重复任务数量 + * @param fibers 限制并发 fiber 数量,缺省为 -1,启用与 funcs 数量相同 fiber + * @return 返回函数执行结果的数组 + * + * + * + */ + export function parallel(func: Function, num: number, fibers?: number/** = -1*/): any[]; + + /** + * + * @brief 并行执行一组函数,并等待返回 + * @param funcs 一组并行执行的函数 + * @return 返回函数执行结果的数组 + * + * + * + */ + export function parallel(...funcs: any[]): any[]; + + /** + * + * @brief 返回当前纤程 + * @return 当前纤程对象 + * + * + * + */ + export function current(): Class_Fiber; + + /** + * + * @brief 暂停当前纤程指定的时间 + * @param ms 指定要暂停的时间,以毫秒为单位,缺省为 0,即有空闲立即回恢复运行 + * + * + * @async + */ + export function sleep(ms?: number/** = 0*/): void; + + } /** end of `module coroutine` */ + export = coroutine +} + +/** endof `module Or Internal Object` */ + + diff --git a/types/fibjs/declare/crypto.d.ts b/types/fibjs/declare/crypto.d.ts new file mode 100644 index 0000000000..9dcea20fa0 --- /dev/null +++ b/types/fibjs/declare/crypto.d.ts @@ -0,0 +1,606 @@ +/*************************************************************************** + * * + * This file was automatically generated with idlc.js * + * build info: * + * - fibjs : 0.25.0 * + * - date : Jun 12 2018 07:22:40 * + * * + ***************************************************************************/ + +/** + * @author Richard + * + */ + + + + + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + + + +/** module Or Internal Object */ +/** + * @brief 加密算法模块 + * @detail 使用方法:,```JavaScript,var crypto = require('crypto');,``` + */ +declare module "crypto" { + + + module crypto { + + /** + * + * @brief 指定对称加密算法 AES,支持 128, 192, 256 位 key,分组密码工作模式支持 ECB, CBC, CFB128, CTR, GCM + * + * + */ + export const AES = 1; + + /** + * + * @brief 指定对称加密算法 CAMELLIA,支持 128, 192, 256 位 key,分组密码工作模式支持 ECB, CBC, CFB128, CTR, GCM + * + * + */ + export const CAMELLIA = 2; + + /** + * + * @brief 指定对称加密算法 DES,支持 64 位 key,分组密码工作模式支持 ECB, CBC + * + * + */ + export const DES = 3; + + /** + * + * @brief 指定对称加密算法 DES-EDE,支持 128 位 key,分组密码工作模式支持 ECB, CBC + * + * + */ + export const DES_EDE = 4; + + /** + * + * @brief 指定对称加密算法 DES-EDE3,支持 192 位 key,分组密码工作模式支持 ECB, CBC + * + * + */ + export const DES_EDE3 = 5; + + /** + * + * @brief 指定对称加密算法 BLOWFISH,支持 192 位 key,分组密码工作模式支持 ECB, CBC, CFB64, CTR + * + * + */ + export const BLOWFISH = 6; + + /** + * + * @brief 指定对称加密算法 ARC4,支持 40, 56, 64, 128 位 key + * + * + */ + export const ARC4 = 7; + + /** + * + * @brief 指定分组密码工作模式支持 ECB + * + * + */ + export const ECB = 1; + + /** + * + * @brief 指定分组密码工作模式支持 CBC + * + * + */ + export const CBC = 2; + + /** + * + * @brief 指定分组密码工作模式支持 CFB64 + * + * + */ + export const CFB64 = 3; + + /** + * + * @brief 指定分组密码工作模式支持 CFB128 + * + * + */ + export const CFB128 = 4; + + /** + * + * @brief 指定分组密码工作模式支持 OFB + * + * + */ + export const OFB = 5; + + /** + * + * @brief 指定分组密码工作模式支持 CTR + * + * + */ + export const CTR = 6; + + /** + * + * @brief 指定分组密码工作模式支持 GCM + * + * + */ + export const GCM = 7; + + /** + * + * @brief 指定流密码模式 + * + * + */ + export const STREAM = 8; + + /** + * + * @brief 指定分组密码工作模式支持 CCM + * + * + */ + export const CCM = 9; + + /** + * + * @brief 指定填充模式为 PKCS7 + * + * + */ + export const PKCS7 = 0; + + /** + * + * @brief 指定填充模式为 ONE_AND_ZEROS + * + * + */ + export const ONE_AND_ZEROS = 1; + + /** + * + * @brief 指定填充模式为 ZEROS_AND_LEN + * + * + */ + export const ZEROS_AND_LEN = 2; + + /** + * + * @brief 指定填充模式为 ZEROS + * + * + */ + export const ZEROS = 3; + + /** + * + * @brief 指定填充模式为 NOPADDING + * + * + */ + export const NOPADDING = 4; + + + + /** + * + * @brief Cipher 构造函数,参见 Cipher + * + * + */ + export class Cipher extends Class_Cipher {} + + + /** + * + * @brief PKey 构造函数,参见 PKey + * + * + */ + export class PKey extends Class_PKey {} + + + /** + * + * @brief X509Cert 构造函数,参见 X509Cert + * + * + */ + export class X509Cert extends Class_X509Cert {} + + + /** + * + * @brief X509Crl 构造函数,参见 X509Crl + * + * + */ + export class X509Crl extends Class_X509Crl {} + + + /** + * + * @brief X509Req 构造函数,参见 X509Req + * + * + */ + export class X509Req extends Class_X509Req {} + + + + + /** + * + * @brief 根据给定的算法名称创建一个信息摘要对象 + * @param algo 指定信息摘要对象的算法 + * @return 返回信息摘要对象 + * + * + * + */ + export function createHash(algo: string): Class_Digest; + + /** + * + * @brief 根据给定的算法名称创建一个 hmac 信息摘要对象 + * @param algo 指定信息摘要对象的算法 + * @param key 二进制签名密钥 + * @return 返回信息摘要对象 + * + * + * + */ + export function createHmac(algo: string, key: Class_Buffer): Class_Digest; + + /** + * + * @brief 加载一个 PEM/DER 格式的密钥文件 + * @param filename 密钥文件名 + * @param password 解密密码 + * @return 返回包含密钥的对象 + * + * + * + */ + export function loadPKey(filename: string, password?: string/** = ""*/): Class_PKey; + + /** + * + * @brief 加载一个 CRT/PEM/DER/TXT 格式的证书,可多次调用 + * + * loadFile 加载 mozilla 的 certdata,txt, 可于 http://hg.mozilla.org/releases/mozilla-release/raw-file/default/security/nss/lib/ckfw/builtins/certdata.txt 下载使用 + * @param filename 证书文件名 + * @return 返回包含证书的对象 + * + * + * + */ + export function loadCert(filename: string): Class_X509Cert; + + /** + * + * @brief 加载一个 PEM/DER 格式的撤销证书,可多次调用 + * @param filename 撤销证书文件名 + * @return 返回包含撤销证书的对象 + * + * + * + */ + export function loadCrl(filename: string): Class_X509Crl; + + /** + * + * @brief 加载一个 PEM/DER 格式的证书请求,可多次调用 + * @param filename 证书请求文件名 + * @return 返回包含请求证书的对象 + * + * + * + */ + export function loadReq(filename: string): Class_X509Req; + + /** + * + * @brief 生成指定尺寸的随机数,使用 havege 生成器 + * @param size 指定生成的随机数尺寸 + * @return 返回生成的随机数 + * + * + * @async + */ + export function randomBytes(size: number): Class_Buffer; + + /** + * + * @brief 生成指定尺寸的低强度随机数,使用快速的算法 + * @param size 指定生成的随机数尺寸 + * @return 返回生成的随机数 + * + * + * @async + */ + export function simpleRandomBytes(size: number): Class_Buffer; + + /** + * + * @brief 生成指定尺寸的伪随机数,使用 entropy 生成器 + * @param size 指定生成的随机数尺寸 + * @return 返回生成的随机数 + * + * + * @async + */ + export function pseudoRandomBytes(size: number): Class_Buffer; + + /** + * + * @brief 生成给定数据的可视化字符图像 + * @param data 指定要展示的数据 + * @param title 指定字符图像的标题,多字节字符会导致宽度错误 + * @param size 字符图像尺寸 + * @return 返回生成的可视化字符串图像 + * + * + * + */ + export function randomArt(data: Class_Buffer, title: string, size?: number/** = 8*/): string; + + /** + * + * @brief 依据 pbkdf1 根据明文 password 生成要求的二进制钥匙 + * @param password 指定使用的密码 + * @param salt 指定 hmac 使用的 salt + * @param iterations 指定迭代次数 + * @param size 指定钥匙尺寸 + * @param algo 指定要使用的 hash 算法,详见 hash 模块 + * @return 返回生成的二进制钥匙 + * + * + * @async + */ + export function pbkdf1(password: Class_Buffer, salt: Class_Buffer, iterations: number, size: number, algo: number): Class_Buffer; + + /** + * + * @brief 依据 pbkdf1 根据明文 password 生成要求的二进制钥匙 + * @param password 指定使用的密码 + * @param salt 指定 hmac 使用的 salt + * @param iterations 指定迭代次数 + * @param size 指定钥匙尺寸 + * @param algoName 指定要使用的 hash 算法,详见 hash 模块 + * @return 返回生成的二进制钥匙 + * + * + * @async + */ + export function pbkdf1(password: Class_Buffer, salt: Class_Buffer, iterations: number, size: number, algoName: string): Class_Buffer; + + /** + * + * @brief 依据 rfc2898 根据明文 password 生成要求的二进制钥匙 + * @param password 指定使用的密码 + * @param salt 指定 hmac 使用的 salt + * @param iterations 指定迭代次数 + * @param size 指定钥匙尺寸 + * @param algo 指定要使用的 hash 算法,详见 hash 模块 + * @return 返回生成的二进制钥匙 + * + * + * @async + */ + export function pbkdf2(password: Class_Buffer, salt: Class_Buffer, iterations: number, size: number, algo: number): Class_Buffer; + + /** + * + * @brief 依据 rfc2898 根据明文 password 生成要求的二进制钥匙 + * @param password 指定使用的密码 + * @param salt 指定 hmac 使用的 salt + * @param iterations 指定迭代次数 + * @param size 指定钥匙尺寸 + * @param algoName 指定要使用的 hash 算法,详见 hash 模块 + * @return 返回生成的二进制钥匙 + * + * + * @async + */ + export function pbkdf2(password: Class_Buffer, salt: Class_Buffer, iterations: number, size: number, algoName: string): Class_Buffer; + + } /** end of `module crypto` */ + export = crypto +} + +/** endof `module Or Internal Object` */ + + diff --git a/types/fibjs/declare/db.d.ts b/types/fibjs/declare/db.d.ts new file mode 100644 index 0000000000..04cc2f101a --- /dev/null +++ b/types/fibjs/declare/db.d.ts @@ -0,0 +1,345 @@ +/*************************************************************************** + * * + * This file was automatically generated with idlc.js * + * build info: * + * - fibjs : 0.25.0 * + * - date : Jun 12 2018 07:22:40 * + * * + ***************************************************************************/ + +/** + * @author Richard + * + */ + + + + + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + + + +/** module Or Internal Object */ +/** + * @brief 数据库访问模块 + * @detail 基础模块。可用于创建和操作数据库资源,引用方式:,```JavaScript,var db = require('db');,``` + */ +declare module "db" { + + + module db { + + + + + + /** + * + * @brief 打开一个数据库,此方法为通用入口,根据提供的 connString 不同调用不同的引擎 + * @param connString 数据库描述,如:mysql://user:pass\@host/db + * @return 返回数据库连接对象 + * + * + * @async + */ + export function open(connString: string): Class__object; + + /** + * + * @brief 打开一个 mysql 数据库 + * @param connString 数据库描述,如:mysql://user:pass\@host/db + * @return 返回数据库连接对象 + * + * + * @async + */ + export function openMySQL(connString: string): Class_MySQL; + + /** + * + * @brief 打开一个 mysql 数据库 + * @param connString 数据库描述,如:mssql://user:pass\@host/db + * @return 返回数据库连接对象 + * + * + * @async + */ + export function openMSSQL(connString: string): Class_MSSQL; + + /** + * + * @brief 打开一个 sqlite 数据库 + * @param connString 数据库描述,如:sqlite:test.db 或者 test.db + * @return 返回数据库连接对象 + * + * + * @async + */ + export function openSQLite(connString: string): Class_SQLite; + + /** + * + * @brief 打开一个 mongodb 数据库 + * @param connString 数据库描述 + * @return 返回数据库连接对象 + * + * + * @async + */ + export function openMongoDB(connString: string): Class_MongoDB; + + /** + * + * @brief 打开一个 leveldb 数据库 + * @param connString 数据库描述,如:level:test.db 或者 test.db + * @return 返回数据库对象 + * + * + * @async + */ + export function openLevelDB(connString: string): Class_LevelDB; + + /** + * + * @brief 打开一个 Redis 数据库 + * @param connString 数据库描述,如:redis://server:port 或者 "server" + * @return 返回数据库连接对象 + * + * + * @async + */ + export function openRedis(connString: string): Class_Redis; + + /** + * + * @brief 格式化一个 sql 命令,并返回格式化结果 + * + * @param sql 格式化字符串,可选参数用 ? 指定。例如:'SELECT FROM TEST WHERE [id]=?' + * @param args 可选参数列表 + * @return 返回格式化之后的 sql 命令 + * + * + * + */ + export function format(sql: string, ...args: any[]): string; + + /** + * + * @brief 格式化一个 mysql 命令,并返回格式化结果 + * + * @param sql 格式化字符串,可选参数用 ? 指定。例如:'SELECT FROM TEST WHERE [id]=?' + * @param args 可选参数列表 + * @return 返回格式化之后的 sql 命令 + * + * + * + */ + export function formatMySQL(sql: string, ...args: any[]): string; + + /** + * + * @brief 格式化一个 mssql 命令,并返回格式化结果 + * + * @param sql 格式化字符串,可选参数用 ? 指定。例如:'SELECT FROM TEST WHERE [id]=?' + * @param args 可选参数列表 + * @return 返回格式化之后的 sql 命令 + * + * + * + */ + export function formatMSSQL(sql: string, ...args: any[]): string; + + /** + * + * @brief 将字符串编码为 SQL 安全编码字符串 + * @param str 要编码的字符串 + * @param mysql 指定 mysql 编码,缺省为 false + * @return 返回编码后的字符串 + * + * + * + */ + export function escape(str: string, mysql?: boolean/** = false*/): string; + + } /** end of `module db` */ + export = db +} + +/** endof `module Or Internal Object` */ + + diff --git a/types/fibjs/declare/dgram.d.ts b/types/fibjs/declare/dgram.d.ts new file mode 100644 index 0000000000..0d3ccd20a9 --- /dev/null +++ b/types/fibjs/declare/dgram.d.ts @@ -0,0 +1,294 @@ +/*************************************************************************** + * * + * This file was automatically generated with idlc.js * + * build info: * + * - fibjs : 0.25.0 * + * - date : Jun 12 2018 07:22:40 * + * * + ***************************************************************************/ + +/** + * @author Richard + * + */ + + + + + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + + + +/** module Or Internal Object */ +/** + * @brief dgram 模块提供了 UDP 数据包 socket 的实现 + * @detail 基础模块,引用方式:,```JavaScript,var dgram = require('dgram');,``` + */ +declare module "dgram" { + + + module dgram { + + + + /** + * + * @brief dgram.Socket 对象是一个封装了数据包函数功能的 EventEmitter。参见 DgramSocket + * dgram.Socket 实例是由 dgram.createSocket() 创建的。创建 dgram.Socket 实例不需要使用 new 关键字。 + * + * + * + */ + export class Socket extends Class_DgramSocket {} + + + + + /** + * + * @brief 创建一个 dgram.Socket 对象 + * + * opts 允许的选项是: + * ```JavaScript + * { + * "type": "udp4" | "udp6", // 必填 + * "reuseAddr": true | false, //若设置为 true,socket.bind() 则会重用地址,即时另一个进程已经在其上面绑定了一个套接字。 默认是 false + * "recvBufferSize": ###, // 设置 SO_RCVBUF 套接字值 + * "sendBufferSize": ### //设置 SO_RCVBUF 套接字值 + * } + * ``` + * @param opts + * @return 返回创建的 Socket 对象 + * + * + * + */ + export function createSocket(opts: object): Class_DgramSocket; + + /** + * + * @brief 创建一个 dgram.Socket 对象 + * + * opts 允许的选项是: + * ```JavaScript + * { + * "type": "udp4" | "udp6", // 必填 + * "reuseAddr": true | false, //若设置为 true,socket.bind() 则会重用地址,即时另一个进程已经在其上面绑定了一个套接字。 默认是 false + * "recvBufferSize": ###, // 设置 SO_RCVBUF 套接字值 + * "sendBufferSize": ### //设置 SO_RCVBUF 套接字值 + * } + * ``` + * @param opts + * @param callback 为 'message' 事件添加一个监听器。 + * @return 返回创建的 Socket 对象 + * + * + * + */ + export function createSocket(opts: object, callback: Function): Class_DgramSocket; + + /** + * + * @brief 创建一个 dgram.Socket 对象 + * @param type 套接字族,'udp4' 或 'udp6'。 + * @return 返回创建的 Socket 对象 + * + * + * + */ + export function createSocket(type: string): Class_DgramSocket; + + /** + * + * @brief 创建一个 dgram.Socket 对象 + * @param type 套接字族,'udp4' 或 'udp6'。 + * @param callback 为 'message' 事件添加一个监听器。 + * @return 返回创建的 Socket 对象 + * + * + * + */ + export function createSocket(type: string, callback: Function): Class_DgramSocket; + + } /** end of `module dgram` */ + export = dgram +} + +/** endof `module Or Internal Object` */ + + diff --git a/types/fibjs/declare/dns.d.ts b/types/fibjs/declare/dns.d.ts new file mode 100644 index 0000000000..c2b802cb5d --- /dev/null +++ b/types/fibjs/declare/dns.d.ts @@ -0,0 +1,239 @@ +/*************************************************************************** + * * + * This file was automatically generated with idlc.js * + * build info: * + * - fibjs : 0.25.0 * + * - date : Jun 12 2018 07:22:40 * + * * + ***************************************************************************/ + +/** + * @author Richard + * + */ + + + + + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + + + +/** module Or Internal Object */ +/** + * @brief dns 域名查询模块 + * @detail 基础模块,引用方式:,```JavaScript,var dns = require('dns');,``` + */ +declare module "dns" { + + + module dns { + + + + + + /** + * + * @brief 查询给定的主机名的地址 + * @param name 指定主机名 + * @return 返回查询的 ip 字符串数组 + * + * + * @async + */ + export function resolve(name: string): any[]; + + /** + * + * @brief 查询给定的主机名的地址 + * @param name 指定主机名 + * @return 返回查询的 ip 字符串 + * + * + * @async + */ + export function lookup(name: string): string; + + } /** end of `module dns` */ + export = dns +} + +/** endof `module Or Internal Object` */ + + diff --git a/types/fibjs/declare/encoding.d.ts b/types/fibjs/declare/encoding.d.ts new file mode 100644 index 0000000000..86db5533ac --- /dev/null +++ b/types/fibjs/declare/encoding.d.ts @@ -0,0 +1,346 @@ +/*************************************************************************** + * * + * This file was automatically generated with idlc.js * + * build info: * + * - fibjs : 0.25.0 * + * - date : Jun 12 2018 07:22:40 * + * * + ***************************************************************************/ + +/** + * @author Richard + * + */ + + + + + + + + + + + + + + + + + + + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + + + +/** module Or Internal Object */ +/** + * @brief 编码与解码模块,用于处理不同的数据编码格式与二进制之间的转换 + * @detail 引用方式:,```JavaScript,var encoding = require('encoding');,``` + */ +declare module "encoding" { + + import base32NS = require('base32') + import base64NS = require('base64') + import base64vlqNS = require('base64vlq') + import hexNS = require('hex') + import iconvNS = require('iconv') + import jsonNS = require('json') + import bsonNS = require('bson') + + module encoding { + + + + /** + * + * @brief base32 编码与解码模块 + * + * + */ + + export const base32: typeof base32NS + + /** + * + * @brief base64 编码与解码模块 + * + * + */ + + export const base64: typeof base64NS + + /** + * + * @brief base64vlq 编码与解码模块 + * + * + */ + + export const base64vlq: typeof base64vlqNS + + /** + * + * @brief hex 编码与解码模块 + * + * + */ + + export const hex: typeof hexNS + + /** + * + * @brief iconv 编码与解码模块 + * + * + */ + + export const iconv: typeof iconvNS + + /** + * + * @brief json 编码与解码模块 + * + * + */ + + export const json: typeof jsonNS + + /** + * + * @brief bson 编码与解码模块 + * + * + */ + + export const bson: typeof bsonNS + + + + /** + * + * @brief 将字符串编码为 javascript 转义字符串,用以在 javascript 代码中包含文本 + * @param str 要编码的字符串 + * @param json 是否生成json兼容字符串 + * @return 返回编码的字符串 + * + * + * + */ + export function jsstr(str: string, json?: boolean/** = false*/): string; + + /** + * + * @brief url 字符串安全编码 + * @param url 要编码的 url + * @return 返回编码的字符串 + * + * + * + */ + export function encodeURI(url: string): string; + + /** + * + * @brief url 部件字符串安全编码 + * @param url 要编码的 url + * @return 返回编码的字符串 + * + * + * + */ + export function encodeURIComponent(url: string): string; + + /** + * + * @brief url 安全字符串解码 + * @param url 要解码的 url + * @return 返回解码的字符串 + * + * + * + */ + export function decodeURI(url: string): string; + + } /** end of `module encoding` */ + export = encoding +} + +/** endof `module Or Internal Object` */ + + diff --git a/types/fibjs/declare/fs.d.ts b/types/fibjs/declare/fs.d.ts new file mode 100644 index 0000000000..b0971e3ee5 --- /dev/null +++ b/types/fibjs/declare/fs.d.ts @@ -0,0 +1,677 @@ +/*************************************************************************** + * * + * This file was automatically generated with idlc.js * + * build info: * + * - fibjs : 0.25.0 * + * - date : Jun 12 2018 07:22:40 * + * * + ***************************************************************************/ + +/** + * @author Richard + * + */ + + + + + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + + + +/** module Or Internal Object */ +/** + * @brief 文件系统处理模块 + * @detail 使用方法:,```JavaScript,var fs = require('fs');,``` + */ +declare module "fs" { + + + module fs { + + /** + * + * @brief seek 方式常量,移动到绝对位置 + * + * + */ + export const SEEK_SET = 0; + + /** + * + * @brief seek 方式常量,移动到当前位置的相对位置 + * + * + */ + export const SEEK_CUR = 1; + + /** + * + * @brief seek 方式常量,移动到文件结尾的相对位置 + * + * + */ + export const SEEK_END = 2; + + + /** + * + * ! fs模块的常量对象 + * + * + */ + export const constants: Object; + + + + + /** + * + * @brief 查询指定的文件或目录是否存在 + * @param path 指定要查询的路径 + * @return 返回 True 表示文件或目录存在 + * + * + * @async + */ + export function exists(path: string): boolean; + + /** + * + * @brief 查询用户对指定的文件的权限 + * @param path 指定要查询的路径 + * @param mode 指定查询的权限,默认为文件是否存在 + * + * + * @async + */ + export function access(path: string, mode?: number/** = 0*/): void; + + /** + * + * @brief 创建硬链接文件, windows 下不支持此方法 + * @param oldPath 源文件 + * @param newPath 将要被创建的文件 + * + * + * @async + */ + export function link(oldPath: string, newPath: string): void; + + /** + * + * @brief 删除指定的文件 + * @param path 指定要删除的路径 + * + * + * @async + */ + export function unlink(path: string): void; + + /** + * + * @brief 创建一个目录 + * @param path 指定要创建的目录名 + * @param mode 指定文件权限,Windows 忽略此参数 + * + * + * @async + */ + export function mkdir(path: string, mode?: number/** = 0777*/): void; + + /** + * + * @brief 删除一个目录 + * @param path 指定要删除的目录名 + * + * + * @async + */ + export function rmdir(path: string): void; + + /** + * + * @brief 重新命名一个文件 + * @param from 指定更名的文件 + * @param to 指定要修改的新文件名 + * + * + * @async + */ + export function rename(from: string, to: string): void; + + /** + * + * @brief 复制一个文件 + * @param from 指定更名的文件 + * @param to 指定要修改的新文件名 + * + * + * @async + */ + export function copy(from: string, to: string): void; + + /** + * + * @brief 设置指定文件的访问权限,Windows 不支持此方法 + * @param path 指定操作的文件 + * @param mode 指定设定的访问权限 + * + * + * @async + */ + export function chmod(path: string, mode: number): void; + + /** + * + * @brief 设置指定文件的访问权限,若文件是软连接则不改变指向文件的权限,只在macOS、BSD 系列平台上可用 + * @param path 指定操作的文件 + * @param mode 指定设定的访问权限 + * + * + * @async + */ + export function lchmod(path: string, mode: number): void; + + /** + * + * @brief 设置指定文件的拥有者,Windows 不支持此方法 + * @param path 指定设置的文件 + * @param uid 文件拥有者用户id + * @param gid 文件拥有者组id + * + * + * @async + */ + export function chown(path: string, uid: number, gid: number): void; + + /** + * + * @brief 设置指定文件的拥有者,如果指定的文件是软连接则不会改变其指向文件的拥有者,Windows 不支持此方法 + * @param path 指定设置的文件 + * @param uid 文件拥有者用户id + * @param gid 文件拥有者组id + * + * + * @async + */ + export function lchown(path: string, uid: number, gid: number): void; + + /** + * + * @brief 查询指定文件的基础信息 + * @param path 指定查询的文件 + * @return 返回文件的基础信息 + * + * + * @async + */ + export function stat(path: string): Class_Stat; + + /** + * + * @brief 查询指定文件的基础信息, 和stat不同的是, 当path是一个软连接的时候,返回的将是这个软连接的信息而不是指向的文件的信息 + * @param path 指定查询的文件 + * @return 返回文件的基础信息 + * + * + * @async + */ + export function lstat(path: string): Class_Stat; + + /** + * + * @brief 读取指定的软连接文件, windows 下不支持此方法 + * @param path 指定读取的软连接文件 + * @return 返回软连接指向的文件名 + * + * + * @async + */ + export function readlink(path: string): string; + + /** + * + * @brief 返回指定路径的绝对路径,如果指定路径中包含相对路径也会被展开 + * @param path 指定读取的路径 + * @return 返回处理后的绝对路径 + * + * + * @async + */ + export function realpath(path: string): string; + + /** + * + * @brief 创建软连接文件 + * @param target 目标文件,可以是文件、目录、或不存在的路径 + * @param linkpath 将被创建的软连接文件 + * @param type 创建的软连接类型, 可选类型为'file', 'dir', 'junction', 默认为'file', 该参数只在windows上有效,当为'junction'的时候将要创建的目标路径linkpath必须为绝对路径, 而target则会被自动转化为绝对路径。 + * + * + * @async + */ + export function symlink(target: string, linkpath: string, type?: string/** = "file"*/): void; + + /** + * + * @brief 修改文件尺寸,如果指定的长度大于源文件大小则用'\0'填充,否则多于的文件内容将丢失 + * @param path 指定被修改文件的路径 + * @param len 指定修改后文件的大小 + * + * + * @async + */ + export function truncate(path: string, len: number): void; + + /** + * + * @brief 根据文件描述符,读取文件内容 + * @param fd 文件描述符 + * @param buffer 读取结果写入的 Buffer 对象 + * @param offset Buffer 写入偏移量, 默认为 0 + * @param length 文件读取字节数,默认为 0 + * @param position 文件读取位置,默认为当前文件位置 + * @return 实际读取的字节数 + * + * + * @async + */ + export function read(fd: number, buffer: Class_Buffer, offset?: number/** = 0*/, length?: number/** = 0*/, position?: number/** = -1*/): number; + + /** + * + * @brief 根据文件描述符,改变文件模式。只在 POSIX 系统有效。 + * @param fd 文件描述符 + * @param mode 文件的模式 + * + * + * @async + */ + export function fchmod(fd: number, mode: number): void; + + /** + * + * @brief 根据文件描述符,改变所有者。只在 POSIX 系统有效。 + * @param fd 文件描述符 + * @param uid 用户id + * @param gid 组id + * + * + * @async + */ + export function fchown(fd: number, uid: number, gid: number): void; + + /** + * + * @brief 根据文件描述符,同步数据到磁盘 + * @param fd 文件描述符 + * + * + * @async + */ + export function fdatasync(fd: number): void; + + /** + * + * @brief 根据文件描述符,同步数据到磁盘 + * @param fd 文件描述符 + * + * + * @async + */ + export function fsync(fd: number): void; + + /** + * + * @brief 读取指定目录的文件信息 + * @param path 指定查询的目录 + * @return 返回目录的文件信息数组 + * + * + * @async + */ + export function readdir(path: string): any[]; + + /** + * + * @brief 打开文件,用于读取,写入,或者同时读写 + * + * 参数 flags 支持的方式如下: + * - 'r' 只读方式,文件不存在则抛出错误。 + * - 'r+' 读写方式,文件不存在则抛出错误。 + * - 'w' 只写方式,文件不存在则自动创建,存在则将被清空。 + * - 'w+' 读写方式,文件不存在则自动创建。 + * - 'a' 只写添加方式,文件不存在则自动创建。 + * - 'a+' 读写添加方式,文件不存在则自动创建。 + * @param fname 指定文件名 + * @param flags 指定文件打开方式,缺省为 "r",只读方式 + * @return 返回打开的文件对象 + * + * + * @async + */ + export function openFile(fname: string, flags?: string/** = "r"*/): Class_SeekableStream; + + /** + * + * @brief 打开文件描述符 + * + * 参数 flags 支持的方式如下: + * - 'r' 只读方式,文件不存在则抛出错误。 + * - 'r+' 读写方式,文件不存在则抛出错误。 + * - 'w' 只写方式,文件不存在则自动创建,存在则将被清空。 + * - 'w+' 读写方式,文件不存在则自动创建。 + * - 'a' 只写添加方式,文件不存在则自动创建。 + * - 'a+' 读写添加方式,文件不存在则自动创建。 + * @param fname 指定文件名 + * @param flags 指定文件打开方式,缺省为 "r",只读方式 + * @param mode 当创建文件的时候,指定文件的模式,默认 0666 + * @return 返回打开的文件描述符 + * + * + * @async + */ + export function open(fname: string, flags?: string/** = "r"*/, mode?: number/** = 0666*/): number; + + /** + * + * @brief 关闭文件描述符 + * @param fd 文件描述符 + * + * + * @async + */ + export function close(fd: number): void; + + /** + * + * @brief 打开文本文件,用于读取,写入,或者同时读写 + * + * 参数 flags 支持的方式如下: + * - 'r' 只读方式,文件不存在则抛出错误。 + * - 'r+' 读写方式,文件不存在则抛出错误。 + * - 'w' 只写方式,文件不存在则自动创建,存在则将被清空。 + * - 'w+' 读写方式,文件不存在则自动创建。 + * - 'a' 只写添加方式,文件不存在则自动创建。 + * - 'a+' 读写添加方式,文件不存在则自动创建。 + * @param fname 指定文件名 + * @param flags 指定文件打开方式,缺省为 "r",只读方式 + * @return 返回打开的文件对象 + * + * + * @async + */ + export function openTextStream(fname: string, flags?: string/** = "r"*/): Class_BufferedStream; + + /** + * + * @brief 打开文本文件,并读取内容 + * @param fname 指定文件名 + * @return 返回文件文本内容 + * + * + * @async + */ + export function readTextFile(fname: string): string; + + /** + * + * @brief 打开二进制文件,并读取内容 + * @param fname 指定文件名 + * @param encoding 指定解码方式,缺省不解码 + * @return 返回文件文本内容 + * + * + * @async + */ + export function readFile(fname: string, encoding?: string/** = ""*/): any; + + /** + * + * @brief 打开文件,以数组方式读取一组文本行,行结尾标识基于 EOL 属性的设置,缺省时,posix:"\n";windows:"\r\n" + * @param fname 指定文件名 + * @param maxlines 指定此次读取的最大行数,缺省读取全部文本行 + * @return 返回读取的文本行数组,若无数据可读,或者连接中断,空数组 + * + * + * + */ + export function readLines(fname: string, maxlines?: number/** = -1*/): any[]; + + /** + * + * @brief 创建文本文件,并写入内容 + * @param fname 指定文件名 + * @param txt 指定要写入的字符串 + * + * + * @async + */ + export function writeTextFile(fname: string, txt: string): void; + + /** + * + * @brief 创建二进制文件,并写入内容 + * @param fname 指定文件名 + * @param data 指定要写入的二进制数据 + * + * + * @async + */ + export function writeFile(fname: string, data: Class_Buffer): void; + + /** + * + * @brief 创建二进制文件,并写入内容 + * @param fname 指定文件名 + * @param data 指定要写入的二进制数据 + * + * + * @async + */ + export function appendFile(fname: string, data: Class_Buffer): void; + + /** + * + * @brief 设置 zip 虚拟文件映射 + * @param fname 指定映射路径 + * @param data 指定映射的 zip 文件数据 + * + * + * + */ + export function setZipFS(fname: string, data: Class_Buffer): void; + + /** + * + * @brief 清除 zip 虚拟文件映射 + * @param fname 指定映射路径,缺省清除全部缓存 + * + * + * + */ + export function clearZipFS(fname?: string/** = ""*/): void; + + } /** end of `module fs` */ + export = fs +} + +/** endof `module Or Internal Object` */ + + diff --git a/types/fibjs/declare/gd.d.ts b/types/fibjs/declare/gd.d.ts new file mode 100644 index 0000000000..843e74f1e9 --- /dev/null +++ b/types/fibjs/declare/gd.d.ts @@ -0,0 +1,587 @@ +/*************************************************************************** + * * + * This file was automatically generated with idlc.js * + * build info: * + * - fibjs : 0.25.0 * + * - date : Jun 12 2018 07:22:40 * + * * + ***************************************************************************/ + +/** + * @author Richard + * + */ + + + + + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + + + +/** module Or Internal Object */ +/** + * @brief 图像文件处理模块 + * @detail 基础模块。可用于创建和操作图像文件,引用方式:,```JavaScript,var gd = require('gd');,``` + */ +declare module "gd" { + + + module gd { + + /** + * + * @brief 图像格式常量,标示当前图像来源为未知 + * + * + */ + export const NONE = 0; + + /** + * + * @brief 图像格式常量,标示当前图像来源为 jpeg 格式数据 + * + * + */ + export const JPEG = 1; + + /** + * + * @brief 图像格式常量,标示当前图像来源为 gif 格式数据 + * + * + */ + export const GIF = 2; + + /** + * + * @brief 图像格式常量,标示当前图像来源为 png 格式数据 + * + * + */ + export const PNG = 3; + + /** + * + * @brief 图像格式常量,标示当前图像来源为 tiff 格式数据 + * + * + */ + export const TIFF = 4; + + /** + * + * @brief 图像格式常量,标示当前图像来源为 bmp 格式数据 + * + * + */ + export const BMP = 5; + + /** + * + * @brief 图像格式常量,标示当前图像来源为 webp 格式数据 + * + * + */ + export const WEBP = 6; + + /** + * + * @brief 图像类型常量,标示当前图像为真彩色图像 + * + * + */ + export const TRUECOLOR = 0; + + /** + * + * @brief 图像类型常量,标示当前图像为调色板图像 + * + * + */ + export const PALETTE = 1; + + /** + * + * @brief 扇形绘制样式,绘制一条连接开始和结束点的圆弧 + * + * + */ + export const ARC = 0; + + /** + * + * @brief 扇形绘制样式,绘制一条连接原点,开始和结束点的直线 + * + * + */ + export const CHORD = 1; + + /** + * + * @brief 扇形绘制样式,绘制不填充的扇形 + * + * + */ + export const NOFILL = 2; + + /** + * + * @brief 扇形绘制样式,绘制一条连接起点和终点的弧和连接原点的直线 + * + * + */ + export const EDGED = 4; + + /** + * + * @brief 镜像方向,横向做镜像处理 + * + * + */ + export const HORIZONTAL = 1; + + /** + * + * @brief 镜像方向,纵向做镜像处理 + * + * + */ + export const VERTICAL = 2; + + /** + * + * @brief 镜像方向,横向和纵向都做镜像处理 + * + * + */ + export const BOTH = 3; + + /** + * + * @brief 旋转方向,向左旋转 + * + * + */ + export const LEFT = 1; + + /** + * + * @brief 旋转方向,向右旋转 + * + * + */ + export const RIGHT = 2; + + /** + * + * @brief 滤波器类型:用平均移除法来达到轮廓效果 + * + * + */ + export const MEAN_REMOVAL = 0; + + /** + * + * @brief 滤波器类型:用边缘检测来突出图像的边缘 + * + * + */ + export const EDGEDETECT = 1; + + /** + * + * @brief 滤波器类型:使图像浮雕化 + * + * + */ + export const EMBOSS = 2; + + /** + * + * @brief 滤波器类型:模糊图像 + * + * + */ + export const SELECTIVE_BLUR = 3; + + /** + * + * @brief 滤波器类型:用高斯算法模糊图像 + * + * + */ + export const GAUSSIAN_BLUR = 4; + + /** + * + * @brief 滤波器类型:将图像中所有颜色反转 + * + * + */ + export const NEGATE = 5; + + /** + * + * @brief 滤波器类型:将图像转换为灰度图 + * + * + */ + export const GRAYSCALE = 6; + + /** + * + * @brief 滤波器类型:使图像更柔滑,用arg1设定柔滑级别 + * + * + */ + export const SMOOTH = 7; + + /** + * + * @brief 滤波器类型:改变图像的亮度,用arg1设定亮度级别,取值范围是-255~255 + * + * + */ + export const BRIGHTNESS = 8; + + /** + * + * @brief 滤波器类型:改变图像的对比度,用arg1设定对比度级别,取值范围是0~100 + * + * + */ + export const CONTRAST = 9; + + /** + * + * @brief 滤波器类型:改变图像的色调,用arg1、arg2、arg3分别指定red、blue、green,每种颜色范围是0~255,arg4为透明度,取值返回是0~127 + * + * + */ + export const COLORIZE = 10; + + + + + + /** + * + * @brief 创建一个新图像 + * @param width 指定图像宽度 + * @param height 指定图像高度 + * @param color 指定图像类型,允许值为 gd.TRUECOLOR 或 gd.PALETTE + * @return 返回创建成功的图像对象 + * + * + * @async + */ + export function create(width: number, height: number, color?: number/** = undefined*/): Class_Image; + + /** + * + * @brief 从格式数据中解码图像 + * @param data 给定解码的图像数据 + * @return 返回解码成功的图像对象 + * + * + * @async + */ + export function load(data: Class_Buffer): Class_Image; + + /** + * + * @brief 从流对象中解码图像 + * @param stm 给定图像数据所在的流对象 + * @return 返回解码成功的图像对象 + * + * + * @async + */ + export function load(stm: Class_SeekableStream): Class_Image; + + /** + * + * @brief 从指定文件中解码图像 + * @param fname 指定文件名 + * @return 返回解码成功的图像对象 + * + * + * @async + */ + export function load(fname: string): Class_Image; + + /** + * + * @brief 通过 rgb 颜色分量生成组合颜色 + * @param red 红色分量,范围为 0-255 + * @param green 绿色分量,范围为 0-255 + * @param blue 蓝色分量,范围为 0-255 + * @return 返回组合颜色 + * + * + * + */ + export function rgb(red: number, green: number, blue: number): number; + + /** + * + * @brief 通过 rgba 颜色分量生成组合颜色 + * @param red 红色分量,范围为 0-255 + * @param green 绿色分量,范围为 0-255 + * @param blue 蓝色分量,范围为 0-255 + * @param alpha 透明分量,范围为 0.0-1.0 + * @return 返回组合颜色 + * + * + * + */ + export function rgba(red: number, green: number, blue: number, alpha: number): number; + + /** + * + * @brief 通过 hsl 颜色分量生成组合颜色 + * @param hue 色相分量,范围为 0-360 + * @param saturation 饱和度分量,范围为 0.0-1.0 + * @param lightness 亮度分量,范围为 0.0-1.0 + * @return 返回组合颜色 + * + * + * + */ + export function hsl(hue: number, saturation: number, lightness: number): number; + + /** + * + * @brief 通过 hsla 颜色分量生成组合颜色 + * @param hue 色相分量,范围为 0-360 + * @param saturation 饱和度分量,范围为 0.0-1.0 + * @param lightness 亮度分量,范围为 0.0-1.0 + * @param alpha 透明分量,范围为 0.0-1.0 + * @return 返回组合颜色 + * + * + * + */ + export function hsla(hue: number, saturation: number, lightness: number, alpha: number): number; + + /** + * + * @brief 通过 hsb 颜色分量生成组合颜色 + * @param hue 色相分量,范围为 0-360 + * @param saturation 饱和度分量,范围为 0.0-1.0 + * @param brightness 明亮程度分量,范围为 0.0-1.0 + * @return 返回组合颜色 + * + * + * + */ + export function hsb(hue: number, saturation: number, brightness: number): number; + + /** + * + * @brief 通过 hsba 颜色分量生成组合颜色 + * @param hue 色相分量,范围为 0-360 + * @param saturation 饱和度分量,范围为 0.0-1.0 + * @param brightness 明亮程度分量,范围为 0.0-1.0 + * @param alpha 透明分量,范围为 0.0-1.0 + * @return 返回组合颜色 + * + * + * + */ + export function hsba(hue: number, saturation: number, brightness: number, alpha: number): number; + + /** + * + * @brief 通过字符串生成组合颜色 + * @param color 指定颜色的字符串,如:"#ff0000", "ff0000", "#f00", "f00" + * @return 返回组合颜色 + * + * + * + */ + export function color(color: string): number; + + } /** end of `module gd` */ + export = gd +} + +/** endof `module Or Internal Object` */ + + diff --git a/types/fibjs/declare/global.d.ts b/types/fibjs/declare/global.d.ts new file mode 100644 index 0000000000..19d539d932 --- /dev/null +++ b/types/fibjs/declare/global.d.ts @@ -0,0 +1,553 @@ +/*************************************************************************** + * * + * This file was automatically generated with idlc.js * + * build info: * + * - fibjs : 0.25.0 * + * - date : Jun 12 2018 07:22:40 * + * * + ***************************************************************************/ + +/** + * @author Richard + * + */ + + + + + + + + + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + + + +/** module Or Internal Object */ +/** + * @brief 全局对象,所有脚本均可以访问的基础对象 + * @detail + */ +declare module "global" { + + import consoleNS = require('console') + import processNS = require('process') + + module global { + + + /** + * + * @brief Worker 宿主对象,仅在 Worker 入口脚本有效 + * + * + */ + export const Master: Class_Worker; + + /** + * + * @brief 全局对象 + * + * + */ + export const global: Object; + + /** + * + * @brief 获取当前脚本的运行参数,启动 js 获取进程启动参数,run 执行的脚本获取传递的参数 + * + * + */ + export const argv: any[]; + + /** + * + * @brief 当前脚本文件名 + * + * + */ + export const __filename: string; + + /** + * + * @brief 当前脚本所在目录 + * + * + */ + export const __dirname: string; + + + /** + * + * @brief 二进制数据缓存对象,用于 io 读写的数据处理,参见 Buffer 对象。 + * + * + */ + export class Buffer extends Class_Buffer {} + + + /** + * + * @brief 64位整数对象,参见 Int64 对象。 + * + * + */ + export class Int64 extends Class_Int64 {} + + + /** + * + * @brief 控制台访问对象 + * + * + */ + + export const console: typeof consoleNS + + /** + * + * @brief 进程对象 + * + * + */ + + export const process: typeof processNS + + + + /** + * + * @brief 运行一个脚本 + * @param fname 指定要运行的脚本路径 + * @param argv 指定要运行的参数,此参数可在脚本内使用 argv 获取 + * + * + * + */ + export function run(fname: string, argv?: any[]/** = v8::Array::New(isolate)*/): void; + + /** + * + * @brief 加载一个模块并返回模块对象,更多信息参阅 @ref module + * + * require 可用于加载基础模块,文件模块。 + * + * 基础模块是沙箱创建时初始化的模块,引用时只需传递相应的 id,比如 require("net")。 + * + * 文件模块是用户自定义模块,引用时需传递以 ./ 或 ../ 开头的相对路径。文件模块支持 .js, .jsc 和 .json 文件。 + * + * 文件模块也支持 package.json 格式,当模块为目录结构时,require 会先查询 package.json 中的 main,未发现则尝试加载路径下的 index.js, index.jsc 或 index.json。 + * + * 若引用路径不是 ./ 或 ../ 开头,并且非基础模块,require 从当前模块所在路径下的 node_modules 查找,并上级目录递归。 + * + * 基础流程如下: + * + * ```dot + * digraph{ + * node [fontname = "Helvetica,sans-Serif", fontsize = 10]; + * edge [fontname = "Helvetica,sans-Serif", fontsize = 10]; + * + * start [label="起始"]; + * resolve [label="path.resolve" shape="rect"]; + * search [label="从当前路径\n向上递归查找\nnode_modules" shape="rect"]; + * load [label="加载" shape="rect"]; + * end [label="返回" shape="doublecircle"]; + * + * is_native [label="内置模块?" shape="diamond"]; + * is_mod [label="模块?" shape="diamond"]; + * is_abs [label="绝对路径?" shape="diamond"]; + * has_file [label="原名存在?" shape="diamond"]; + * has_ext [label="增加 .js 存在?" shape="diamond"]; + * has_package [label="/package.json\n存在?" shape="diamond"]; + * has_main [label="main 存在?" shape="diamond"]; + * has_index [label="index.js 存在?" shape="diamond"]; + * + * start -> is_native; + * is_native -> end [label="是"]; + * is_native -> is_mod [label="否"]; + * is_mod -> search [label="是"]; + * search -> has_file; + * is_mod -> is_abs [label="否"]; + * is_abs -> has_file [label="是"]; + * is_abs -> resolve [label="否"]; + * resolve -> has_file; + * has_file -> load [label="是"]; + * has_file -> has_ext [label="否"]; + * has_ext -> load [label="是"]; + * has_ext -> has_package [label="否"]; + * has_package -> has_main [label="是"]; + * has_package -> has_index [label="否"]; + * has_main -> load [label="是"]; + * has_main -> has_index [label="否"]; + * has_index -> load [label="是"]; + * has_index -> end [label="否"]; + * load -> end; + * } + * ``` + * + * @param id 指定要加载的模块名称 + * @return 返回加载模块的引出对象 + * + * + * + */ + export function require(id: string): any; + + /** + * + * @brief 在指定的时间后调用函数 + * @param callback 指定回调函数 + * @param timeout 指定延时的时间,以毫秒为单位。超过 2^31 的话,立即执行。 + * @param args 额外的参数,传入到指定的 callback 内,可选。 + * @return 返回定时器对象 + * + * + * + */ + export function setTimeout(callback: Function, timeout?: number/** = 1*/, ...args: any[]): Class_Timer; + + /** + * + * @brief 清除指定的定时器 + * @param t 指定要清除的定时器 + * + * + * + */ + export function clearTimeout(t: any): void; + + /** + * + * @brief 每间隔指定的时间后调用函数 + * @param callback 指定回调函数 + * @param timeout 指定间隔的时间,以毫秒为单位。超过 2^31 的话,立即执行。 + * @param args 额外的参数,传入到指定的 callback 内,可选。 + * @return 返回定时器对象 + * + * + * + */ + export function setInterval(callback: Function, timeout: number, ...args: any[]): Class_Timer; + + /** + * + * @brief 清除指定的定时器 + * @param t 指定要清除的定时器 + * + * + * + */ + export function clearInterval(t: any): void; + + /** + * + * @brief 每间隔指定的时间后调用函数,这是个高精度定时器,会主动打断正在运行的 JavaScript 脚本执行定时器 + * 由于 setHrInterval 的定时器会中断正在运行的代码执行回调,因此不要在回调函数内修改可能影响其它模块的数据,或者在回调中调用任何标记为 async 的 api 函数,否则将会产生不可预知的结果。例如: + * ```JavaScript + * var timers = require('timers'); + * + * var cnt = 0; + * timers.setHrInterval(() => { + * cnt++; + * }, 100); + * + * while (cnt < 10); + * + * console.error("===============================> done"); + * ``` + * 这段代码中,第 8 行的循环并不会因为 cnt 的改变而结束,因为 JavaScript 在优化代码时会认定在这个循环过程中 cnt 不会被改变。 + * @param callback 指定回调函数 + * @param timeout 指定间隔的时间,以毫秒为单位。超过 2^31 的话,立即执行。 + * @param args 额外的参数,传入到指定的 callback 内,可选。 + * @return 返回定时器对象 + * + * + * + */ + export function setHrInterval(callback: Function, timeout: number, ...args: any[]): Class_Timer; + + /** + * + * @brief 清除指定的定时器 + * @param t 指定要清除的定时器 + * + * + * + */ + export function clearHrInterval(t: any): void; + + /** + * + * @brief 下一个空闲时间立即执行回调函数 + * @param callback 指定回调函数 + * @param args 额外的参数,传入到指定的 callback 内,可选。 + * @return 返回定时器对象 + * + * + * + */ + export function setImmediate(callback: Function, ...args: any[]): Class_Timer; + + /** + * + * @brief 清除指定的定时器 + * @param t 指定要清除的定时器 + * + * + * + */ + export function clearImmediate(t: any): void; + + /** + * + * @brief 强制要求进行垃圾回收 + * + * + */ + export function GC(): void; + + /** + * + * @brief 进入交互模式,可以交互执行内部命令和代码,仅在启动 js 可以引用 + * + * 参数 cmd 格式如下: + * ```JavaScript + * [ + * { + * cmd: ".test", + * help: "this is a test", + * exec: function(argv) { + * console.log(argv); + * } + * }, + * { + * cmd: ".test1", + * help: "this is an other test", + * exec: function(argv) { + * console.log(argv); + * } + * } + * ] + * ``` + * @param cmds 补充命令 + * + * + * + */ + export function repl(cmds?: any[]/** = v8::Array::New(isolate)*/): void; + + /** + * + * @brief 进入交互模式,可以交互执行内部命令和代码,仅在启动 js 可以引用 + * + * 同一时刻只允许一个 Stream repl,新建一个 Stream repl 时,前一个 repl 将被关闭。 + * + * 参数 cmd 格式如下: + * ```JavaScript + * [ + * { + * cmd: ".test", + * help: "this is a test", + * exec: function(argv) { + * console.log(argv); + * } + * }, + * { + * cmd: ".test1", + * help: "this is an other test", + * exec: function(argv) { + * console.log(argv); + * } + * } + * ] + * ``` + * @param out 输入输出流对象,通常为网络连接 + * @param cmds 补充命令 + * + * + * + */ + export function repl(out: Class_Stream, cmds?: any[]/** = v8::Array::New(isolate)*/): void; + + } /** end of `module global` */ + export = global +} + +/** endof `module Or Internal Object` */ + + diff --git a/types/fibjs/declare/gui.d.ts b/types/fibjs/declare/gui.d.ts new file mode 100644 index 0000000000..60768a9d93 --- /dev/null +++ b/types/fibjs/declare/gui.d.ts @@ -0,0 +1,304 @@ +/*************************************************************************** + * * + * This file was automatically generated with idlc.js * + * build info: * + * - fibjs : 0.25.0 * + * - date : Jun 12 2018 07:22:40 * + * * + ***************************************************************************/ + +/** + * @author Richard + * + */ + + + + + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + + + +/** module Or Internal Object */ +/** + * @brief gui 模块 + * @detail 使用方法:,```JavaScript,var gui = require('gui');,``` + */ +declare module "gui" { + + + module gui { + + /** + * + * @brief WebView ie 模拟版本,指定 ie7 + * + * + */ + export const IE7 = 7000; + + /** + * + * @brief WebView ie 模拟版本,指定 ie8 + * + * + */ + export const IE8 = 8000; + + /** + * + * @brief WebView ie 模拟版本,指定 ie9 + * + * + */ + export const IE9 = 9000; + + /** + * + * @brief WebView ie 模拟版本,指定 ie10 + * + * + */ + export const IE10 = 10000; + + /** + * + * @brief WebView ie 模拟版本,指定 ie11 + * + * + */ + export const IE11 = 11000; + + /** + * + * @brief WebView ie 模拟版本,指定 edge + * + * + */ + export const EDGE = 11001; + + + + + + /** + * + * 设置 WebView 内 ie 最高模拟版本,当系统 ie 版本低于此版本时,将模拟系统安装版本 + * @param ver 指定 ie 模拟版本 + * + * + * + */ + export function setVersion(ver: number): void; + + /** + * + * @brief 打开一个窗口并访问指定网址 + * + * 支持以下参数: + * ```JavaScript + * { + * "left": 100, // 窗口左上角 x,缺省系统自动设定 + * "right": 100, // 窗口左上角 y,缺省系统自动设定 + * "width": 100, // 窗口宽度,缺省系统自动设定 + * "height": 100, // 窗口高度,缺省系统自动设定 + * "border": true, // 是否有边框,缺省有边框 + * "caption": true, // 是否有标题栏,缺省有标题栏 + * "resizable": true, // 是否可改变尺寸,缺省可以改变 + * "maximize": false, // 是否最大化显示,缺省不最大化 + * "visible": true, // 是否显示,缺省显示 + * "debug": true // 是否输出 WebView 内的错误和 console 信息,缺省显示 + * } + * ``` + * 当设定 width 和 height,而未设定 left 或 right 时,窗口将自动居中 + * @param url 指定的网址,,可以使用 fs:path 访问本地文件系统 + * @param opt 打开窗口参数 + * @return 返回打开的窗口对象 + * + * + * + */ + export function open(url: string, opt?: object/** = v8::Object::New(isolate)*/): Class_WebView; + + } /** end of `module gui` */ + export = gui +} + +/** endof `module Or Internal Object` */ + + diff --git a/types/fibjs/declare/hash.d.ts b/types/fibjs/declare/hash.d.ts new file mode 100644 index 0000000000..a51aa76e34 --- /dev/null +++ b/types/fibjs/declare/hash.d.ts @@ -0,0 +1,522 @@ +/*************************************************************************** + * * + * This file was automatically generated with idlc.js * + * build info: * + * - fibjs : 0.25.0 * + * - date : Jun 12 2018 07:22:40 * + * * + ***************************************************************************/ + +/** + * @author Richard + * + */ + + + + + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + + + +/** module Or Internal Object */ +/** + * @brief 信息摘要计算模块,可用于计算信息摘要和摘要签名 + * @detail + */ +declare module "hash" { + + + module hash { + + /** + * + * @brief MD2 信息摘要算法标识常量 + * + * + */ + export const MD2 = 1; + + /** + * + * @brief MD4 信息摘要算法标识常量 + * + * + */ + export const MD4 = 2; + + /** + * + * @brief MD5 信息摘要算法标识常量 + * + * + */ + export const MD5 = 3; + + /** + * + * @brief SHA1 信息摘要算法标识常量 + * + * + */ + export const SHA1 = 4; + + /** + * + * @brief SHA224 信息摘要算法标识常量 + * + * + */ + export const SHA224 = 5; + + /** + * + * @brief SHA256 信息摘要算法标识常量 + * + * + */ + export const SHA256 = 6; + + /** + * + * @brief SHA384 信息摘要算法标识常量 + * + * + */ + export const SHA384 = 7; + + /** + * + * @brief SHA512 信息摘要算法标识常量 + * + * + */ + export const SHA512 = 8; + + /** + * + * @brief RIPEMD160 信息摘要算法标识常量 + * + * + */ + export const RIPEMD160 = 9; + + + + + + /** + * + * @brief 根据指定的算法标识创建一个信息摘要运算对象 + * @param algo 指定摘要运算算法 + * @param data 创建同时更新的二进制数据 + * @return 返回构造的信息摘要对象 + * + * + * + */ + export function digest(algo: number, data: Class_Buffer): Class_Digest; + + /** + * + * @brief 根据指定的算法标识创建一个信息摘要运算对象 + * @param algo 指定摘要运算算法 + * @return 返回构造的信息摘要对象 + * + * + * + */ + export function digest(algo: number): Class_Digest; + + /** + * + * @brief 创建一个 MD2 信息摘要运算对象 + * @param data 创建同时更新的二进制数据 + * @return 返回构造的信息摘要对象 + * + * + * + */ + export function md2(data: Class_Buffer): Class_Digest; + + /** + * + * @brief 创建一个 MD4 信息摘要运算对象 + * @param data 创建同时更新的二进制数据 + * @return 返回构造的信息摘要对象 + * + * + * + */ + export function md4(data: Class_Buffer): Class_Digest; + + /** + * + * @brief 创建一个 MD5 信息摘要运算对象 + * @param data 创建同时更新的二进制数据 + * @return 返回构造的信息摘要对象 + * + * + * + */ + export function md5(data: Class_Buffer): Class_Digest; + + /** + * + * @brief 创建一个 SHA1 信息摘要运算对象 + * @param data 创建同时更新的二进制数据 + * @return 返回构造的信息摘要对象 + * + * + * + */ + export function sha1(data: Class_Buffer): Class_Digest; + + /** + * + * @brief 创建一个 SHA224 信息摘要运算对象 + * @param data 创建同时更新的二进制数据 + * @return 返回构造的信息摘要对象 + * + * + * + */ + export function sha224(data: Class_Buffer): Class_Digest; + + /** + * + * @brief 创建一个 SHA256 信息摘要运算对象 + * @param data 创建同时更新的二进制数据 + * @return 返回构造的信息摘要对象 + * + * + * + */ + export function sha256(data: Class_Buffer): Class_Digest; + + /** + * + * @brief 创建一个 SHA384 信息摘要运算对象 + * @param data 创建同时更新的二进制数据 + * @return 返回构造的信息摘要对象 + * + * + * + */ + export function sha384(data: Class_Buffer): Class_Digest; + + /** + * + * @brief 创建一个 SHA512 信息摘要运算对象 + * @param data 创建同时更新的二进制数据 + * @return 返回构造的信息摘要对象 + * + * + * + */ + export function sha512(data: Class_Buffer): Class_Digest; + + /** + * + * @brief 创建一个 RIPEMD160 信息摘要运算对象 + * @param data 创建同时更新的二进制数据 + * @return 返回构造的信息摘要对象 + * + * + * + */ + export function ripemd160(data: Class_Buffer): Class_Digest; + + /** + * + * @brief 根据指定的算法标识创建一个信息摘要签名运算对象 + * @param algo 指定摘要运算算法 + * @param key 二进制签名密钥 + * @return 返回构造的信息摘要对象 + * + * + * + */ + export function hmac(algo: number, key: Class_Buffer): Class_Digest; + + /** + * + * @brief 创建一个 MD2 信息摘要签名运算对象 + * @param key 二进制签名密钥 + * @return 返回构造的信息摘要对象 + * + * + * + */ + export function hmac_md2(key: Class_Buffer): Class_Digest; + + /** + * + * @brief 创建一个 MD4 信息摘要签名运算对象 + * @param key 二进制签名密钥 + * @return 返回构造的信息摘要对象 + * + * + * + */ + export function hmac_md4(key: Class_Buffer): Class_Digest; + + /** + * + * @brief 创建一个 MD5 信息摘要签名运算对象 + * @param key 二进制签名密钥 + * @return 返回构造的信息摘要对象 + * + * + * + */ + export function hmac_md5(key: Class_Buffer): Class_Digest; + + /** + * + * @brief 创建一个 SHA1 信息摘要签名运算对象 + * @param key 二进制签名密钥 + * @return 返回构造的信息摘要对象 + * + * + * + */ + export function hmac_sha1(key: Class_Buffer): Class_Digest; + + /** + * + * @brief 创建一个 SHA224 信息摘要签名运算对象 + * @param key 二进制签名密钥 + * @return 返回构造的信息摘要对象 + * + * + * + */ + export function hmac_sha224(key: Class_Buffer): Class_Digest; + + /** + * + * @brief 创建一个 SHA256 信息摘要签名运算对象 + * @param key 二进制签名密钥 + * @return 返回构造的信息摘要对象 + * + * + * + */ + export function hmac_sha256(key: Class_Buffer): Class_Digest; + + /** + * + * @brief 创建一个 SHA384 信息摘要签名运算对象 + * @param key 二进制签名密钥 + * @return 返回构造的信息摘要对象 + * + * + * + */ + export function hmac_sha384(key: Class_Buffer): Class_Digest; + + /** + * + * @brief 创建一个 SHA512 信息摘要签名运算对象 + * @param key 二进制签名密钥 + * @return 返回构造的信息摘要对象 + * + * + * + */ + export function hmac_sha512(key: Class_Buffer): Class_Digest; + + /** + * + * @brief 创建一个 RIPEMD160 信息摘要签名运算对象 + * @param key 二进制签名密钥 + * @return 返回构造的信息摘要对象 + * + * + * + */ + export function hmac_ripemd160(key: Class_Buffer): Class_Digest; + + } /** end of `module hash` */ + export = hash +} + +/** endof `module Or Internal Object` */ + + diff --git a/types/fibjs/declare/hex.d.ts b/types/fibjs/declare/hex.d.ts new file mode 100644 index 0000000000..a8254c6de6 --- /dev/null +++ b/types/fibjs/declare/hex.d.ts @@ -0,0 +1,239 @@ +/*************************************************************************** + * * + * This file was automatically generated with idlc.js * + * build info: * + * - fibjs : 0.25.0 * + * - date : Jun 12 2018 07:22:40 * + * * + ***************************************************************************/ + +/** + * @author Richard + * + */ + + + + + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + + + +/** module Or Internal Object */ +/** + * @brief hex 编码与解码模块 + * @detail 引用方式:,```JavaScript,var encoding = require('encoding');,var hex = encoding.hex;,```,或者,```JavaScript,var hex = require('hex');,``` + */ +declare module "hex" { + + + module hex { + + + + + + /** + * + * @brief 以 hex 方式编码数据 + * @param data 要编码的数据 + * @return 返回编码的字符串 + * + * + * + */ + export function encode(data: Class_Buffer): string; + + /** + * + * @brief 以 hex 方式解码字符串为二进制数据 + * @param data 要解码的字符串 + * @return 返回解码的二进制数据 + * + * + * + */ + export function decode(data: string): Class_Buffer; + + } /** end of `module hex` */ + export = hex +} + +/** endof `module Or Internal Object` */ + + diff --git a/types/fibjs/declare/http.d.ts b/types/fibjs/declare/http.d.ts new file mode 100644 index 0000000000..000f4a6b79 --- /dev/null +++ b/types/fibjs/declare/http.d.ts @@ -0,0 +1,513 @@ +/*************************************************************************** + * * + * This file was automatically generated with idlc.js * + * build info: * + * - fibjs : 0.25.0 * + * - date : Jun 12 2018 07:22:40 * + * * + ***************************************************************************/ + +/** + * @author Richard + * + */ + + + + + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + + + +/** module Or Internal Object */ +/** + * @brief 超文本传输协议模块,用以支持 http 协议处理,模块别名:https + * @detail + */ +declare module "http" { + + + module http { + + + /** + * + * @brief 返回标准的 HTTP 响应状态码的集合,以及各自的简短描述。 + * + * + */ + export const STATUS_CODES: any[]; + + /** + * + * @brief 返回http客户端的 HttpCookie 对象列表 + * + * + */ + export const cookies: any[]; + + /** + * + * @brief 查询和设置超时时间 + * + * + */ + export const timeout: number; + + /** + * + * @brief cookie功能开关,默认开启 + * + * + */ + export const enableCookie: boolean; + + /** + * + * @brief 自动redirect功能开关,默认开启 + * + * + */ + export const autoRedirect: boolean; + + /** + * + * @brief 查询和设置 body 最大尺寸,以 MB 为单位,缺省为 -1,不限制尺寸 + * + * + */ + export const maxBodySize: number; + + /** + * + * @brief 查询和设置 http 请求中的浏览器标识 + * + * + */ + export const userAgent: string; + + /** + * + * @brief 查询和设置 keep-alive 最大缓存连接数,缺省 128 + * + * + */ + export const poolSize: number; + + /** + * + * @brief 查询和设置 keep-alive 缓存连接超时时间,缺省 10000 ms + * + * + */ + export const poolTimeout: number; + + + /** + * + * @brief 创建一个 http 请求对象,参见 HttpRequest + * + * + */ + export class Request extends Class_HttpRequest {} + + + /** + * + * @brief 创建一个 http 响应对象,参见 HttpResponse + * + * + */ + export class Response extends Class_HttpResponse {} + + + /** + * + * @brief 创建一个 http cookie 对象,参见 HttpCookie + * + * + */ + export class Cookie extends Class_HttpCookie {} + + + /** + * + * @brief 创建一个 http 服务器,参见 HttpServer + * + * + */ + export class Server extends Class_HttpServer {} + + + /** + * + * @brief 创建一个 http 客户端,参见 HttpClient + * + * + */ + export class Client extends Class_HttpClient {} + + + /** + * + * @brief 创建一个 https 服务器,参见 HttpsServer + * + * + */ + export class HttpsServer extends Class_HttpsServer {} + + + /** + * + * @brief 创建一个 http 协议处理器对象,参见 HttpHandler + * + * + */ + export class Handler extends Class_HttpHandler {} + + + + + /** + * + * @brief 创建一个 http 静态文件处理器,用以用静态文件响应 http 消息 + * + * fileHandler 支持 gzip 预压缩,当请求接受 gzip 编码,且相同路径下 filename.ext.gz 文件存在时,将直接返回此文件, + * 从而避免重复压缩带来服务器负载。 + * @param root 文件根路径 + * @param mimes 扩展 mime 设置 + * @param autoIndex 是否支持浏览目录文件,缺省为 false,不支持 + * @return 返回一个静态文件处理器用于处理 http 消息 + * + * + * + */ + export function fileHandler(root: string, mimes?: object/** = v8::Object::New(isolate)*/, autoIndex?: boolean/** = false*/): Class_Handler; + + /** + * + * @brief 发送 http 请求到指定的流对象,并返回结果 + * @param conn 指定处理请求的流对象 + * @param req 要发送的 HttpRequest 对象 + * @return 返回服务器响应 + * + * + * @async + */ + export function request(conn: Class_Stream, req: Class_HttpRequest): Class_HttpResponse; + + /** + * + * @brief 请求指定的 url,并返回结果 + * opts 包含请求的附加选项,支持的内容如下: + * ```JavaScript + * { + * "query": {}, + * "body": SeekedStream | Buffer | String | {}, + * "json": {}, + * "headers": {} + * } + * ``` + * 其中 body,json 不得同时出现。缺省为 {},不包含任何附加信息 + * @param method 指定 http 请求方法:GET, POST 等 + * @param url 指定 url,必须是包含主机的完整 url + * @param opts 指定附加信息 + * @return 返回服务器响应 + * + * + * @async + */ + export function request(method: string, url: string, opts?: object/** = v8::Object::New(isolate)*/): Class_HttpResponse; + + /** + * + * @brief 用 GET 方法请求指定的 url,并返回结果,等同于 request("GET", ...) + * opts 包含请求的附加选项,支持的内容如下: + * ```JavaScript + * { + * "query": {}, + * "body": SeekedStream | Buffer | String | {}, + * "json": {}, + * "headers": {} + * } + * ``` + * 其中 body,json 不得同时出现。缺省为 {},不包含任何附加信息 + * @param url 指定 url,必须是包含主机的完整 url + * @param opts 指定附加信息 + * @return 返回服务器响应 + * + * + * @async + */ + export function get(url: string, opts?: object/** = v8::Object::New(isolate)*/): Class_HttpResponse; + + /** + * + * @brief 用 POST 方法请求指定的 url,并返回结果,等同于 request("POST", ...) + * opts 包含请求的附加选项,支持的内容如下: + * ```JavaScript + * { + * "query": {}, + * "body": SeekedStream | Buffer | String | {}, + * "json": {}, + * "headers": {} + * } + * ``` + * 其中 body,json 不得同时出现。缺省为 {},不包含任何附加信息 + * @param url 指定 url,必须是包含主机的完整 url + * @param opts 指定附加信息 + * @return 返回服务器响应 + * + * + * @async + */ + export function post(url: string, opts?: object/** = v8::Object::New(isolate)*/): Class_HttpResponse; + + /** + * + * @brief 用 DELETE 方法请求指定的 url,并返回结果,等同于 request("DELETE", ...) + * opts 包含请求的附加选项,支持的内容如下: + * ```JavaScript + * { + * "query": {}, + * "body": SeekedStream | Buffer | String | {}, + * "json": {}, + * "headers": {} + * } + * ``` + * 其中 body,json 不得同时出现。缺省为 {},不包含任何附加信息 + * @param url 指定 url,必须是包含主机的完整 url + * @param opts 指定附加信息 + * @return 返回服务器响应 + * + * + * @async + */ + export function del(url: string, opts?: object/** = v8::Object::New(isolate)*/): Class_HttpResponse; + + /** + * + * @brief 用 PUT 方法请求指定的 url,并返回结果,等同于 request("PUT", ...) + * opts 包含请求的附加选项,支持的内容如下: + * ```JavaScript + * { + * "query": {}, + * "body": SeekedStream | Buffer | String | {}, + * "json": {}, + * "headers": {} + * } + * ``` + * 其中 body,json 不得同时出现。缺省为 {},不包含任何附加信息 + * @param url 指定 url,必须是包含主机的完整 url + * @param opts 指定附加信息 + * @return 返回服务器响应 + * + * + * @async + */ + export function put(url: string, opts?: object/** = v8::Object::New(isolate)*/): Class_HttpResponse; + + /** + * + * @brief 用 PATCH 方法请求指定的 url,并返回结果,等同于 request("PATCH", ...) + * opts 包含请求的附加选项,支持的内容如下: + * ```JavaScript + * { + * "query": {}, + * "body": SeekedStream | Buffer | String | {}, + * "json": {}, + * "headers": {} + * } + * ``` + * 其中 body,json 不得同时出现。缺省为 {},不包含任何附加信息 + * @param url 指定 url,必须是包含主机的完整 url + * @param opts 指定附加信息 + * @return 返回服务器响应 + * + * + * @async + */ + export function patch(url: string, opts?: object/** = v8::Object::New(isolate)*/): Class_HttpResponse; + + } /** end of `module http` */ + export = http +} + +/** endof `module Or Internal Object` */ + + diff --git a/types/fibjs/declare/iconv.d.ts b/types/fibjs/declare/iconv.d.ts new file mode 100644 index 0000000000..443ae25e21 --- /dev/null +++ b/types/fibjs/declare/iconv.d.ts @@ -0,0 +1,252 @@ +/*************************************************************************** + * * + * This file was automatically generated with idlc.js * + * build info: * + * - fibjs : 0.25.0 * + * - date : Jun 12 2018 07:22:40 * + * * + ***************************************************************************/ + +/** + * @author Richard + * + */ + + + + + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + + + +/** module Or Internal Object */ +/** + * @brief iconv 编码与解码模块 + * @detail 引用方式:,```JavaScript,var encoding = require('encoding');,var iconv = encoding.iconv;,```,或者,```JavaScript,var iconv = require('iconv');,``` + */ +declare module "iconv" { + + + module iconv { + + + + + + /** + * + * @brief 用 iconv 将文本转换为二进制数据 + * @param charset 指定字符集 + * @param data 要转换的文本 + * @return 返回解码的二进制数据 + * + * + * + */ + export function encode(charset: string, data: string): Class_Buffer; + + /** + * + * @brief 用 iconv 将 Buffer 内容转换为文本 + * @param charset 指定字符集 + * @param data 要转换的二进制数据 + * @return 返回编码的字符串 + * + * + * + */ + export function decode(charset: string, data: Class_Buffer): string; + + /** + * + * @brief 检测字符集是否被支持 + * @param charset 指定字符集 + * @return 返回是否支持该字符集 + * + * + * + */ + export function isEncoding(charset: string): boolean; + + } /** end of `module iconv` */ + export = iconv +} + +/** endof `module Or Internal Object` */ + + diff --git a/types/fibjs/declare/index.d.ts b/types/fibjs/declare/index.d.ts new file mode 100644 index 0000000000..df0e02e683 --- /dev/null +++ b/types/fibjs/declare/index.d.ts @@ -0,0 +1,101 @@ +/*************************************************************************** + * * + * This file was automatically generated with idlc.js * + * build info: * + * - fibjs : 0.25.0 * + * - date : Jun 12 2018 07:22:40 * + * * + ***************************************************************************/ + +/** + * @author Richard + * + */ + + + +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// + +import _Global from 'global'; +import _Process from 'process'; + +type GlobalExportsType = any; +interface ModuleType { + exports: GlobalExportsType; +} + +declare global { + var exports: GlobalExportsType; + const module: ModuleType; + + const Buffer: typeof _Global.Buffer + const Int64: typeof _Global.Int64 + /** const console: console; */ + const process: typeof _Global.process + const Master: typeof _Global.Master + const global: typeof _Global.global + /** const run: null; */ + const require: typeof _Global.require + const argv: typeof _Global.argv + const __filename: typeof _Global.__filename + const __dirname: typeof _Global.__dirname + /** const setTimeout: Timer; */ + /** const clearTimeout: null; */ + /** const setInterval: Timer; */ + /** const clearInterval: null; */ + const setHrInterval: typeof _Global.setHrInterval + const clearHrInterval: typeof _Global.clearHrInterval + /** const setImmediate: Timer; */ + /** const clearImmediate: null; */ + const GC: typeof _Global.GC + const repl: typeof _Global.repl +} /** end of `declare global` */ + + diff --git a/types/fibjs/declare/io.d.ts b/types/fibjs/declare/io.d.ts new file mode 100644 index 0000000000..ff9f884f28 --- /dev/null +++ b/types/fibjs/declare/io.d.ts @@ -0,0 +1,259 @@ +/*************************************************************************** + * * + * This file was automatically generated with idlc.js * + * build info: * + * - fibjs : 0.25.0 * + * - date : Jun 12 2018 07:22:40 * + * * + ***************************************************************************/ + +/** + * @author Richard + * + */ + + + + + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + + + +/** module Or Internal Object */ +/** + * @brief 输入输出处理模块 + * @detail 使用方法:,```JavaScript,var io = require('io');,``` + */ +declare module "io" { + + + module io { + + + + /** + * + * @brief 创建一个内存流对象,参见 MemoryStream + * + * + */ + export class MemoryStream extends Class_MemoryStream {} + + + /** + * + * @brief 创建一个缓存流读取对象,参见 BufferedStream + * + * + */ + export class BufferedStream extends Class_BufferedStream {} + + + + + /** + * + * @brief 复制流数据到目标流中 + * @param from 源流对象 + * @param to 目标流对象 + * @param bytes 复制的字节数 + * @return 返回复制的字节数 + * + * + * @async + */ + export function copyStream(from: Class_Stream, to: Class_Stream, bytes?: number/** = -1*/): number; + + /** + * + * @brief 双向复制流数据,直到流中无数据,或者流被关闭 + * @param stm1 流对象一 + * @param stm2 流对象二 + * + * + * @async + */ + export function bridge(stm1: Class_Stream, stm2: Class_Stream): void; + + } /** end of `module io` */ + export = io +} + +/** endof `module Or Internal Object` */ + + diff --git a/types/fibjs/declare/json.d.ts b/types/fibjs/declare/json.d.ts new file mode 100644 index 0000000000..f90b2d9a4b --- /dev/null +++ b/types/fibjs/declare/json.d.ts @@ -0,0 +1,239 @@ +/*************************************************************************** + * * + * This file was automatically generated with idlc.js * + * build info: * + * - fibjs : 0.25.0 * + * - date : Jun 12 2018 07:22:40 * + * * + ***************************************************************************/ + +/** + * @author Richard + * + */ + + + + + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + + + +/** module Or Internal Object */ +/** + * @brief json 编码与解码模块 + * @detail 引用方式:,```JavaScript,var encoding = require('encoding');,var json = encoding.json;,```,或者,```JavaScript,var json = require('json');,``` + */ +declare module "json" { + + + module json { + + + + + + /** + * + * @brief 以 json 格式编码变量 + * @param data 要编码的变量 + * @return 返回编码的字符串 + * + * + * + */ + export function encode(data: any): string; + + /** + * + * @brief 以 json 方式解码字符串为一个变量 + * @param data 要解码的字符串 + * @return 返回解码的变量 + * + * + * + */ + export function decode(data: string): any; + + } /** end of `module json` */ + export = json +} + +/** endof `module Or Internal Object` */ + + diff --git a/types/fibjs/declare/mq.d.ts b/types/fibjs/declare/mq.d.ts new file mode 100644 index 0000000000..4f2af5d198 --- /dev/null +++ b/types/fibjs/declare/mq.d.ts @@ -0,0 +1,307 @@ +/*************************************************************************** + * * + * This file was automatically generated with idlc.js * + * build info: * + * - fibjs : 0.25.0 * + * - date : Jun 12 2018 07:22:40 * + * * + ***************************************************************************/ + +/** + * @author Richard + * + */ + + + + + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + + + +/** module Or Internal Object */ +/** + * @brief 消息队列模块 + * @detail + */ +declare module "mq" { + + + module mq { + + + + /** + * + * @brief 创建一个消息对象,参见 Message + * + * + */ + export class Message extends Class_Message {} + + + /** + * + * @brief 创建一个 http 协议处理器对象,参见 HttpHandler + * + * + */ + export class HttpHandler extends Class_HttpHandler {} + + + /** + * + * @brief 创建一个消息处理器对象,传递值内置处理器则直接返回 + * + * hdlr 接受内置消息处理器,处理函数,链式处理数组,路由对象: + * - Function javascript 函数,将使用此函数进行处理 + * - Handler 内置处理器,将使用此处理器进行处理 + * - 链式处理数组,等同于返回 new mq.Chain(hdlr),参见 Chain + * - 路由对象,等同于返回 new mq.Routing(hdlr),参见 Routing + * + * 消息处理函数语法如下: + * ```JavaScript + * function func(v){ + * } + * ``` + * 参数 v 为正在处理的消息,返回结果允许有四种: + * - Function javascript 函数,将使用此函数进行下一阶段处理 + * - Handler 内置处理器,将使用此处理器进行下一阶段处理 + * - 链式处理数组,等同于 new mq.Chain(v),参见 Chain + * - 路由对象,等同于 new mq.Routing(v),参见 Routing + * + * 无返回或者其他的返回结果将结束消息处理。 + * @param hdlr 内置消息处理器,处理函数,链式处理数组,路由对象 + * @return 返回封装了处理函数的处理器 + * + * + * + */ + export class Handler extends Class_Handler {} + + + /** + * + * @brief 创建一个消息处理器链处理对象,参见 Chain + * + * + */ + export class Chain extends Class_Chain {} + + + /** + * + * @brief 创建一个消息处理器路由对象,参见 Routing + * + * + */ + export class Routing extends Class_Routing {} + + + + + /** + * + * @brief 创建一个空处理器对象,次处理对象不做任何处理直接返回 + * @return 返回空处理函数 + * + * + * + */ + export function nullHandler(): Class_Handler; + + /** + * + * @brief 使用给定的处理器处理一个消息或对象 + * + * 不同于处理器的 invoke 方法,此方法将循环调用每个处理器的返回处理器,直到处理器返回 null 为止。 + * @param hdlr 指定使用的处理器 + * @param v 指定要处理的消息或对象 + * + * + * @async + */ + export function invoke(hdlr: Class_Handler, v: Class__object): void; + + } /** end of `module mq` */ + export = mq +} + +/** endof `module Or Internal Object` */ + + diff --git a/types/fibjs/declare/net.d.ts b/types/fibjs/declare/net.d.ts new file mode 100644 index 0000000000..8c2bf58055 --- /dev/null +++ b/types/fibjs/declare/net.d.ts @@ -0,0 +1,396 @@ +/*************************************************************************** + * * + * This file was automatically generated with idlc.js * + * build info: * + * - fibjs : 0.25.0 * + * - date : Jun 12 2018 07:22:40 * + * * + ***************************************************************************/ + +/** + * @author Richard + * + */ + + + + + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + + + +/** module Or Internal Object */ +/** + * @brief 网络访问模块 + * @detail 基础模块。可用于创建和操作网络资源,引用方式:,```JavaScript,var net = require('net');,``` + */ +declare module "net" { + + + module net { + + /** + * + * @brief 地址集常量,指定 ipv4 + * + * + */ + export const AF_INET = 2; + + /** + * + * @brief 地址集常量,指定 ipv6 + * + * + */ + export const AF_INET6 = 10; + + /** + * + * @brief 协议族常量,指定 tcp + * + * + */ + export const SOCK_STREAM = 1; + + /** + * + * @brief 协议族常量,指定 udp + * + * + */ + export const SOCK_DGRAM = 2; + + + + /** + * + * @brief 创建一个 Socket 对象,参见 Socket + * + * + */ + export class Socket extends Class_Socket {} + + + /** + * + * @brief 创建一个 Smtp 对象,参见 Smtp + * + * + */ + export class Smtp extends Class_Smtp {} + + + /** + * + * @brief 创建一个 TcpServer 对象,参见 TcpServer + * + * + */ + export class TcpServer extends Class_TcpServer {} + + + /** + * + * @brief 创建一个 UrlObject 对象,参见 UrlObject + * + * + */ + export class Url extends Class_UrlObject {} + + + + + /** + * + * @brief 查询当前运行环境网络信息 + * @return 返回网卡信息 + * + * + * + */ + export function info(): object; + + /** + * + * @brief 查询给定的主机名的地址 + * @param name 指定主机名 + * @param family 指定查询返回类型,缺省为 AF_INET + * @return 返回查询的 ip 字符串 + * + * + * @async + */ + export function resolve(name: string, family?: number/** = undefined*/): string; + + /** + * + * @brief 快速查询的主机地址,等效与 resolve(name) + * @param name 指定主机名 + * @return 返回查询的 ip 字符串 + * + * + * @async + */ + export function ip(name: string): string; + + /** + * + * @brief 快速查询的主机 ipv6 地址,等效与 resolve(name, net.AF_INET6) + * @param name 指定主机名 + * @return 返回查询的 ipv6 字符串 + * + * + * @async + */ + export function ipv6(name: string): string; + + /** + * + * @brief 创建一个 Socket 或 SslSocket 对象并建立连接 + * @param url 指定连接的协议,可以是:tcp://host:port 或者 ssl://host:port + * @param timeout 指定超时时间,单位是毫秒,默认为0 + * @return 返回连接成功的 Socket 或者 SslSocket 对象 + * + * + * @async + */ + export function connect(url: string, timeout?: number/** = 0*/): Class_Stream; + + /** + * + * @brief 创建一个 Smtp 对象并建立连接,参见 Smtp + * @param url 指定连接的协议,可以是:tcp://host:port 或者 ssl://host:port + * @param timeout 指定超时时间,单位是毫秒,默认为0 + * @return 返回连接成功的 Smtp 对象 + * + * + * @async + */ + export function openSmtp(url: string, timeout?: number/** = 0*/): Class_Smtp; + + /** + * + * @brief 查询当前系统异步网络引擎 + * @return 返回网络引擎名称 + * + * + * + */ + export function backend(): string; + + /** + * + * @brief 检测输入是否是 IP 地址 + * @param ip 指定要检测的字符串 + * @return 非合法的 IP 地址,返回 0, 如果是 IPv4 则返回 4,如果是 IPv6 则返回 6 + * + * + * + */ + export function isIP(ip?: string/** = ""*/): number; + + /** + * + * @brief 检测输入是否是 IPv4 地址 + * @param ip 指定要检测的字符串 + * @return 如果是 IPv4 则返回 true.否则返回 false + * + * + * + */ + export function isIPv4(ip?: string/** = ""*/): boolean; + + /** + * + * @brief 检测输入是否是 IPv6 地址 + * @param ip 指定要检测的字符串 + * @return 如果是 IPv6 则返回 true.否则返回 false + * + * + * + */ + export function isIPv6(ip?: string/** = ""*/): boolean; + + } /** end of `module net` */ + export = net +} + +/** endof `module Or Internal Object` */ + + diff --git a/types/fibjs/declare/object.d.ts b/types/fibjs/declare/object.d.ts new file mode 100644 index 0000000000..6c1b2019e0 --- /dev/null +++ b/types/fibjs/declare/object.d.ts @@ -0,0 +1,54 @@ +/*************************************************************************** + * * + * This file was automatically generated with idlc.js * + * build info: * + * - fibjs : 0.25.0 * + * - date : Jun 12 2018 07:22:40 * + * * + ***************************************************************************/ + +/** + * @author Richard + * + */ + + + + + +/** module Or Internal Object */ +/** + * @brief 基础对象,所有对象均继承于此 + * @detail + */ + +declare class Class__object { + + + + /** + * + * @brief 返回对象的字符串表示,一般返回 "[Native Object]",对象可以根据自己的特性重新实现 + * @return 返回对象的字符串表示 + * + * + * + */ + toString(): string; + + /** + * + * @brief 返回对象的 JSON 格式表示,一般返回对象定义的可读属性集合 + * @param key 未使用 + * @return 返回包含可 JSON 序列化的值 + * + * + * + */ + toJSON(key?: string/** = ""*/): any; + +} /** endof class */ + +/** endof `module Or Internal Object` */ + + diff --git a/types/fibjs/declare/os.d.ts b/types/fibjs/declare/os.d.ts new file mode 100644 index 0000000000..977fc4c6ce --- /dev/null +++ b/types/fibjs/declare/os.d.ts @@ -0,0 +1,481 @@ +/*************************************************************************** + * * + * This file was automatically generated with idlc.js * + * build info: * + * - fibjs : 0.25.0 * + * - date : Jun 12 2018 07:22:40 * + * * + ***************************************************************************/ + +/** + * @author Richard + * + */ + + + + + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + + + +/** module Or Internal Object */ +/** + * @brief 操作系统与文件系统处理模块 + * @detail 使用方法:,```JavaScript,var os = require('os');,``` + */ +declare module "os" { + + + module os { + + + /** + * + * @brief 查询运行环境当前时区 + * + * + */ + export const timezone: number; + + /** + * + * @brief 查询当前运行环境行结尾标识,posix:\"\\n\";windows:\"\\r\\n\" + * + * + */ + export const EOL: string; + + /** + * + * @brief 查询当前运行执行文件完整路径 + * + * + */ + export const execPath: string; + + + /** + * + * @brief Service 构造函数,参见 Service + * + * + */ + export class Service extends Class_Service {} + + + + + /** + * + * @brief 查询当前运行环境主机名 + * @return 返回主机名 + * + * + * + */ + export function hostname(): string; + + /** + * + * @brief 查询当前 CPU 的字节顺序 + * @return 返回字节顺序 + * + * + * + */ + export function endianness(): string; + + /** + * + * @brief 查询当前运行环境操作系统名称 + * @return 返回系统名称 + * + * + * + */ + export function type(): string; + + /** + * + * @brief 查询当前运行环境操作系统版本 + * @return 返回版本信息 + * + * + * + */ + export function release(): string; + + /** + * + * @brief 查询当前用户目录 + * @return 返回目录字符串 + * + * + * + */ + export function homedir(): string; + + /** + * + * @brief 查询当前 cpu 环境 + * @return 返回 cpu 类型,可能的结果为 'amd64', 'arm', 'arm64', 'ia32' + * + * + * + */ + export function arch(): string; + + /** + * + * @brief 查询运行环境运行时间,以秒为单位 + * @return 返回表示时间的数值 + * + * + * + */ + export function uptime(): number; + + /** + * + * @brief 查询运行环境 1分钟,5分钟,15分钟平均负载 + * @return 返回包含三个负载数据的数组 + * + * + * + */ + export function loadavg(): any[]; + + /** + * + * @brief 查询运行环境总内存,以字节为单位 + * @return 返回内存数据 + * + * + * + */ + export function totalmem(): number; + + /** + * + * @brief 查询运行环境可用内存,以字节为单位 + * @return 返回内存数据 + * + * + * + */ + export function freemem(): number; + + /** + * + * @brief 查询当前运行环境 cpu 个数和参数 + * @return 返回包含 cpu 参数的数组,每一项对应一个 cpu + * + * + * + */ + export function cpus(): any[]; + + /** + * + * @brief 查询当前运行环境 cpu 个数 + * @return 返回 cpu 个数 + * + * + * + */ + export function cpuNumbers(): number; + + /** + * + * @brief 查询当前运行环境临时文件目录 + * @return 返回临时文件目录 + * + * + * + */ + export function tmpdir(): string; + + /** + * + * @brief 返回当前有效执行用户信息 + * @param options 用于解释结果字符串的字符编码 + * @return 当前有效执行用户信息 + * + * + * + */ + export function userInfo(options?: object/** = v8::Object::New(isolate)*/): object; + + /** + * + * @brief 查询当前运行环境网络信息 + * @return 返回网卡信息 + * + * + * + */ + export function networkInterfaces(): object; + + /** + * + * @brief 查询当前主机的打印机信息 + * @return 返回打印机信息 + * + * + * + */ + export function printerInfo(): any[]; + + /** + * + * @brief 创建一个打印机输出对象 + * @param name 打印机名称 + * @return 返回打印机输出对象 + * + * + * @async + */ + export function openPrinter(name: string): Class_BufferedStream; + + /** + * + * @brief 查询当前平台名称 + * @return 返回平台名称,可能的结果为 'darwin', 'freebsd', 'linux', 或 'win32' + * + * + * + */ + export function platform(): string; + + /** + * + * @brief 解析时间字符串或查询运行环境当前时间 + * @param tmString 时间字符串,缺省则查询当前时间 + * @return 返回 javascript Date 对象 + * + * + * + */ + export function time(tmString?: string/** = ""*/): Date; + + /** + * + * @brief 时间计算函数,根据 part 指定计算时间 + * @param d 指定用于计算 Date 对象 + * @param num 指定运算的数值 + * @param part 指定运算的时间部位,接收值为:"year", "month", "day", "hour", "minute", "second" + * @return 返回 javascript Date 对象 + * + * + * + */ + export function dateAdd(d: Date, num: number, part: string): Date; + + /** + * + * @brief 查询当前进程内存使用报告 + * + * 内存报告生成类似以下结果: + * ```JavaScript + * { + * "rss": 8622080, + * "heapTotal": 4083456, + * "heapUsed": 1621800, + * "nativeObjects": 122 + * } + * ``` + * 其中: + * - rss 返回进程当前占用物理内存大小 + * - heapTotal 返回 v8 引擎堆内存大小 + * - heapUsed 返回 v8 引擎正在使用堆内存大小 + * - nativeObjects 返回当前有效内置对象数 + * @return 返回包含内存报告 + * + * + * + */ + export function memoryUsage(): object; + + } /** end of `module os` */ + export = os +} + +/** endof `module Or Internal Object` */ + + diff --git a/types/fibjs/declare/path.d.ts b/types/fibjs/declare/path.d.ts new file mode 100644 index 0000000000..9b6ae9cfec --- /dev/null +++ b/types/fibjs/declare/path.d.ts @@ -0,0 +1,375 @@ +/*************************************************************************** + * * + * This file was automatically generated with idlc.js * + * build info: * + * - fibjs : 0.25.0 * + * - date : Jun 12 2018 07:22:40 * + * * + ***************************************************************************/ + +/** + * @author Richard + * + */ + + + + + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + + + +/** module Or Internal Object */ +/** + * @brief 文件路径处理模块 + * @detail 引用方法:,```JavaScript,var path = require('path');,``` + */ +declare module "path" { + + + module path { + + + /** + * + * @brief 查询当前操作系统的路径分割字符,posix 返回 '/', windows 返回 '\\' + * + * + * + */ + export const sep: string; + + /** + * + * @brief 查询当前操作系统的多路径组合字符,posix 返回 ':', windows 返回 ';' + * + * + * + */ + export const delimiter: string; + + /** + * + * @brief posix 实现,参见 path_posix + * + * + * + */ + export const posix: Object; + + /** + * + * @brief windows 实现,参见 path_win32 + * + * + * + */ + export const win32: Object; + + + + + /** + * + * @brief 标准化路径,处理路径中父目录等信息 + * + * @param path 给定的未处理的路径 + * @return 返回经过处理的路径 + * + * + * + */ + export function normalize(path: string): string; + + /** + * + * @brief 查询路径中的文件名称,若指定扩展名,则自动取消匹配的扩展名 + * + * @param path 给定查询的路径 + * @param ext 指定扩展名,若文件名中有符合条件的扩展名,将自动取消 + * @return 返回文件名称 + * + * + * + */ + export function basename(path: string, ext?: string/** = ""*/): string; + + /** + * + * @brief 查询路径中的文件扩展名 + * + * @param path 给定查询的路径 + * @return 返回得到的扩展名 + * + * + * + */ + export function extname(path: string): string; + + /** + * + * @brief 查询路径中的目录路径 + * + * @param path 给定查询的路径 + * @return 返回得到的目录的路径 + * + * + * + */ + export function dirname(path: string): string; + + /** + * + * @brief 转换给定路径为全路径 + * + * @param path 给定转换的路径 + * @return 返回转换的全路径 + * + * + * + */ + export function fullpath(path: string): string; + + /** + * + * @brief 识别给定的路径是否是绝对路径 + * + * @param path 给定需要识别的路径 + * @return 是绝对路径则返回 true + * + * + * + */ + export function isAbsolute(path: string): boolean; + + /** + * + * @brief 合并一系列路径成为一个单一路径 + * + * @param ps 一个或多个相关的路径 + * @return 返回得到的新路径 + * + * + * + */ + export function join(...ps: any[]): string; + + /** + * + * @brief 合并一系列路径成为一个绝对路径 + * + * @param ps 一个或多个相关的路径 + * @return 返回得到的新路径 + * + * + * + */ + export function resolve(...ps: any[]): string; + + /** + * + * @brief 求 _from 到 to 的相对路径 + * + * @param _from 源路径 + * @param to 目标路径 + * @return 返回得到的相对路径 + * + * + * + */ + export function relative(_from: string, to: string): string; + + /** + * + * @brief 转换成 namespace-prefixed 路径。只在 windows 有效,其他系统直接返回。 + * see: https://msdn.microsoft.com/library/windows/desktop/aa365247(v=vs.85).aspx#namespaces + * @param path 给定的路径。 + * @return 返回得到的新路径 + * + * + * + */ + export function toNamespacedPath(path?: any/** = v8::Undefined(isolate)*/): any; + + } /** end of `module path` */ + export = path +} + +/** endof `module Or Internal Object` */ + + diff --git a/types/fibjs/declare/path_posix.d.ts b/types/fibjs/declare/path_posix.d.ts new file mode 100644 index 0000000000..bfeea21068 --- /dev/null +++ b/types/fibjs/declare/path_posix.d.ts @@ -0,0 +1,375 @@ +/*************************************************************************** + * * + * This file was automatically generated with idlc.js * + * build info: * + * - fibjs : 0.25.0 * + * - date : Jun 12 2018 07:22:40 * + * * + ***************************************************************************/ + +/** + * @author Richard + * + */ + + + + + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + + + +/** module Or Internal Object */ +/** + * @brief 文件路径处理模块 + * @detail 引用方法:,```JavaScript,var path = require('path').posix;,``` + */ +declare module "path_posix" { + + + module path_posix { + + + /** + * + * @brief 查询当前操作系统的路径分割字符,posix 返回 '/', windows 返回 '\\' + * + * + * + */ + export const sep: string; + + /** + * + * @brief 查询当前操作系统的多路径组合字符,posix 返回 ':', windows 返回 ';' + * + * + * + */ + export const delimiter: string; + + /** + * + * @brief posix 实现,参见 path_posix + * + * + * + */ + export const posix: Object; + + /** + * + * @brief windows 实现,参见 path_win32 + * + * + * + */ + export const win32: Object; + + + + + /** + * + * @brief 标准化路径,处理路径中父目录等信息 + * + * @param path 给定的未处理的路径 + * @return 返回经过处理的路径 + * + * + * + */ + export function normalize(path: string): string; + + /** + * + * @brief 查询路径中的文件名称,若指定扩展名,则自动取消匹配的扩展名 + * + * @param path 给定查询的路径 + * @param ext 指定扩展名,若文件名中有符合条件的扩展名,将自动取消 + * @return 返回文件名称 + * + * + * + */ + export function basename(path: string, ext?: string/** = ""*/): string; + + /** + * + * @brief 查询路径中的文件扩展名 + * + * @param path 给定查询的路径 + * @return 返回得到的扩展名 + * + * + * + */ + export function extname(path: string): string; + + /** + * + * @brief 查询路径中的目录路径 + * + * @param path 给定查询的路径 + * @return 返回得到的目录的路径 + * + * + * + */ + export function dirname(path: string): string; + + /** + * + * @brief 转换给定路径为全路径 + * + * @param path 给定转换的路径 + * @return 返回转换的全路径 + * + * + * + */ + export function fullpath(path: string): string; + + /** + * + * @brief 识别给定的路径是否是绝对路径 + * + * @param path 给定需要识别的路径 + * @return 是绝对路径则返回 true + * + * + * + */ + export function isAbsolute(path: string): boolean; + + /** + * + * @brief 合并一系列路径成为一个单一路径 + * + * @param ps 一个或多个相关的路径 + * @return 返回得到的新路径 + * + * + * + */ + export function join(...ps: any[]): string; + + /** + * + * @brief 合并一系列路径成为一个绝对路径 + * + * @param ps 一个或多个相关的路径 + * @return 返回得到的新路径 + * + * + * + */ + export function resolve(...ps: any[]): string; + + /** + * + * @brief 求 _from 到 to 的相对路径 + * + * @param _from 源路径 + * @param to 目标路径 + * @return 返回得到的相对路径 + * + * + * + */ + export function relative(_from: string, to: string): string; + + /** + * + * @brief 转换成 namespace-prefixed 路径。只在 windows 有效,其他系统直接返回。 + * see: https://msdn.microsoft.com/library/windows/desktop/aa365247(v=vs.85).aspx#namespaces + * @param path 给定的路径。 + * @return 返回得到的新路径 + * + * + * + */ + export function toNamespacedPath(path?: any/** = v8::Undefined(isolate)*/): any; + + } /** end of `module path_posix` */ + export = path_posix +} + +/** endof `module Or Internal Object` */ + + diff --git a/types/fibjs/declare/path_win32.d.ts b/types/fibjs/declare/path_win32.d.ts new file mode 100644 index 0000000000..25ce64db09 --- /dev/null +++ b/types/fibjs/declare/path_win32.d.ts @@ -0,0 +1,375 @@ +/*************************************************************************** + * * + * This file was automatically generated with idlc.js * + * build info: * + * - fibjs : 0.25.0 * + * - date : Jun 12 2018 07:22:40 * + * * + ***************************************************************************/ + +/** + * @author Richard + * + */ + + + + + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + + + +/** module Or Internal Object */ +/** + * @brief 文件路径处理模块 + * @detail 引用方法:,```JavaScript,var path = require('path').win32;,``` + */ +declare module "path_win32" { + + + module path_win32 { + + + /** + * + * @brief 查询当前操作系统的路径分割字符,posix 返回 '/', windows 返回 '\\' + * + * + * + */ + export const sep: string; + + /** + * + * @brief 查询当前操作系统的多路径组合字符,posix 返回 ':', windows 返回 ';' + * + * + * + */ + export const delimiter: string; + + /** + * + * @brief posix 实现,参见 path_posix + * + * + * + */ + export const posix: Object; + + /** + * + * @brief windows 实现,参见 path_win32 + * + * + * + */ + export const win32: Object; + + + + + /** + * + * @brief 标准化路径,处理路径中父目录等信息 + * + * @param path 给定的未处理的路径 + * @return 返回经过处理的路径 + * + * + * + */ + export function normalize(path: string): string; + + /** + * + * @brief 查询路径中的文件名称,若指定扩展名,则自动取消匹配的扩展名 + * + * @param path 给定查询的路径 + * @param ext 指定扩展名,若文件名中有符合条件的扩展名,将自动取消 + * @return 返回文件名称 + * + * + * + */ + export function basename(path: string, ext?: string/** = ""*/): string; + + /** + * + * @brief 查询路径中的文件扩展名 + * + * @param path 给定查询的路径 + * @return 返回得到的扩展名 + * + * + * + */ + export function extname(path: string): string; + + /** + * + * @brief 查询路径中的目录路径 + * + * @param path 给定查询的路径 + * @return 返回得到的目录的路径 + * + * + * + */ + export function dirname(path: string): string; + + /** + * + * @brief 转换给定路径为全路径 + * + * @param path 给定转换的路径 + * @return 返回转换的全路径 + * + * + * + */ + export function fullpath(path: string): string; + + /** + * + * @brief 识别给定的路径是否是绝对路径 + * + * @param path 给定需要识别的路径 + * @return 是绝对路径则返回 true + * + * + * + */ + export function isAbsolute(path: string): boolean; + + /** + * + * @brief 合并一系列路径成为一个单一路径 + * + * @param ps 一个或多个相关的路径 + * @return 返回得到的新路径 + * + * + * + */ + export function join(...ps: any[]): string; + + /** + * + * @brief 合并一系列路径成为一个绝对路径 + * + * @param ps 一个或多个相关的路径 + * @return 返回得到的新路径 + * + * + * + */ + export function resolve(...ps: any[]): string; + + /** + * + * @brief 求 _from 到 to 的相对路径 + * + * @param _from 源路径 + * @param to 目标路径 + * @return 返回得到的相对路径 + * + * + * + */ + export function relative(_from: string, to: string): string; + + /** + * + * @brief 转换成 namespace-prefixed 路径。只在 windows 有效,其他系统直接返回。 + * see: https://msdn.microsoft.com/library/windows/desktop/aa365247(v=vs.85).aspx#namespaces + * @param path 给定的路径。 + * @return 返回得到的新路径 + * + * + * + */ + export function toNamespacedPath(path?: any/** = v8::Undefined(isolate)*/): any; + + } /** end of `module path_win32` */ + export = path_win32 +} + +/** endof `module Or Internal Object` */ + + diff --git a/types/fibjs/declare/process.d.ts b/types/fibjs/declare/process.d.ts new file mode 100644 index 0000000000..1e6e1c8739 --- /dev/null +++ b/types/fibjs/declare/process.d.ts @@ -0,0 +1,561 @@ +/*************************************************************************** + * * + * This file was automatically generated with idlc.js * + * build info: * + * - fibjs : 0.25.0 * + * - date : Jun 12 2018 07:22:40 * + * * + ***************************************************************************/ + +/** + * @author Richard + * + */ + + + + + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + + + +/** module Or Internal Object */ +/** + * @brief 进程处理模块,用以管理当前进程的资源 + * @detail 引用方法:,```JavaScript,var process = require('process');,```,,## 进程事件,process 模块对象是 EventEmitter 的实例,可以通过注册事件监听器响应进程级别的事件。,,### beforeExit 事件,**当 fibjs 的任务已经为空,并且没有额外的工作被添加进来,事件 `beforeExit` 会被触发**,```JavaScript,process.on('beforeExit', exitCode => {});,```,正常情况下,如果没有额外的工作被添加到任务队列,fibjs 进程会结束。但是如果 `beforeExit` 事件绑定的监听器的回调函数中,启动了一个新的任务,比如开启一个 fiber,那么 fibjs 进程会继续运行。,,process.exitCode 作为唯一的参数值传递给 `beforeExit` 事件监听器的回调函数。如果进程由于显式的原因而将要终止,例如直接调用 process.exit 或抛出未捕获的异常,`beforeExit`事件不会被触发。,,### exit 事件,**当 fibjs 退出时,事件 `exit` 会被触发,一旦所有与 `exit` 事件绑定的监听器执行完成,进程会终止**,```JavaScript,process.on('exit', exitCode => {});,```,`exit` 事件监听器的回调函数,只有一个入参,这个参数的值可以是 process.exitCode 的属性值,或者是调用 process.exit 方法时传入的 `exitCode` 值。,,### Signal 事件,**当 fibjs 进程接收到一个信号时,会触发信号事件,目前支持的信号有 SIGINT 和 SIGTERM。每个事件名称,以信号名称的大写表示 (比如事件'SIGINT' 对应信号 SIGINT)。**,,信号事件不同于其它进程事件,信号事件是抢占的,当信号发生时,无论当前在 io 操作,还是 JavaScript 运算,都会尽快触发相应事件。比如你可以用下面的代码,中断当前应用,并输出运行状态:,```JavaScript,var coroutine = require('coroutine');,,process.on('SIGINT', () => {, coroutine.fibers.forEach(f => console.error("Fiber %d:\n%s", f.id, f.stack));, process.exit();,});,```,信号名称及其意义如下:,* SIGINT:在终端运行时,可以被所有平台支持,通常可以通过 CTRL+C 触发。,* SIGTERM:当进程被 kill 时触发此信号。Windows 下不支持。 + */ +declare module "process" { + + + module process { + + + /** + * + * @brief 返回当前进程的命令行参数 + * + * + */ + export const argv: any[]; + + /** + * + * @brief 返回当前进程的特殊命令行参数,这些参数被 fibjs 用于设置运行环境 + * + * + */ + export const execArgv: any[]; + + /** + * + * @brief 返回 fibjs 版本字符串 + * + * + */ + export const version: string; + + /** + * + * @brief 返回 fibjs 及组件的版本信息 + * + * + */ + export const versions: Object; + + /** + * + * @brief 查询当前运行执行文件完整路径 + * + * + */ + export const execPath: string; + + /** + * + * @brief 查询当前进程的环境变量 + * + * + */ + export const env: Object; + + /** + * + * @brief 查询当前 cpu 环境,可能的结果为 'amd64', 'arm', 'arm64', 'ia32' + * + * + */ + export const arch: string; + + /** + * + * @brief 查询当前平台名称,可能的结果为 'darwin', 'freebsd', 'linux', 或 'win32' + * + * + */ + export const platform: string; + + /** + * + * @brief 查询当前进程标准输入对象 + * + * + */ + export const stdin: Class_File; + + /** + * + * @brief 查询当前进程标准输出对象 + * + * + */ + export const stdout: Class_File; + + /** + * + * @brief 查询当前进程标准错误输出对象 + * + * + */ + export const stderr: Class_File; + + /** + * + * @brief 查询和设置当前进程的退出码 + * + * + */ + export const exitCode: number; + + + + + /** + * + * @brief 改变当前的 umask,Windows 不支持此方法 + * @param mask 指定新的掩码 + * @return 返回之前的 mask + * + * + * + */ + export function umask(mask: number): number; + + /** + * + * @brief 改变当前的 umask,Windows 不支持此方法 + * @param mask 指定新的掩码, 字符串类型八进制(e.g: "0664") + * @return 返回之前的 mask + * + * + * + */ + export function umask(mask: string): number; + + /** + * + * @brief 返回当前的 umask,Windows 不支持此方法 + * @return 返回当前的 mask 值 + * + * + * + */ + export function umask(): number; + + /** + * + * @brief 返回系统高精度时间,此时间与当前时间无关,仅用于高精度计时 + * @param diff 用于比较的初始时间 + * @return 返回计时时间,格式为 [seconds, nanoseconds] + * + * + * + */ + export function hrtime(diff?: any[]/** = v8::Array::New(isolate)*/): any[]; + + /** + * + * @brief 退出当前进程,并返回 exitCode 作为进程结果 + * + * + */ + export function exit(): void; + + /** + * + * @brief 退出当前进程,并返回结果 + * @param code 返回进程结果 + * + * + * + */ + export function exit(code: number): void; + + /** + * + * @brief 返回操作系统当前工作路径 + * @return 返回当前系统路径 + * + * + * + */ + export function cwd(): string; + + /** + * + * @brief 修改操作系统当前工作路径 + * @param directory 指定设定的新路径 + * + * + * + */ + export function chdir(directory: string): void; + + /** + * + * @brief 查询运行环境运行时间,以秒为单位 + * @return 返回表示时间的数值 + * + * + * + */ + export function uptime(): number; + + /** + * + * @brief 查询当前进程内存使用报告 + * + * 内存报告生成类似以下结果: + * ```JavaScript + * { + * "rss": 8622080, + * "heapTotal": 4083456, + * "heapUsed": 1621800 + * } + * ``` + * 其中: + * - rss 返回进程当前占用物理内存大小 + * - heapTotal 返回 v8 引擎堆内存大小 + * - heapUsed 返回 v8 引擎正在使用堆内存大小 + * @return 返回包含内存报告 + * + * + * + */ + export function memoryUsage(): object; + + /** + * + * @brief 启动一个纤程 + * @param func 制定纤程执行的函数 + * @param args 可变参数序列,此序列会在纤程内传递给函数 + * + * + * + */ + export function nextTick(func: Function, ...args: any[]): void; + + /** + * + * @brief 运行指定的命令行,接管进程输入输出流,并返回进程对象 + * + * opts 支持的选项如下: + * ```JavaScript + * { + * "timeout": 100, // 单位为 ms + * "envs": [] // 进程环境变量 + * } + * ``` + * @param command 指定运行的命令行 + * @param args 指定运行的参数列表 + * @param opts 指定运行的选项 + * @return 返回包含运行结果的进程对象 + * + * + * + */ + export function open(command: string, args: any[], opts?: object/** = v8::Object::New(isolate)*/): Class_SubProcess; + + /** + * + * @brief 运行指定的命令行,接管进程输入输出流,并返回进程对象 + * + * opts 支持的选项如下: + * ```JavaScript + * { + * "timeout": 100, // 单位为 ms + * "envs": [] // 进程环境变量 + * } + * ``` + * @param command 指定运行的命令行 + * @param opts 指定运行的选项 + * @return 返回包含运行结果的进程对象 + * + * + * + */ + export function open(command: string, opts?: object/** = v8::Object::New(isolate)*/): Class_SubProcess; + + /** + * + * @brief 运行指定的命令行,并返回进程对象 + * + * opts 支持的选项如下: + * ```JavaScript + * { + * "timeout": 100, // 单位为 ms + * "envs": [] // 进程环境变量 + * } + * ``` + * @param command 指定运行的命令行 + * @param args 指定运行的参数列表 + * @param opts 指定运行的选项 + * @return 返回包含运行结果的进程对象 + * + * + * + */ + export function start(command: string, args: any[], opts?: object/** = v8::Object::New(isolate)*/): Class_SubProcess; + + /** + * + * @brief 运行指定的命令行,并返回进程对象 + * + * opts 支持的选项如下: + * ```JavaScript + * { + * "timeout": 100, // 单位为 ms + * "envs": [] // 进程环境变量 + * } + * ``` + * @param command 指定运行的命令行 + * @param opts 指定运行的选项 + * @return 返回包含运行结果的进程对象 + * + * + * + */ + export function start(command: string, opts?: object/** = v8::Object::New(isolate)*/): Class_SubProcess; + + /** + * + * @brief 运行指定的命令行,并返回进程的结束代码 + * + * opts 支持的选项如下: + * ```JavaScript + * { + * "timeout": 100, // 单位为 ms + * "envs": [] // 进程环境变量 + * } + * ``` + * @param command 指定运行的命令行 + * @param args 指定运行的参数列表 + * @param opts 指定运行的选项 + * @return 返回命令的运行结果 + * + * + * + */ + export function run(command: string, args: any[], opts?: object/** = v8::Object::New(isolate)*/): number; + + /** + * + * @brief 运行指定的命令行,并返回进程的结束代码 + * + * opts 支持的选项如下: + * ```JavaScript + * { + * "timeout": 100, // 单位为 ms + * "envs": [] // 进程环境变量 + * } + * ``` + * @param command 指定运行的命令行 + * @param opts 指定运行的选项 + * @return 返回命令的运行结果 + * + * + * + */ + export function run(command: string, opts?: object/** = v8::Object::New(isolate)*/): number; + + } /** end of `module process` */ + export = process +} + +/** endof `module Or Internal Object` */ + + diff --git a/types/fibjs/declare/profiler.d.ts b/types/fibjs/declare/profiler.d.ts new file mode 100644 index 0000000000..5d3459ddbb --- /dev/null +++ b/types/fibjs/declare/profiler.d.ts @@ -0,0 +1,440 @@ +/*************************************************************************** + * * + * This file was automatically generated with idlc.js * + * build info: * + * - fibjs : 0.25.0 * + * - date : Jun 12 2018 07:22:40 * + * * + ***************************************************************************/ + +/** + * @author Richard + * + */ + + + + + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + + + +/** module Or Internal Object */ +/** + * @brief 内存 profiler 模块 + * @detail 使用方法:,```JavaScript,var profiler = require('profiler');,``` + */ +declare module "profiler" { + + + module profiler { + + /** + * + * @brief 隐藏节点,当显示给用户时可以被过滤掉 + * + * + */ + export const Node_Hidden = 0; + + /** + * + * @brief 数组 + * + * + */ + export const Node_Array = 1; + + /** + * + * @brief 字符串 + * + * + */ + export const Node_String = 2; + + /** + * + * @brief JS对象(字符串和数组除外) + * + * + */ + export const Node_Object = 3; + + /** + * + * @brief 编译后的代码 + * + * + */ + export const Node_Code = 4; + + /** + * + * @brief 函数闭包 + * + * + */ + export const Node_Closure = 5; + + /** + * + * @brief 正则表达式 + * + * + */ + export const Node_RegExp = 6; + + /** + * + * @brief 堆中排好序的数字 + * + * + */ + export const Node_HeapNumber = 7; + + /** + * + * @brief Native对象(非v8堆上的) + * + * + */ + export const Node_Native = 8; + + /** + * + * @brief Synthetic对象 + * + * + */ + export const Node_Synthetic = 9; + + /** + * + * @brief 拼接的字符串 + * + * + */ + export const Node_ConsString = 10; + + /** + * + * @brief 分割的字符串 + * + * + */ + export const Node_SlicedString = 11; + + /** + * + * @brief 符号(ES6) + * + * + */ + export const Node_Symbol = 12; + + /** + * + * @brief 堆中排好序的SIMD值(ES7) + * + * + */ + export const Node_SimdValue = 13; + + /** + * + * @brief 函数中的变量 + * + * + */ + export const Edge_ContextVariable = 0; + + /** + * + * @brief 数组中的元素 + * + * + */ + export const Edge_Element = 1; + + /** + * + * @brief 有名对象的属性 + * + * + */ + export const Edge_Property = 2; + + /** + * + * @brief JS无法进入的链接 + * + * + */ + export const Edge_Internal = 3; + + /** + * + * @brief 指向需要事先计算出空间大小的节点 + * + * + */ + export const Edge_Hidden = 4; + + /** + * + * @brief 指向无法事先计算出空间大小的节点 + * + * + */ + export const Edge_Shortcut = 5; + + /** + * + * @brief 一个弱引用(被GC忽视) + * + * + */ + export const Edge_Weak = 6; + + + + + + /** + * + * @brief 根据指定名称保存一个堆快照 + * @param fname 堆快照名称 + * + * + * + */ + export function saveSnapshot(fname: string): void; + + /** + * + * @brief 根据指定名称读取一个堆快照 + * @param fname 堆快照名称 + * @return 返回读取到的堆快照 + * + * + * + */ + export function loadSnapshot(fname: string): Class_HeapSnapshot; + + /** + * + * @brief 获取当前时间节点的堆快照,堆快照记录了当前时刻JS堆的状态 + * @return 返回获取到的堆信息快照 + * + * + * + */ + export function takeSnapshot(): Class_HeapSnapshot; + + /** + * + * @brief 执行给定的函数,并对比执行前后 v8 堆的变化 + * @param test 给定要测试的函数 + * @return 返回对比的结果 + * + * + * + */ + export function diff(test: Function): object; + + /** + * + * @brief 启动一次运行状态采样日志 + * @param fname 给定日志存储文件名 + * @param time 指定采样时间,缺省 1 分钟 + * @param interval 指定间隔时间,缺省 100 毫秒 + * @return 返回采样定时器,可以通过 clear 方法提前停止采样 + * + * + * + */ + export function start(fname: string, time?: number/** = 60000*/, interval?: number/** = 100*/): Class_Timer; + + } /** end of `module profiler` */ + export = profiler +} + +/** endof `module Or Internal Object` */ + + diff --git a/types/fibjs/declare/punycode.d.ts b/types/fibjs/declare/punycode.d.ts new file mode 100644 index 0000000000..2d2e423bb7 --- /dev/null +++ b/types/fibjs/declare/punycode.d.ts @@ -0,0 +1,261 @@ +/*************************************************************************** + * * + * This file was automatically generated with idlc.js * + * build info: * + * - fibjs : 0.25.0 * + * - date : Jun 12 2018 07:22:40 * + * * + ***************************************************************************/ + +/** + * @author Richard + * + */ + + + + + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + + + +/** module Or Internal Object */ +/** + * @brief punycode 国际化域名转换模块 + * @detail Punycode 是由 RFC 3492 定义的主要用于国际化域名的字符编码方案。因为 URL 中主机名限制只能是 ASCII 字符,包括非 ASCII 字符的主机名必须使用 punycode 算法转化为ASCII。,,使用方法:,```JavaScript,var punycode = require('punycode');,``` + */ +declare module "punycode" { + + + module punycode { + + + + + + /** + * + * @brief 将一个 Unicode 字符串转化为等价的只含有 ASCII 字符的 Punycode 字符串 + * @param domain 给定Unicode 字符串 + * @return 返回编码后的只含有 ASCII 字符的 Punycode 字符串 + * + * + * + */ + export function encode(domain: string): string; + + /** + * + * @brief 将一个 Punycode 字符串转化为等价的 Unicode 字符串 + * @param domain 给定Unicode 字符串 + * @return 返回解码后的 Unicode 字符串 + * + * + * + */ + export function decode(domain: string): string; + + /** + * + * @brief 转换一个代表了一个域名的Unicode字符串为一个只含有 ASCII 字符的字符串。只有代表了域名的部分的非 ASCII 字符串会被转换。也就是说,如果你调用了一个已经被转换为ASCII的字符串,也是没有问题的。 + * @param domain 给定Unicode 字符串 + * @return 返回编码后的 ASCII 字符串 + * + * + * + */ + export function toASCII(domain: string): string; + + /** + * + * @brief 转换一个代表了一个域名的Punycode字符串为一个Unicode字符串。只有代表了域名的部分的Punycode字符串会被转换。也就是说,如果你调用了一个已经被转换为Unicode的字符串,也是没有问题的。 + * @param domain 给定 ASCII 字符串 + * @return 返回解码后的 Unicode 字符串 + * + * + * + */ + export function toUnicode(domain: string): string; + + } /** end of `module punycode` */ + export = punycode +} + +/** endof `module Or Internal Object` */ + + diff --git a/types/fibjs/declare/querystring.d.ts b/types/fibjs/declare/querystring.d.ts new file mode 100644 index 0000000000..bd939a0621 --- /dev/null +++ b/types/fibjs/declare/querystring.d.ts @@ -0,0 +1,267 @@ +/*************************************************************************** + * * + * This file was automatically generated with idlc.js * + * build info: * + * - fibjs : 0.25.0 * + * - date : Jun 12 2018 07:22:40 * + * * + ***************************************************************************/ + +/** + * @author Richard + * + */ + + + + + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + + + +/** module Or Internal Object */ +/** + * @brief http query 处理模块 + * @detail 引用方法:,```JavaScript,var querystring = require('querystring');,``` + */ +declare module "querystring" { + + + module querystring { + + + + + + /** + * + * @brief url 部件字符串安全编码 + * @param str 要编码的 url + * @return 返回编码的字符串 + * + * + * + */ + export function escape(str: string): string; + + /** + * + * @brief url 安全字符串解码 + * @param str 要解码的 url + * @return 返回解码的字符串 + * + * + * + */ + export function unescape(str: string): string; + + /** + * + * @brief 解析 query 字符串 + * @param str 要解析的字符串 + * @param sep 解析时使用的分割字符串,缺省为 & + * @param eq 解析时使用的赋值字符串,缺省为 = + * @param opt 解析参数,暂未支持 + * @return 返回解码的对象 + * + * + * + */ + export function parse(str: string, sep?: string/** = "&"*/, eq?: string/** = "="*/, opt?: object/** = v8::Object::New(isolate)*/): Class_HttpCollection; + + /** + * + * @brief 序列化一个对象为 query 字符串 + * @param obj 要序列化的对象 + * @param sep 序列化时使用的分割字符串,缺省为 & + * @param eq 序列化时使用的赋值字符串,缺省为 = + * @param opt 解析参数,暂未支持 + * @return 返回序列化后的字符串 + * + * + * + */ + export function stringify(obj: object, sep?: string/** = "&"*/, eq?: string/** = "="*/, opt?: object/** = v8::Object::New(isolate)*/): string; + + } /** end of `module querystring` */ + export = querystring +} + +/** endof `module Or Internal Object` */ + + diff --git a/types/fibjs/declare/registry.d.ts b/types/fibjs/declare/registry.d.ts new file mode 100644 index 0000000000..3190eaf5d5 --- /dev/null +++ b/types/fibjs/declare/registry.d.ts @@ -0,0 +1,386 @@ +/*************************************************************************** + * * + * This file was automatically generated with idlc.js * + * build info: * + * - fibjs : 0.25.0 * + * - date : Jun 12 2018 07:22:40 * + * * + ***************************************************************************/ + +/** + * @author Richard + * + */ + + + + + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + + + +/** module Or Internal Object */ +/** + * @brief Windows 注册表访问模块 + * @detail 引用方式:,```JavaScript,var registry = require('registry');,var value = registry.get(registry.CLASSES_ROOT, "\node1\node2\value");,``` + */ +declare module "registry" { + + + module registry { + + /** + * + * @brief 注册表根,存储Windows可识别的文件类型的详细列表,以及相关联的程序 + * + * + */ + export const CLASSES_ROOT = 0; + + /** + * + * @brief 注册表根,存储当前用户设置的信息 + * + * + */ + export const CURRENT_USER = 1; + + /** + * + * @brief 注册表根,包括安装在计算机上的硬件和软件的信息 + * + * + */ + export const LOCAL_MACHINE = 2; + + /** + * + * @brief 注册表根,包含使用计算机的用户的信息 + * + * + */ + export const USERS = 3; + + /** + * + * @brief 注册表根,这个分支包含计算机当前的硬件配置信息 + * + * + */ + export const CURRENT_CONFIG = 5; + + /** + * + * @brief 注册表数据类型,字符串 + * + * + */ + export const SZ = 1; + + /** + * + * @brief 注册表数据类型,扩展字符串 + * + * + */ + export const EXPAND_SZ = 2; + + /** + * + * @brief 注册表数据类型,32 位数值 + * + * + */ + export const DWORD = 4; + + /** + * + * @brief 注册表数据类型,64 位数值 + * + * + */ + export const QWORD = 11; + + + + + + /** + * + * @brief 返回指定键值下的所有子健 + * @param root 指定注册表根 + * @param key 指定键值 + * @return 返回该键值下所有子健 + * + * + * + */ + export function listSubKey(root: number, key: string): any[]; + + /** + * + * @brief 返回指定键值下的所有数据的健 + * @param root 指定注册表根 + * @param key 指定键值 + * @return 返回该键值下所有数据的健 + * + * + * + */ + export function listValue(root: number, key: string): any[]; + + /** + * + * @brief 查询指定键值的数值 + * @param root 指定注册表根 + * @param key 指定键值 + * @return 返回指定键值的数值 + * + * + * + */ + export function get(root: number, key: string): any; + + /** + * + * @brief 设置指定键值为数字 + * @param root 指定注册表根 + * @param key 指定键值 + * @param value 指定数字 + * @param type 指定类型,允许的类型为 DWORD 和 QWORD,缺省为 DWORD + * + * + * + */ + export function set(root: number, key: string, value: number, type?: number/** = undefined*/): void; + + /** + * + * @brief 设置指定键值为字符串 + * @param root 指定注册表根 + * @param key 指定键值 + * @param value 指定字符串 + * @param type 指定类型,允许的类型为 SZ 和 EXPAND_SZ,缺省为 SZ + * + * + * + */ + export function set(root: number, key: string, value: string, type?: number/** = undefined*/): void; + + /** + * + * @brief 设置指定键值为多字符串 + * @param root 指定注册表根 + * @param key 指定键值 + * @param value 指定多字符串数组 + * + * + * + */ + export function set(root: number, key: string, value: any[]): void; + + /** + * + * @brief 设置指定键值为二进制 + * @param root 指定注册表根 + * @param key 指定键值 + * @param value 指定二进制数据 + * + * + * + */ + export function set(root: number, key: string, value: Class_Buffer): void; + + /** + * + * @brief 删除指定键值的数值 + * @param root 指定注册表根 + * @param key 指定键值 + * + * + * + */ + export function del(root: number, key: string): void; + + } /** end of `module registry` */ + export = registry +} + +/** endof `module Or Internal Object` */ + + diff --git a/types/fibjs/declare/ssl.d.ts b/types/fibjs/declare/ssl.d.ts new file mode 100644 index 0000000000..e331eeb691 --- /dev/null +++ b/types/fibjs/declare/ssl.d.ts @@ -0,0 +1,408 @@ +/*************************************************************************** + * * + * This file was automatically generated with idlc.js * + * build info: * + * - fibjs : 0.25.0 * + * - date : Jun 12 2018 07:22:40 * + * * + ***************************************************************************/ + +/** + * @author Richard + * + */ + + + + + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + + + +/** module Or Internal Object */ +/** + * @brief ssl/tls 模块,模块别名:tls + * @detail + */ +declare module "ssl" { + + + module ssl { + + /** + * + * @brief 证书验证模式,不验证 + * + * + */ + export const VERIFY_NONE = 0; + + /** + * + * @brief 证书验证模式,可选验证,允许验证不通过 + * + * + */ + export const VERIFY_OPTIONAL = 1; + + /** + * + * @brief 证书验证模式,要求验证,验证不通过则中断 + * + * + */ + export const VERIFY_REQUIRED = 2; + + /** + * + * @brief 证书验证结果,证书超时 + * + * + */ + export const BADCERT_EXPIRED = 1; + + /** + * + * @brief 证书验证结果,证书被撤销 + * + * + */ + export const BADCERT_REVOKED = 2; + + /** + * + * @brief 证书验证结果,证书名错误 + * + * + */ + export const BADCERT_CN_MISMATCH = 4; + + /** + * + * @brief 证书验证结果,证书不可信 + * + * + */ + export const BADCERT_NOT_TRUSTED = 8; + + /** + * + * @brief ssl 协议版本 ssl 3.0 + * + * + */ + export const ssl3 = 0; + + /** + * + * @brief ssl 协议版本 tls 1.0 + * + * + */ + export const tls1 = 1; + + /** + * + * @brief ssl 协议版本 tls 1.1 + * + * + */ + export const tls1_1 = 2; + + /** + * + * @brief ssl 协议版本 tls 1.2 + * + * + */ + export const tls1_2 = 3; + + + /** + * + * @brief 全局证书,用于 ssl 客户端模式验证服务器证书 + * + * + */ + export const ca: Class_X509Cert; + + /** + * + * @brief 设定证书验证模式,缺省为 VERIFY_REQUIRED + * + * + */ + export const verification: number; + + /** + * + * @brief 设定最低版本支持,缺省 ssl3 + * + * + */ + export const min_version: number; + + /** + * + * @brief 设定最高版本支持,缺省 tls1_1 + * + * + */ + export const max_version: number; + + + /** + * + * @brief 创建一个 SslSocket 对象,参见 SslSocket + * + * + */ + export class Socket extends Class_SslSocket {} + + + /** + * + * @brief 创建一个 SslHandler 对象,参见 SslHandler + * + * + */ + export class Handler extends Class_SslHandler {} + + + /** + * + * @brief 创建一个 SslServer 对象,参见 SslServer + * + * + */ + export class Server extends Class_SslServer {} + + + + + /** + * + * @brief 创建一个 SslSocket 对象并建立连接 + * @param url 指定连接的协议,可以是:ssl://host:port + * @param timeout 指定超时时间,单位是毫秒,默认为0 + * @return 返回连接成功的 SslSocket 对象 + * + * + * @async + */ + export function connect(url: string, timeout?: number/** = 0*/): Class_Stream; + + /** + * + * @brief 设定缺省客户端证书 + * @param crt X509Cert 证书,用于客户端验证服务器 + * @param key PKey 私钥,用于与客户端会话 + * + * + * + */ + export function setClientCert(crt: Class_X509Cert, key: Class_PKey): void; + + /** + * + * @brief 从文件中加载缺省客户端证书 + * @param crtFile X509Cert 证书文件,用于客户端验证服务器 + * @param keyFile PKey 私钥文件,用于与客户端会话 + * @param password 解密密码 + * + * + * + */ + export function loadClientCertFile(crtFile: string, keyFile: string, password?: string/** = ""*/): void; + + /** + * + * @brief 加载自带的缺省根证书,等同于 ssl.ca.loadRootCerts + * 此证书内容源自:http://hg.mozilla.org/releases/mozilla-release/raw-file/default/security/nss/lib/ckfw/builtins/certdata.txt + * + * + */ + export function loadRootCerts(): void; + + } /** end of `module ssl` */ + export = ssl +} + +/** endof `module Or Internal Object` */ + + diff --git a/types/fibjs/declare/string_decoder.d.ts b/types/fibjs/declare/string_decoder.d.ts new file mode 100644 index 0000000000..22b4a8aed6 --- /dev/null +++ b/types/fibjs/declare/string_decoder.d.ts @@ -0,0 +1,226 @@ +/*************************************************************************** + * * + * This file was automatically generated with idlc.js * + * build info: * + * - fibjs : 0.25.0 * + * - date : Jun 12 2018 07:22:40 * + * * + ***************************************************************************/ + +/** + * @author Richard + * + */ + + + + + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + + + +/** module Or Internal Object */ +/** + * @brief 解码 Buffer 到字符串 + * @detail 使用方法:,```JavaScript, const { StringDecoder } = require('string_decoder');, const decoder = new StringDecoder('utf8');,, const cent = Buffer.from([0xC2, 0xA2]);, console.log(decoder.write(cent));,, const euro = Buffer.from([0xE2, 0x82, 0xAC]);, console.log(decoder.write(euro));,``` + */ +declare module "string_decoder" { + + + module string_decoder { + + + + /** + * + * @brief 创建一个解码对象,参见 StringDecoder + * + * + */ + export class StringDecoder extends Class_StringDecoder {} + + + + + } /** end of `module string_decoder` */ + export = string_decoder +} + +/** endof `module Or Internal Object` */ + + diff --git a/types/fibjs/declare/test.d.ts b/types/fibjs/declare/test.d.ts new file mode 100644 index 0000000000..c3f7d36456 --- /dev/null +++ b/types/fibjs/declare/test.d.ts @@ -0,0 +1,366 @@ +/*************************************************************************** + * * + * This file was automatically generated with idlc.js * + * build info: * + * - fibjs : 0.25.0 * + * - date : Jun 12 2018 07:22:40 * + * * + ***************************************************************************/ + +/** + * @author Richard + * + */ + + + + + + + + + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + + + +/** module Or Internal Object */ +/** + * @brief 测试套件模块,用以定义管理测试套件 + * @detail 使用方法 :,,```JavaScript,var test = require('test');,test.setup();,,describe('test', () => {, before(() => {, // setup before the whole test, });,, beforeEach(() => {, // setup before each test, });,, after(() => {, // cleanup after the whole test, });,, afterEach(() => {, // cleanup after each test, });,, it('case', () => {, assert.ok(true);, });,, // ignored test case, xit('case', () => {, assert.ok(true);, });,, // ignored test case, it.skip('case', () => {, assert.ok(true);, });,, // only test case, oit('case', () => {, assert.ok(true);, });,, // only test case, it.only('case', () => {, assert.ok(true);, });,});,,// async function test,describe('test async', () => {,it('pass case', async() => {, assert.ok(true);,});,,it('error case', async() => {, throw new Error('some thing wrong!');,});,});,,// callback function test,// cannot use callback mode in jsc,describe('test callback', () => {,it('pass case', done => {, setTimeout(() => {, assert.ok(true);, done();, }, 0);,});,,it('error case', done => {, setTimeout(() => {, done(new Error('some thing wrong!'));, }, 0);,});,});,,process.exit(-test.run(console.DEBUG));,``` + */ +declare module "test" { + + import consoleNS = require('console') + import assertNS = require('assert') + + module test { + + + /** + * + * @brief 设置和查询慢速测试警告阀值,以 ms 为单位,缺省为 75 + * + * + * + */ + export const slow: number; + + + /** + * + * @brief 断言测试模块,如果测试值为假,则报错,报错行为可设定继续运行或者错误抛出 + * + * + */ + + export const assert: typeof assertNS + + + + /** + * + * @brief 定义一个测试模块,可嵌套定义 + * @param name 定义模块名称 + * @param block 模块初始化代码 + * + * + * + */ + export function describe(name: string, block: Function): void; + + /** + * + * @brief 暂停测试的模块定义,test.setup 后可使用 describe.skip 调用 + * @param name 定义模块名称 + * @param block 模块初始化代码 + * + * + * + */ + export function xdescribe(name: string, block: Function): void; + + /** + * + * @brief 独立测试的模块定义,test.setup 后可使用 describe.only 调用 + * @param name 定义模块名称 + * @param block 模块初始化代码 + * + * + * + */ + export function odescribe(name: string, block: Function): void; + + /** + * + * @brief 定义一个测试项目 + * @param name 定义项目名称 + * @param block 测试内容 + * + * + * + */ + export function it(name: string, block: Function): void; + + /** + * + * @brief 暂停测试的项目定义,test.setup 后可使用 it.skip 调用 + * @param name 定义项目名称 + * @param block 测试内容 + * + * + * + */ + export function xit(name: string, block: Function): void; + + /** + * + * @brief 独立测试的项目定义,test.setup 后可使用 it.only 调用 + * @param name 定义项目名称 + * @param block 测试内容 + * + * + * + */ + export function oit(name: string, block: Function): void; + + /** + * + * @brief 定义当前测试模块进入事件 + * @param func 事件函数 + * + * + * + */ + export function before(func: Function): void; + + /** + * + * @brief 定义当前测试模块退出事件 + * @param func 事件函数 + * + * + * + */ + export function after(func: Function): void; + + /** + * + * @brief 定义当前测试模块测试项目进入事件 + * @param func 事件函数 + * + * + * + */ + export function beforeEach(func: Function): void; + + /** + * + * @brief 定义当前测试模块测试项目退出事件 + * @param func 事件函数 + * + * + * + */ + export function afterEach(func: Function): void; + + /** + * + * @brief 开始执行定义的测试模块 + * @param loglevel 指定进行测试时的日志输出级别,ERROR 时,项目报错信息集中在报告后显示,低于 ERROR 时,输出信息随时显示,高于 ERROR 时,只显示报告 + * @return 返回测试用例统计结果,正确则返回 0,错误则返回错误个数 + * + * + * + */ + export function run(loglevel?: number/** = undefined*/): number; + + /** + * + * @brief 初始化当前脚本的测试环境,将 test 模块方法复制为当前脚本全局变量 + * + * + */ + export function setup(): void; + + } /** end of `module test` */ + export = test +} + +/** endof `module Or Internal Object` */ + + diff --git a/types/fibjs/declare/timers.d.ts b/types/fibjs/declare/timers.d.ts new file mode 100644 index 0000000000..8de6e72812 --- /dev/null +++ b/types/fibjs/declare/timers.d.ts @@ -0,0 +1,335 @@ +/*************************************************************************** + * * + * This file was automatically generated with idlc.js * + * build info: * + * - fibjs : 0.25.0 * + * - date : Jun 12 2018 07:22:40 * + * * + ***************************************************************************/ + +/** + * @author Richard + * + */ + + + + + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + + + +/** module Or Internal Object */ +/** + * @brief timers 模块 + * @detail + */ +declare module "timers" { + + + module timers { + + + + + + /** + * + * @brief 在指定的时间后调用函数 + * @param callback 指定回调函数 + * @param timeout 指定延时的时间,以毫秒为单位。超过 2^31 的话,立即执行。 + * @param args 额外的参数,传入到指定的 callback 内,可选。 + * @return 返回定时器对象 + * + * + * + */ + export function setTimeout(callback: Function, timeout?: number/** = 1*/, ...args: any[]): Class_Timer; + + /** + * + * @brief 清除指定的定时器 + * @param t 指定要清除的定时器 + * + * + * + */ + export function clearTimeout(t: any): void; + + /** + * + * @brief 每间隔指定的时间后调用函数 + * @param callback 指定回调函数 + * @param timeout 指定间隔的时间,以毫秒为单位。超过 2^31 的话,立即执行。 + * @param args 额外的参数,传入到指定的 callback 内,可选。 + * @return 返回定时器对象 + * + * + * + */ + export function setInterval(callback: Function, timeout: number, ...args: any[]): Class_Timer; + + /** + * + * @brief 清除指定的定时器 + * @param t 指定要清除的定时器 + * + * + * + */ + export function clearInterval(t: any): void; + + /** + * + * @brief 每间隔指定的时间后调用函数,这是个高精度定时器,会主动打断正在运行的 JavaScript 脚本执行定时器 + * 由于 setHrInterval 的定时器会中断正在运行的代码执行回调,因此不要在回调函数内修改可能影响其它模块的数据,或者在回调中调用任何标记为 async 的 api 函数,否则将会产生不可预知的结果。例如: + * ```JavaScript + * var timers = require('timers'); + * + * var cnt = 0; + * timers.setHrInterval(() => { + * cnt++; + * }, 100); + * + * while (cnt < 10); + * + * console.error("===============================> done"); + * ``` + * 这段代码中,第 8 行的循环并不会因为 cnt 的改变而结束,因为 JavaScript 在优化代码时会认定在这个循环过程中 cnt 不会被改变。 + * @param callback 指定回调函数 + * @param timeout 指定间隔的时间,以毫秒为单位。超过 2^31 的话,立即执行。 + * @param args 额外的参数,传入到指定的 callback 内,可选。 + * @return 返回定时器对象 + * + * + * + */ + export function setHrInterval(callback: Function, timeout: number, ...args: any[]): Class_Timer; + + /** + * + * @brief 清除指定的定时器 + * @param t 指定要清除的定时器 + * + * + * + */ + export function clearHrInterval(t: any): void; + + /** + * + * @brief 下一个空闲时间立即执行回调函数 + * @param callback 指定回调函数 + * @param args 额外的参数,传入到指定的 callback 内,可选。 + * @return 返回定时器对象 + * + * + * + */ + export function setImmediate(callback: Function, ...args: any[]): Class_Timer; + + /** + * + * @brief 清除指定的定时器 + * @param t 指定要清除的定时器 + * + * + * + */ + export function clearImmediate(t: any): void; + + /** + * + * @brief 调用给定的函数,并在超时时间到期时中断函数运行 + * @param func 指定要运行的函数 + * @param timeout 指定超时时间 + * @param args 额外的参数,传入到指定的 callback 内,可选。 + * @return 返回 func 的运行结果 + * + * + * + */ + export function call(func: Function, timeout: number, ...args: any[]): any; + + } /** end of `module timers` */ + export = timers +} + +/** endof `module Or Internal Object` */ + + diff --git a/types/fibjs/declare/tty.d.ts b/types/fibjs/declare/tty.d.ts new file mode 100644 index 0000000000..c2a20d7d2f --- /dev/null +++ b/types/fibjs/declare/tty.d.ts @@ -0,0 +1,228 @@ +/*************************************************************************** + * * + * This file was automatically generated with idlc.js * + * build info: * + * - fibjs : 0.25.0 * + * - date : Jun 12 2018 07:22:40 * + * * + ***************************************************************************/ + +/** + * @author Richard + * + */ + + + + + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + + + +/** module Or Internal Object */ +/** + * @brief tty 模块 + * @detail 使用方法:,```JavaScript,const tty = require('tty');,``` + */ +declare module "tty" { + + + module tty { + + + + + + /** + * + * @brief 查询是否是命令交互窗口 + * @param fd 文件描述符 + * @return 如果文件描述符同一个终端窗口关联则返回 true ,否则返回 false + * + * + * + */ + export function isatty(fd: number): boolean; + + } /** end of `module tty` */ + export = tty +} + +/** endof `module Or Internal Object` */ + + diff --git a/types/fibjs/declare/url.d.ts b/types/fibjs/declare/url.d.ts new file mode 100644 index 0000000000..545b516cd2 --- /dev/null +++ b/types/fibjs/declare/url.d.ts @@ -0,0 +1,241 @@ +/*************************************************************************** + * * + * This file was automatically generated with idlc.js * + * build info: * + * - fibjs : 0.25.0 * + * - date : Jun 12 2018 07:22:40 * + * * + ***************************************************************************/ + +/** + * @author Richard + * + */ + + + + + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + + + +/** module Or Internal Object */ +/** + * @brief url 处理模块 + * @detail + */ +declare module "url" { + + + module url { + + + + + + /** + * + * @brief 参数构造 UrlObject 对象 + * @param args 指定构造参数的字典对象,支持的字段有:protocol, slashes, username, password, hostname, port, pathname, query, hash + * @return 返回构造成功的字符串 + * + * + * + */ + export function format(args: object): string; + + /** + * + * @brief 解析一个 url 字符串 + * @param url 指定需要解析的 url 字符串 + * @param parseQueryString 指定是否解析 query + * @param slashesDenoteHost 默认为false, 如果设置为true,则从字符串'//'之后到下一个'/'之前的字符串会被解析为host,例如'//foo/bar', 结果应该是{host: 'foo', pathname: '/bar'}而不是{pathname: '//foo/bar'} + * @return 返回包含解析数据的对象 + * + * + * + */ + export function parse(url: string, parseQueryString?: boolean/** = false*/, slashesDenoteHost?: boolean/** = false*/): Class_UrlObject; + + } /** end of `module url` */ + export = url +} + +/** endof `module Or Internal Object` */ + + diff --git a/types/fibjs/declare/util.d.ts b/types/fibjs/declare/util.d.ts new file mode 100644 index 0000000000..1b38c49399 --- /dev/null +++ b/types/fibjs/declare/util.d.ts @@ -0,0 +1,988 @@ +/*************************************************************************** + * * + * This file was automatically generated with idlc.js * + * build info: * + * - fibjs : 0.25.0 * + * - date : Jun 12 2018 07:22:40 * + * * + ***************************************************************************/ + +/** + * @author Richard + * + */ + + + + + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + + + +/** module Or Internal Object */ +/** + * @brief 常用工具模块 + * @detail + */ +declare module "util" { + + + module util { + + + + /** + * + * @brief 数据统计对象,用以构建应用运行时数据收集,参见 Stats 对象。 + * + * + */ + export class Stats extends Class_Stats {} + + + /** + * + * @brief LRU(least recently used) 缓存对象,参见 LruCache 对象。 + * + * + */ + export class LruCache extends Class_LruCache {} + + + + + /** + * + * @brief 按照指定的格式格式化变量 + * + * @param fmt 格式化字符串 + * @param args 可选参数列表 + * @return 返回格式化后的字符串 + * + * + * + */ + export function format(fmt: string, ...args: any[]): string; + + /** + * + * @brief 格式格式化变量 + * + * @param args 可选参数列表 + * @return 返回格式化后的字符串 + * + * + * + */ + export function format(...args: any[]): string; + + /** + * + * @brief 从一个构造函数 constructor 继承原型方法到另一个。构造函数的原型将被设置为一个新的从超类(superConstructor)创建的对象。 + * + * @param constructor 初始的构造函数 + * @param superConstructor 被继承的超类 + * + * + * + */ + export function inherits(constructor: any, superConstructor: any): void; + + /** + * + * @brief 方法返回 obj 的字符串表示,主要用于调试。 附加的 options 可用于改变格式化字符串的某些方面。 + * + * @param obj 指定需要处理的对象 + * @param options 指定格式控制选项 + * @return 返回格式化后的字符串 + * + * + * + */ + export function inspect(obj: object, options?: object/** = v8::Object::New(isolate)*/): string; + + /** + * + * @brief 检测给定的变量是否不包含任何值(没有可枚举的属性) + * + * @param v 给定需要检测的变量 + * @return 如果为空则返回 True + * + * + * + */ + export function isEmpty(v: any): boolean; + + /** + * + * @brief 检测给定的变量是否是数组 + * + * @param v 给定需要检测的变量 + * @return 如果是数组则返回 True + * + * + * + */ + export function isArray(v: any): boolean; + + /** + * + * @brief 检测给定的变量是否是 Boolean + * + * @param v 给定需要检测的变量 + * @return 如果是 Boolean 则返回 True + * + * + * + */ + export function isBoolean(v: any): boolean; + + /** + * + * @brief 检测给定的变量是否是 Null + * + * @param v 给定需要检测的变量 + * @return 如果是 Null 则返回 True + * + * + * + */ + export function isNull(v: any): boolean; + + /** + * + * @brief 检测给定的变量是否是 Null 或者 Undefined + * + * @param v 给定需要检测的变量 + * @return 如果是 Null 或者 Undefined 则返回 True + * + * + * + */ + export function isNullOrUndefined(v: any): boolean; + + /** + * + * @brief 检测给定的变量是否是数字 + * + * @param v 给定需要检测的变量 + * @return 如果是数字则返回 True + * + * + * + */ + export function isNumber(v: any): boolean; + + /** + * + * @brief 检测给定的变量是否是字符串 + * + * @param v 给定需要检测的变量 + * @return 如果是字符串则返回 True + * + * + * + */ + export function isString(v: any): boolean; + + /** + * + * @brief 检测给定的变量是否是 Undefined + * + * @param v 给定需要检测的变量 + * @return 如果是 Undefined 则返回 True + * + * + * + */ + export function isUndefined(v: any): boolean; + + /** + * + * @brief 检测给定的变量是否是正则对象 + * + * @param v 给定需要检测的变量 + * @return 如果是正则对象则返回 True + * + * + * + */ + export function isRegExp(v: any): boolean; + + /** + * + * @brief 检测给定的变量是否是对象 + * + * @param v 给定需要检测的变量 + * @return 如果是对象则返回 True + * + * + * + */ + export function isObject(v: any): boolean; + + /** + * + * @brief 检测给定的变量是否是日期对象 + * + * @param v 给定需要检测的变量 + * @return 如果是日期对象则返回 True + * + * + * + */ + export function isDate(v: any): boolean; + + /** + * + * @brief 检测给定的变量是否是错误对象 + * + * @param v 给定需要检测的变量 + * @return 如果是错误对象则返回 True + * + * + * + */ + export function isNativeError(v: any): boolean; + + /** + * + * @brief 检测给定的变量是否是原始类型 + * + * @param v 给定需要检测的变量 + * @return 如果是原始类型则返回 True + * + * + * + */ + export function isPrimitive(v: any): boolean; + + /** + * + * @brief 检测给定的变量是否是Symbol类型 + * + * @param v 给定需要检测的变量 + * @return 如果是Symbol类型则返回 True + * + * + * + */ + export function isSymbol(v: any): boolean; + + /** + * + * @brief 检测给定的变量是否是 DataView 类型 + * + * @param v 给定需要检测的变量 + * @return 如果是 DataView 类型则返回 True + * + * + * + */ + export function isDataView(v: any): boolean; + + /** + * + * @brief 检测给定的变量是否是 External 类型 + * + * @param v 给定需要检测的变量 + * @return 如果是 External 类型则返回 True + * + * + * + */ + export function isExternal(v: any): boolean; + + /** + * + * @brief 检测给定的变量是否是 Map 类型 + * + * @param v 给定需要检测的变量 + * @return 如果是 Map 类型则返回 True + * + * + * + */ + export function isMap(v: any): boolean; + + /** + * + * @brief 检测给定的变量是否是 MapIterator 类型 + * + * @param v 给定需要检测的变量 + * @return 如果是 MapIterator 类型则返回 True + * + * + * + */ + export function isMapIterator(v: any): boolean; + + /** + * + * @brief 检测给定的变量是否是 Promise 类型 + * + * @param v 给定需要检测的变量 + * @return 如果是 Promise 类型则返回 True + * + * + * + */ + export function isPromise(v: any): boolean; + + /** + * + * @brief 检测给定的变量是否是 AsyncFunction 类型 + * + * @param v 给定需要检测的变量 + * @return 如果是 AsyncFunction 类型则返回 True + * + * + * + */ + export function isAsyncFunction(v: any): boolean; + + /** + * + * @brief 检测给定的变量是否是 Set 类型 + * + * @param v 给定需要检测的变量 + * @return 如果是 Set 类型则返回 True + * + * + * + */ + export function isSet(v: any): boolean; + + /** + * + * @brief 检测给定的变量是否是 SetIterator 类型 + * + * @param v 给定需要检测的变量 + * @return 如果是 SetIterator 类型则返回 True + * + * + * + */ + export function isSetIterator(v: any): boolean; + + /** + * + * @brief 检测给定的变量是否是 TypedArray 类型 + * + * @param v 给定需要检测的变量 + * @return 如果是 TypedArray 类型则返回 True + * + * + * + */ + export function isTypedArray(v: any): boolean; + + /** + * + * @brief 检测给定的变量是否是 Uint8Array 类型 + * + * @param v 给定需要检测的变量 + * @return 如果是 Uint8Array 类型则返回 True + * + * + * + */ + export function isUint8Array(v: any): boolean; + + /** + * + * @brief 检测给定的变量是否是函数对象 + * + * @param v 给定需要检测的变量 + * @return 如果是函数对象则返回 True + * + * + * + */ + export function isFunction(v: any): boolean; + + /** + * + * @brief 检测给定的变量是否是函数 Buffer 对象 + * + * @param v 给定需要检测的变量 + * @return 如果是函数 Buffer 对象则返回 True + * + * + * + */ + export function isBuffer(v: any): boolean; + + /** + * + * @brief 查询指定对象是否包含给定的键 + * + * @param v 给定需要查询的对象 + * @param key 指定需要查询的键 + * @return 返回对象的全部键数组 + * + * + * + */ + export function has(v: any, key: string): boolean; + + /** + * + * @brief 查询指定对象的全部键数组 + * + * @param v 给定需要查询的对象 + * @return 返回对象的全部键数组 + * + * + * + */ + export function keys(v: any): any[]; + + /** + * + * @brief 查询指定对象的全部值数组 + * + * @param v 给定需要查询的对象 + * @return 返回对象的全部值数组 + * + * + * + */ + export function values(v: any): any[]; + + /** + * + * @brief 克隆给定变量,如果是对象或数组,则复制内容到新对象 + * + * @param v 给定要克隆的变量 + * @return 返回克隆结果 + * + * + * + */ + export function clone(v: any): any; + + /** + * + * @brief 深度冻结一个对象,被冻结后的对象及其包含的对象都将不允许修改 + * + * @param v 指定要冻结的对象 + * + * + * + */ + export function deepFreeze(v: any): void; + + /** + * + * @brief 将一个或者多个对象的键值扩展到指定对象 + * + * @param v 指定要扩展的对象 + * @param objs 指定一个或者多个用于扩展的对象 + * @return 返回扩展的结果 + * + * + * + */ + export function extend(v: any, ...objs: any[]): any; + + /** + * + * @brief 将一个或者多个对象的键值扩展到指定对象,是 extend 的别名 + * + * @param v 指定要扩展的对象 + * @param objs 指定一个或者多个用于扩展的对象 + * @return 返回扩展的结果 + * + * + * + */ + export function _extend(v: any, ...objs: any[]): any; + + /** + * + * @brief 返回一个object副本,只过滤出指定键的属性值 + * + * @param v 指定要过滤的对象 + * @param objs 指定一个或者多个用于选择的键 + * @return 返回过滤的结果 + * + * + * + */ + export function pick(v: any, ...objs: any[]): object; + + /** + * + * @brief 返回一个object副本,只过排除指定键的属性值 + * + * @param v 指定要过滤的对象 + * @param keys 指定一个或者多个用于排除的键 + * @return 返回排除的结果 + * + * + * + */ + export function omit(v: any, ...keys: any[]): object; + + /** + * + * @brief 获取数组的第一个元素 + * + * @param v 给定要获取的数组 + * @return 返回获取的元素 + * + * + * + */ + export function first(v: any): any; + + /** + * + * @brief 获取数组的开始多个元素 + * + * @param v 给定要获取的数组 + * @param n 指定要获取的元素个数 + * @return 返回获取的元素数组 + * + * + * + */ + export function first(v: any, n: number): any; + + /** + * + * @brief 获取数组的第后一个元素 + * + * @param v 给定要获取的数组 + * @return 返回获取的元素 + * + * + * + */ + export function last(v: any): any; + + /** + * + * @brief 获取数组的结尾多个元素 + * + * @param v 给定要获取的数组 + * @param n 指定要获取的元素个数 + * @return 返回获取的元素数组 + * + * + * + */ + export function last(v: any, n: number): any; + + /** + * + * @brief 获取数组的元素去重后的副本 + * + * @param v 给定要去重的数组 + * @param sorted 指定数组是否排序,如果指定数组排序,将使用快速算法 + * @return 返回去重元素后的数组 + * + * + * + */ + export function unique(v: any, sorted?: boolean/** = false*/): any[]; + + /** + * + * @brief 将一个或者多个数组的值合并成一个值唯一的数组 + * + * @param arrs 指定一个或者多个用于合并的数组 + * @return 返回合并的结果 + * + * + * + */ + export function union(...arrs: any[]): any[]; + + /** + * + * @brief 返回一个包含 arr 数组中排除一个或者多个数组元素的交集 + * + * @param arrs 指定一个或者多个用于计算交集的数组 + * @return 返回计算交集的结果 + * + * + * + */ + export function intersection(...arrs: any[]): any[]; + + /** + * + * @brief 将一个嵌套多层的数组(嵌套可以是任何层数)转换为只有一层的数组。 如果你传递 shallow 参数,数组将只减少一维的嵌套。 + * + * @param arr 指定需要转换的数组 + * @param shallow 指定是否只减少一维的嵌套,缺省为 false + * @return 返回转换的结果 + * + * + * + */ + export function flatten(arr: any, shallow?: boolean/** = false*/): any[]; + + /** + * + * @brief 返回一个包含 arr 数组中排除一个或者多个元素后的数组 + * + * @param arr 指定需要排除的数组 + * @param els 指定一个或者多个用于排除的元素 + * @return 返回排除的结果 + * + * + * + */ + export function without(arr: any, ...els: any[]): any[]; + + /** + * + * @brief 返回一个包含 arr 数组中排除 without 数组元素之后的数组 + * + * @param list 指定需要排除的数组 + * @param arrs 指定用于排除的一个或者多个数组 + * @return 返回排除的结果 + * + * + * + */ + export function difference(list: any[], ...arrs: any[]): any[]; + + /** + * + * @brief 遍历 list 中的所有元素,按顺序用遍历输出每个元素。如果传递了 context 参数,则把 iterator 绑定到 context 对象上。每次调用 iterator 都会传递三个参数:(element, index, list) + * + * @param list 指定需要遍历的列表或对象 + * @param iterator 指定用于遍历的回调函数 + * @param context 指定调用 iterator 时绑定的 context 对象 + * @return 返回 list 本身 + * + * + * + */ + export function each(list: any, iterator: Function, context?: any/** = v8::Undefined(isolate)*/): any; + + /** + * + * @brief 通过变换函数(iterator迭代器)把 list 中的每个值映射到一个新的数组中。如果传递了 context 参数,则把 iterator 绑定到 context 对象上。每次调用 iterator 都会传递三个参数:(element, index, list) + * + * @param list 指定需要变换的列表或对象 + * @param iterator 指定用于变换的回调函数 + * @param context 指定调用 iterator 时绑定的 context 对象 + * @return 返回变换的结果 + * + * + * + */ + export function map(list: any, iterator: Function, context?: any/** = v8::Undefined(isolate)*/): any[]; + + /** + * + * @brief 把 list中 元素归结为一个单独的数值。如果传递了 context 参数,则把 iterator 绑定到 context 对象上。每次调用 iterator 都会传递三个参数:(memo, element, index, list) + * + * @param list 指定需要归结的列表或对象 + * @param iterator 指定用于归结的回调函数 + * @param memo 指定归结的初始值 + * @param context 指定调用 iterator 时绑定的 context 对象 + * @return 返回归结的结果 + * + * + * + */ + export function reduce(list: any, iterator: Function, memo: any, context?: any/** = v8::Undefined(isolate)*/): any; + + /** + * + * @brief 编译脚本为二进制代码 + * util.compile 可以将脚本编译为 v8 内部运行数据块(非机器执行代码)。编译以后的代码,保存为 *.jsc 后,可以由 run 和 require 直接加载执行。 + * + * 由于编译之后,目标代码将不能逆向获取源代码,依赖于 Function.toString 的程序将不能正常运行。 + * + * @param srcname 指定要添加的脚本名称 + * @param script 指定要编译的脚本代码 + * @param mode 编译模式,0: module, 1: script, 2: worker,缺省为 0 + * @return 返回编译出的二进制代码 + * + * + * + */ + export function compile(srcname: string, script: string, mode?: number/** = 0*/): Class_Buffer; + + /** + * + * @brief 包裹 callback 或 async 方法为同步调用 + * + * util.sync 将 callback 方法或者 async 方法处理为 sync 方法,以方便调用。 + * + * callback 示例如下: + * ```JavaScript + * // callback + * var util = require('util'); + * + * function cb_test(a, b, cb) { + * setTimeout(() => { + * cb(null, a + b); + * }, 100); + * } + * + * var fn_sync = util.sync(cb_test); + * console.log(fn_sync(100, 200)); + * ``` + * async 示例如下: + * ```JavaScript + * // async/await + * var util = require('util'); + * + * async function async_test(a, b) { + * return a + b; + * } + * + * var fn_sync = util.sync(async_test); + * console.log(fn_sync(100, 200)); + * ``` + * 对于未标记为 async 的返回 promise 的函数,可以手动指定 sync 模式: + * ```JavaScript + * // async/await + * var util = require('util'); + * + * function async_test(a, b) { + * return new Promise(function (resolve, reject) { + * resolve(a + b); + * }); + * } + * + * var fn_sync = util.sync(async_test, true); + * console.log(fn_sync(100, 200)); + * ``` + * + * @param func 给定需要包裹的方法 + * @param async_func 指定以 async 函数方式处理 func,为 false 则自动判断 + * @return 返回同步运行的方法 + * + * + * + */ + export function sync(func: Function, async_func?: boolean/** = false*/): Function; + + /** + * + * @brief 查询当前引擎及各组件版本信息 + * + * ```JavaScript + * { + * "fibjs": "0.25.0", + * "clang": "9.1", + * "date": "Jun 12 2018 07:22:40", + * "vender": { + * "ev": "4.24", + * "expat": "2.2.5", + * "gd": "2.2.4", + * "jpeg": "8.3", + * "leveldb": "1.17", + * "mongo": "0.7", + * "pcre": "8.21", + * "png": "1.5.4", + * "mbedtls": "2.6.1", + * "snappy": "1.1.2", + * "sqlite": "3.23.0", + * "tiff": "3.9.5", + * "uuid": "1.6.2", + * "v8": "6.7.288.20", + * "v8-snapshot": true, + * "zlib": "1.2.7", + * "zmq": "3.1" + * } + * } + * ``` + * @return 返回组件版本对象 + * + * + * + */ + export function buildInfo(): object; + + } /** end of `module util` */ + export = util +} + +/** endof `module Or Internal Object` */ + + diff --git a/types/fibjs/declare/uuid.d.ts b/types/fibjs/declare/uuid.d.ts new file mode 100644 index 0000000000..b891509800 --- /dev/null +++ b/types/fibjs/declare/uuid.d.ts @@ -0,0 +1,311 @@ +/*************************************************************************** + * * + * This file was automatically generated with idlc.js * + * build info: * + * - fibjs : 0.25.0 * + * - date : Jun 12 2018 07:22:40 * + * * + ***************************************************************************/ + +/** + * @author Richard + * + */ + + + + + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + + + +/** module Or Internal Object */ +/** + * @brief uuid 唯一 id 模块 + * @detail 基础模块。提供唯一 id 的创建于操作,```JavaScript,var uuid = require('uuid');,``` + */ +declare module "uuid" { + + + module uuid { + + /** + * + * @brief md5 与 sha1 创建 uuid 时指定 name 命名为域名 + * + * + */ + export const DNS = 0; + + /** + * + * @brief md5 与 sha1 创建 uuid 时指定 name 命名为 url 地址 + * + * + */ + export const URL = 1; + + /** + * + * @brief md5 与 sha1 创建 uuid 时指定 name 命名为 ISO OID + * + * + */ + export const OID = 2; + + /** + * + * @brief md5 与 sha1 创建 uuid 时指定 name 命名为 X.500 DN + * + * + */ + export const X509 = 3; + + + /** + * + * @brief 查询和修改 Snowflake 算法的主机 id + * + * + */ + export const hostID: number; + + + + + /** + * + * @brief 使用时间和主机名创建 uuid + * @return 返回一个生成的二进制 id + * + * + * + */ + export function node(): Class_Buffer; + + /** + * + * @brief 使用特定命名的 md5 创建 uuid + * @param ns 指定命名空间,可以为 uuid.DNS, uuid.URL, uuid.OID, uuid.X509 + * @param name 指定名称 + * @return 返回一个生成的二进制 id + * + * + * + */ + export function md5(ns: number, name: string): Class_Buffer; + + /** + * + * @brief 使用随机数创建 uuid + * @return 返回一个生成的二进制 id + * + * + * + */ + export function random(): Class_Buffer; + + /** + * + * @brief 使用特定命名的 sha1 创建 uuid + * @param ns 指定命名空间,可以为 uuid.DNS, uuid.URL, uuid.OID, uuid.X509 + * @param name 指定名称 + * @return 返回一个生成的二进制 id + * + * + * + */ + export function sha1(ns: number, name: string): Class_Buffer; + + /** + * + * @brief 使用 Snowflake 算法创建 uuid + * @return 返回一个生成的二进制 id + * + * + * + */ + export function snowflake(): Class_Buffer; + + } /** end of `module uuid` */ + export = uuid +} + +/** endof `module Or Internal Object` */ + + diff --git a/types/fibjs/declare/vm.d.ts b/types/fibjs/declare/vm.d.ts new file mode 100644 index 0000000000..6cb2c89ead --- /dev/null +++ b/types/fibjs/declare/vm.d.ts @@ -0,0 +1,226 @@ +/*************************************************************************** + * * + * This file was automatically generated with idlc.js * + * build info: * + * - fibjs : 0.25.0 * + * - date : Jun 12 2018 07:22:40 * + * * + ***************************************************************************/ + +/** + * @author Richard + * + */ + + + + + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + + + +/** module Or Internal Object */ +/** + * @brief 安全沙箱模块,用于隔离不同安全等级的运行环境 + * @detail 通过建立安全沙箱,可以限制脚本运行时可以接触的资源,隔离不同脚本执行环境,并可以为不同的环境定制基础模块,以保障整体运行环境的安全。,,下面的示例创建一个沙箱,限制只允许访问全局基础模块中的 assert 模块,并添加 a 和 b 两个定制模块:,```JavaScript,var vm = require('vm');,var sbox = new vm.SandBox({, a: 100,, b: 200,, assert: require('assert'),});,,var mod_in_sbox = sbox.require('./path/to/mod');,``` + */ +declare module "vm" { + + + module vm { + + + + /** + * + * @brief 创建一个 SandBox 对象,参见 SandBox + * + * + */ + export class SandBox extends Class_SandBox {} + + + + + } /** end of `module vm` */ + export = vm +} + +/** endof `module Or Internal Object` */ + + diff --git a/types/fibjs/declare/ws.d.ts b/types/fibjs/declare/ws.d.ts new file mode 100644 index 0000000000..e31944594a --- /dev/null +++ b/types/fibjs/declare/ws.d.ts @@ -0,0 +1,327 @@ +/*************************************************************************** + * * + * This file was automatically generated with idlc.js * + * build info: * + * - fibjs : 0.25.0 * + * - date : Jun 12 2018 07:22:40 * + * * + ***************************************************************************/ + +/** + * @author Richard + * + */ + + + + + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + + + +/** module Or Internal Object */ +/** + * @brief websocket 支持模块 + * @detail 使用方法:,```JavaScript,var ws = require('ws');,```,创建一个服务器:,```JavaScript,var ws = require('ws');,var http = require('http');,,var svr = new http.Server(80, {, '/ws': ws.upgrade((conn, req) => {, conn.onmessage = e => console.log(e.data);, }),});,svr.run();,```,使用 WebSocket 客户端:,```JavaScript,var ws = require('ws');,,var conn = new ws.Socket('ws://127.0.0.1/ws');,conn.ommessage = e => console.log(e.data);,``` + */ +declare module "ws" { + + + module ws { + + /** + * + * @brief 指定 websocket 消息类型 0,代表一个继续帧 + * + * + */ + export const CONTINUE = 0; + + /** + * + * @brief 指定 websocket 消息类型 1,代表一个文本帧 + * + * + */ + export const TEXT = 1; + + /** + * + * @brief 指定 websocket 消息类型 2,代表一个二进制帧 + * + * + */ + export const BINARY = 2; + + /** + * + * @brief 指定 websocket 消息类型 8,连接关闭 + * + * + */ + export const CLOSE = 8; + + /** + * + * @brief 指定 websocket 消息类型 9,代表一个 ping 帧 + * + * + */ + export const PING = 9; + + /** + * + * @brief 指定 websocket 消息类型 10,代表一个 pong 帧 + * + * + */ + export const PONG = 10; + + /** + * + * @brief 指定 WebSocket 状态,表示正在连接中 + * + * + */ + export const CONNECTING = 0; + + /** + * + * @brief 指定 WebSocket 状态,表示打开状态 + * + * + */ + export const OPEN = 1; + + /** + * + * @brief 指定 WebSocket 状态,表示已发送 CLOSE 消息,等待关闭中 + * + * + */ + export const CLOSING = 2; + + /** + * + * @brief 指定 WebSocket 状态,表示已经关闭 + * + * + */ + export const CLOSED = 3; + + + + /** + * + * @brief 创建一个 websocket 消息对象,参见 WebSocketMessage + * + * + */ + export class Message extends Class_WebSocketMessage {} + + + /** + * + * @brief WebSocket 对象,参见 WebSocket + * + * + */ + export class Socket extends Class_WebSocket {} + + + + + /** + * + * @brief 创建一个 websocket 协议处理器,从 http 接收 upgrade 请求并握手,生成 WebSocket 对象 + * accept 函数调用时,将传递两个参数,第一个参数为接收到的 WebSocket 对象,第二个参数为握手时的 HttpRequest 对象。 + * @param accept 连接成功处理函数 + * @return 返回协议处理器,可与 HttpServer, Chain, Routing 等对接 + * + * + * + */ + export function upgrade(accept: Function): Class_Handler; + + } /** end of `module ws` */ + export = ws +} + +/** endof `module Or Internal Object` */ + + diff --git a/types/fibjs/declare/xml.d.ts b/types/fibjs/declare/xml.d.ts new file mode 100644 index 0000000000..454d7defe5 --- /dev/null +++ b/types/fibjs/declare/xml.d.ts @@ -0,0 +1,333 @@ +/*************************************************************************** + * * + * This file was automatically generated with idlc.js * + * build info: * + * - fibjs : 0.25.0 * + * - date : Jun 12 2018 07:22:40 * + * * + ***************************************************************************/ + +/** + * @author Richard + * + */ + + + + + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + + + +/** module Or Internal Object */ +/** + * @brief xml 处理模块 + * @detail + */ +declare module "xml" { + + + module xml { + + /** + * + * @brief XmlNode 的 nodeType 属性常量,表示节点为 XmlElement 对象 + * + * + * + */ + export const ELEMENT_NODE = 1; + + /** + * + * @brief XmlNode 的 nodeType 属性常量,表示节点为 XmlAttr 对象 + * + * + * + */ + export const ATTRIBUTE_NODE = 2; + + /** + * + * @brief XmlNode 的 nodeType 属性常量,表示节点为 XmlText 对象 + * + * + * + */ + export const TEXT_NODE = 3; + + /** + * + * @brief XmlNode 的 nodeType 属性常量,表示节点为 XmlCDATASection 对象 + * + * + * + */ + export const CDATA_SECTION_NODE = 4; + + /** + * + * @brief XmlNode 的 nodeType 属性常量,表示节点为 XmlProcessingInstruction 对象 + * + * + * + */ + export const PROCESSING_INSTRUCTION_NODE = 7; + + /** + * + * @brief XmlNode 的 nodeType 属性常量,表示节点为 XmlComment 对象 + * + * + * + */ + export const COMMENT_NODE = 8; + + /** + * + * @brief XmlNode 的 nodeType 属性常量,表示节点为 XmlDocument 对象 + * + * + * + */ + export const DOCUMENT_NODE = 9; + + /** + * + * @brief XmlNode 的 nodeType 属性常量,表示节点为 XmlDocumentType 对象 + * + * + * + */ + export const DOCUMENT_TYPE_NODE = 10; + + + + /** + * + * @brief xml 文档对象,参见 XmlDocument 对象 + * + * + */ + export class Document extends Class_XmlDocument {} + + + + + /** + * + * @brief 解析 xml/html 文本,并创建 XmlDocument 对象,不支持多语种 + * @param source 指定需要解析的 xml/html 文本 + * @param type 指定文本类型,缺省为 text/xml,也可指定为 text/html + * @return 返回创建的 XmlDocument 对象 + * + * + * + */ + export function parse(source: string, type?: string/** = "text/xml"*/): Class_XmlDocument; + + /** + * + * @brief 解析 xml/html,并创建 XmlDocument 对象,解析时会根据指定的语种转换 + * @param source 指定需要解析的 xml/html 二进制数据 + * @param type 指定文本类型,缺省为 text/xml,也可指定为 text/html + * @return 返回创建的 XmlDocument 对象 + * + * + * + */ + export function parse(source: Class_Buffer, type?: string/** = "text/xml"*/): Class_XmlDocument; + + /** + * + * @brief 序列化 XmlNode 为字符串 + * @param node 指定需要序列化的 XmlNode + * @return 返回序列化的字符串 + * + * + * + */ + export function serialize(node: Class_XmlNode): string; + + } /** end of `module xml` */ + export = xml +} + +/** endof `module Or Internal Object` */ + + diff --git a/types/fibjs/declare/zip.d.ts b/types/fibjs/declare/zip.d.ts new file mode 100644 index 0000000000..45c87abb46 --- /dev/null +++ b/types/fibjs/declare/zip.d.ts @@ -0,0 +1,283 @@ +/*************************************************************************** + * * + * This file was automatically generated with idlc.js * + * build info: * + * - fibjs : 0.25.0 * + * - date : Jun 12 2018 07:22:40 * + * * + ***************************************************************************/ + +/** + * @author Richard + * + */ + + + + + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + + + +/** module Or Internal Object */ +/** + * @brief zip 格式文件压缩解压模块 + * @detail 使用方法:,```JavaScript,var zip = require('zip');,``` + */ +declare module "zip" { + + + module zip { + + /** + * + * @brief 压缩类型常量, 不压缩, 仅存储 + * + * + */ + export const ZIP_STORED = 0; + + /** + * + * @brief 压缩类型常量, 需要依赖zlib库进行压缩 + * + * + */ + export const ZIP_DEFLATED = 1; + + + + + + /** + * + * @brief 判断文件是否是zip格式 + * @param filename 文件名 + * @return 返回true代表文件是zip文件 + * + * + * @async + */ + export function isZipFile(filename: string): boolean; + + /** + * + * @brief 打开一个zip文件 + * @param path 文件路径 + * @param mod 打开文件模式, "r"代表读取, "w"代表创建, "a"代表在zip文件后追加 + * @param compress_type 压缩类型, ZIP_STORED 代表不压缩, 仅存储。 默认使用ZIP_DEFLATED 代表使用zlib库进行压缩。 + * @return 返回zip文件对象 + * + * + * @async + */ + export function open(path: string, mod?: string/** = "r"*/, compress_type?: number/** = undefined*/): Class_ZipFile; + + /** + * + * @brief 打开一个zip文件 + * @param data zip文件数据 + * @param mod 打开文件模式, "r"代表读取, "w"代表创建, "a"代表在zip文件后追加 + * @param compress_type 压缩类型, ZIP_STORED 代表不压缩, 仅存储。 默认使用ZIP_DEFLATED 代表使用zlib库进行压缩。 + * @return 返回zip文件对象 + * + * + * @async + */ + export function open(data: Class_Buffer, mod?: string/** = "r"*/, compress_type?: number/** = undefined*/): Class_ZipFile; + + /** + * + * @brief 打开一个zip文件 + * @param strm zip文件流 + * @param mod 打开文件模式, "r"代表读取, "w"代表创建, "a"代表在zip文件后追加 + * @param compress_type 压缩类型, ZIP_STORED 代表不压缩, 仅存储。 默认使用ZIP_DEFLATED 代表使用zlib库进行压缩。 + * @return 返回zip文件对象 + * + * + * @async + */ + export function open(strm: Class_SeekableStream, mod?: string/** = "r"*/, compress_type?: number/** = undefined*/): Class_ZipFile; + + } /** end of `module zip` */ + export = zip +} + +/** endof `module Or Internal Object` */ + + diff --git a/types/fibjs/declare/zlib.d.ts b/types/fibjs/declare/zlib.d.ts new file mode 100644 index 0000000000..693dcf81bf --- /dev/null +++ b/types/fibjs/declare/zlib.d.ts @@ -0,0 +1,525 @@ +/*************************************************************************** + * * + * This file was automatically generated with idlc.js * + * build info: * + * - fibjs : 0.25.0 * + * - date : Jun 12 2018 07:22:40 * + * * + ***************************************************************************/ + +/** + * @author Richard + * + */ + + + + + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + + + +/** module Or Internal Object */ +/** + * @brief zlib 压缩解压模块 + * @detail 使用方法:,```JavaScript,var zlib = require('zlib');,``` + */ +declare module "zlib" { + + + module zlib { + + /** + * + * @brief deflate 压缩级别,设定不压缩 + * + * + */ + export const NO_COMPRESSION = 0; + + /** + * + * @brief deflate 压缩级别,设定最快压缩 + * + * + */ + export const BEST_SPEED = 1; + + /** + * + * @brief deflate 压缩级别,设定最高压缩 + * + * + */ + export const BEST_COMPRESSION = 9; + + /** + * + * @brief deflate 压缩级别,设定缺省设置 + * + * + */ + export const DEFAULT_COMPRESSION = -1; + + + + + + /** + * + * @brief 创建一个 deflate 流对象 + * @param to 用于存储处理结果的流 + * @return 返回封装过的流对象 + * + * + */ + export function createDeflate(to: Class_Stream): Class_Stream; + + /** + * + * @brief 创建一个 deflateRaw 流对象 + * @param to 用于存储处理结果的流 + * @return 返回封装过的流对象 + * + * + */ + export function createDeflateRaw(to: Class_Stream): Class_Stream; + + /** + * + * @brief 创建一个 gunzip 流对象 + * @param to 用于存储处理结果的流 + * @param maxSize 指定解压缩尺寸限制,缺省为 -1,不限制 + * @return 返回封装过的流对象 + * + * + */ + export function createGunzip(to: Class_Stream, maxSize?: number/** = -1*/): Class_Stream; + + /** + * + * @brief 创建一个 gzip 流对象 + * @param to 用于存储处理结果的流 + * @return 返回封装过的流对象 + * + * + */ + export function createGzip(to: Class_Stream): Class_Stream; + + /** + * + * @brief 创建一个 inflate 流对象 + * @param to 用于存储处理结果的流 + * @param maxSize 指定解压缩尺寸限制,缺省为 -1,不限制 + * @return 返回封装过的流对象 + * + * + */ + export function createInflate(to: Class_Stream, maxSize?: number/** = -1*/): Class_Stream; + + /** + * + * @brief 创建一个 inflateRaw 流对象 + * @param to 用于存储处理结果的流 + * @param maxSize 指定解压缩尺寸限制,缺省为 -1,不限制 + * @return 返回封装过的流对象 + * + * + */ + export function createInflateRaw(to: Class_Stream, maxSize?: number/** = -1*/): Class_Stream; + + /** + * + * @brief 使用 deflate 算法压缩数据(zlib格式) + * @param data 给定要压缩的数据 + * @param level 指定压缩级别,缺省为 DEFAULT_COMPRESSION + * @return 返回压缩后的二进制数据 + * + * + * @async + */ + export function deflate(data: Class_Buffer, level?: number/** = undefined*/): Class_Buffer; + + /** + * + * @brief 使用 deflate 算法压缩数据到流对象中(zlib格式) + * @param data 给定要压缩的数据 + * @param stm 指定存储压缩数据的流 + * @param level 指定压缩级别,缺省为 DEFAULT_COMPRESSION + * + * + * @async + */ + export function deflateTo(data: Class_Buffer, stm: Class_Stream, level?: number/** = undefined*/): void; + + /** + * + * @brief 使用 deflate 算法压缩源流中的数据到流对象中(zlib格式) + * @param src 给定要压缩的数据所在的流 + * @param stm 指定存储压缩数据的流 + * @param level 指定压缩级别,缺省为 DEFAULT_COMPRESSION + * + * + * @async + */ + export function deflateTo(src: Class_Stream, stm: Class_Stream, level?: number/** = undefined*/): void; + + /** + * + * @brief 解压缩 deflate 算法压缩的数据(zlib格式) + * @param data 给定压缩后的数据 + * @param maxSize 指定解压缩尺寸限制,缺省为 -1,不限制 + * @return 返回解压缩后的二进制数据 + * + * + * @async + */ + export function inflate(data: Class_Buffer, maxSize?: number/** = -1*/): Class_Buffer; + + /** + * + * @brief 解压缩 deflate 算法压缩的数据到流对象中(zlib格式) + * @param data 给定要解压缩的数据 + * @param stm 指定存储解压缩数据的流 + * @param maxSize 指定解压缩尺寸限制,缺省为 -1,不限制 + * + * + * @async + */ + export function inflateTo(data: Class_Buffer, stm: Class_Stream, maxSize?: number/** = -1*/): void; + + /** + * + * @brief 解压缩源流中 deflate 算法压缩的数据到流对象中(zlib格式) + * @param src 给定要解压缩的数据所在的流 + * @param stm 指定存储解压缩数据的流 + * @param maxSize 指定解压缩尺寸限制,缺省为 -1,不限制 + * + * + * @async + */ + export function inflateTo(src: Class_Stream, stm: Class_Stream, maxSize?: number/** = -1*/): void; + + /** + * + * @brief 使用 gzip 算法压缩数据 + * @param data 给定要压缩的数据 + * @return 返回压缩后的二进制数据 + * + * + * @async + */ + export function gzip(data: Class_Buffer): Class_Buffer; + + /** + * + * @brief 使用 gzip 算法压缩数据到流对象中 + * @param data 给定要压缩的数据 + * @param stm 指定存储压缩数据的流 + * + * + * @async + */ + export function gzipTo(data: Class_Buffer, stm: Class_Stream): void; + + /** + * + * @brief 使用 gzip 算法压缩源流中的数据到流对象中 + * @param src 给定要压缩的数据所在的流 + * @param stm 指定存储压缩数据的流 + * + * + * @async + */ + export function gzipTo(src: Class_Stream, stm: Class_Stream): void; + + /** + * + * @brief 解压缩 gzip 算法压缩的数据 + * @param data 给定压缩后的数据 + * @param maxSize 指定解压缩尺寸限制,缺省为 -1,不限制 + * @return 返回解压缩后的二进制数据 + * + * + * @async + */ + export function gunzip(data: Class_Buffer, maxSize?: number/** = -1*/): Class_Buffer; + + /** + * + * @brief 解压缩 gzip 算法压缩的数据到流对象中 + * @param data 给定要解压缩的数据 + * @param stm 指定存储解压缩数据的流 + * @param maxSize 指定解压缩尺寸限制,缺省为 -1,不限制 + * + * + * @async + */ + export function gunzipTo(data: Class_Buffer, stm: Class_Stream, maxSize?: number/** = -1*/): void; + + /** + * + * @brief 解压缩源流中 gzip 算法压缩的数据到流对象中 + * @param src 给定要解压缩的数据所在的流 + * @param stm 指定存储解压缩数据的流 + * @param maxSize 指定解压缩尺寸限制,缺省为 -1,不限制 + * + * + * @async + */ + export function gunzipTo(src: Class_Stream, stm: Class_Stream, maxSize?: number/** = -1*/): void; + + /** + * + * @brief 使用 deflate 算法压缩数据(deflateRaw) + * @param data 给定要压缩的数据 + * @param level 指定压缩级别,缺省为 DEFAULT_COMPRESSION + * @return 返回压缩后的二进制数据 + * + * + * @async + */ + export function deflateRaw(data: Class_Buffer, level?: number/** = undefined*/): Class_Buffer; + + /** + * + * @brief 使用 deflate 算法压缩数据到流对象中(deflateRaw) + * @param data 给定要压缩的数据 + * @param stm 指定存储压缩数据的流 + * @param level 指定压缩级别,缺省为 DEFAULT_COMPRESSION + * + * + * @async + */ + export function deflateRawTo(data: Class_Buffer, stm: Class_Stream, level?: number/** = undefined*/): void; + + /** + * + * @brief 使用 deflate 算法压缩源流中的数据到流对象中(deflateRaw) + * @param src 给定要压缩的数据所在的流 + * @param stm 指定存储压缩数据的流 + * @param level 指定压缩级别,缺省为 DEFAULT_COMPRESSION + * + * + * @async + */ + export function deflateRawTo(src: Class_Stream, stm: Class_Stream, level?: number/** = undefined*/): void; + + /** + * + * @brief 解压缩 deflate 算法压缩的数据(inflateRaw) + * @param data 给定压缩后的数据 + * @param maxSize 指定解压缩尺寸限制,缺省为 -1,不限制 + * @return 返回解压缩后的二进制数据 + * + * + * @async + */ + export function inflateRaw(data: Class_Buffer, maxSize?: number/** = -1*/): Class_Buffer; + + /** + * + * @brief 解压缩 deflate 算法压缩的数据到流对象中(inflateRaw) + * @param data 给定要解压缩的数据 + * @param stm 指定存储解压缩数据的流 + * @param maxSize 指定解压缩尺寸限制,缺省为 -1,不限制 + * + * + * @async + */ + export function inflateRawTo(data: Class_Buffer, stm: Class_Stream, maxSize?: number/** = -1*/): void; + + /** + * + * @brief 解压缩源流中 deflate 算法压缩的数据到流对象中(inflateRaw) + * @param src 给定要解压缩的数据所在的流 + * @param stm 指定存储解压缩数据的流 + * @param maxSize 指定解压缩尺寸限制,缺省为 -1,不限制 + * + * + * @async + */ + export function inflateRawTo(src: Class_Stream, stm: Class_Stream, maxSize?: number/** = -1*/): void; + + } /** end of `module zlib` */ + export = zlib +} + +/** endof `module Or Internal Object` */ + + diff --git a/types/fibjs/declare/zmq.d.ts b/types/fibjs/declare/zmq.d.ts new file mode 100644 index 0000000000..11f119e8f7 --- /dev/null +++ b/types/fibjs/declare/zmq.d.ts @@ -0,0 +1,314 @@ +/*************************************************************************** + * * + * This file was automatically generated with idlc.js * + * build info: * + * - fibjs : 0.25.0 * + * - date : Jun 12 2018 07:22:40 * + * * + ***************************************************************************/ + +/** + * @author Richard + * + */ + + + + + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + +/// + + + +/** module Or Internal Object */ +/** + * @brief zeroMQ 消息队列模块 + * @detail 基础模块。提供 zeroMQ 消息队列支撑。,```JavaScript,var zmq = require('zmq');,``` + */ +declare module "zmq" { + + + module zmq { + + /** + * + * + * + * + */ + export const PAIR = 0; + + /** + * + * @brief 发布类型,所发送的消息将会分发给所有订阅者。 + * + * + */ + export const PUB = 1; + + /** + * + * @brief 订阅类型,用于接收 PUB 分发的消息。 + * + * + */ + export const SUB = 2; + + /** + * + * @brief 请求类型,此类型的接口只允许交替进行 send 和 recv 消息,每一个接受的消息都是最后一次发送请求的响应。 + * + * + */ + export const REQ = 3; + + /** + * + * @brief 响应类型,此类型的接口只允许交替进行 recv 和 send 消息,每一个发送的消息都会作为最后一次接受的请求的回应。 + * + * + */ + export const REP = 4; + + /** + * + * + * + * + */ + export const DEALER = 5; + + /** + * + * + * + * + */ + export const ROUTER = 6; + + /** + * + * @brief 获取消息类型,上游推送的消息将被公平的分发到此类接口。 + * + * + */ + export const PULL = 7; + + /** + * + * @brief 推送类型,推送的消息将均衡发送到下游接口。 + * + * + */ + export const PUSH = 8; + + /** + * + * + * + * + */ + export const XPUB = 9; + + /** + * + * + * + * + */ + export const XSUB = 10; + + + + /** + * + * @brief ZmqSocket 对象,参见 ZmqSocket + * + * + */ + export class Socket extends Class_ZmqSocket {} + + + + + } /** end of `module zmq` */ + export = zmq +} + +/** endof `module Or Internal Object` */ + + diff --git a/types/fibjs/fibjs-tests.ts b/types/fibjs/fibjs-tests.ts new file mode 100644 index 0000000000..90b5f5ff6c --- /dev/null +++ b/types/fibjs/fibjs-tests.ts @@ -0,0 +1,48 @@ +import assert = require('assert'); +import base32 = require('base32'); +import base64 = require('base64'); +import base64vlq = require('base64vlq'); +import bson = require('bson'); +import console = require('console'); +import constants = require('constants'); +import coroutine = require('coroutine'); +import crypto = require('crypto'); +import db = require('db'); +import dgram = require('dgram'); +import dns = require('dns'); +// import encoding = require('encoding'); +import fs = require('fs'); +import gd = require('gd'); +// import global = require('global'); +import gui = require('gui'); +import hash = require('hash'); +import hex = require('hex'); +import http = require('http'); +import iconv = require('iconv'); +import io = require('io'); +import json = require('json'); +import mq = require('mq'); +import net = require('net'); +import os = require('os'); +import path = require('path'); +import path_posix = require('path_posix'); +import path_win32 = require('path_win32'); +import process = require('process'); +import profiler = require('profiler'); +import punycode = require('punycode'); +import querystring = require('querystring'); +import registry = require('registry'); +import ssl = require('ssl'); +import string_decoder = require('string_decoder'); +// import test = require('test'); +import timers = require('timers'); +import tty = require('tty'); +import url = require('url'); +import util = require('util'); +import uuid = require('uuid'); +import vm = require('vm'); +import ws = require('ws'); +import xml = require('xml'); +import zip = require('zip'); +import zlib = require('zlib'); +import zmq = require('zmq'); diff --git a/types/fibjs/index.d.ts b/types/fibjs/index.d.ts new file mode 100644 index 0000000000..02201fd904 --- /dev/null +++ b/types/fibjs/index.d.ts @@ -0,0 +1,6 @@ +// Type definitions for fibjs 0.26 +// Project: https://github.com/fibjs/fibjs +// Definitions by: richardo2016 +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// diff --git a/types/fibjs/tsconfig.json b/types/fibjs/tsconfig.json new file mode 100644 index 0000000000..c42204e812 --- /dev/null +++ b/types/fibjs/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "fibjs-tests.ts" + ] +} diff --git a/types/fibjs/tslint.json b/types/fibjs/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/fibjs/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/figlet/figlet-tests.ts b/types/figlet/figlet-tests.ts new file mode 100644 index 0000000000..676fb9003f --- /dev/null +++ b/types/figlet/figlet-tests.ts @@ -0,0 +1,95 @@ +import figlet = require('figlet'); + +figlet('abc', (err, str) => { + // $ExpectType Error | null + err; + // $ExpectType string | undefined + str; +}); +figlet('My World', '1Row', (err, str) => { + // $ExpectType Error | null + err; + // $ExpectType string | undefined + str; +}); +// $ExpectError +figlet('fweGWEPewfe', 'What is the font? I cannot get it'); +// $ExpectError +figlet('qweoqw'); +// $ExpectError +figlet('qweoqw', '1Row'); +// $ExpectError +figlet('qweoqw', '1Row', undefined as any, undefined as any); + +figlet.text('tokiyo tomare', (err, str) => { + // $ExpectType Error | null + err; + // $ExpectType string | undefined + str; +}); +figlet.text('Hi', 'Flower Power', (err, str) => { + // $ExpectType Error | null + err; + // $ExpectType string | undefined + str; +}); +figlet.text('Annyeong', { + font: 'Fun Face', + horizontalLayout: 'full', + verticalLayout: 'fitted', +}, (err, str) => { + // $ExpectType Error | null + err; + // $ExpectType string | undefined + str; +}); +figlet.text('Oreehe', { + font: 'Fun Face', + // $ExpectError + value: 'abc', +}, undefined as any); +// $ExpectError +figlet.text('It cannot make sense'); + +// $ExpectType string +figlet.textSync('test text'); +// $ExpectType string +figlet.textSync('text desu', 'Fuzzy'); +// $ExpectType string +figlet.textSync('oho', { + font: 'Invita', +}); +// $ExpectError +figlet.textSync(); + +figlet.metadata('JS Block Letters', (err, fontOptions, headerComment) => { + // $ExpectType Error | null + err; + // $ExpectType FontOptions | undefined + fontOptions; + // $ExpectType string | undefined + headerComment; +}); +// $ExpectError +figlet.metadata('This is random font name which cannot make sense', undefined as any); +// $ExpectError +figlet.metadata('Alligator', undefined as any, undefined as any); + +// $ExpectType Defaults +figlet.defaults(); +// $ExpectType Defaults +figlet.defaults({}); +// $ExpectType Defaults +figlet.defaults({ + font: 'Patorjk\'s Cheese' +}); + +figlet.fonts((err, fonts) => { + // $ExpectType Error | null + err; + // $ExpectType Fonts[] | undefined + fonts; +}); + +// $ExpectType Fonts[] +figlet.fontsSync(); diff --git a/types/figlet/index.d.ts b/types/figlet/index.d.ts new file mode 100644 index 0000000000..07bb706066 --- /dev/null +++ b/types/figlet/index.d.ts @@ -0,0 +1,406 @@ +// Type definitions for figlet 1.2 +// Project: https://github.com/patorjk/figlet.js +// Definitions by: Junyoung Clare Jang +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +// TypeScript Version: 2.1 + +declare namespace figlet { + type Fonts = + | '1Row' + | '3-D' + | '3D Diagonal' + | '3D-ASCII' + | '3x5' + | '4Max' + | '5 Line Oblique' + | 'AMC 3 Line' + | 'AMC 3 Liv1' + | 'AMC AAA01' + | 'AMC Neko' + | 'AMC Razor' + | 'AMC Razor2' + | 'AMC Slash' + | 'AMC Slider' + | 'AMC Thin' + | 'AMC Tubes' + | 'AMC Untitled' + | 'ANSI Shadow' + | 'ASCII New Roman' + | 'Acrobatic' + | 'Alligator' + | 'Alligator2' + | 'Alpha' + | 'Alphabet' + | 'Arrows' + | 'Avatar' + | 'B1FF' + | 'B1FF' + | 'Banner' + | 'Banner3-D' + | 'Banner3' + | 'Banner4' + | 'Barbwire' + | 'Basic' + | 'Bear' + | 'Bell' + | 'Benjamin' + | 'Big Chief' + | 'Big Money-ne' + | 'Big Money-nw' + | 'Big Money-se' + | 'Big Money-sw' + | 'Big' + | 'Bigfig' + | 'Binary' + | 'Block' + | 'Blocks' + | 'Bloody' + | 'Bolger' + | 'Braced' + | 'Bright' + | 'Broadway KB' + | 'Broadway' + | 'Bubble' + | 'Bulbhead' + | 'Caligraphy' + | 'Caligraphy2' + | 'Calvin S' + | 'Cards' + | 'Catwalk' + | 'Chiseled' + | 'Chunky' + | 'Coinstak' + | 'Cola' + | 'Colossal' + | 'Computer' + | 'Contessa' + | 'Contrast' + | 'Cosmike' + | 'Crawford' + | 'Crawford2' + | 'Crazy' + | 'Cricket' + | 'Cursive' + | 'Cyberlarge' + | 'Cybermedium' + | 'Cybersmall' + | 'Cygnet' + | 'DANC4' + | 'DOS Rebel' + | 'DWhistled' + | 'Dancing Font' + | 'Decimal' + | 'Def Leppard' + | 'Delta Corps Priest 1' + | 'Diamond' + | 'Diet Cola' + | 'Digital' + | 'Doh' + | 'Doom' + | 'Dot Matrix' + | 'Double Shorts' + | 'Double' + | 'Dr Pepper' + | 'Efti Chess' + | 'Efti Font' + | 'Efti Italic' + | 'Efti Piti' + | 'Efti Robot' + | 'Efti Wall' + | 'Efti Water' + | 'Electronic' + | 'Elite' + | 'Epic' + | 'Fender' + | 'Filter' + | 'Fire Font-k' + | 'Fire Font-s' + | 'Flipped' + | 'Flower Power' + | 'Four Tops' + | 'Fraktur' + | 'Fun Face' + | 'Fun Faces' + | 'Fuzzy' + | 'Georgi16' + | 'Georgia11' + | 'Ghost' + | 'Ghoulish' + | 'Glenyn' + | 'Goofy' + | 'Gothic' + | 'Graceful' + | 'Gradient' + | 'Graffiti' + | 'Greek' + | 'Heart Left' + | 'Heart Right' + | 'Henry 3D' + | 'Hex' + | 'Hieroglyphs' + | 'Hollywood' + | 'Horizontal Left' + | 'Horizontal Right' + | 'ICL-1900' + | 'Impossible' + | 'Invita' + | 'Isometric1' + | 'Isometric2' + | 'Isometric3' + | 'Isometric4' + | 'Italic' + | 'Ivrit' + | 'JS Block Letters' + | 'JS Bracket Letters' + | 'JS Capital Curves' + | 'JS Cursive' + | 'JS Stick Letters' + | 'Jacky' + | 'Jazmine' + | 'Jerusalem' + | 'Katakana' + | 'Kban' + | 'Keyboard' + | 'Knob' + | 'Konto Slant' + | 'Konto' + | 'LCD' + | 'Larry 3D 2' + | 'Larry 3D' + | 'Lean' + | 'Letters' + | 'Lil Devil' + | 'Line Blocks' + | 'Linux' + | 'Lockergnome' + | 'Madrid' + | 'Marquee' + | 'Maxfour' + | 'Merlin1' + | 'Merlin2' + | 'Mike' + | 'Mini' + | 'Mirror' + | 'Mnemonic' + | 'Modular' + | 'Morse' + | 'Morse2' + | 'Moscow' + | 'Mshebrew210' + | 'Muzzle' + | 'NScript' + | 'NT Greek' + | 'NV Script' + | 'Nancyj-Fancy' + | 'Nancyj-Improved' + | 'Nancyj-Underlined' + | 'Nancyj' + | 'Nipples' + | 'O8' + | 'OS2' + | 'Octal' + | 'Ogre' + | 'Old Banner' + | 'Patorjk\'s Cheese' + | 'Patorjk-HeX' + | 'Pawp' + | 'Peaks Slant' + | 'Peaks' + | 'Pebbles' + | 'Pepper' + | 'Poison' + | 'Puffy' + | 'Puzzle' + | 'Pyramid' + | 'Rammstein' + | 'Rectangles' + | 'Red Phoenix' + | 'Relief' + | 'Relief2' + | 'Reverse' + | 'Roman' + | 'Rot13' + | 'Rot13' + | 'Rotated' + | 'Rounded' + | 'Rowan Cap' + | 'Rozzo' + | 'Runic' + | 'Runyc' + | 'S Blood' + | 'SL Script' + | 'Santa Clara' + | 'Script' + | 'Serifcap' + | 'Shadow' + | 'Shimrod' + | 'Short' + | 'Slant Relief' + | 'Slant' + | 'Slide' + | 'Small Caps' + | 'Small Isometric1' + | 'Small Keyboard' + | 'Small Poison' + | 'Small Script' + | 'Small Shadow' + | 'Small Slant' + | 'Small Tengwar' + | 'Small' + | 'Soft' + | 'Speed' + | 'Spliff' + | 'Stacey' + | 'Stampate' + | 'Stampatello' + | 'Standard' + | 'Star Strips' + | 'Star Wars' + | 'Stellar' + | 'Stforek' + | 'Stick Letters' + | 'Stop' + | 'Straight' + | 'Stronger Than All' + | 'Sub-Zero' + | 'Swamp Land' + | 'Swan' + | 'Sweet' + | 'THIS' + | 'Tanja' + | 'Tengwar' + | 'Term' + | 'Test1' + | 'The Edge' + | 'Thick' + | 'Thin' + | 'Thorned' + | 'Three Point' + | 'Ticks Slant' + | 'Ticks' + | 'Tiles' + | 'Tinker-Toy' + | 'Tombstone' + | 'Train' + | 'Trek' + | 'Tsalagi' + | 'Tubular' + | 'Twisted' + | 'Two Point' + | 'USA Flag' + | 'Univers' + | 'Varsity' + | 'Wavy' + | 'Weird' + | 'Wet Letter' + | 'Whimsy' + | 'Wow' + ; + + type KerningMethods = + | 'default' + | 'full' + | 'fitted' + | 'controlled smushing' + | 'universal smushing' + ; + type PrintDirection = number; + + interface FittingRules { + vLayout: number; + vRule5: boolean; + vRule4: boolean; + vRule3: boolean; + vRule2: boolean; + vRule1: boolean; + hLayout: number; + hRule6: boolean; + hRule5: boolean; + hRule4: boolean; + hRule3: boolean; + hRule2: boolean; + hRule1: boolean; + } + + interface Options { + font?: Fonts; + horizontalLayout?: KerningMethods; + verticalLayout?: KerningMethods; + printDirection?: PrintDirection; + showHardBlanks?: boolean; + } + interface FontOptions { + hardBlank: string; + height: number; + baseline: number; + maxLength: number; + oldLayout: number; + numCommentLines: number; + printDirection: PrintDirection; + fullLayout: number | null; + codeTagCount: number | null; + fittingRules: FittingRules; + } + interface Defaults { + font: Fonts; + fontPath: string; + } + + function text(txt: string, cb: (error: Error | null, result?: string) => void): void; + function text(txt: string, font: Fonts, cb: (error: Error | null, result?: string) => void): void; + /** + * @desc + * This `unified-signatures` is disabled because `Fonts` type is too long + */ + // tslint:disable-next-line: unified-signatures + function text(txt: string, options: Options | undefined, cb: (error: Error | null, result?: string) => void): void; + + function textSync(txt: string, font?: Fonts): string; + /** + * @desc + * This `unified-signatures` is disabled because `Fonts` type is too long + */ + // tslint:disable-next-line: unified-signatures + function textSync(txt: string, options: Options): string; + + function metadata(font: Fonts, cb: (error: Error | null, fontOptions?: FontOptions, headerComment?: string) => void): void; + + function defaults(opt?: Partial): Defaults; + + function loadFont(font: Fonts, cb: (error: Error | null, fontOptions?: FontOptions) => void): void; + /** + * @todo + * Use 'node' namespace to add following methods only in node environment. + */ + /** + * @warn + * This method works in node environment only. + * In browser environment, this method does not work. + */ + function loadFontSync(font: Fonts): FontOptions; + /** + * @warn + * This method exists in node environment only. + * In browser environment, this method does not exist. + */ + function fonts(cb: (error: Error | null, fontList?: Fonts[]) => void): void; + /** + * @warn + * This method exists in node environment only. + * In browser environment, this method does not exist. + */ + function fontsSync(): Fonts[]; +} + +declare function figlet(txt: string, cb: (error: Error | null, result?: string) => void): void; +declare function figlet(txt: string, font: figlet.Fonts, cb: (error: Error | null, result?: string) => void): void; +/** + * @desc + * This `unified-signatures` is disabled because `Fonts` type is too long + */ +// tslint:disable-next-line: unified-signatures +declare function figlet(txt: string, options: figlet.Options | undefined, cb: (error: Error | null, result?: string) => void): void; + +export as namespace figlet; +export = figlet; diff --git a/types/figlet/tsconfig.json b/types/figlet/tsconfig.json new file mode 100644 index 0000000000..946bec6c7d --- /dev/null +++ b/types/figlet/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", + "figlet-tests.ts" + ] +} diff --git a/types/figlet/tslint.json b/types/figlet/tslint.json new file mode 100644 index 0000000000..f93cf8562a --- /dev/null +++ b/types/figlet/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": "dtslint/dt.json" +} diff --git a/types/filesystem/index.d.ts b/types/filesystem/index.d.ts index 93dbb35d61..76ac35668c 100644 --- a/types/filesystem/index.d.ts +++ b/types/filesystem/index.d.ts @@ -1,21 +1,21 @@ // Type definitions for File System API // Project: http://www.w3.org/TR/file-system-api/ -// Definitions by: Kon -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// Definitions by: Kon +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped /// interface LocalFileSystem { - + /** * Used for storage with no guarantee of persistence. */ - TEMPORARY:number; + TEMPORARY: number; /** * Used for storage that should not be removed by the user agent without application or user permission. */ - PERSISTENT:number; + PERSISTENT: number; /** * Requests a filesystem in which to store application data. @@ -24,50 +24,50 @@ interface LocalFileSystem { * @param successCallback The callback that is called when the user agent provides a filesystem. * @param errorCallback A callback that is called when errors happen, or when the request to obtain the filesystem is denied. */ - requestFileSystem(type:number, size:number, successCallback:FileSystemCallback, errorCallback?:ErrorCallback):void; - + requestFileSystem(type: number, size: number, successCallback: FileSystemCallback, errorCallback?: ErrorCallback): void; + /** * Allows the user to look up the Entry for a file or directory referred to by a local URL. * @param url A URL referring to a local file in a filesystem accessable via this API. * @param successCallback A callback that is called to report the Entry to which the supplied URL refers. * @param errorCallback A callback that is called when errors happen, or when the request to obtain the Entry is denied. - */ - resolveLocalFileSystemURL(url:string, successCallback:EntryCallback, errorCallback?:ErrorCallback):void; + */ + resolveLocalFileSystemURL(url: string, successCallback: EntryCallback, errorCallback?: ErrorCallback): void; /** * see requestFileSystem. */ - webkitRequestFileSystem(type:number, size:number, successCallback:FileSystemCallback, errorCallback?:ErrorCallback):void; + webkitRequestFileSystem(type: number, size: number, successCallback: FileSystemCallback, errorCallback?: ErrorCallback): void; } interface LocalFileSystemSync { /** * Used for storage with no guarantee of persistence. */ - TEMPORARY:number; + TEMPORARY: number; /** * Used for storage that should not be removed by the user agent without application or user permission. */ - PERSISTENT:number; + PERSISTENT: number; /** * Requests a filesystem in which to store application data. * @param type Whether the filesystem requested should be persistent, as defined above. Use one of TEMPORARY or PERSISTENT. * @param size This is an indicator of how much storage space, in bytes, the application expects to need. */ - requestFileSystemSync(type:number, size:number):FileSystemSync; + requestFileSystemSync(type: number, size: number): FileSystemSync; /** * Allows the user to look up the Entry for a file or directory referred to by a local URL. * @param url A URL referring to a local file in a filesystem accessable via this API. */ - resolveLocalFileSystemSyncURL(url:string):EntrySync; + resolveLocalFileSystemSyncURL(url: string): EntrySync; /** * see requestFileSystemSync */ - webkitRequestFileSystemSync(type:number, size:number):FileSystemSync; + webkitRequestFileSystemSync(type: number, size: number): FileSystemSync; } interface Metadata { @@ -75,31 +75,31 @@ interface Metadata { * This is the time at which the file or directory was last modified. * @readonly */ - modificationTime:Date; + modificationTime: Date; /** * The size of the file, in bytes. This must return 0 for directories. * @readonly */ - size:number; + size: number; } interface Flags { /** * Used to indicate that the user wants to create a file or directory if it was not previously there. */ - create?:boolean; + create?: boolean; /** * By itself, exclusive must have no effect. Used with create, it must cause getFile and getDirectory to fail if the target path already exists. */ - exclusive?:boolean; + exclusive?: boolean; } -/** +/** * This interface represents a file system. */ -interface FileSystem{ +interface FileSystem { /** * This is the name of the file system. The specifics of naming filesystems is unspecified, but a name must be unique across the list of exposed file systems. * @readonly @@ -118,38 +118,38 @@ interface Entry { /** * Entry is a file. */ - isFile:boolean; + isFile: boolean; /** * Entry is a directory. */ - isDirectory:boolean; + isDirectory: boolean; /** * Look up metadata about this entry. * @param successCallback A callback that is called with the time of the last modification. * @param errorCallback ErrorCallback A callback that is called when errors happen. */ - getMetadata(successCallback:MetadataCallback, errorCallback?:ErrorCallback):void; - + getMetadata(successCallback: MetadataCallback, errorCallback?: ErrorCallback): void; + /** * The name of the entry, excluding the path leading to it. */ - name:string; + name: string; /** * The full absolute path from the root to the entry. */ - fullPath:string; + fullPath: string; /** * The file system on which the entry resides. */ - filesystem:FileSystem; + filesystem: FileSystem; /** * Move an entry to a different location on the file system. It is an error to try to: - * + * * *
  • move a directory inside itself or to any child at any depth;
  • *
  • move an entry into its parent if a name different from its current one isn't provided;
  • @@ -161,12 +161,12 @@ interface Entry { * A move of a file on top of an existing file must attempt to delete and replace that file. * A move of a directory on top of an existing empty directory must attempt to delete and replace that directory. */ - moveTo(parent:DirectoryEntry, newName?:string, successCallback?:EntryCallback, errorCallback?:ErrorCallback):void; - + moveTo(parent: DirectoryEntry, newName?: string, successCallback?: EntryCallback, errorCallback?: ErrorCallback): void; + /** * Copy an entry to a different location on the file system. It is an error to try to: - * - *