diff --git a/.gitignore b/.gitignore index 9b93436e7f7..90b078fc94f 100644 --- a/.gitignore +++ b/.gitignore @@ -58,5 +58,4 @@ internal/ !tests/baselines/reference/project/nodeModules*/**/* .idea yarn.lock -package-lock.json .parallelperf.* diff --git a/.mailmap b/.mailmap index 7ae5cb19818..98f004c58dc 100644 --- a/.mailmap +++ b/.mailmap @@ -276,4 +276,15 @@ Francois Wouts Jan Melcher Jan Melcher Matt Mitchell Maxwell Paul Brickner -Tycho Grouwstra \ No newline at end of file +Tycho Grouwstra +Adrian Leonhard +Alex Chugaev +Henry Mercer +Ivan Enderlin +Joe Calzaretta +Magnus Kulke +Stas Vilchik +Taras Mankovski +Thomas den Hollander +Vakhurin Sergey +Zeeshan Ahmed \ No newline at end of file diff --git a/AUTHORS.md b/AUTHORS.md index 4f94a67f7dd..c554a588715 100644 --- a/AUTHORS.md +++ b/AUTHORS.md @@ -3,8 +3,10 @@ TypeScript is authored by: * Abubaker Bashir * Adam Freidin * Adi Dahiya +* Adrian Leonhard * Ahmad Farid * Akshar Patel +* Alex Chugaev * Alex Eagle * Alexander Kuvaev * Alexander Rusakov @@ -105,6 +107,7 @@ TypeScript is authored by: * Halasi Tamás * Harald Niesche * Hendrik Liebau +* Henry Mercer * Herrington Darkholme * Homa Wong * Iain Monro @@ -112,6 +115,7 @@ TypeScript is authored by: * Ika * Ingvar Stepanyan * Isiah Meadows +* Ivan Enderlin * Ivo Gabe de Wolff * Iwata Hidetaka * Jakub Młokosiewicz @@ -127,6 +131,7 @@ TypeScript is authored by: * Jeffrey Morlan * Jesse Schalken * Jiri Tobisek +* Joe Calzaretta * Joe Chung * Joel Day * Joey Wilson @@ -161,6 +166,7 @@ TypeScript is authored by: * Lucien Greathouse * Lukas Elmer * Magnus Hiie +* Magnus Kulke * Manish Giri * Marin Marinov * Marius Schulz @@ -232,13 +238,16 @@ TypeScript is authored by: * Soo Jae Hwang * Stan Thomas * Stanislav Sysoev +* Stas Vilchik * Steve Lucco * Sudheesh Singanamalla * Sébastien Arod * @T18970237136 * @t_ +* Taras Mankovski * Tarik Ozket * Tetsuharu Ohzeki +* Thomas den Hollander * Thomas Loubiou * Tien Hoanhtien * Tim Lancina @@ -253,6 +262,7 @@ TypeScript is authored by: * TruongSinh Tran-Nguyen * Tycho Grouwstra * Vadi Taslim +* Vakhurin Sergey * Vidar Tonaas Fauske * Viktor Zozulyak * Vilic Vane @@ -263,5 +273,6 @@ TypeScript is authored by: * York Yao * @yortus * Yuichi Nukiyama +* Zeeshan Ahmed * Zev Spitz * Zhengbo Li \ No newline at end of file diff --git a/issue_template.md b/issue_template.md index e812fe7b74c..ddc1d070bc9 100644 --- a/issue_template.md +++ b/issue_template.md @@ -2,7 +2,8 @@ -**TypeScript Version:** 2.4.0 / nightly (2.5.0-dev.201xxxxx) + +**TypeScript Version:** 2.6.0-dev.201xxxxx **Code** diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 00000000000..cde6c1ff733 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,5302 @@ +{ + "name": "typescript", + "version": "2.6.0", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "@gulp-sourcemaps/identity-map": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@gulp-sourcemaps/identity-map/-/identity-map-1.0.1.tgz", + "integrity": "sha1-z6I7xYQPkQTOMqZedNt+epdLvuE=", + "dev": true, + "requires": { + "acorn": "5.1.2", + "css": "2.2.1", + "normalize-path": "2.1.1", + "source-map": "0.5.7", + "through2": "2.0.3" + }, + "dependencies": { + "acorn": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.1.2.tgz", + "integrity": "sha512-o96FZLJBPY1lvTuJylGA9Bk3t/GKPPJG8H0ydQQl01crzwJgspa4AEIq/pVTXigmK0PHVQhiAtn8WMBLL9D2WA==", + "dev": true + } + } + }, + "@gulp-sourcemaps/map-sources": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@gulp-sourcemaps/map-sources/-/map-sources-1.0.0.tgz", + "integrity": "sha1-iQrnxdjId/bThIYCFazp1+yUW9o=", + "dev": true, + "requires": { + "normalize-path": "2.1.1", + "through2": "2.0.3" + } + }, + "@types/browserify": { + "version": "12.0.33", + "resolved": "https://registry.npmjs.org/@types/browserify/-/browserify-12.0.33.tgz", + "integrity": "sha512-mY6dYfq1Ns3Xqz/JFUcyoWaXtm0XDoNhkU1vCwM/ULM5zqNL+SbtacJhce/JCgPeCdbqdVqq77tJ4HwdtypSxg==", + "dev": true, + "requires": { + "@types/insert-module-globals": "7.0.0", + "@types/node": "8.0.34" + } + }, + "@types/chai": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.0.4.tgz", + "integrity": "sha512-cvU0HomQ7/aGDQJZsbtJXqBQ7w4J4TqLB0Z/h8mKrpRjfeZEvTbygkfJEb7fWdmwpIeDeFmIVwAEqS0OYuUv3Q==", + "dev": true + }, + "@types/colors": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/@types/colors/-/colors-1.1.3.tgz", + "integrity": "sha1-VBOwp6GxbdGL4OP9V9L+7Mgcx3Y=", + "dev": true + }, + "@types/convert-source-map": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@types/convert-source-map/-/convert-source-map-1.5.0.tgz", + "integrity": "sha512-4OHKJEw70U59CN24TLRxU3W+B/9GPp0P6g+eNIsObZLAIqw6NTEBorkjIpei4xsvUCx+YzFwUtt4MBZbfSLvbQ==", + "dev": true + }, + "@types/del": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@types/del/-/del-3.0.0.tgz", + "integrity": "sha512-18mSs54BvzV8+TTQxt0ancig6tsuPZySnhp3cQkWFFDmDMavU4pmWwR+bHHqRBWODYqpzIzVkqKLuk/fP6yypQ==", + "dev": true, + "requires": { + "@types/glob": "5.0.33" + } + }, + "@types/glob": { + "version": "5.0.33", + "resolved": "https://registry.npmjs.org/@types/glob/-/glob-5.0.33.tgz", + "integrity": "sha512-BcD4yyWz+qmCggaYMSFF0Xn7GkO6tgwm3Fh9Gxk/kQmEU3Z7flQTnVlMyKBUNvXXNTCCyjqK4XT4/2hLd1gQ2A==", + "dev": true, + "requires": { + "@types/minimatch": "3.0.1", + "@types/node": "8.0.34" + } + }, + "@types/gulp": { + "version": "3.8.33", + "resolved": "https://registry.npmjs.org/@types/gulp/-/gulp-3.8.33.tgz", + "integrity": "sha512-3UpA2pkKO40cNPe/8bxMQFWSASR9Jx67JfN9Z2Cf6ogfDMwXgEHm2XjKmuLYEtrp1IHYApOWlYMLYNgtTJgSAw==", + "dev": true, + "requires": { + "@types/node": "8.0.34", + "@types/orchestrator": "0.3.0", + "@types/vinyl": "2.0.1" + } + }, + "@types/gulp-concat": { + "version": "0.0.31", + "resolved": "https://registry.npmjs.org/@types/gulp-concat/-/gulp-concat-0.0.31.tgz", + "integrity": "sha512-F14zRcKn15HC59RXRlHpcxj79WoLjkJBJBPfN0NBZOgkRCfDZYVu8rs0Y/CH4CJGUbbc/nHczD2LmepDS+ARaA==", + "dev": true, + "requires": { + "@types/node": "8.0.34" + } + }, + "@types/gulp-help": { + "version": "0.0.33", + "resolved": "https://registry.npmjs.org/@types/gulp-help/-/gulp-help-0.0.33.tgz", + "integrity": "sha1-ZejGUSQQkiVTf6OQA8S6UfT9GsU=", + "dev": true, + "requires": { + "@types/gulp": "3.8.33", + "@types/node": "8.0.34", + "@types/orchestrator": "0.3.0" + } + }, + "@types/gulp-newer": { + "version": "0.0.30", + "resolved": "https://registry.npmjs.org/@types/gulp-newer/-/gulp-newer-0.0.30.tgz", + "integrity": "sha1-bqn7oVsFdr5CTpl31IlCAEZKFR4=", + "dev": true, + "requires": { + "@types/node": "8.0.34" + } + }, + "@types/gulp-sourcemaps": { + "version": "0.0.31", + "resolved": "https://registry.npmjs.org/@types/gulp-sourcemaps/-/gulp-sourcemaps-0.0.31.tgz", + "integrity": "sha512-kJD1byVNx+sdQlaBzZpSGeFH/4l99TXTY4XSGW+aRk27eOnVyk6VknXJpsb1Jk5E4ThKxZ8GYy6ais7MtprK1w==", + "dev": true, + "requires": { + "@types/node": "8.0.34" + } + }, + "@types/insert-module-globals": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/@types/insert-module-globals/-/insert-module-globals-7.0.0.tgz", + "integrity": "sha512-zudCJPwluh1VUDB6Gl/OQdRp+fYy3+47huJB/JMQubMS2p+sH18MCVK4WUz3FqaWLB12yh5ELxVR/+tqwlm/qA==", + "dev": true, + "requires": { + "@types/node": "8.0.34" + } + }, + "@types/merge2": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@types/merge2/-/merge2-1.1.2.tgz", + "integrity": "sha512-Xy54xPmFQ8oAx0S3ku46i/zXE4dvfxl5M8n4p2M62IwxPau8IpobiRtL4jkrUzX6Kgeyb34BHOh0i70SDjKHeA==", + "dev": true, + "requires": { + "@types/node": "8.0.34" + } + }, + "@types/minimatch": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.1.tgz", + "integrity": "sha512-rUO/jz10KRSyA9SHoCWQ8WX9BICyj5jZYu1/ucKEJKb4KzLZCKMURdYbadP157Q6Zl1x0vHsrU+Z/O0XlhYQDw==", + "dev": true + }, + "@types/minimist": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@types/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-aaI6OtKcrwCX8G7aWbNh7i8GOfY=", + "dev": true + }, + "@types/mkdirp": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/@types/mkdirp/-/mkdirp-0.5.1.tgz", + "integrity": "sha512-XA4vNO6GCBz8Smq0hqSRo4yRWMqr4FPQrWjhJt6nKskzly4/p87SfuJMFYGRyYb6jo2WNIQU2FDBsY5r1BibUA==", + "dev": true, + "requires": { + "@types/node": "8.0.34" + } + }, + "@types/mocha": { + "version": "2.2.43", + "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-2.2.43.tgz", + "integrity": "sha512-xNlAmH+lRJdUMXClMTI9Y0pRqIojdxfm7DHsIxoB2iTzu3fnPmSMEN8SsSx0cdwV36d02PWCWaDUoZPDSln+xw==", + "dev": true + }, + "@types/node": { + "version": "8.0.34", + "resolved": "https://registry.npmjs.org/@types/node/-/node-8.0.34.tgz", + "integrity": "sha512-Jnmm57+nHqvJUPwUzt1CLoLzFtF2B2vgG7cWFut+a4nqTp9/L6pL0N+o0Jt3V7AQnCKMsPEqQpLFZYleBCdq3w==", + "dev": true + }, + "@types/orchestrator": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/@types/orchestrator/-/orchestrator-0.3.0.tgz", + "integrity": "sha1-v4ShaZyTMNT+ic2BJj6PwJ+zKXg=", + "dev": true, + "requires": { + "@types/node": "8.0.34", + "@types/q": "0.0.37" + }, + "dependencies": { + "@types/q": { + "version": "0.0.37", + "resolved": "https://registry.npmjs.org/@types/q/-/q-0.0.37.tgz", + "integrity": "sha512-vjFGX1zMTMz/kUp3xgfJcxMVLkMWVMrdlyc0RwVyve1y9jxwqNaT8wTcv6M51ylq2a/zn5lm8g7qPSoIS4uvZQ==", + "dev": true + } + } + }, + "@types/q": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/@types/q/-/q-1.0.5.tgz", + "integrity": "sha512-sudQPADzmQjXYS1fS2TxbWA/N/vbbfaO4Y7luPaAEyRWZVXC8jHwKV8KgNDbT7IHQaONNZWy9BYsodxY7IyDXQ==", + "dev": true + }, + "@types/run-sequence": { + "version": "0.0.29", + "resolved": "https://registry.npmjs.org/@types/run-sequence/-/run-sequence-0.0.29.tgz", + "integrity": "sha1-atD3ODE24TklMi5p/EHbd7MLIHU=", + "dev": true, + "requires": { + "@types/gulp": "3.8.33", + "@types/node": "8.0.34" + } + }, + "@types/through2": { + "version": "2.0.33", + "resolved": "https://registry.npmjs.org/@types/through2/-/through2-2.0.33.tgz", + "integrity": "sha1-H/LoihAN+1sUDnu5h5HxGUQA0TE=", + "dev": true, + "requires": { + "@types/node": "8.0.34" + } + }, + "@types/vinyl": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@types/vinyl/-/vinyl-2.0.1.tgz", + "integrity": "sha512-Joudabfn2ZofU2usW04y8OLmN75u7ZQkW0MCT3AnoBf5oUBp5iQ3Pgfz9+y1RdWkzhCPZo9/wBJ7FMWW2JrY0g==", + "dev": true, + "requires": { + "@types/node": "8.0.34" + } + }, + "@types/xml2js": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/@types/xml2js/-/xml2js-0.4.0.tgz", + "integrity": "sha512-3gw0UqFMq7PsfMDwsawD0/L48soXfzOEh0NSAWVO99IZXnhx9LD3nOldHIpGYzZBsrS9NV2vaRFvEdWe+UweXQ==", + "dev": true, + "requires": { + "@types/node": "8.0.34" + } + }, + "JSONStream": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.1.tgz", + "integrity": "sha1-cH92HgHa6eFvG8+TcDt4xwlmV5o=", + "dev": true, + "requires": { + "jsonparse": "1.3.1", + "through": "2.3.8" + } + }, + "abbrev": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.0.9.tgz", + "integrity": "sha1-kbR5JYinc4wl813W9jdSovh3YTU=", + "dev": true + }, + "acorn": { + "version": "4.0.13", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-4.0.13.tgz", + "integrity": "sha1-EFSVrlNh1pe9GVyCUZLhrX8lN4c=", + "dev": true + }, + "align-text": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz", + "integrity": "sha1-DNkKVhCT810KmSVsIrcGlDP60Rc=", + "dev": true, + "requires": { + "kind-of": "3.2.2", + "longest": "1.0.1", + "repeat-string": "1.6.1" + } + }, + "amdefine": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz", + "integrity": "sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU=", + "dev": true + }, + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "dev": true + }, + "ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", + "dev": true + }, + "archy": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/archy/-/archy-1.0.0.tgz", + "integrity": "sha1-+cjBN1fMHde8N5rHeyxipcKGjEA=", + "dev": true + }, + "argparse": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.9.tgz", + "integrity": "sha1-c9g7wmP4bpf4zE9rrhsOkKfSLIY=", + "dev": true, + "requires": { + "sprintf-js": "1.0.3" + } + }, + "arr-diff": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-2.0.0.tgz", + "integrity": "sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8=", + "dev": true, + "requires": { + "arr-flatten": "1.1.0" + } + }, + "arr-flatten": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", + "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==", + "dev": true + }, + "array-differ": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/array-differ/-/array-differ-1.0.0.tgz", + "integrity": "sha1-7/UuN1gknTO+QCuLuOVkuytdQDE=", + "dev": true + }, + "array-each": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/array-each/-/array-each-1.0.1.tgz", + "integrity": "sha1-p5SvDAWrF1KEbudTofIRoFugxE8=", + "dev": true + }, + "array-filter": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/array-filter/-/array-filter-0.0.1.tgz", + "integrity": "sha1-fajPLiZijtcygDWB/SH2fKzS7uw=", + "dev": true + }, + "array-find-index": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.2.tgz", + "integrity": "sha1-3wEKoSh+Fku9pvlyOwqWoexBh6E=", + "dev": true + }, + "array-map": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/array-map/-/array-map-0.0.0.tgz", + "integrity": "sha1-iKK6tz0c97zVwbEYoAP2b2ZfpmI=", + "dev": true + }, + "array-reduce": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/array-reduce/-/array-reduce-0.0.0.tgz", + "integrity": "sha1-FziZ0//Rx9k4PkR5Ul2+J4yrXys=", + "dev": true + }, + "array-slice": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/array-slice/-/array-slice-1.0.0.tgz", + "integrity": "sha1-5zA08A3MH0CHYAj9IP6ud71LfC8=", + "dev": true + }, + "array-union": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz", + "integrity": "sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk=", + "dev": true, + "requires": { + "array-uniq": "1.0.3" + } + }, + "array-uniq": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz", + "integrity": "sha1-r2rId6Jcx/dOBYiUdThY39sk/bY=", + "dev": true + }, + "array-unique": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz", + "integrity": "sha1-odl8yvy8JiXMcPrc6zalDFiwGlM=", + "dev": true + }, + "arrify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", + "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=", + "dev": true + }, + "asn1.js": { + "version": "4.9.1", + "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-4.9.1.tgz", + "integrity": "sha1-SLokC0WpKA6UdImQull9IWYX/UA=", + "dev": true, + "requires": { + "bn.js": "4.11.8", + "inherits": "2.0.3", + "minimalistic-assert": "1.0.0" + } + }, + "assert": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/assert/-/assert-1.4.1.tgz", + "integrity": "sha1-mZEtWRg2tab1s0XA8H7vwI/GXZE=", + "dev": true, + "requires": { + "util": "0.10.3" + } + }, + "assertion-error": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.0.2.tgz", + "integrity": "sha1-E8pRXYYgbaC6xm6DTdOX2HWBCUw=", + "dev": true + }, + "astw": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/astw/-/astw-2.2.0.tgz", + "integrity": "sha1-e9QXhNMkk5h66yOba04cV6hzuRc=", + "dev": true, + "requires": { + "acorn": "4.0.13" + } + }, + "async": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", + "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=", + "dev": true + }, + "atob": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/atob/-/atob-1.1.3.tgz", + "integrity": "sha1-lfE2KbEsOlGl0hWr3OKqnzL4B3M=", + "dev": true + }, + "babel-code-frame": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz", + "integrity": "sha1-Y/1D99weO7fONZR9uP42mj9Yx0s=", + "dev": true, + "requires": { + "chalk": "1.1.3", + "esutils": "2.0.2", + "js-tokens": "3.0.2" + } + }, + "balanced-match": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", + "dev": true + }, + "base64-js": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.2.1.tgz", + "integrity": "sha512-dwVUVIXsBZXwTuwnXI9RK8sBmgq09NDHzyR9SAph9eqk76gKK2JSQmZARC2zRC81JC2QTtxD0ARU5qTS25gIGw==", + "dev": true + }, + "beeper": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/beeper/-/beeper-1.1.1.tgz", + "integrity": "sha1-5tXqjF2tABMEpwsiY4RH9pyy+Ak=", + "dev": true + }, + "bn.js": { + "version": "4.11.8", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz", + "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==", + "dev": true + }, + "brace-expansion": { + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.8.tgz", + "integrity": "sha1-wHshHHyVLsH479Uad+8NHTmQopI=", + "dev": true, + "requires": { + "balanced-match": "1.0.0", + "concat-map": "0.0.1" + } + }, + "braces": { + "version": "1.8.5", + "resolved": "https://registry.npmjs.org/braces/-/braces-1.8.5.tgz", + "integrity": "sha1-uneWLhLf+WnWt2cR6RS3N4V79qc=", + "dev": true, + "requires": { + "expand-range": "1.8.2", + "preserve": "0.2.0", + "repeat-element": "1.1.2" + } + }, + "brorand": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", + "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=", + "dev": true + }, + "browser-pack": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/browser-pack/-/browser-pack-6.0.2.tgz", + "integrity": "sha1-+GzWzvT1MAyOY+B6TVEvZfv/RTE=", + "dev": true, + "requires": { + "JSONStream": "1.3.1", + "combine-source-map": "0.7.2", + "defined": "1.0.0", + "through2": "2.0.3", + "umd": "3.0.1" + } + }, + "browser-resolve": { + "version": "1.11.2", + "resolved": "https://registry.npmjs.org/browser-resolve/-/browser-resolve-1.11.2.tgz", + "integrity": "sha1-j/CbCixCFxihBRwmCzLkj0QpOM4=", + "dev": true, + "requires": { + "resolve": "1.1.7" + } + }, + "browser-stdout": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.0.tgz", + "integrity": "sha1-81HTKWnTL6XXpVZxVCY9korjvR8=", + "dev": true + }, + "browserify": { + "version": "14.4.0", + "resolved": "https://registry.npmjs.org/browserify/-/browserify-14.4.0.tgz", + "integrity": "sha1-CJo0Y69Y0OSNjNQHCz90ZU1avKk=", + "dev": true, + "requires": { + "JSONStream": "1.3.1", + "assert": "1.4.1", + "browser-pack": "6.0.2", + "browser-resolve": "1.11.2", + "browserify-zlib": "0.1.4", + "buffer": "5.0.8", + "cached-path-relative": "1.0.1", + "concat-stream": "1.5.2", + "console-browserify": "1.1.0", + "constants-browserify": "1.0.0", + "crypto-browserify": "3.11.1", + "defined": "1.0.0", + "deps-sort": "2.0.0", + "domain-browser": "1.1.7", + "duplexer2": "0.1.4", + "events": "1.1.1", + "glob": "7.1.2", + "has": "1.0.1", + "htmlescape": "1.1.1", + "https-browserify": "1.0.0", + "inherits": "2.0.3", + "insert-module-globals": "7.0.1", + "labeled-stream-splicer": "2.0.0", + "module-deps": "4.1.1", + "os-browserify": "0.1.2", + "parents": "1.0.1", + "path-browserify": "0.0.0", + "process": "0.11.10", + "punycode": "1.4.1", + "querystring-es3": "0.2.1", + "read-only-stream": "2.0.0", + "readable-stream": "2.3.3", + "resolve": "1.1.7", + "shasum": "1.0.2", + "shell-quote": "1.6.1", + "stream-browserify": "2.0.1", + "stream-http": "2.7.2", + "string_decoder": "1.0.3", + "subarg": "1.0.0", + "syntax-error": "1.3.0", + "through2": "2.0.3", + "timers-browserify": "1.4.2", + "tty-browserify": "0.0.0", + "url": "0.11.0", + "util": "0.10.3", + "vm-browserify": "0.0.4", + "xtend": "4.0.1" + } + }, + "browserify-aes": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.0.8.tgz", + "integrity": "sha512-WYCMOT/PtGTlpOKFht0YJFYcPy6pLCR98CtWfzK13zoynLlBMvAdEMSRGmgnJCw2M2j/5qxBkinZQFobieM8dQ==", + "dev": true, + "requires": { + "buffer-xor": "1.0.3", + "cipher-base": "1.0.4", + "create-hash": "1.1.3", + "evp_bytestokey": "1.0.3", + "inherits": "2.0.3", + "safe-buffer": "5.1.1" + } + }, + "browserify-cipher": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/browserify-cipher/-/browserify-cipher-1.0.0.tgz", + "integrity": "sha1-mYgkSHS/XtTijalWZtzWasj8Njo=", + "dev": true, + "requires": { + "browserify-aes": "1.0.8", + "browserify-des": "1.0.0", + "evp_bytestokey": "1.0.3" + } + }, + "browserify-des": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/browserify-des/-/browserify-des-1.0.0.tgz", + "integrity": "sha1-2qJ3cXRwki7S/hhZQRihdUOXId0=", + "dev": true, + "requires": { + "cipher-base": "1.0.4", + "des.js": "1.0.0", + "inherits": "2.0.3" + } + }, + "browserify-rsa": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.0.1.tgz", + "integrity": "sha1-IeCr+vbyApzy+vsTNWenAdQTVSQ=", + "dev": true, + "requires": { + "bn.js": "4.11.8", + "randombytes": "2.0.5" + } + }, + "browserify-sign": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.0.4.tgz", + "integrity": "sha1-qk62jl17ZYuqa/alfmMMvXqT0pg=", + "dev": true, + "requires": { + "bn.js": "4.11.8", + "browserify-rsa": "4.0.1", + "create-hash": "1.1.3", + "create-hmac": "1.1.6", + "elliptic": "6.4.0", + "inherits": "2.0.3", + "parse-asn1": "5.1.0" + } + }, + "browserify-zlib": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/browserify-zlib/-/browserify-zlib-0.1.4.tgz", + "integrity": "sha1-uzX4pRn2AOD6a4SFJByXnQFB+y0=", + "dev": true, + "requires": { + "pako": "0.2.9" + } + }, + "buffer": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.0.8.tgz", + "integrity": "sha512-xXvjQhVNz50v2nPeoOsNqWCLGfiv4ji/gXZM28jnVwdLJxH4mFyqgqCKfaK9zf1KUbG6zTkjLOy7ou+jSMarGA==", + "dev": true, + "requires": { + "base64-js": "1.2.1", + "ieee754": "1.1.8" + } + }, + "buffer-crc32": { + "version": "0.2.13", + "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", + "integrity": "sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI=", + "dev": true + }, + "buffer-xor": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", + "integrity": "sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=", + "dev": true + }, + "builtin-modules": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", + "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=", + "dev": true + }, + "builtin-status-codes": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz", + "integrity": "sha1-hZgoeOIbmOHGZCXgPQF0eI9Wnug=", + "dev": true + }, + "cached-path-relative": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/cached-path-relative/-/cached-path-relative-1.0.1.tgz", + "integrity": "sha1-0JxLUoAKpMB44t2BqGmqyQ0uVOc=", + "dev": true + }, + "camelcase": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-2.1.1.tgz", + "integrity": "sha1-fB0W1nmhu+WcoCys7PsBHiAfWh8=", + "dev": true + }, + "camelcase-keys": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-2.1.0.tgz", + "integrity": "sha1-MIvur/3ygRkFHvodkyITyRuPkuc=", + "dev": true, + "requires": { + "camelcase": "2.1.1", + "map-obj": "1.0.1" + } + }, + "center-align": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/center-align/-/center-align-0.1.3.tgz", + "integrity": "sha1-qg0yYptu6XIgBBHL1EYckHvCt60=", + "dev": true, + "optional": true, + "requires": { + "align-text": "0.1.4", + "lazy-cache": "1.0.4" + } + }, + "chai": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chai/-/chai-4.1.2.tgz", + "integrity": "sha1-D2RYS6ZC8PKs4oBiefTwbKI61zw=", + "dev": true, + "requires": { + "assertion-error": "1.0.2", + "check-error": "1.0.2", + "deep-eql": "3.0.1", + "get-func-name": "2.0.0", + "pathval": "1.1.0", + "type-detect": "4.0.3" + } + }, + "chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "dev": true, + "requires": { + "ansi-styles": "2.2.1", + "escape-string-regexp": "1.0.5", + "has-ansi": "2.0.0", + "strip-ansi": "3.0.1", + "supports-color": "2.0.0" + } + }, + "check-error": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.2.tgz", + "integrity": "sha1-V00xLt2Iu13YkS6Sht1sCu1KrII=", + "dev": true + }, + "cipher-base": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz", + "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==", + "dev": true, + "requires": { + "inherits": "2.0.3", + "safe-buffer": "5.1.1" + } + }, + "cliui": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-2.1.0.tgz", + "integrity": "sha1-S0dXYP+AJkx2LDoXGQMukcf+oNE=", + "dev": true, + "optional": true, + "requires": { + "center-align": "0.1.3", + "right-align": "0.1.3", + "wordwrap": "0.0.2" + }, + "dependencies": { + "wordwrap": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.2.tgz", + "integrity": "sha1-t5Zpu0LstAn4PVg8rVLKF+qhZD8=", + "dev": true, + "optional": true + } + } + }, + "clone": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.2.tgz", + "integrity": "sha1-Jgt6meux7f4kdTgXX3gyQ8sZ0Uk=", + "dev": true + }, + "clone-buffer": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/clone-buffer/-/clone-buffer-1.0.0.tgz", + "integrity": "sha1-4+JbIHrE5wGvch4staFnksrD3Fg=", + "dev": true + }, + "clone-stats": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/clone-stats/-/clone-stats-0.0.1.tgz", + "integrity": "sha1-uI+UqCzzi4eR1YBG6kAprYjKmdE=", + "dev": true + }, + "cloneable-readable": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/cloneable-readable/-/cloneable-readable-1.0.0.tgz", + "integrity": "sha1-pikNQT8hemEjL5XkWP84QYz7ARc=", + "dev": true, + "requires": { + "inherits": "2.0.3", + "process-nextick-args": "1.0.7", + "through2": "2.0.3" + } + }, + "color-convert": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.0.tgz", + "integrity": "sha1-Gsz5fdc5uYO/mU1W/sj5WFNkG3o=", + "dev": true, + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, + "colors": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/colors/-/colors-1.1.2.tgz", + "integrity": "sha1-FopHAXVran9RoSzgyXv6KMCE7WM=", + "dev": true + }, + "combine-source-map": { + "version": "0.7.2", + "resolved": "https://registry.npmjs.org/combine-source-map/-/combine-source-map-0.7.2.tgz", + "integrity": "sha1-CHAxKFazB6h8xKxIbzqaYq7MwJ4=", + "dev": true, + "requires": { + "convert-source-map": "1.1.3", + "inline-source-map": "0.6.2", + "lodash.memoize": "3.0.4", + "source-map": "0.5.7" + }, + "dependencies": { + "convert-source-map": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.1.3.tgz", + "integrity": "sha1-SCnId+n+SbMWHzvzZziI4gRpmGA=", + "dev": true + } + } + }, + "commander": { + "version": "2.11.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.11.0.tgz", + "integrity": "sha512-b0553uYA5YAEGgyYIGYROzKQ7X5RAqedkfjiZxwi0kL1g3bOaBNNZfYkzt/CL0umgD5wc9Jec2FbB98CjkMRvQ==", + "dev": true + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "dev": true + }, + "concat-stream": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.5.2.tgz", + "integrity": "sha1-cIl4Yk2FavQaWnQd790mHadSwmY=", + "dev": true, + "requires": { + "inherits": "2.0.3", + "readable-stream": "2.0.6", + "typedarray": "0.0.6" + }, + "dependencies": { + "readable-stream": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.0.6.tgz", + "integrity": "sha1-j5A0HmilPMySh4jaz80Rs265t44=", + "dev": true, + "requires": { + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "1.0.0", + "process-nextick-args": "1.0.7", + "string_decoder": "0.10.31", + "util-deprecate": "1.0.2" + } + }, + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", + "dev": true + } + } + }, + "concat-with-sourcemaps": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/concat-with-sourcemaps/-/concat-with-sourcemaps-1.0.4.tgz", + "integrity": "sha1-9Vs74q60dgGxCi1SWcz7cP0vHdY=", + "dev": true, + "requires": { + "source-map": "0.5.7" + } + }, + "console-browserify": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.1.0.tgz", + "integrity": "sha1-8CQcRXMKn8YyOyBtvzjtx0HQuxA=", + "dev": true, + "requires": { + "date-now": "0.1.4" + } + }, + "constants-browserify": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/constants-browserify/-/constants-browserify-1.0.0.tgz", + "integrity": "sha1-wguW2MYXdIqvHBYCF2DNJ/y4y3U=", + "dev": true + }, + "convert-source-map": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.5.0.tgz", + "integrity": "sha1-ms1whRxtXf3ZPZKC5e35SgP/RrU=", + "dev": true + }, + "core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", + "dev": true + }, + "create-ecdh": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.0.tgz", + "integrity": "sha1-iIxyNZbN92EvZJgjPuvXo1MBc30=", + "dev": true, + "requires": { + "bn.js": "4.11.8", + "elliptic": "6.4.0" + } + }, + "create-hash": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.1.3.tgz", + "integrity": "sha1-YGBCrIuSYnUPSDyt2rD1gZFy2P0=", + "dev": true, + "requires": { + "cipher-base": "1.0.4", + "inherits": "2.0.3", + "ripemd160": "2.0.1", + "sha.js": "2.4.9" + } + }, + "create-hmac": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.6.tgz", + "integrity": "sha1-rLniIaThe9sHbpBlfEK5PjcmzwY=", + "dev": true, + "requires": { + "cipher-base": "1.0.4", + "create-hash": "1.1.3", + "inherits": "2.0.3", + "ripemd160": "2.0.1", + "safe-buffer": "5.1.1", + "sha.js": "2.4.9" + } + }, + "crypto-browserify": { + "version": "3.11.1", + "resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.11.1.tgz", + "integrity": "sha512-Na7ZlwCOqoaW5RwUK1WpXws2kv8mNhWdTlzob0UXulk6G9BDbyiJaGTYBIX61Ozn9l1EPPJpICZb4DaOpT9NlQ==", + "dev": true, + "requires": { + "browserify-cipher": "1.0.0", + "browserify-sign": "4.0.4", + "create-ecdh": "4.0.0", + "create-hash": "1.1.3", + "create-hmac": "1.1.6", + "diffie-hellman": "5.0.2", + "inherits": "2.0.3", + "pbkdf2": "3.0.14", + "public-encrypt": "4.0.0", + "randombytes": "2.0.5" + } + }, + "css": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/css/-/css-2.2.1.tgz", + "integrity": "sha1-c6TIHehdtmTU7mdPfUcIXjstVdw=", + "dev": true, + "requires": { + "inherits": "2.0.3", + "source-map": "0.1.43", + "source-map-resolve": "0.3.1", + "urix": "0.1.0" + }, + "dependencies": { + "source-map": { + "version": "0.1.43", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.1.43.tgz", + "integrity": "sha1-wkvBRspRfBRx9drL4lcbK3+eM0Y=", + "dev": true, + "requires": { + "amdefine": "1.0.1" + } + } + } + }, + "currently-unhandled": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/currently-unhandled/-/currently-unhandled-0.4.1.tgz", + "integrity": "sha1-mI3zP+qxke95mmE2nddsF635V+o=", + "dev": true, + "requires": { + "array-find-index": "1.0.2" + } + }, + "d": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/d/-/d-1.0.0.tgz", + "integrity": "sha1-dUu1v+VUUdpppYuU1F9MWwRi1Y8=", + "dev": true, + "requires": { + "es5-ext": "0.10.31" + } + }, + "date-now": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/date-now/-/date-now-0.1.4.tgz", + "integrity": "sha1-6vQ5/U1ISK105cx9vvIAZyueNFs=", + "dev": true + }, + "dateformat": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-2.2.0.tgz", + "integrity": "sha1-QGXiATz5+5Ft39gu+1Bq1MZ2kGI=", + "dev": true + }, + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "debug-fabulous": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/debug-fabulous/-/debug-fabulous-0.2.1.tgz", + "integrity": "sha512-u0TV6HcfLsZ03xLBhdhSViQMldaiQ2o+8/nSILaXkuNSWvxkx66vYJUAam0Eu7gAilJRX/69J4kKdqajQPaPyw==", + "dev": true, + "requires": { + "debug": "3.1.0", + "memoizee": "0.4.11", + "object-assign": "4.1.1" + } + }, + "decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", + "dev": true + }, + "deep-eql": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-3.0.1.tgz", + "integrity": "sha512-+QeIQyN5ZuO+3Uk5DYh6/1eKO0m0YmJFGNmFHGACpf1ClL1nmlV/p4gNgbl2pJGxgXb4faqo6UE+M5ACEMyVcw==", + "dev": true, + "requires": { + "type-detect": "4.0.3" + } + }, + "deep-is": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", + "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", + "dev": true + }, + "defaults": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.3.tgz", + "integrity": "sha1-xlYFHpgX2f8I7YgUd/P+QBnz730=", + "dev": true, + "requires": { + "clone": "1.0.2" + } + }, + "defined": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/defined/-/defined-1.0.0.tgz", + "integrity": "sha1-yY2bzvdWdBiOEQlpFRGZ45sfppM=", + "dev": true + }, + "del": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/del/-/del-3.0.0.tgz", + "integrity": "sha1-U+z2mf/LyzljdpGrE7rxYIGXZuU=", + "dev": true, + "requires": { + "globby": "6.1.0", + "is-path-cwd": "1.0.0", + "is-path-in-cwd": "1.0.0", + "p-map": "1.2.0", + "pify": "3.0.0", + "rimraf": "2.6.2" + } + }, + "deprecated": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/deprecated/-/deprecated-0.0.1.tgz", + "integrity": "sha1-+cmvVGSvoeepcUWKi97yqpTVuxk=", + "dev": true + }, + "deps-sort": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/deps-sort/-/deps-sort-2.0.0.tgz", + "integrity": "sha1-CRckkC6EZYJg65EHSMzNGvbiH7U=", + "dev": true, + "requires": { + "JSONStream": "1.3.1", + "shasum": "1.0.2", + "subarg": "1.0.0", + "through2": "2.0.3" + } + }, + "des.js": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.0.0.tgz", + "integrity": "sha1-wHTS4qpqipoH29YfmhXCzYPsjsw=", + "dev": true, + "requires": { + "inherits": "2.0.3", + "minimalistic-assert": "1.0.0" + } + }, + "detect-file": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/detect-file/-/detect-file-0.1.0.tgz", + "integrity": "sha1-STXe39lIhkjgBrASlWbpOGcR6mM=", + "dev": true, + "requires": { + "fs-exists-sync": "0.1.0" + } + }, + "detect-newline": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/detect-newline/-/detect-newline-2.1.0.tgz", + "integrity": "sha1-9B8cEL5LAOh7XxPaaAdZ8sW/0+I=", + "dev": true + }, + "detective": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/detective/-/detective-4.5.0.tgz", + "integrity": "sha1-blqMaybmx6JUsca210kNmOyR7dE=", + "dev": true, + "requires": { + "acorn": "4.0.13", + "defined": "1.0.0" + } + }, + "diff": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/diff/-/diff-3.3.1.tgz", + "integrity": "sha512-MKPHZDMB0o6yHyDryUOScqZibp914ksXwAMYMTHj6KO8UeKsRYNJD3oNCKjTqZon+V488P7N/HzXF8t7ZR95ww==", + "dev": true + }, + "diffie-hellman": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.2.tgz", + "integrity": "sha1-tYNXOScM/ias9jIJn97SoH8gnl4=", + "dev": true, + "requires": { + "bn.js": "4.11.8", + "miller-rabin": "4.0.1", + "randombytes": "2.0.5" + } + }, + "domain-browser": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/domain-browser/-/domain-browser-1.1.7.tgz", + "integrity": "sha1-hnqksJP6oF8d4IwG9NeyH9+GmLw=", + "dev": true + }, + "duplexer2": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.1.4.tgz", + "integrity": "sha1-ixLauHjA1p4+eJEFFmKjL8a93ME=", + "dev": true, + "requires": { + "readable-stream": "2.3.3" + } + }, + "duplexify": { + "version": "3.5.1", + "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.5.1.tgz", + "integrity": "sha512-j5goxHTwVED1Fpe5hh3q9R93Kip0Bg2KVAt4f8CEYM3UEwYcPSvWbXaUQOzdX/HtiNomipv+gU7ASQPDbV7pGQ==", + "dev": true, + "requires": { + "end-of-stream": "1.4.0", + "inherits": "2.0.3", + "readable-stream": "2.3.3", + "stream-shift": "1.0.0" + }, + "dependencies": { + "end-of-stream": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.0.tgz", + "integrity": "sha1-epDYM+/abPpurA9JSduw+tOmMgY=", + "dev": true, + "requires": { + "once": "1.4.0" + } + } + } + }, + "elliptic": { + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.4.0.tgz", + "integrity": "sha1-ysmvh2LIWDYYcAPI3+GT5eLq5d8=", + "dev": true, + "requires": { + "bn.js": "4.11.8", + "brorand": "1.1.0", + "hash.js": "1.1.3", + "hmac-drbg": "1.0.1", + "inherits": "2.0.3", + "minimalistic-assert": "1.0.0", + "minimalistic-crypto-utils": "1.0.1" + } + }, + "end-of-stream": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-0.1.5.tgz", + "integrity": "sha1-jhdyBsPICDfYVjLouTWd/osvbq8=", + "dev": true, + "requires": { + "once": "1.3.3" + }, + "dependencies": { + "once": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/once/-/once-1.3.3.tgz", + "integrity": "sha1-suJhVXzkwxTsgwTz+oJmPkKXyiA=", + "dev": true, + "requires": { + "wrappy": "1.0.2" + } + } + } + }, + "error-ex": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.1.tgz", + "integrity": "sha1-+FWobOYa3E6GIcPNoh56dhLDqNw=", + "dev": true, + "requires": { + "is-arrayish": "0.2.1" + } + }, + "es5-ext": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.31.tgz", + "integrity": "sha1-e7k4yVp/G59ygJLcCcQe3MOY7v4=", + "dev": true, + "requires": { + "es6-iterator": "2.0.1", + "es6-symbol": "3.1.1" + } + }, + "es6-iterator": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.1.tgz", + "integrity": "sha1-jjGcnwRTv1ddN0lAplWSDlnKVRI=", + "dev": true, + "requires": { + "d": "1.0.0", + "es5-ext": "0.10.31", + "es6-symbol": "3.1.1" + } + }, + "es6-promise": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-3.3.1.tgz", + "integrity": "sha1-oIzd6EzNvzTQJ6FFG8kdS80ophM=", + "dev": true + }, + "es6-symbol": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.1.tgz", + "integrity": "sha1-vwDvT9q2uhtG7Le2KbTH7VcVzHc=", + "dev": true, + "requires": { + "d": "1.0.0", + "es5-ext": "0.10.31" + } + }, + "es6-weak-map": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/es6-weak-map/-/es6-weak-map-2.0.2.tgz", + "integrity": "sha1-XjqzIlH/0VOKH45f+hNXdy+S2W8=", + "dev": true, + "requires": { + "d": "1.0.0", + "es5-ext": "0.10.31", + "es6-iterator": "2.0.1", + "es6-symbol": "3.1.1" + } + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true + }, + "escodegen": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.8.1.tgz", + "integrity": "sha1-WltTr0aTEQvrsIZ6o0MN07cKEBg=", + "dev": true, + "requires": { + "esprima": "2.7.3", + "estraverse": "1.9.3", + "esutils": "2.0.2", + "optionator": "0.8.2", + "source-map": "0.2.0" + }, + "dependencies": { + "source-map": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.2.0.tgz", + "integrity": "sha1-2rc/vPwrqBm03gO9b26qSBZLP50=", + "dev": true, + "optional": true, + "requires": { + "amdefine": "1.0.1" + } + } + } + }, + "esprima": { + "version": "2.7.3", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-2.7.3.tgz", + "integrity": "sha1-luO3DVd59q1JzQMmc9HDEnZ7pYE=", + "dev": true + }, + "estraverse": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-1.9.3.tgz", + "integrity": "sha1-r2fy3JIlgkFZUJJgkaQAXSnJu0Q=", + "dev": true + }, + "esutils": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz", + "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=", + "dev": true + }, + "event-emitter": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/event-emitter/-/event-emitter-0.3.5.tgz", + "integrity": "sha1-34xp7vFkeSPHFXuc6DhAYQsCzDk=", + "dev": true, + "requires": { + "d": "1.0.0", + "es5-ext": "0.10.31" + } + }, + "events": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/events/-/events-1.1.1.tgz", + "integrity": "sha1-nr23Y1rQmccNzEwqH1AEKI6L2SQ=", + "dev": true + }, + "evp_bytestokey": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz", + "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==", + "dev": true, + "requires": { + "md5.js": "1.3.4", + "safe-buffer": "5.1.1" + } + }, + "expand-brackets": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-0.1.5.tgz", + "integrity": "sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s=", + "dev": true, + "requires": { + "is-posix-bracket": "0.1.1" + } + }, + "expand-range": { + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/expand-range/-/expand-range-1.8.2.tgz", + "integrity": "sha1-opnv/TNf4nIeuujiV+x5ZE/IUzc=", + "dev": true, + "requires": { + "fill-range": "2.2.3" + } + }, + "expand-tilde": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/expand-tilde/-/expand-tilde-1.2.2.tgz", + "integrity": "sha1-C4HrqJflo9MdHD0QL48BRB5VlEk=", + "dev": true, + "requires": { + "os-homedir": "1.0.2" + } + }, + "extend": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.1.tgz", + "integrity": "sha1-p1Xqe8Gt/MWjHOfnYtuq3F5jZEQ=", + "dev": true + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "0.1.1" + } + }, + "extglob": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/extglob/-/extglob-0.3.2.tgz", + "integrity": "sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE=", + "dev": true, + "requires": { + "is-extglob": "1.0.0" + } + }, + "fancy-log": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/fancy-log/-/fancy-log-1.3.0.tgz", + "integrity": "sha1-Rb4X0Cu5kX1gzP/UmVyZnmyMmUg=", + "dev": true, + "requires": { + "chalk": "1.1.3", + "time-stamp": "1.1.0" + } + }, + "fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", + "dev": true + }, + "filelist": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/filelist/-/filelist-0.0.6.tgz", + "integrity": "sha1-WKZBrR9XV0on/oekQO8xiDS1Vxk=", + "dev": true, + "requires": { + "minimatch": "3.0.4", + "utilities": "0.0.37" + }, + "dependencies": { + "utilities": { + "version": "0.0.37", + "resolved": "https://registry.npmjs.org/utilities/-/utilities-0.0.37.tgz", + "integrity": "sha1-o0cNCn9ogULZ6KV87hEo8S4Z4ZY=", + "dev": true + } + } + }, + "filename-regex": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/filename-regex/-/filename-regex-2.0.1.tgz", + "integrity": "sha1-wcS5vuPglyXdsQa3XB4wH+LxiyY=", + "dev": true + }, + "fill-range": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-2.2.3.tgz", + "integrity": "sha1-ULd9/X5Gm8dJJHCWNpn+eoSFpyM=", + "dev": true, + "requires": { + "is-number": "2.1.0", + "isobject": "2.1.0", + "randomatic": "1.1.7", + "repeat-element": "1.1.2", + "repeat-string": "1.6.1" + } + }, + "find-index": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/find-index/-/find-index-0.1.1.tgz", + "integrity": "sha1-Z101iyyjiS15Whq0cjL4tuLg3eQ=", + "dev": true + }, + "find-up": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", + "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", + "dev": true, + "requires": { + "path-exists": "2.1.0", + "pinkie-promise": "2.0.1" + } + }, + "findup-sync": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-0.4.3.tgz", + "integrity": "sha1-QAQ5Kee8YK3wt/SCfExudaDeyhI=", + "dev": true, + "requires": { + "detect-file": "0.1.0", + "is-glob": "2.0.1", + "micromatch": "2.3.11", + "resolve-dir": "0.1.1" + } + }, + "fined": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/fined/-/fined-1.1.0.tgz", + "integrity": "sha1-s33IRLdqL15wgeiE98CuNE8VNHY=", + "dev": true, + "requires": { + "expand-tilde": "2.0.2", + "is-plain-object": "2.0.4", + "object.defaults": "1.1.0", + "object.pick": "1.3.0", + "parse-filepath": "1.0.1" + }, + "dependencies": { + "expand-tilde": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/expand-tilde/-/expand-tilde-2.0.2.tgz", + "integrity": "sha1-l+gBqgUt8CRU3kawK/YhZCzchQI=", + "dev": true, + "requires": { + "homedir-polyfill": "1.0.1" + } + } + } + }, + "first-chunk-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/first-chunk-stream/-/first-chunk-stream-1.0.0.tgz", + "integrity": "sha1-Wb+1DNkF9g18OUzT2ayqtOatk04=", + "dev": true + }, + "flagged-respawn": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/flagged-respawn/-/flagged-respawn-0.3.2.tgz", + "integrity": "sha1-/xke3c1wiKZ1smEP/8l2vpuAdLU=", + "dev": true + }, + "for-in": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", + "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=", + "dev": true + }, + "for-own": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/for-own/-/for-own-0.1.5.tgz", + "integrity": "sha1-UmXGgaTylNq78XyVCbZ2OqhFEM4=", + "dev": true, + "requires": { + "for-in": "1.0.2" + } + }, + "fs-exists-sync": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/fs-exists-sync/-/fs-exists-sync-0.1.0.tgz", + "integrity": "sha1-mC1ok6+RjnLQjeyehnP/K1qNat0=", + "dev": true + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "dev": true + }, + "function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", + "dev": true + }, + "gaze": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/gaze/-/gaze-0.5.2.tgz", + "integrity": "sha1-QLcJU30k0dRXZ9takIaJ3+aaxE8=", + "dev": true, + "requires": { + "globule": "0.1.0" + } + }, + "get-func-name": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.0.tgz", + "integrity": "sha1-6td0q+5y4gQJQzoGY2YCPdaIekE=", + "dev": true + }, + "get-stdin": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-4.0.1.tgz", + "integrity": "sha1-uWjGsKBDhDJJAui/Gl3zJXmkUP4=", + "dev": true + }, + "glob": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", + "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", + "dev": true, + "requires": { + "fs.realpath": "1.0.0", + "inflight": "1.0.6", + "inherits": "2.0.3", + "minimatch": "3.0.4", + "once": "1.4.0", + "path-is-absolute": "1.0.1" + } + }, + "glob-base": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/glob-base/-/glob-base-0.3.0.tgz", + "integrity": "sha1-27Fk9iIbHAscz4Kuoyi0l98Oo8Q=", + "dev": true, + "requires": { + "glob-parent": "2.0.0", + "is-glob": "2.0.1" + } + }, + "glob-parent": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-2.0.0.tgz", + "integrity": "sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg=", + "dev": true, + "requires": { + "is-glob": "2.0.1" + } + }, + "glob-stream": { + "version": "3.1.18", + "resolved": "https://registry.npmjs.org/glob-stream/-/glob-stream-3.1.18.tgz", + "integrity": "sha1-kXCl8St5Awb9/lmPMT+PeVT9FDs=", + "dev": true, + "requires": { + "glob": "4.5.3", + "glob2base": "0.0.12", + "minimatch": "2.0.10", + "ordered-read-streams": "0.1.0", + "through2": "0.6.5", + "unique-stream": "1.0.0" + }, + "dependencies": { + "glob": { + "version": "4.5.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-4.5.3.tgz", + "integrity": "sha1-xstz0yJsHv7wTePFbQEvAzd+4V8=", + "dev": true, + "requires": { + "inflight": "1.0.6", + "inherits": "2.0.3", + "minimatch": "2.0.10", + "once": "1.4.0" + } + }, + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", + "dev": true + }, + "minimatch": { + "version": "2.0.10", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-2.0.10.tgz", + "integrity": "sha1-jQh8OcazjAAbl/ynzm0OHoCvusc=", + "dev": true, + "requires": { + "brace-expansion": "1.1.8" + } + }, + "readable-stream": { + "version": "1.0.34", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", + "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", + "dev": true, + "requires": { + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "0.0.1", + "string_decoder": "0.10.31" + } + }, + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", + "dev": true + }, + "through2": { + "version": "0.6.5", + "resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz", + "integrity": "sha1-QaucZ7KdVyCQcUEOHXp6lozTrUg=", + "dev": true, + "requires": { + "readable-stream": "1.0.34", + "xtend": "4.0.1" + } + } + } + }, + "glob-watcher": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/glob-watcher/-/glob-watcher-0.0.6.tgz", + "integrity": "sha1-uVtKjfdLOcgymLDAXJeLTZo7cQs=", + "dev": true, + "requires": { + "gaze": "0.5.2" + } + }, + "glob2base": { + "version": "0.0.12", + "resolved": "https://registry.npmjs.org/glob2base/-/glob2base-0.0.12.tgz", + "integrity": "sha1-nUGbPijxLoOjYhZKJ3BVkiycDVY=", + "dev": true, + "requires": { + "find-index": "0.1.1" + } + }, + "global-modules": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-0.2.3.tgz", + "integrity": "sha1-6lo77ULG1s6ZWk+KEmm12uIjgo0=", + "dev": true, + "requires": { + "global-prefix": "0.1.5", + "is-windows": "0.2.0" + } + }, + "global-prefix": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-0.1.5.tgz", + "integrity": "sha1-jTvGuNo8qBEqFg2NSW/wRiv+948=", + "dev": true, + "requires": { + "homedir-polyfill": "1.0.1", + "ini": "1.3.4", + "is-windows": "0.2.0", + "which": "1.3.0" + } + }, + "globby": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-6.1.0.tgz", + "integrity": "sha1-9abXDoOV4hyFj7BInWTfAkJNUGw=", + "dev": true, + "requires": { + "array-union": "1.0.2", + "glob": "7.1.2", + "object-assign": "4.1.1", + "pify": "2.3.0", + "pinkie-promise": "2.0.1" + }, + "dependencies": { + "pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "dev": true + } + } + }, + "globule": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/globule/-/globule-0.1.0.tgz", + "integrity": "sha1-2cjt3h2nnRJaFRt5UzuXhnY0auU=", + "dev": true, + "requires": { + "glob": "3.1.21", + "lodash": "1.0.2", + "minimatch": "0.2.14" + }, + "dependencies": { + "glob": { + "version": "3.1.21", + "resolved": "https://registry.npmjs.org/glob/-/glob-3.1.21.tgz", + "integrity": "sha1-0p4KBV3qUTj00H7UDomC6DwgZs0=", + "dev": true, + "requires": { + "graceful-fs": "1.2.3", + "inherits": "1.0.2", + "minimatch": "0.2.14" + } + }, + "graceful-fs": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-1.2.3.tgz", + "integrity": "sha1-FaSAaldUfLLS2/J/QuiajDRRs2Q=", + "dev": true + }, + "inherits": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-1.0.2.tgz", + "integrity": "sha1-ykMJ2t7mtUzAuNJH6NfHoJdb3Js=", + "dev": true + }, + "minimatch": { + "version": "0.2.14", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-0.2.14.tgz", + "integrity": "sha1-x054BXT2PG+aCQ6Q775u9TpqdWo=", + "dev": true, + "requires": { + "lru-cache": "2.7.3", + "sigmund": "1.0.1" + } + } + } + }, + "glogg": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/glogg/-/glogg-1.0.0.tgz", + "integrity": "sha1-f+DxmfV6yQbPUS/urY+Q7kooT8U=", + "dev": true, + "requires": { + "sparkles": "1.0.0" + } + }, + "graceful-fs": { + "version": "3.0.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-3.0.11.tgz", + "integrity": "sha1-dhPHeKGv6mLyXGMKCG1/Osu92Bg=", + "dev": true, + "requires": { + "natives": "1.1.0" + } + }, + "growl": { + "version": "1.10.3", + "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.3.tgz", + "integrity": "sha512-hKlsbA5Vu3xsh1Cg3J7jSmX/WaW6A5oBeqzM88oNbCRQFz+zUaXm6yxS4RVytp1scBoJzSYl4YAEOQIt6O8V1Q==", + "dev": true + }, + "gulp": { + "version": "3.9.1", + "resolved": "https://registry.npmjs.org/gulp/-/gulp-3.9.1.tgz", + "integrity": "sha1-VxzkWSjdQK9lFPxAEYZgFsE4RbQ=", + "dev": true, + "requires": { + "archy": "1.0.0", + "chalk": "1.1.3", + "deprecated": "0.0.1", + "gulp-util": "3.0.8", + "interpret": "1.0.4", + "liftoff": "2.3.0", + "minimist": "1.2.0", + "orchestrator": "0.3.8", + "pretty-hrtime": "1.0.3", + "semver": "4.3.6", + "tildify": "1.2.0", + "v8flags": "2.1.1", + "vinyl-fs": "0.3.14" + } + }, + "gulp-clone": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/gulp-clone/-/gulp-clone-1.0.0.tgz", + "integrity": "sha1-mubGVr2cTzae6AXu9WV4a8gQBbA=", + "dev": true, + "requires": { + "gulp-util": "2.2.20", + "through2": "0.4.2" + }, + "dependencies": { + "ansi-regex": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-0.2.1.tgz", + "integrity": "sha1-DY6UaWej2BQ/k+JOKYUl/BsiNfk=", + "dev": true + }, + "ansi-styles": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-1.1.0.tgz", + "integrity": "sha1-6uy/Zs1waIJ2Cy9GkVgrj1XXp94=", + "dev": true + }, + "chalk": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-0.5.1.tgz", + "integrity": "sha1-Zjs6ZItotV0EaQ1JFnqoN4WPIXQ=", + "dev": true, + "requires": { + "ansi-styles": "1.1.0", + "escape-string-regexp": "1.0.5", + "has-ansi": "0.1.0", + "strip-ansi": "0.3.0", + "supports-color": "0.2.0" + } + }, + "dateformat": { + "version": "1.0.12", + "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-1.0.12.tgz", + "integrity": "sha1-nxJLZ1lMk3/3BpMuSmQsyo27/uk=", + "dev": true, + "requires": { + "get-stdin": "4.0.1", + "meow": "3.7.0" + } + }, + "gulp-util": { + "version": "2.2.20", + "resolved": "https://registry.npmjs.org/gulp-util/-/gulp-util-2.2.20.tgz", + "integrity": "sha1-1xRuVyiRC9jwR6awseVJvCLb1kw=", + "dev": true, + "requires": { + "chalk": "0.5.1", + "dateformat": "1.0.12", + "lodash._reinterpolate": "2.4.1", + "lodash.template": "2.4.1", + "minimist": "0.2.0", + "multipipe": "0.1.2", + "through2": "0.5.1", + "vinyl": "0.2.3" + }, + "dependencies": { + "through2": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/through2/-/through2-0.5.1.tgz", + "integrity": "sha1-390BLrnHAOIyP9M084rGIqs3Lac=", + "dev": true, + "requires": { + "readable-stream": "1.0.34", + "xtend": "3.0.0" + } + } + } + }, + "has-ansi": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-0.1.0.tgz", + "integrity": "sha1-hPJlqujA5qiKEtcCKJS3VoiUxi4=", + "dev": true, + "requires": { + "ansi-regex": "0.2.1" + } + }, + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", + "dev": true + }, + "lodash._reinterpolate": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/lodash._reinterpolate/-/lodash._reinterpolate-2.4.1.tgz", + "integrity": "sha1-TxInqlqHEfxjL1sHofRgequLMiI=", + "dev": true + }, + "lodash.escape": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/lodash.escape/-/lodash.escape-2.4.1.tgz", + "integrity": "sha1-LOEsXghNsKV92l5dHu659dF1o7Q=", + "dev": true, + "requires": { + "lodash._escapehtmlchar": "2.4.1", + "lodash._reunescapedhtml": "2.4.1", + "lodash.keys": "2.4.1" + } + }, + "lodash.keys": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/lodash.keys/-/lodash.keys-2.4.1.tgz", + "integrity": "sha1-SN6kbfj/djKxDXBrissmWR4rNyc=", + "dev": true, + "requires": { + "lodash._isnative": "2.4.1", + "lodash._shimkeys": "2.4.1", + "lodash.isobject": "2.4.1" + } + }, + "lodash.template": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/lodash.template/-/lodash.template-2.4.1.tgz", + "integrity": "sha1-nmEQB+32KRKal0qzxIuBez4c8g0=", + "dev": true, + "requires": { + "lodash._escapestringchar": "2.4.1", + "lodash._reinterpolate": "2.4.1", + "lodash.defaults": "2.4.1", + "lodash.escape": "2.4.1", + "lodash.keys": "2.4.1", + "lodash.templatesettings": "2.4.1", + "lodash.values": "2.4.1" + } + }, + "lodash.templatesettings": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/lodash.templatesettings/-/lodash.templatesettings-2.4.1.tgz", + "integrity": "sha1-6nbHXRHrhtTb6JqDiTu4YZKaxpk=", + "dev": true, + "requires": { + "lodash._reinterpolate": "2.4.1", + "lodash.escape": "2.4.1" + } + }, + "minimist": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.2.0.tgz", + "integrity": "sha1-Tf/lJdriuGTGbC4jxicdev3s784=", + "dev": true + }, + "readable-stream": { + "version": "1.0.34", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", + "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", + "dev": true, + "requires": { + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "0.0.1", + "string_decoder": "0.10.31" + } + }, + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", + "dev": true + }, + "strip-ansi": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-0.3.0.tgz", + "integrity": "sha1-JfSOoiynkYfzF0pNuHWTR7sSYiA=", + "dev": true, + "requires": { + "ansi-regex": "0.2.1" + } + }, + "supports-color": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-0.2.0.tgz", + "integrity": "sha1-2S3iaU6z9nMjlz1649i1W0wiGQo=", + "dev": true + }, + "through2": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/through2/-/through2-0.4.2.tgz", + "integrity": "sha1-2/WGYDEVHsg1K7bE22SiKSqEC5s=", + "dev": true, + "requires": { + "readable-stream": "1.0.34", + "xtend": "2.1.2" + }, + "dependencies": { + "xtend": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-2.1.2.tgz", + "integrity": "sha1-bv7MKk2tjmlixJAbM3znuoe10os=", + "dev": true, + "requires": { + "object-keys": "0.4.0" + } + } + } + }, + "vinyl": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-0.2.3.tgz", + "integrity": "sha1-vKk4IJWC7FpJrVOKAPofEl5RMlI=", + "dev": true, + "requires": { + "clone-stats": "0.0.1" + } + }, + "xtend": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-3.0.0.tgz", + "integrity": "sha1-XM50B7r2Qsunvs2laBEcST9ZZlo=", + "dev": true + } + } + }, + "gulp-concat": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/gulp-concat/-/gulp-concat-2.6.1.tgz", + "integrity": "sha1-Yz0WyV2IUEYorQJmVmPO5aR5M1M=", + "dev": true, + "requires": { + "concat-with-sourcemaps": "1.0.4", + "through2": "2.0.3", + "vinyl": "2.1.0" + }, + "dependencies": { + "clone": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/clone/-/clone-2.1.1.tgz", + "integrity": "sha1-0hfR6WERjjrJpLi7oyhVU79kfNs=", + "dev": true + }, + "clone-stats": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/clone-stats/-/clone-stats-1.0.0.tgz", + "integrity": "sha1-s3gt/4u1R04Yuba/D9/ngvh3doA=", + "dev": true + }, + "replace-ext": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-1.0.0.tgz", + "integrity": "sha1-3mMSg3P8v3w8z6TeWkgMRaZ5WOs=", + "dev": true + }, + "vinyl": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-2.1.0.tgz", + "integrity": "sha1-Ah+cLPlR1rk5lDyJ617lrdT9kkw=", + "dev": true, + "requires": { + "clone": "2.1.1", + "clone-buffer": "1.0.0", + "clone-stats": "1.0.0", + "cloneable-readable": "1.0.0", + "remove-trailing-separator": "1.1.0", + "replace-ext": "1.0.0" + } + } + } + }, + "gulp-help": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/gulp-help/-/gulp-help-1.6.1.tgz", + "integrity": "sha1-Jh2xhuGDl/7z9qLCLpwxW/qIrgw=", + "dev": true, + "requires": { + "chalk": "1.1.3", + "object-assign": "3.0.0" + }, + "dependencies": { + "object-assign": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-3.0.0.tgz", + "integrity": "sha1-m+3VygiXlJvKR+f/QIBi1Un1h/I=", + "dev": true + } + } + }, + "gulp-insert": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/gulp-insert/-/gulp-insert-0.5.0.tgz", + "integrity": "sha1-MjE/E+SiPPWsylzl8MCAkjx3hgI=", + "dev": true, + "requires": { + "readable-stream": "1.1.14", + "streamqueue": "0.0.6" + }, + "dependencies": { + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", + "dev": true + }, + "readable-stream": { + "version": "1.1.14", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", + "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", + "dev": true, + "requires": { + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "0.0.1", + "string_decoder": "0.10.31" + } + }, + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", + "dev": true + } + } + }, + "gulp-newer": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/gulp-newer/-/gulp-newer-1.3.0.tgz", + "integrity": "sha1-1Q7Ky7gi7aSStXMkpshaB/2aVcE=", + "dev": true, + "requires": { + "glob": "7.1.2", + "gulp-util": "3.0.8", + "kew": "0.7.0" + } + }, + "gulp-sourcemaps": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/gulp-sourcemaps/-/gulp-sourcemaps-2.6.1.tgz", + "integrity": "sha512-1qHCI3hdmsMdq/SUotxwUh/L8YzlI6J9zQ5ifNOtx4Y6KV5y5sGuORv1KZzWhuKtz/mXNh5xLESUtwC4EndCjA==", + "dev": true, + "requires": { + "@gulp-sourcemaps/identity-map": "1.0.1", + "@gulp-sourcemaps/map-sources": "1.0.0", + "acorn": "4.0.13", + "convert-source-map": "1.5.0", + "css": "2.2.1", + "debug-fabulous": "0.2.1", + "detect-newline": "2.1.0", + "graceful-fs": "4.1.11", + "source-map": "0.5.7", + "strip-bom-string": "1.0.0", + "through2": "2.0.3", + "vinyl": "1.2.0" + }, + "dependencies": { + "graceful-fs": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", + "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=", + "dev": true + }, + "vinyl": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-1.2.0.tgz", + "integrity": "sha1-XIgDbPVl5d8FVYv8kR+GVt8hiIQ=", + "dev": true, + "requires": { + "clone": "1.0.2", + "clone-stats": "0.0.1", + "replace-ext": "0.0.1" + } + } + } + }, + "gulp-typescript": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/gulp-typescript/-/gulp-typescript-3.2.2.tgz", + "integrity": "sha1-t+Xh08s193LlPmBAJmAYJuK+d/w=", + "dev": true, + "requires": { + "gulp-util": "3.0.8", + "source-map": "0.5.7", + "through2": "2.0.3", + "vinyl-fs": "2.4.4" + }, + "dependencies": { + "glob": { + "version": "5.0.15", + "resolved": "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz", + "integrity": "sha1-G8k2ueAvSmA/zCIuz3Yz0wuLk7E=", + "dev": true, + "requires": { + "inflight": "1.0.6", + "inherits": "2.0.3", + "minimatch": "3.0.4", + "once": "1.4.0", + "path-is-absolute": "1.0.1" + } + }, + "glob-parent": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", + "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", + "dev": true, + "requires": { + "is-glob": "3.1.0", + "path-dirname": "1.0.2" + } + }, + "glob-stream": { + "version": "5.3.5", + "resolved": "https://registry.npmjs.org/glob-stream/-/glob-stream-5.3.5.tgz", + "integrity": "sha1-pVZlqajM3EGRWofHAeMtTgFvrSI=", + "dev": true, + "requires": { + "extend": "3.0.1", + "glob": "5.0.15", + "glob-parent": "3.1.0", + "micromatch": "2.3.11", + "ordered-read-streams": "0.3.0", + "through2": "0.6.5", + "to-absolute-glob": "0.1.1", + "unique-stream": "2.2.1" + }, + "dependencies": { + "readable-stream": { + "version": "1.0.34", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", + "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", + "dev": true, + "requires": { + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "0.0.1", + "string_decoder": "0.10.31" + } + }, + "through2": { + "version": "0.6.5", + "resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz", + "integrity": "sha1-QaucZ7KdVyCQcUEOHXp6lozTrUg=", + "dev": true, + "requires": { + "readable-stream": "1.0.34", + "xtend": "4.0.1" + } + } + } + }, + "graceful-fs": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", + "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=", + "dev": true + }, + "gulp-sourcemaps": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/gulp-sourcemaps/-/gulp-sourcemaps-1.6.0.tgz", + "integrity": "sha1-uG/zSdgBzrVuHZ59x7vLS33uYAw=", + "dev": true, + "requires": { + "convert-source-map": "1.5.0", + "graceful-fs": "4.1.11", + "strip-bom": "2.0.0", + "through2": "2.0.3", + "vinyl": "1.2.0" + } + }, + "is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", + "dev": true + }, + "is-glob": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", + "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", + "dev": true, + "requires": { + "is-extglob": "2.1.1" + } + }, + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", + "dev": true + }, + "json-stable-stringify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz", + "integrity": "sha1-mnWdOcXy/1A/1TAGRu1EX4jE+a8=", + "dev": true, + "requires": { + "jsonify": "0.0.0" + } + }, + "ordered-read-streams": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/ordered-read-streams/-/ordered-read-streams-0.3.0.tgz", + "integrity": "sha1-cTfmmzKYuzQiR6G77jiByA4v14s=", + "dev": true, + "requires": { + "is-stream": "1.1.0", + "readable-stream": "2.3.3" + } + }, + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", + "dev": true + }, + "strip-bom": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", + "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", + "dev": true, + "requires": { + "is-utf8": "0.2.1" + } + }, + "unique-stream": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/unique-stream/-/unique-stream-2.2.1.tgz", + "integrity": "sha1-WqADz76Uxf+GbE59ZouxxNuts2k=", + "dev": true, + "requires": { + "json-stable-stringify": "1.0.1", + "through2-filter": "2.0.0" + } + }, + "vinyl": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-1.2.0.tgz", + "integrity": "sha1-XIgDbPVl5d8FVYv8kR+GVt8hiIQ=", + "dev": true, + "requires": { + "clone": "1.0.2", + "clone-stats": "0.0.1", + "replace-ext": "0.0.1" + } + }, + "vinyl-fs": { + "version": "2.4.4", + "resolved": "https://registry.npmjs.org/vinyl-fs/-/vinyl-fs-2.4.4.tgz", + "integrity": "sha1-vm/zJwy1Xf19MGNkDegfJddTIjk=", + "dev": true, + "requires": { + "duplexify": "3.5.1", + "glob-stream": "5.3.5", + "graceful-fs": "4.1.11", + "gulp-sourcemaps": "1.6.0", + "is-valid-glob": "0.3.0", + "lazystream": "1.0.0", + "lodash.isequal": "4.5.0", + "merge-stream": "1.0.1", + "mkdirp": "0.5.1", + "object-assign": "4.1.1", + "readable-stream": "2.3.3", + "strip-bom": "2.0.0", + "strip-bom-stream": "1.0.0", + "through2": "2.0.3", + "through2-filter": "2.0.0", + "vali-date": "1.0.0", + "vinyl": "1.2.0" + } + } + } + }, + "gulp-util": { + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/gulp-util/-/gulp-util-3.0.8.tgz", + "integrity": "sha1-AFTh50RQLifATBh8PsxQXdVLu08=", + "dev": true, + "requires": { + "array-differ": "1.0.0", + "array-uniq": "1.0.3", + "beeper": "1.1.1", + "chalk": "1.1.3", + "dateformat": "2.2.0", + "fancy-log": "1.3.0", + "gulplog": "1.0.0", + "has-gulplog": "0.1.0", + "lodash._reescape": "3.0.0", + "lodash._reevaluate": "3.0.0", + "lodash._reinterpolate": "3.0.0", + "lodash.template": "3.6.2", + "minimist": "1.2.0", + "multipipe": "0.1.2", + "object-assign": "3.0.0", + "replace-ext": "0.0.1", + "through2": "2.0.3", + "vinyl": "0.5.3" + }, + "dependencies": { + "object-assign": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-3.0.0.tgz", + "integrity": "sha1-m+3VygiXlJvKR+f/QIBi1Un1h/I=", + "dev": true + } + } + }, + "gulplog": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/gulplog/-/gulplog-1.0.0.tgz", + "integrity": "sha1-4oxNRdBey77YGDY86PnFkmIp/+U=", + "dev": true, + "requires": { + "glogg": "1.0.0" + } + }, + "handlebars": { + "version": "4.0.10", + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.0.10.tgz", + "integrity": "sha1-PTDHGLCaPZbyPqTMH0A8TTup/08=", + "dev": true, + "requires": { + "async": "1.5.2", + "optimist": "0.6.1", + "source-map": "0.4.4", + "uglify-js": "2.8.29" + }, + "dependencies": { + "source-map": { + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz", + "integrity": "sha1-66T12pwNyZneaAMti092FzZSA2s=", + "dev": true, + "requires": { + "amdefine": "1.0.1" + } + } + } + }, + "has": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.1.tgz", + "integrity": "sha1-hGFzP1OLCDfJNh45qauelwTcLyg=", + "dev": true, + "requires": { + "function-bind": "1.1.1" + } + }, + "has-ansi": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", + "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", + "dev": true, + "requires": { + "ansi-regex": "2.1.1" + } + }, + "has-color": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/has-color/-/has-color-0.1.7.tgz", + "integrity": "sha1-ZxRKUmDDT8PMpnfQQdr1L+e3iy8=", + "dev": true + }, + "has-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", + "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=", + "dev": true + }, + "has-gulplog": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/has-gulplog/-/has-gulplog-0.1.0.tgz", + "integrity": "sha1-ZBTIKRNpfaUVkDl9r7EvIpZ4Ec4=", + "dev": true, + "requires": { + "sparkles": "1.0.0" + } + }, + "hash-base": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-2.0.2.tgz", + "integrity": "sha1-ZuodhW206KVHDK32/OI65SRO8uE=", + "dev": true, + "requires": { + "inherits": "2.0.3" + } + }, + "hash.js": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.3.tgz", + "integrity": "sha512-/UETyP0W22QILqS+6HowevwhEFJ3MBJnwTf75Qob9Wz9t0DPuisL8kW8YZMK62dHAKE1c1p+gY1TtOLY+USEHA==", + "dev": true, + "requires": { + "inherits": "2.0.3", + "minimalistic-assert": "1.0.0" + } + }, + "he": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/he/-/he-1.1.1.tgz", + "integrity": "sha1-k0EP0hsAlzUVH4howvJx80J+I/0=", + "dev": true + }, + "hmac-drbg": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", + "integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=", + "dev": true, + "requires": { + "hash.js": "1.1.3", + "minimalistic-assert": "1.0.0", + "minimalistic-crypto-utils": "1.0.1" + } + }, + "homedir-polyfill": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/homedir-polyfill/-/homedir-polyfill-1.0.1.tgz", + "integrity": "sha1-TCu8inWJmP7r9e1oWA921GdotLw=", + "dev": true, + "requires": { + "parse-passwd": "1.0.0" + } + }, + "hosted-git-info": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.5.0.tgz", + "integrity": "sha512-pNgbURSuab90KbTqvRPsseaTxOJCZBD0a7t+haSN33piP9cCM4l0CqdzAif2hUqm716UovKB2ROmiabGAKVXyg==", + "dev": true + }, + "htmlescape": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/htmlescape/-/htmlescape-1.1.1.tgz", + "integrity": "sha1-OgPtwiFLyjtmQko+eVk0lQnLA1E=", + "dev": true + }, + "https-browserify": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/https-browserify/-/https-browserify-1.0.0.tgz", + "integrity": "sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM=", + "dev": true + }, + "ieee754": { + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.8.tgz", + "integrity": "sha1-vjPUCsEO8ZJnAfbwii2G+/0a0+Q=", + "dev": true + }, + "indent-string": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-2.1.0.tgz", + "integrity": "sha1-ji1INIdCEhtKghi3oTfppSBJ3IA=", + "dev": true, + "requires": { + "repeating": "2.0.1" + } + }, + "indexof": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/indexof/-/indexof-0.0.1.tgz", + "integrity": "sha1-gtwzbSMrkGIXnQWrMpOmYFn9Q10=", + "dev": true + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "dev": true, + "requires": { + "once": "1.4.0", + "wrappy": "1.0.2" + } + }, + "inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", + "dev": true + }, + "ini": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.4.tgz", + "integrity": "sha1-BTfLedr1m1mhpRff9wbIbsA5Fi4=", + "dev": true + }, + "inline-source-map": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/inline-source-map/-/inline-source-map-0.6.2.tgz", + "integrity": "sha1-+Tk0ccGKedFyT4Y/o4tYY3Ct4qU=", + "dev": true, + "requires": { + "source-map": "0.5.7" + } + }, + "insert-module-globals": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/insert-module-globals/-/insert-module-globals-7.0.1.tgz", + "integrity": "sha1-wDv04BywhtW15azorQr+eInWOMM=", + "dev": true, + "requires": { + "JSONStream": "1.3.1", + "combine-source-map": "0.7.2", + "concat-stream": "1.5.2", + "is-buffer": "1.1.5", + "lexical-scope": "1.2.0", + "process": "0.11.10", + "through2": "2.0.3", + "xtend": "4.0.1" + } + }, + "interpret": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.0.4.tgz", + "integrity": "sha1-ggzdWIuGj/sZGoCVBtbJyPISsbA=", + "dev": true + }, + "is-absolute": { + "version": "0.2.6", + "resolved": "https://registry.npmjs.org/is-absolute/-/is-absolute-0.2.6.tgz", + "integrity": "sha1-IN5p89uULvLYe5wto28XIjWxtes=", + "dev": true, + "requires": { + "is-relative": "0.2.1", + "is-windows": "0.2.0" + } + }, + "is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", + "dev": true + }, + "is-buffer": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.5.tgz", + "integrity": "sha1-Hzsm72E7IUuIy8ojzGwB2Hlh7sw=", + "dev": true + }, + "is-builtin-module": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-1.0.0.tgz", + "integrity": "sha1-VAVy0096wxGfj3bDDLwbHgN6/74=", + "dev": true, + "requires": { + "builtin-modules": "1.1.1" + } + }, + "is-dotfile": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/is-dotfile/-/is-dotfile-1.0.3.tgz", + "integrity": "sha1-pqLzL/0t+wT1yiXs0Pa4PPeYoeE=", + "dev": true + }, + "is-equal-shallow": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz", + "integrity": "sha1-IjgJj8Ih3gvPpdnqxMRdY4qhxTQ=", + "dev": true, + "requires": { + "is-primitive": "2.0.0" + } + }, + "is-extendable": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", + "dev": true + }, + "is-extglob": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", + "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=", + "dev": true + }, + "is-finite": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.0.2.tgz", + "integrity": "sha1-zGZ3aVYCvlUO8R6LSqYwU0K20Ko=", + "dev": true, + "requires": { + "number-is-nan": "1.0.1" + } + }, + "is-glob": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", + "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", + "dev": true, + "requires": { + "is-extglob": "1.0.0" + } + }, + "is-number": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-2.1.0.tgz", + "integrity": "sha1-Afy7s5NGOlSPL0ZszhbezknbkI8=", + "dev": true, + "requires": { + "kind-of": "3.2.2" + } + }, + "is-path-cwd": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-1.0.0.tgz", + "integrity": "sha1-0iXsIxMuie3Tj9p2dHLmLmXxEG0=", + "dev": true + }, + "is-path-in-cwd": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-path-in-cwd/-/is-path-in-cwd-1.0.0.tgz", + "integrity": "sha1-ZHdYK4IU1gI0YJRWcAO+ip6sBNw=", + "dev": true, + "requires": { + "is-path-inside": "1.0.0" + } + }, + "is-path-inside": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-1.0.0.tgz", + "integrity": "sha1-/AbloWg/vaE95mev9xe7wQpI838=", + "dev": true, + "requires": { + "path-is-inside": "1.0.2" + } + }, + "is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dev": true, + "requires": { + "isobject": "3.0.1" + }, + "dependencies": { + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true + } + } + }, + "is-posix-bracket": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz", + "integrity": "sha1-MzTceXdDaOkvAW5vvAqI9c1ua8Q=", + "dev": true + }, + "is-primitive": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-primitive/-/is-primitive-2.0.0.tgz", + "integrity": "sha1-IHurkWOEmcB7Kt8kCkGochADRXU=", + "dev": true + }, + "is-promise": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.1.0.tgz", + "integrity": "sha1-eaKp7OfwlugPNtKy87wWwf9L8/o=", + "dev": true + }, + "is-relative": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-relative/-/is-relative-0.2.1.tgz", + "integrity": "sha1-0n9MfVFtF1+2ENuEu+7yPDvJeqU=", + "dev": true, + "requires": { + "is-unc-path": "0.1.2" + } + }, + "is-stream": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", + "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", + "dev": true + }, + "is-unc-path": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/is-unc-path/-/is-unc-path-0.1.2.tgz", + "integrity": "sha1-arBTpyVzwQJQ/0FqOBTDUXivObk=", + "dev": true, + "requires": { + "unc-path-regex": "0.1.2" + } + }, + "is-utf8": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", + "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=", + "dev": true + }, + "is-valid-glob": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/is-valid-glob/-/is-valid-glob-0.3.0.tgz", + "integrity": "sha1-1LVcafUYhvm2XHDWwmItN+KfSP4=", + "dev": true + }, + "is-windows": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-0.2.0.tgz", + "integrity": "sha1-3hqm1j6indJIc3tp8f+LgALSEIw=", + "dev": true + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + }, + "isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", + "dev": true + }, + "isobject": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", + "dev": true, + "requires": { + "isarray": "1.0.0" + } + }, + "istanbul": { + "version": "0.4.5", + "resolved": "https://registry.npmjs.org/istanbul/-/istanbul-0.4.5.tgz", + "integrity": "sha1-ZcfXPUxNqE1POsMQuRj7C4Azczs=", + "dev": true, + "requires": { + "abbrev": "1.0.9", + "async": "1.5.2", + "escodegen": "1.8.1", + "esprima": "2.7.3", + "glob": "5.0.15", + "handlebars": "4.0.10", + "js-yaml": "3.10.0", + "mkdirp": "0.5.1", + "nopt": "3.0.6", + "once": "1.4.0", + "resolve": "1.1.7", + "supports-color": "3.2.3", + "which": "1.3.0", + "wordwrap": "1.0.0" + }, + "dependencies": { + "glob": { + "version": "5.0.15", + "resolved": "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz", + "integrity": "sha1-G8k2ueAvSmA/zCIuz3Yz0wuLk7E=", + "dev": true, + "requires": { + "inflight": "1.0.6", + "inherits": "2.0.3", + "minimatch": "3.0.4", + "once": "1.4.0", + "path-is-absolute": "1.0.1" + } + }, + "supports-color": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", + "integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=", + "dev": true, + "requires": { + "has-flag": "1.0.0" + } + } + } + }, + "jake": { + "version": "8.0.15", + "resolved": "https://registry.npmjs.org/jake/-/jake-8.0.15.tgz", + "integrity": "sha1-8Np9WOeQrBqPhubuDxk+XZIw6rs=", + "dev": true, + "requires": { + "async": "0.9.2", + "chalk": "0.4.0", + "filelist": "0.0.6", + "minimatch": "3.0.4", + "utilities": "1.0.5" + }, + "dependencies": { + "ansi-styles": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-1.0.0.tgz", + "integrity": "sha1-yxAt8cVvUSPquLZ817mAJ6AnkXg=", + "dev": true + }, + "async": { + "version": "0.9.2", + "resolved": "https://registry.npmjs.org/async/-/async-0.9.2.tgz", + "integrity": "sha1-rqdNXmHB+JlhO/ZL2mbUx48v0X0=", + "dev": true + }, + "chalk": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-0.4.0.tgz", + "integrity": "sha1-UZmj3c0MHv4jvAjBsCewYXbgxk8=", + "dev": true, + "requires": { + "ansi-styles": "1.0.0", + "has-color": "0.1.7", + "strip-ansi": "0.1.1" + } + }, + "strip-ansi": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-0.1.1.tgz", + "integrity": "sha1-OeipjQRNFQZgq+SmgIrPcLt7yZE=", + "dev": true + } + } + }, + "js-tokens": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz", + "integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls=", + "dev": true + }, + "js-yaml": { + "version": "3.10.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.10.0.tgz", + "integrity": "sha512-O2v52ffjLa9VeM43J4XocZE//WT9N0IiwDa3KSHH7Tu8CtH+1qM8SIZvnsTh6v+4yFy5KUY3BHUVwjpfAWsjIA==", + "dev": true, + "requires": { + "argparse": "1.0.9", + "esprima": "4.0.0" + }, + "dependencies": { + "esprima": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.0.tgz", + "integrity": "sha512-oftTcaMu/EGrEIu904mWteKIv8vMuOgGYo7EhVJJN00R/EED9DCua/xxHRdYnKtcECzVg7xOWhflvJMnqcFZjw==", + "dev": true + } + } + }, + "json-stable-stringify": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-0.0.1.tgz", + "integrity": "sha1-YRwj6BTbN1Un34URk9tZ3Sryf0U=", + "dev": true, + "requires": { + "jsonify": "0.0.0" + } + }, + "jsonify": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz", + "integrity": "sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM=", + "dev": true + }, + "jsonparse": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz", + "integrity": "sha1-P02uSpH6wxX3EGL4UhzCOfE2YoA=", + "dev": true + }, + "kew": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/kew/-/kew-0.7.0.tgz", + "integrity": "sha1-edk9LTM2PW/dKXCzNdkUGtWR15s=", + "dev": true + }, + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "1.1.5" + } + }, + "labeled-stream-splicer": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/labeled-stream-splicer/-/labeled-stream-splicer-2.0.0.tgz", + "integrity": "sha1-pS4dE4AkwAuGscDJH2d5GLiuClk=", + "dev": true, + "requires": { + "inherits": "2.0.3", + "isarray": "0.0.1", + "stream-splicer": "2.0.0" + }, + "dependencies": { + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", + "dev": true + } + } + }, + "lazy-cache": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz", + "integrity": "sha1-odePw6UEdMuAhF07O24dpJpEbo4=", + "dev": true, + "optional": true + }, + "lazystream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/lazystream/-/lazystream-1.0.0.tgz", + "integrity": "sha1-9plf4PggOS9hOWvolGJAe7dxaOQ=", + "dev": true, + "requires": { + "readable-stream": "2.3.3" + } + }, + "levn": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", + "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", + "dev": true, + "requires": { + "prelude-ls": "1.1.2", + "type-check": "0.3.2" + } + }, + "lexical-scope": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/lexical-scope/-/lexical-scope-1.2.0.tgz", + "integrity": "sha1-/Ope3HBKSzqHls3KQZw6CvryLfQ=", + "dev": true, + "requires": { + "astw": "2.2.0" + } + }, + "liftoff": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/liftoff/-/liftoff-2.3.0.tgz", + "integrity": "sha1-qY8v9nGD2Lp8+soQVIvX/wVQs4U=", + "dev": true, + "requires": { + "extend": "3.0.1", + "findup-sync": "0.4.3", + "fined": "1.1.0", + "flagged-respawn": "0.3.2", + "lodash.isplainobject": "4.0.6", + "lodash.isstring": "4.0.1", + "lodash.mapvalues": "4.6.0", + "rechoir": "0.6.2", + "resolve": "1.1.7" + } + }, + "load-json-file": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", + "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", + "dev": true, + "requires": { + "graceful-fs": "4.1.11", + "parse-json": "2.2.0", + "pify": "2.3.0", + "pinkie-promise": "2.0.1", + "strip-bom": "2.0.0" + }, + "dependencies": { + "graceful-fs": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", + "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=", + "dev": true + }, + "pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "dev": true + }, + "strip-bom": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", + "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", + "dev": true, + "requires": { + "is-utf8": "0.2.1" + } + } + } + }, + "lodash": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-1.0.2.tgz", + "integrity": "sha1-j1dWDIO1n8JwvT1WG2kAQ0MOJVE=", + "dev": true + }, + "lodash._basecopy": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/lodash._basecopy/-/lodash._basecopy-3.0.1.tgz", + "integrity": "sha1-jaDmqHbPNEwK2KVIghEd08XHyjY=", + "dev": true + }, + "lodash._basetostring": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/lodash._basetostring/-/lodash._basetostring-3.0.1.tgz", + "integrity": "sha1-0YYdh3+CSlL2aYMtyvPuFVZqB9U=", + "dev": true + }, + "lodash._basevalues": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/lodash._basevalues/-/lodash._basevalues-3.0.0.tgz", + "integrity": "sha1-W3dXYoAr3j0yl1A+JjAIIP32Ybc=", + "dev": true + }, + "lodash._escapehtmlchar": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/lodash._escapehtmlchar/-/lodash._escapehtmlchar-2.4.1.tgz", + "integrity": "sha1-32fDu2t+jh6DGrSL+geVuSr+iZ0=", + "dev": true, + "requires": { + "lodash._htmlescapes": "2.4.1" + } + }, + "lodash._escapestringchar": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/lodash._escapestringchar/-/lodash._escapestringchar-2.4.1.tgz", + "integrity": "sha1-7P4iYYoq3lC/7qQ5N+Ud9m8O23I=", + "dev": true + }, + "lodash._getnative": { + "version": "3.9.1", + "resolved": "https://registry.npmjs.org/lodash._getnative/-/lodash._getnative-3.9.1.tgz", + "integrity": "sha1-VwvH3t5G1hzc3mh9ZdPuy6o6r/U=", + "dev": true + }, + "lodash._htmlescapes": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/lodash._htmlescapes/-/lodash._htmlescapes-2.4.1.tgz", + "integrity": "sha1-MtFL8IRLbeb4tioFG09nwii2JMs=", + "dev": true + }, + "lodash._isiterateecall": { + "version": "3.0.9", + "resolved": "https://registry.npmjs.org/lodash._isiterateecall/-/lodash._isiterateecall-3.0.9.tgz", + "integrity": "sha1-UgOte6Ql+uhCRg5pbbnPPmqsBXw=", + "dev": true + }, + "lodash._isnative": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/lodash._isnative/-/lodash._isnative-2.4.1.tgz", + "integrity": "sha1-PqZAS3hKe+g2x7V1gOHN95sUgyw=", + "dev": true + }, + "lodash._objecttypes": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/lodash._objecttypes/-/lodash._objecttypes-2.4.1.tgz", + "integrity": "sha1-fAt/admKH3ZSn4kLDNsbTf7BHBE=", + "dev": true + }, + "lodash._reescape": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/lodash._reescape/-/lodash._reescape-3.0.0.tgz", + "integrity": "sha1-Kx1vXf4HyKNVdT5fJ/rH8c3hYWo=", + "dev": true + }, + "lodash._reevaluate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/lodash._reevaluate/-/lodash._reevaluate-3.0.0.tgz", + "integrity": "sha1-WLx0xAZklTrgsSTYBpltrKQx4u0=", + "dev": true + }, + "lodash._reinterpolate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz", + "integrity": "sha1-DM8tiRZq8Ds2Y8eWU4t1rG4RTZ0=", + "dev": true + }, + "lodash._reunescapedhtml": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/lodash._reunescapedhtml/-/lodash._reunescapedhtml-2.4.1.tgz", + "integrity": "sha1-dHxPxAED6zu4oJduVx96JlnpO6c=", + "dev": true, + "requires": { + "lodash._htmlescapes": "2.4.1", + "lodash.keys": "2.4.1" + }, + "dependencies": { + "lodash.keys": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/lodash.keys/-/lodash.keys-2.4.1.tgz", + "integrity": "sha1-SN6kbfj/djKxDXBrissmWR4rNyc=", + "dev": true, + "requires": { + "lodash._isnative": "2.4.1", + "lodash._shimkeys": "2.4.1", + "lodash.isobject": "2.4.1" + } + } + } + }, + "lodash._root": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/lodash._root/-/lodash._root-3.0.1.tgz", + "integrity": "sha1-+6HEUkwZ7ppfgTa0YJ8BfPTe1pI=", + "dev": true + }, + "lodash._shimkeys": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/lodash._shimkeys/-/lodash._shimkeys-2.4.1.tgz", + "integrity": "sha1-bpzJZm/wgfC1psl4uD4kLmlJ0gM=", + "dev": true, + "requires": { + "lodash._objecttypes": "2.4.1" + } + }, + "lodash.defaults": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/lodash.defaults/-/lodash.defaults-2.4.1.tgz", + "integrity": "sha1-p+iIXwXmiFEUS24SqPNngCa8TFQ=", + "dev": true, + "requires": { + "lodash._objecttypes": "2.4.1", + "lodash.keys": "2.4.1" + }, + "dependencies": { + "lodash.keys": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/lodash.keys/-/lodash.keys-2.4.1.tgz", + "integrity": "sha1-SN6kbfj/djKxDXBrissmWR4rNyc=", + "dev": true, + "requires": { + "lodash._isnative": "2.4.1", + "lodash._shimkeys": "2.4.1", + "lodash.isobject": "2.4.1" + } + } + } + }, + "lodash.escape": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/lodash.escape/-/lodash.escape-3.2.0.tgz", + "integrity": "sha1-mV7g3BjBtIzJLv+ucaEKq1tIdpg=", + "dev": true, + "requires": { + "lodash._root": "3.0.1" + } + }, + "lodash.isarguments": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/lodash.isarguments/-/lodash.isarguments-3.1.0.tgz", + "integrity": "sha1-L1c9hcaiQon/AGY7SRwdM4/zRYo=", + "dev": true + }, + "lodash.isarray": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/lodash.isarray/-/lodash.isarray-3.0.4.tgz", + "integrity": "sha1-eeTriMNqgSKvhvhEqpvNhRtfu1U=", + "dev": true + }, + "lodash.isequal": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.isequal/-/lodash.isequal-4.5.0.tgz", + "integrity": "sha1-QVxEePK8wwEgwizhDtMib30+GOA=", + "dev": true + }, + "lodash.isobject": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/lodash.isobject/-/lodash.isobject-2.4.1.tgz", + "integrity": "sha1-Wi5H/mmVPx7mMafrof5k0tBlWPU=", + "dev": true, + "requires": { + "lodash._objecttypes": "2.4.1" + } + }, + "lodash.isplainobject": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz", + "integrity": "sha1-fFJqUtibRcRcxpC4gWO+BJf1UMs=", + "dev": true + }, + "lodash.isstring": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/lodash.isstring/-/lodash.isstring-4.0.1.tgz", + "integrity": "sha1-1SfftUVuynzJu5XV2ur4i6VKVFE=", + "dev": true + }, + "lodash.keys": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/lodash.keys/-/lodash.keys-3.1.2.tgz", + "integrity": "sha1-TbwEcrFWvlCgsoaFXRvQsMZWCYo=", + "dev": true, + "requires": { + "lodash._getnative": "3.9.1", + "lodash.isarguments": "3.1.0", + "lodash.isarray": "3.0.4" + } + }, + "lodash.mapvalues": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/lodash.mapvalues/-/lodash.mapvalues-4.6.0.tgz", + "integrity": "sha1-G6+lAF3p3W9PJmaMMMo3IwzJaJw=", + "dev": true + }, + "lodash.memoize": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-3.0.4.tgz", + "integrity": "sha1-LcvSwofLwKVcxCMovQxzYVDVPj8=", + "dev": true + }, + "lodash.restparam": { + "version": "3.6.1", + "resolved": "https://registry.npmjs.org/lodash.restparam/-/lodash.restparam-3.6.1.tgz", + "integrity": "sha1-k2pOMJ7zMKdkXtQUWYbIWuWyCAU=", + "dev": true + }, + "lodash.template": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/lodash.template/-/lodash.template-3.6.2.tgz", + "integrity": "sha1-+M3sxhaaJVvpCYrosMU9N4kx0U8=", + "dev": true, + "requires": { + "lodash._basecopy": "3.0.1", + "lodash._basetostring": "3.0.1", + "lodash._basevalues": "3.0.0", + "lodash._isiterateecall": "3.0.9", + "lodash._reinterpolate": "3.0.0", + "lodash.escape": "3.2.0", + "lodash.keys": "3.1.2", + "lodash.restparam": "3.6.1", + "lodash.templatesettings": "3.1.1" + } + }, + "lodash.templatesettings": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/lodash.templatesettings/-/lodash.templatesettings-3.1.1.tgz", + "integrity": "sha1-+zB4RHU7Zrnxr6VOJix0UwfbqOU=", + "dev": true, + "requires": { + "lodash._reinterpolate": "3.0.0", + "lodash.escape": "3.2.0" + } + }, + "lodash.values": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/lodash.values/-/lodash.values-2.4.1.tgz", + "integrity": "sha1-q/UUQ2s8twUAFieXjLzzCxKA7qQ=", + "dev": true, + "requires": { + "lodash.keys": "2.4.1" + }, + "dependencies": { + "lodash.keys": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/lodash.keys/-/lodash.keys-2.4.1.tgz", + "integrity": "sha1-SN6kbfj/djKxDXBrissmWR4rNyc=", + "dev": true, + "requires": { + "lodash._isnative": "2.4.1", + "lodash._shimkeys": "2.4.1", + "lodash.isobject": "2.4.1" + } + } + } + }, + "longest": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz", + "integrity": "sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc=", + "dev": true + }, + "loud-rejection": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/loud-rejection/-/loud-rejection-1.6.0.tgz", + "integrity": "sha1-W0b4AUft7leIcPCG0Eghz5mOVR8=", + "dev": true, + "requires": { + "currently-unhandled": "0.4.1", + "signal-exit": "3.0.2" + } + }, + "lru-cache": { + "version": "2.7.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-2.7.3.tgz", + "integrity": "sha1-bUUk6LlV+V1PW1iFHOId1y+06VI=", + "dev": true + }, + "lru-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/lru-queue/-/lru-queue-0.1.0.tgz", + "integrity": "sha1-Jzi9nw089PhEkMVzbEhpmsYyzaM=", + "dev": true, + "requires": { + "es5-ext": "0.10.31" + } + }, + "make-error": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.0.tgz", + "integrity": "sha1-Uq06M5zPEM5itAQLcI/nByRLi5Y=", + "dev": true + }, + "map-cache": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", + "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=", + "dev": true + }, + "map-obj": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz", + "integrity": "sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0=", + "dev": true + }, + "md5.js": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.4.tgz", + "integrity": "sha1-6b296UogpawYsENA/Fdk1bCdkB0=", + "dev": true, + "requires": { + "hash-base": "3.0.4", + "inherits": "2.0.3" + }, + "dependencies": { + "hash-base": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.0.4.tgz", + "integrity": "sha1-X8hoaEfs1zSZQDMZprCj8/auSRg=", + "dev": true, + "requires": { + "inherits": "2.0.3", + "safe-buffer": "5.1.1" + } + } + } + }, + "memoizee": { + "version": "0.4.11", + "resolved": "https://registry.npmjs.org/memoizee/-/memoizee-0.4.11.tgz", + "integrity": "sha1-vemBdmPJ5A/bKk6hw2cpYIeujI8=", + "dev": true, + "requires": { + "d": "1.0.0", + "es5-ext": "0.10.31", + "es6-weak-map": "2.0.2", + "event-emitter": "0.3.5", + "is-promise": "2.1.0", + "lru-queue": "0.1.0", + "next-tick": "1.0.0", + "timers-ext": "0.1.2" + } + }, + "meow": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/meow/-/meow-3.7.0.tgz", + "integrity": "sha1-cstmi0JSKCkKu/qFaJJYcwioAfs=", + "dev": true, + "requires": { + "camelcase-keys": "2.1.0", + "decamelize": "1.2.0", + "loud-rejection": "1.6.0", + "map-obj": "1.0.1", + "minimist": "1.2.0", + "normalize-package-data": "2.4.0", + "object-assign": "4.1.1", + "read-pkg-up": "1.0.1", + "redent": "1.0.0", + "trim-newlines": "1.0.0" + } + }, + "merge-stream": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-1.0.1.tgz", + "integrity": "sha1-QEEgLVCKNCugAXQAjfDCUbjBNeE=", + "dev": true, + "requires": { + "readable-stream": "2.3.3" + } + }, + "merge2": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.2.0.tgz", + "integrity": "sha1-D4ghUdmIsfPQdYlFQE+nPuWSPT8=", + "dev": true + }, + "micromatch": { + "version": "2.3.11", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-2.3.11.tgz", + "integrity": "sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU=", + "dev": true, + "requires": { + "arr-diff": "2.0.0", + "array-unique": "0.2.1", + "braces": "1.8.5", + "expand-brackets": "0.1.5", + "extglob": "0.3.2", + "filename-regex": "2.0.1", + "is-extglob": "1.0.0", + "is-glob": "2.0.1", + "kind-of": "3.2.2", + "normalize-path": "2.1.1", + "object.omit": "2.0.1", + "parse-glob": "3.0.4", + "regex-cache": "0.4.4" + } + }, + "miller-rabin": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/miller-rabin/-/miller-rabin-4.0.1.tgz", + "integrity": "sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA==", + "dev": true, + "requires": { + "bn.js": "4.11.8", + "brorand": "1.1.0" + } + }, + "minimalistic-assert": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.0.tgz", + "integrity": "sha1-cCvi3aazf0g2vLP121ZkG2Sh09M=", + "dev": true + }, + "minimalistic-crypto-utils": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", + "integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=", + "dev": true + }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "dev": true, + "requires": { + "brace-expansion": "1.1.8" + } + }, + "minimist": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "dev": true + }, + "mkdirp": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", + "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", + "dev": true, + "requires": { + "minimist": "0.0.8" + }, + "dependencies": { + "minimist": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", + "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", + "dev": true + } + } + }, + "mocha": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-4.0.1.tgz", + "integrity": "sha512-evDmhkoA+cBNiQQQdSKZa2b9+W2mpLoj50367lhy+Klnx9OV8XlCIhigUnn1gaTFLQCa0kdNhEGDr0hCXOQFDw==", + "dev": true, + "requires": { + "browser-stdout": "1.3.0", + "commander": "2.11.0", + "debug": "3.1.0", + "diff": "3.3.1", + "escape-string-regexp": "1.0.5", + "glob": "7.1.2", + "growl": "1.10.3", + "he": "1.1.1", + "mkdirp": "0.5.1", + "supports-color": "4.4.0" + }, + "dependencies": { + "has-flag": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-2.0.0.tgz", + "integrity": "sha1-6CB68cx7MNRGzHC3NLXovhj4jVE=", + "dev": true + }, + "supports-color": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-4.4.0.tgz", + "integrity": "sha512-rKC3+DyXWgK0ZLKwmRsrkyHVZAjNkfzeehuFWdGGcqGDTZFH73+RH6S/RDAAxl9GusSjZSUWYLmT9N5pzXFOXQ==", + "dev": true, + "requires": { + "has-flag": "2.0.0" + } + } + } + }, + "mocha-fivemat-progress-reporter": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/mocha-fivemat-progress-reporter/-/mocha-fivemat-progress-reporter-0.1.0.tgz", + "integrity": "sha1-zK/w4ckc9Vf+d+B535lUuRt0d1Y=", + "dev": true + }, + "module-deps": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/module-deps/-/module-deps-4.1.1.tgz", + "integrity": "sha1-IyFYM/HaE/1gbMuAh7RIUty4If0=", + "dev": true, + "requires": { + "JSONStream": "1.3.1", + "browser-resolve": "1.11.2", + "cached-path-relative": "1.0.1", + "concat-stream": "1.5.2", + "defined": "1.0.0", + "detective": "4.5.0", + "duplexer2": "0.1.4", + "inherits": "2.0.3", + "parents": "1.0.1", + "readable-stream": "2.3.3", + "resolve": "1.1.7", + "stream-combiner2": "1.1.1", + "subarg": "1.0.0", + "through2": "2.0.3", + "xtend": "4.0.1" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + }, + "multipipe": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/multipipe/-/multipipe-0.1.2.tgz", + "integrity": "sha1-Ko8t33Du1WTf8tV/HhoTfZ8FB4s=", + "dev": true, + "requires": { + "duplexer2": "0.0.2" + }, + "dependencies": { + "duplexer2": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.0.2.tgz", + "integrity": "sha1-xhTc9n4vsUmVqRcR5aYX6KYKMds=", + "dev": true, + "requires": { + "readable-stream": "1.1.14" + } + }, + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", + "dev": true + }, + "readable-stream": { + "version": "1.1.14", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", + "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", + "dev": true, + "requires": { + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "0.0.1", + "string_decoder": "0.10.31" + } + }, + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", + "dev": true + } + } + }, + "natives": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/natives/-/natives-1.1.0.tgz", + "integrity": "sha1-6f+EFBimsux6SV6TmYT3jxY+bjE=", + "dev": true + }, + "next-tick": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.0.0.tgz", + "integrity": "sha1-yobR/ogoFpsBICCOPchCS524NCw=", + "dev": true + }, + "nopt": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz", + "integrity": "sha1-xkZdvwirzU2zWTF/eaxopkayj/k=", + "dev": true, + "requires": { + "abbrev": "1.0.9" + } + }, + "normalize-package-data": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.4.0.tgz", + "integrity": "sha512-9jjUFbTPfEy3R/ad/2oNbKtW9Hgovl5O1FvFWKkKblNXoN/Oou6+9+KKohPK13Yc3/TyunyWhJp6gvRNR/PPAw==", + "dev": true, + "requires": { + "hosted-git-info": "2.5.0", + "is-builtin-module": "1.0.0", + "semver": "4.3.6", + "validate-npm-package-license": "3.0.1" + } + }, + "normalize-path": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", + "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", + "dev": true, + "requires": { + "remove-trailing-separator": "1.1.0" + } + }, + "number-is-nan": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", + "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", + "dev": true + }, + "object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", + "dev": true + }, + "object-keys": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-0.4.0.tgz", + "integrity": "sha1-KKaq50KN0sOpLz2V8hM13SBOAzY=", + "dev": true + }, + "object.defaults": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/object.defaults/-/object.defaults-1.1.0.tgz", + "integrity": "sha1-On+GgzS0B96gbaFtiNXNKeQ1/s8=", + "dev": true, + "requires": { + "array-each": "1.0.1", + "array-slice": "1.0.0", + "for-own": "1.0.0", + "isobject": "3.0.1" + }, + "dependencies": { + "for-own": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/for-own/-/for-own-1.0.0.tgz", + "integrity": "sha1-xjMy9BXO3EsE2/5wz4NklMU8tEs=", + "dev": true, + "requires": { + "for-in": "1.0.2" + } + }, + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true + } + } + }, + "object.omit": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/object.omit/-/object.omit-2.0.1.tgz", + "integrity": "sha1-Gpx0SCnznbuFjHbKNXmuKlTr0fo=", + "dev": true, + "requires": { + "for-own": "0.1.5", + "is-extendable": "0.1.1" + } + }, + "object.pick": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", + "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=", + "dev": true, + "requires": { + "isobject": "3.0.1" + }, + "dependencies": { + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true + } + } + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "dev": true, + "requires": { + "wrappy": "1.0.2" + } + }, + "optimist": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz", + "integrity": "sha1-2j6nRob6IaGaERwybpDrFaAZZoY=", + "dev": true, + "requires": { + "minimist": "0.0.10", + "wordwrap": "0.0.3" + }, + "dependencies": { + "minimist": { + "version": "0.0.10", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.10.tgz", + "integrity": "sha1-3j+YVD2/lggr5IrRoMfNqDYwHc8=", + "dev": true + }, + "wordwrap": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz", + "integrity": "sha1-o9XabNXAvAAI03I0u68b7WMFkQc=", + "dev": true + } + } + }, + "optionator": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.2.tgz", + "integrity": "sha1-NkxeQJ0/TWMB1sC0wFu6UBgK62Q=", + "dev": true, + "requires": { + "deep-is": "0.1.3", + "fast-levenshtein": "2.0.6", + "levn": "0.3.0", + "prelude-ls": "1.1.2", + "type-check": "0.3.2", + "wordwrap": "1.0.0" + } + }, + "orchestrator": { + "version": "0.3.8", + "resolved": "https://registry.npmjs.org/orchestrator/-/orchestrator-0.3.8.tgz", + "integrity": "sha1-FOfp4nZPcxX7rBhOUGx6pt+UrX4=", + "dev": true, + "requires": { + "end-of-stream": "0.1.5", + "sequencify": "0.0.7", + "stream-consume": "0.1.0" + } + }, + "ordered-read-streams": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/ordered-read-streams/-/ordered-read-streams-0.1.0.tgz", + "integrity": "sha1-/VZamvjrRHO6abbtijQ1LLVS8SY=", + "dev": true + }, + "os-browserify": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/os-browserify/-/os-browserify-0.1.2.tgz", + "integrity": "sha1-ScoCk+CxlZCl9d4Qx/JlphfY/lQ=", + "dev": true + }, + "os-homedir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", + "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=", + "dev": true + }, + "p-map": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-1.2.0.tgz", + "integrity": "sha512-r6zKACMNhjPJMTl8KcFH4li//gkrXWfbD6feV8l6doRHlzljFWGJ2AP6iKaCJXyZmAUMOPtvbW7EXkbWO/pLEA==", + "dev": true + }, + "pako": { + "version": "0.2.9", + "resolved": "https://registry.npmjs.org/pako/-/pako-0.2.9.tgz", + "integrity": "sha1-8/dSL073gjSNqBYbrZ7P1Rv4OnU=", + "dev": true + }, + "parents": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parents/-/parents-1.0.1.tgz", + "integrity": "sha1-/t1NK/GTp3dF/nHjcdc8MwfZx1E=", + "dev": true, + "requires": { + "path-platform": "0.11.15" + } + }, + "parse-asn1": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.0.tgz", + "integrity": "sha1-N8T5t+06tlx0gXtfJICTf7+XxxI=", + "dev": true, + "requires": { + "asn1.js": "4.9.1", + "browserify-aes": "1.0.8", + "create-hash": "1.1.3", + "evp_bytestokey": "1.0.3", + "pbkdf2": "3.0.14" + } + }, + "parse-filepath": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parse-filepath/-/parse-filepath-1.0.1.tgz", + "integrity": "sha1-FZ1hVdQ5BNFsEO9piRHaHpGWm3M=", + "dev": true, + "requires": { + "is-absolute": "0.2.6", + "map-cache": "0.2.2", + "path-root": "0.1.1" + } + }, + "parse-glob": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/parse-glob/-/parse-glob-3.0.4.tgz", + "integrity": "sha1-ssN2z7EfNVE7rdFz7wu246OIORw=", + "dev": true, + "requires": { + "glob-base": "0.3.0", + "is-dotfile": "1.0.3", + "is-extglob": "1.0.0", + "is-glob": "2.0.1" + } + }, + "parse-json": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", + "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", + "dev": true, + "requires": { + "error-ex": "1.3.1" + } + }, + "parse-passwd": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/parse-passwd/-/parse-passwd-1.0.0.tgz", + "integrity": "sha1-bVuTSkVpk7I9N/QKOC1vFmao5cY=", + "dev": true + }, + "path-browserify": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-0.0.0.tgz", + "integrity": "sha1-oLhwcpquIUAFt9UDLsLLuw+0RRo=", + "dev": true + }, + "path-dirname": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/path-dirname/-/path-dirname-1.0.2.tgz", + "integrity": "sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA=", + "dev": true + }, + "path-exists": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", + "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", + "dev": true, + "requires": { + "pinkie-promise": "2.0.1" + } + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "dev": true + }, + "path-is-inside": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz", + "integrity": "sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM=", + "dev": true + }, + "path-parse": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.5.tgz", + "integrity": "sha1-PBrfhx6pzWyUMbbqK9dKD/BVxME=", + "dev": true + }, + "path-platform": { + "version": "0.11.15", + "resolved": "https://registry.npmjs.org/path-platform/-/path-platform-0.11.15.tgz", + "integrity": "sha1-6GQhf3TDaFDwhSt43Hv31KVyG/I=", + "dev": true + }, + "path-root": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/path-root/-/path-root-0.1.1.tgz", + "integrity": "sha1-mkpoFMrBwM1zNgqV8yCDyOpHRbc=", + "dev": true, + "requires": { + "path-root-regex": "0.1.2" + } + }, + "path-root-regex": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/path-root-regex/-/path-root-regex-0.1.2.tgz", + "integrity": "sha1-v8zcjfWxLcUsi0PsONGNcsBLqW0=", + "dev": true + }, + "path-type": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", + "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=", + "dev": true, + "requires": { + "graceful-fs": "4.1.11", + "pify": "2.3.0", + "pinkie-promise": "2.0.1" + }, + "dependencies": { + "graceful-fs": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", + "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=", + "dev": true + }, + "pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "dev": true + } + } + }, + "pathval": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.0.tgz", + "integrity": "sha1-uULm1L3mUwBe9rcTYd74cn0GReA=", + "dev": true + }, + "pbkdf2": { + "version": "3.0.14", + "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.0.14.tgz", + "integrity": "sha512-gjsZW9O34fm0R7PaLHRJmLLVfSoesxztjPjE9o6R+qtVJij90ltg1joIovN9GKrRW3t1PzhDDG3UMEMFfZ+1wA==", + "dev": true, + "requires": { + "create-hash": "1.1.3", + "create-hmac": "1.1.6", + "ripemd160": "2.0.1", + "safe-buffer": "5.1.1", + "sha.js": "2.4.9" + } + }, + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true + }, + "pinkie": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", + "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=", + "dev": true + }, + "pinkie-promise": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", + "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", + "dev": true, + "requires": { + "pinkie": "2.0.4" + } + }, + "prelude-ls": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", + "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", + "dev": true + }, + "preserve": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/preserve/-/preserve-0.2.0.tgz", + "integrity": "sha1-gV7R9uvGWSb4ZbMQwHE7yzMVzks=", + "dev": true + }, + "pretty-hrtime": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/pretty-hrtime/-/pretty-hrtime-1.0.3.tgz", + "integrity": "sha1-t+PqQkNaTJsnWdmeDyAesZWALuE=", + "dev": true + }, + "process": { + "version": "0.11.10", + "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", + "integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI=", + "dev": true + }, + "process-nextick-args": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", + "integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M=", + "dev": true + }, + "public-encrypt": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.0.tgz", + "integrity": "sha1-OfaZ86RlYN1eusvKaTyvfGXBjMY=", + "dev": true, + "requires": { + "bn.js": "4.11.8", + "browserify-rsa": "4.0.1", + "create-hash": "1.1.3", + "parse-asn1": "5.1.0", + "randombytes": "2.0.5" + } + }, + "punycode": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", + "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", + "dev": true + }, + "q": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/q/-/q-1.5.0.tgz", + "integrity": "sha1-3QG6ydBtMObyGa7LglPunr3DCPE=", + "dev": true + }, + "querystring": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", + "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=", + "dev": true + }, + "querystring-es3": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/querystring-es3/-/querystring-es3-0.2.1.tgz", + "integrity": "sha1-nsYfeQSYdXB9aUFFlv2Qek1xHnM=", + "dev": true + }, + "randomatic": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/randomatic/-/randomatic-1.1.7.tgz", + "integrity": "sha512-D5JUjPyJbaJDkuAazpVnSfVkLlpeO3wDlPROTMLGKG1zMFNFRgrciKo1ltz/AzNTkqE0HzDx655QOL51N06how==", + "dev": true, + "requires": { + "is-number": "3.0.0", + "kind-of": "4.0.0" + }, + "dependencies": { + "is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "dev": true, + "requires": { + "kind-of": "3.2.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "1.1.5" + } + } + } + }, + "kind-of": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", + "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", + "dev": true, + "requires": { + "is-buffer": "1.1.5" + } + } + } + }, + "randombytes": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.0.5.tgz", + "integrity": "sha512-8T7Zn1AhMsQ/HI1SjcCfT/t4ii3eAqco3yOcSzS4mozsOz69lHLsoMXmF9nZgnFanYscnSlUSgs8uZyKzpE6kg==", + "dev": true, + "requires": { + "safe-buffer": "5.1.1" + } + }, + "read-only-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/read-only-stream/-/read-only-stream-2.0.0.tgz", + "integrity": "sha1-JyT9aoET1zdkrCiNQ4YnDB2/F/A=", + "dev": true, + "requires": { + "readable-stream": "2.3.3" + } + }, + "read-pkg": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", + "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=", + "dev": true, + "requires": { + "load-json-file": "1.1.0", + "normalize-package-data": "2.4.0", + "path-type": "1.1.0" + } + }, + "read-pkg-up": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz", + "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=", + "dev": true, + "requires": { + "find-up": "1.1.2", + "read-pkg": "1.1.0" + } + }, + "readable-stream": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.3.tgz", + "integrity": "sha512-m+qzzcn7KUxEmd1gMbchF+Y2eIUbieUaxkWtptyHywrX0rE8QEYqPC07Vuy4Wm32/xE16NcdBctb8S0Xe/5IeQ==", + "dev": true, + "requires": { + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "1.0.0", + "process-nextick-args": "1.0.7", + "safe-buffer": "5.1.1", + "string_decoder": "1.0.3", + "util-deprecate": "1.0.2" + } + }, + "rechoir": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", + "integrity": "sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q=", + "dev": true, + "requires": { + "resolve": "1.1.7" + } + }, + "redent": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/redent/-/redent-1.0.0.tgz", + "integrity": "sha1-z5Fqsf1fHxbfsggi3W7H9zDCr94=", + "dev": true, + "requires": { + "indent-string": "2.1.0", + "strip-indent": "1.0.1" + } + }, + "regex-cache": { + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/regex-cache/-/regex-cache-0.4.4.tgz", + "integrity": "sha512-nVIZwtCjkC9YgvWkpM55B5rBhBYRZhAaJbgcFYXXsHnbZ9UZI9nnVWYZpBlCqv9ho2eZryPnWrZGsOdPwVWXWQ==", + "dev": true, + "requires": { + "is-equal-shallow": "0.1.3" + } + }, + "remove-trailing-separator": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", + "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=", + "dev": true + }, + "repeat-element": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.2.tgz", + "integrity": "sha1-7wiaF40Ug7quTZPrmLT55OEdmQo=", + "dev": true + }, + "repeat-string": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", + "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=", + "dev": true + }, + "repeating": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/repeating/-/repeating-2.0.1.tgz", + "integrity": "sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo=", + "dev": true, + "requires": { + "is-finite": "1.0.2" + } + }, + "replace-ext": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-0.0.1.tgz", + "integrity": "sha1-KbvZIHinOfC8zitO5B6DeVNSKSQ=", + "dev": true + }, + "resolve": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.1.7.tgz", + "integrity": "sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs=", + "dev": true + }, + "resolve-dir": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/resolve-dir/-/resolve-dir-0.1.1.tgz", + "integrity": "sha1-shklmlYC+sXFxJatiUpujMQwJh4=", + "dev": true, + "requires": { + "expand-tilde": "1.2.2", + "global-modules": "0.2.3" + } + }, + "resolve-url": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", + "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=", + "dev": true + }, + "right-align": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/right-align/-/right-align-0.1.3.tgz", + "integrity": "sha1-YTObci/mo1FWiSENJOFMlhSGE+8=", + "dev": true, + "optional": true, + "requires": { + "align-text": "0.1.4" + } + }, + "rimraf": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz", + "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", + "dev": true, + "requires": { + "glob": "7.1.2" + } + }, + "ripemd160": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.1.tgz", + "integrity": "sha1-D0WEKVxTo2KK9+bXmsohzlfRxuc=", + "dev": true, + "requires": { + "hash-base": "2.0.2", + "inherits": "2.0.3" + } + }, + "run-sequence": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/run-sequence/-/run-sequence-2.2.0.tgz", + "integrity": "sha512-xW5DmUwdvoyYQUMPKN8UW7TZSFs7AxtT59xo1m5y91jHbvwGlGgOmdV1Yw5P68fkjf3aHUZ4G1o1mZCtNe0qtw==", + "dev": true, + "requires": { + "chalk": "1.1.3", + "gulp-util": "3.0.8" + } + }, + "safe-buffer": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", + "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==", + "dev": true + }, + "sander": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/sander/-/sander-0.5.1.tgz", + "integrity": "sha1-dB4kXiMfB8r7b98PEzrfohalAq0=", + "dev": true, + "requires": { + "es6-promise": "3.3.1", + "graceful-fs": "4.1.11", + "mkdirp": "0.5.1", + "rimraf": "2.6.2" + }, + "dependencies": { + "graceful-fs": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", + "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=", + "dev": true + } + } + }, + "sax": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", + "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==", + "dev": true + }, + "semver": { + "version": "4.3.6", + "resolved": "https://registry.npmjs.org/semver/-/semver-4.3.6.tgz", + "integrity": "sha1-MAvG4OhjdPe6YQaLWx7NV/xlMto=", + "dev": true + }, + "sequencify": { + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/sequencify/-/sequencify-0.0.7.tgz", + "integrity": "sha1-kM/xnQLgcCf9dn9erT57ldHnOAw=", + "dev": true + }, + "sha.js": { + "version": "2.4.9", + "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.9.tgz", + "integrity": "sha512-G8zektVqbiPHrylgew9Zg1VRB1L/DtXNUVAM6q4QLy8NE3qtHlFXTf8VLL4k1Yl6c7NMjtZUTdXV+X44nFaT6A==", + "dev": true, + "requires": { + "inherits": "2.0.3", + "safe-buffer": "5.1.1" + } + }, + "shasum": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/shasum/-/shasum-1.0.2.tgz", + "integrity": "sha1-5wEjENj0F/TetXEhUOVni4euVl8=", + "dev": true, + "requires": { + "json-stable-stringify": "0.0.1", + "sha.js": "2.4.9" + } + }, + "shell-quote": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.6.1.tgz", + "integrity": "sha1-9HgZSczkAmlxJ0MOo7PFR29IF2c=", + "dev": true, + "requires": { + "array-filter": "0.0.1", + "array-map": "0.0.0", + "array-reduce": "0.0.0", + "jsonify": "0.0.0" + } + }, + "sigmund": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/sigmund/-/sigmund-1.0.1.tgz", + "integrity": "sha1-P/IfGYytIXX587eBhT/ZTQ0ZtZA=", + "dev": true + }, + "signal-exit": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", + "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", + "dev": true + }, + "sorcery": { + "version": "0.10.0", + "resolved": "https://registry.npmjs.org/sorcery/-/sorcery-0.10.0.tgz", + "integrity": "sha1-iukK19fLBfxZ8asMY3hF1cFaUrc=", + "dev": true, + "requires": { + "buffer-crc32": "0.2.13", + "minimist": "1.2.0", + "sander": "0.5.1", + "sourcemap-codec": "1.3.1" + } + }, + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true + }, + "source-map-resolve": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.3.1.tgz", + "integrity": "sha1-YQ9hIqRFuN1RU1oqcbeD38Ekh2E=", + "dev": true, + "requires": { + "atob": "1.1.3", + "resolve-url": "0.2.1", + "source-map-url": "0.3.0", + "urix": "0.1.0" + } + }, + "source-map-support": { + "version": "0.4.18", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.4.18.tgz", + "integrity": "sha512-try0/JqxPLF9nOjvSta7tVondkP5dwgyLDjVoyMDlmjugT2lRZ1OfsrYTkCd2hkDnJTKRbO/Rl3orm8vlsUzbA==", + "dev": true, + "requires": { + "source-map": "0.5.7" + } + }, + "source-map-url": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.3.0.tgz", + "integrity": "sha1-fsrxO1e80J2opAxdJp2zN5nUqvk=", + "dev": true + }, + "sourcemap-codec": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/sourcemap-codec/-/sourcemap-codec-1.3.1.tgz", + "integrity": "sha1-mtb5vb1pGTEBbjCTnbyGhnMyMUY=", + "dev": true, + "requires": { + "vlq": "0.2.3" + } + }, + "sparkles": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/sparkles/-/sparkles-1.0.0.tgz", + "integrity": "sha1-Gsu/tZJDbRC76PeFt8xvgoFQEsM=", + "dev": true + }, + "spdx-correct": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-1.0.2.tgz", + "integrity": "sha1-SzBz2TP/UfORLwOsVRlJikFQ20A=", + "dev": true, + "requires": { + "spdx-license-ids": "1.2.2" + } + }, + "spdx-expression-parse": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-1.0.4.tgz", + "integrity": "sha1-m98vIOH0DtRH++JzJmGR/O1RYmw=", + "dev": true + }, + "spdx-license-ids": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-1.2.2.tgz", + "integrity": "sha1-yd96NCRZSt5r0RkA1ZZpbcBrrFc=", + "dev": true + }, + "sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", + "dev": true + }, + "stream-browserify": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-2.0.1.tgz", + "integrity": "sha1-ZiZu5fm9uZQKTkUUyvtDu3Hlyds=", + "dev": true, + "requires": { + "inherits": "2.0.3", + "readable-stream": "2.3.3" + } + }, + "stream-combiner2": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/stream-combiner2/-/stream-combiner2-1.1.1.tgz", + "integrity": "sha1-+02KFCDqNidk4hrUeAOXvry0HL4=", + "dev": true, + "requires": { + "duplexer2": "0.1.4", + "readable-stream": "2.3.3" + } + }, + "stream-consume": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/stream-consume/-/stream-consume-0.1.0.tgz", + "integrity": "sha1-pB6tGm1ggc63n2WwYZAbbY89HQ8=", + "dev": true + }, + "stream-http": { + "version": "2.7.2", + "resolved": "https://registry.npmjs.org/stream-http/-/stream-http-2.7.2.tgz", + "integrity": "sha512-c0yTD2rbQzXtSsFSVhtpvY/vS6u066PcXOX9kBB3mSO76RiUQzL340uJkGBWnlBg4/HZzqiUXtaVA7wcRcJgEw==", + "dev": true, + "requires": { + "builtin-status-codes": "3.0.0", + "inherits": "2.0.3", + "readable-stream": "2.3.3", + "to-arraybuffer": "1.0.1", + "xtend": "4.0.1" + } + }, + "stream-shift": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.0.tgz", + "integrity": "sha1-1cdSgl5TZ+eG944Y5EXqIjoVWVI=", + "dev": true + }, + "stream-splicer": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/stream-splicer/-/stream-splicer-2.0.0.tgz", + "integrity": "sha1-G2O+Q4oTPktnHMGTUZdgAXWRDYM=", + "dev": true, + "requires": { + "inherits": "2.0.3", + "readable-stream": "2.3.3" + } + }, + "streamqueue": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/streamqueue/-/streamqueue-0.0.6.tgz", + "integrity": "sha1-ZvX17JTpuK8knkrsLdH3Qb/pTeM=", + "dev": true, + "requires": { + "readable-stream": "1.1.14" + }, + "dependencies": { + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", + "dev": true + }, + "readable-stream": { + "version": "1.1.14", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", + "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", + "dev": true, + "requires": { + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "0.0.1", + "string_decoder": "0.10.31" + } + }, + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", + "dev": true + } + } + }, + "string_decoder": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", + "integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==", + "dev": true, + "requires": { + "safe-buffer": "5.1.1" + } + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "dev": true, + "requires": { + "ansi-regex": "2.1.1" + } + }, + "strip-bom": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-1.0.0.tgz", + "integrity": "sha1-hbiGLzhEtabV7IRnqTWYFzo295Q=", + "dev": true, + "requires": { + "first-chunk-stream": "1.0.0", + "is-utf8": "0.2.1" + } + }, + "strip-bom-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/strip-bom-stream/-/strip-bom-stream-1.0.0.tgz", + "integrity": "sha1-5xRDmFd9Uaa+0PoZlPoF9D/ZiO4=", + "dev": true, + "requires": { + "first-chunk-stream": "1.0.0", + "strip-bom": "2.0.0" + }, + "dependencies": { + "strip-bom": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", + "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", + "dev": true, + "requires": { + "is-utf8": "0.2.1" + } + } + } + }, + "strip-bom-string": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/strip-bom-string/-/strip-bom-string-1.0.0.tgz", + "integrity": "sha1-5SEekiQ2n7uB1jOi8ABE3IztrZI=", + "dev": true + }, + "strip-indent": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-1.0.1.tgz", + "integrity": "sha1-DHlipq3vp7vUrDZkYKY4VSrhoKI=", + "dev": true, + "requires": { + "get-stdin": "4.0.1" + } + }, + "strip-json-comments": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", + "dev": true + }, + "subarg": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/subarg/-/subarg-1.0.0.tgz", + "integrity": "sha1-9izxdYHplrSPyWVpn1TAauJouNI=", + "dev": true, + "requires": { + "minimist": "1.2.0" + } + }, + "supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", + "dev": true + }, + "syntax-error": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/syntax-error/-/syntax-error-1.3.0.tgz", + "integrity": "sha1-HtkmbE1AvnXcVb+bsct3Biu5bKE=", + "dev": true, + "requires": { + "acorn": "4.0.13" + } + }, + "through": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", + "dev": true + }, + "through2": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.3.tgz", + "integrity": "sha1-AARWmzfHx0ujnEPzzteNGtlBQL4=", + "dev": true, + "requires": { + "readable-stream": "2.3.3", + "xtend": "4.0.1" + } + }, + "through2-filter": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/through2-filter/-/through2-filter-2.0.0.tgz", + "integrity": "sha1-YLxVoNrLdghdsfna6Zq0P4PWIuw=", + "dev": true, + "requires": { + "through2": "2.0.3", + "xtend": "4.0.1" + } + }, + "tildify": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/tildify/-/tildify-1.2.0.tgz", + "integrity": "sha1-3OwD9V3Km3qj5bBPIYF+tW5jWIo=", + "dev": true, + "requires": { + "os-homedir": "1.0.2" + } + }, + "time-stamp": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/time-stamp/-/time-stamp-1.1.0.tgz", + "integrity": "sha1-dkpaEa9QVhkhsTPztE5hhofg9cM=", + "dev": true + }, + "timers-browserify": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-1.4.2.tgz", + "integrity": "sha1-ycWLV1voQHN1y14kYtrO50NZ9B0=", + "dev": true, + "requires": { + "process": "0.11.10" + } + }, + "timers-ext": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/timers-ext/-/timers-ext-0.1.2.tgz", + "integrity": "sha1-YcxHp2wavTGV8UUn+XjViulMUgQ=", + "dev": true, + "requires": { + "es5-ext": "0.10.31", + "next-tick": "1.0.0" + } + }, + "to-absolute-glob": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/to-absolute-glob/-/to-absolute-glob-0.1.1.tgz", + "integrity": "sha1-HN+kcqnvUMI57maZm2YsoOs5k38=", + "dev": true, + "requires": { + "extend-shallow": "2.0.1" + } + }, + "to-arraybuffer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz", + "integrity": "sha1-fSKbH8xjfkZsoIEYCDanqr/4P0M=", + "dev": true + }, + "travis-fold": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/travis-fold/-/travis-fold-0.1.2.tgz", + "integrity": "sha1-/sAF+dyqJZo/lFnOWmkGq6TFRdo=", + "dev": true + }, + "trim-newlines": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-1.0.0.tgz", + "integrity": "sha1-WIeWa7WCpFA6QetST301ARgVphM=", + "dev": true + }, + "ts-node": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-3.3.0.tgz", + "integrity": "sha1-wTxqMCTjC+EYDdUwOPwgkonUv2k=", + "dev": true, + "requires": { + "arrify": "1.0.1", + "chalk": "2.1.0", + "diff": "3.3.1", + "make-error": "1.3.0", + "minimist": "1.2.0", + "mkdirp": "0.5.1", + "source-map-support": "0.4.18", + "tsconfig": "6.0.0", + "v8flags": "3.0.1", + "yn": "2.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.0.tgz", + "integrity": "sha512-NnSOmMEYtVR2JVMIGTzynRkkaxtiq1xnFBcdQD/DnNCYPoEPsVJhM98BDyaoNOQIi7p4okdi3E27eN7GQbsUug==", + "dev": true, + "requires": { + "color-convert": "1.9.0" + } + }, + "chalk": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.1.0.tgz", + "integrity": "sha512-LUHGS/dge4ujbXMJrnihYMcL4AoOweGnw9Tp3kQuqy1Kx5c1qKjqvMJZ6nVJPMWJtKCTN72ZogH3oeSO9g9rXQ==", + "dev": true, + "requires": { + "ansi-styles": "3.2.0", + "escape-string-regexp": "1.0.5", + "supports-color": "4.4.0" + } + }, + "has-flag": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-2.0.0.tgz", + "integrity": "sha1-6CB68cx7MNRGzHC3NLXovhj4jVE=", + "dev": true + }, + "supports-color": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-4.4.0.tgz", + "integrity": "sha512-rKC3+DyXWgK0ZLKwmRsrkyHVZAjNkfzeehuFWdGGcqGDTZFH73+RH6S/RDAAxl9GusSjZSUWYLmT9N5pzXFOXQ==", + "dev": true, + "requires": { + "has-flag": "2.0.0" + } + }, + "v8flags": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/v8flags/-/v8flags-3.0.1.tgz", + "integrity": "sha1-3Oj8N5wX2fLJ6e142JzgAFKxt2s=", + "dev": true, + "requires": { + "homedir-polyfill": "1.0.1" + } + } + } + }, + "tsconfig": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/tsconfig/-/tsconfig-6.0.0.tgz", + "integrity": "sha1-aw6DdgA9evGGT434+J3QBZ/80DI=", + "dev": true, + "requires": { + "strip-bom": "3.0.0", + "strip-json-comments": "2.0.1" + }, + "dependencies": { + "strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", + "dev": true + } + } + }, + "tslib": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.8.0.tgz", + "integrity": "sha512-ymKWWZJST0/CkgduC2qkzjMOWr4bouhuURNXCn/inEX0L57BnRG6FhX76o7FOnsjHazCjfU2LKeSrlS2sIKQJg==", + "dev": true + }, + "tslint": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/tslint/-/tslint-5.7.0.tgz", + "integrity": "sha1-wl4NDJL6EgHCvDDoROCOaCtPNVI=", + "dev": true, + "requires": { + "babel-code-frame": "6.26.0", + "colors": "1.1.2", + "commander": "2.11.0", + "diff": "3.3.1", + "glob": "7.1.2", + "minimatch": "3.0.4", + "resolve": "1.4.0", + "semver": "5.4.1", + "tslib": "1.8.0", + "tsutils": "2.12.1" + }, + "dependencies": { + "resolve": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.4.0.tgz", + "integrity": "sha512-aW7sVKPufyHqOmyyLzg/J+8606v5nevBgaliIlV7nUpVMsDnoBGV/cbSLNjZAg9q0Cfd/+easKVKQ8vOu8fn1Q==", + "dev": true, + "requires": { + "path-parse": "1.0.5" + } + }, + "semver": { + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.4.1.tgz", + "integrity": "sha512-WfG/X9+oATh81XtllIo/I8gOiY9EXRdv1cQdyykeXK17YcUW3EXUAi2To4pcH6nZtJPr7ZOpM5OMyWJZm+8Rsg==", + "dev": true + } + } + }, + "tsutils": { + "version": "2.12.1", + "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-2.12.1.tgz", + "integrity": "sha1-9Nlc4zkciXHkblTEzw7bCiHdWyQ=", + "dev": true, + "requires": { + "tslib": "1.8.0" + } + }, + "tty-browserify": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.0.tgz", + "integrity": "sha1-oVe6QC2iTpv5V/mqadUk7tQpAaY=", + "dev": true + }, + "type-check": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", + "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", + "dev": true, + "requires": { + "prelude-ls": "1.1.2" + } + }, + "type-detect": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.3.tgz", + "integrity": "sha1-Dj8mcLRAmbC0bChNE2p+9Jx0wuo=", + "dev": true + }, + "typedarray": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", + "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=", + "dev": true + }, + "typescript": { + "version": "2.6.0-dev.20171011", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-2.6.0-dev.20171011.tgz", + "integrity": "sha512-il66U8zNRbF875Gq6cP3K/CthG7Dp9PRpu5w5mVHaPcolzJhrdLa3K2WavqqJg/7h7sPOZvsU8nYdXO61sHagg==", + "dev": true + }, + "uglify-js": { + "version": "2.8.29", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-2.8.29.tgz", + "integrity": "sha1-KcVzMUgFe7Th913zW3qcty5qWd0=", + "dev": true, + "optional": true, + "requires": { + "source-map": "0.5.7", + "uglify-to-browserify": "1.0.2", + "yargs": "3.10.0" + } + }, + "uglify-to-browserify": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz", + "integrity": "sha1-bgkk1r2mta/jSeOabWMoUKD4grc=", + "dev": true, + "optional": true + }, + "umd": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/umd/-/umd-3.0.1.tgz", + "integrity": "sha1-iuVW4RAR9jwllnCKiDclnwGz1g4=", + "dev": true + }, + "unc-path-regex": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/unc-path-regex/-/unc-path-regex-0.1.2.tgz", + "integrity": "sha1-5z3T17DXxe2G+6xrCufYxqadUPo=", + "dev": true + }, + "unique-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unique-stream/-/unique-stream-1.0.0.tgz", + "integrity": "sha1-1ZpKdUJ0R9mqbJHnAmP40mpLEEs=", + "dev": true + }, + "urix": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz", + "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=", + "dev": true + }, + "url": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/url/-/url-0.11.0.tgz", + "integrity": "sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE=", + "dev": true, + "requires": { + "punycode": "1.3.2", + "querystring": "0.2.0" + }, + "dependencies": { + "punycode": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz", + "integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=", + "dev": true + } + } + }, + "user-home": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/user-home/-/user-home-1.1.1.tgz", + "integrity": "sha1-K1viOjK2Onyd640PKNSFcko98ZA=", + "dev": true + }, + "util": { + "version": "0.10.3", + "resolved": "https://registry.npmjs.org/util/-/util-0.10.3.tgz", + "integrity": "sha1-evsa/lCAUkZInj23/g7TeTNqwPk=", + "dev": true, + "requires": { + "inherits": "2.0.1" + }, + "dependencies": { + "inherits": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz", + "integrity": "sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE=", + "dev": true + } + } + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", + "dev": true + }, + "utilities": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/utilities/-/utilities-1.0.5.tgz", + "integrity": "sha1-8rd6iPNRBzP8chW1xIalBKdaskU=", + "dev": true + }, + "v8flags": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/v8flags/-/v8flags-2.1.1.tgz", + "integrity": "sha1-qrGh+jDUX4jdMhFIh1rALAtV5bQ=", + "dev": true, + "requires": { + "user-home": "1.1.1" + } + }, + "vali-date": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/vali-date/-/vali-date-1.0.0.tgz", + "integrity": "sha1-G5BKWWCfsyjvB4E4Qgk09rhnCaY=", + "dev": true + }, + "validate-npm-package-license": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.1.tgz", + "integrity": "sha1-KAS6vnEq0zeUWaz74kdGqywwP7w=", + "dev": true, + "requires": { + "spdx-correct": "1.0.2", + "spdx-expression-parse": "1.0.4" + } + }, + "vinyl": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-0.5.3.tgz", + "integrity": "sha1-sEVbOPxeDPMNQyUTLkYZcMIJHN4=", + "dev": true, + "requires": { + "clone": "1.0.2", + "clone-stats": "0.0.1", + "replace-ext": "0.0.1" + } + }, + "vinyl-fs": { + "version": "0.3.14", + "resolved": "https://registry.npmjs.org/vinyl-fs/-/vinyl-fs-0.3.14.tgz", + "integrity": "sha1-mmhRzhysHBzqX+hsCTHWIMLPqeY=", + "dev": true, + "requires": { + "defaults": "1.0.3", + "glob-stream": "3.1.18", + "glob-watcher": "0.0.6", + "graceful-fs": "3.0.11", + "mkdirp": "0.5.1", + "strip-bom": "1.0.0", + "through2": "0.6.5", + "vinyl": "0.4.6" + }, + "dependencies": { + "clone": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/clone/-/clone-0.2.0.tgz", + "integrity": "sha1-xhJqkK1Pctv1rNskPMN3JP6T/B8=", + "dev": true + }, + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", + "dev": true + }, + "readable-stream": { + "version": "1.0.34", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", + "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", + "dev": true, + "requires": { + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "0.0.1", + "string_decoder": "0.10.31" + } + }, + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", + "dev": true + }, + "through2": { + "version": "0.6.5", + "resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz", + "integrity": "sha1-QaucZ7KdVyCQcUEOHXp6lozTrUg=", + "dev": true, + "requires": { + "readable-stream": "1.0.34", + "xtend": "4.0.1" + } + }, + "vinyl": { + "version": "0.4.6", + "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-0.4.6.tgz", + "integrity": "sha1-LzVsh6VQolVGHza76ypbqL94SEc=", + "dev": true, + "requires": { + "clone": "0.2.0", + "clone-stats": "0.0.1" + } + } + } + }, + "vlq": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/vlq/-/vlq-0.2.3.tgz", + "integrity": "sha512-DRibZL6DsNhIgYQ+wNdWDL2SL3bKPlVrRiBqV5yuMm++op8W4kGFtaQfCs4KEJn0wBZcHVHJ3eoywX8983k1ow==", + "dev": true + }, + "vm-browserify": { + "version": "0.0.4", + "resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-0.0.4.tgz", + "integrity": "sha1-XX6kW7755Kb/ZflUOOCofDV9WnM=", + "dev": true, + "requires": { + "indexof": "0.0.1" + } + }, + "which": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.0.tgz", + "integrity": "sha512-xcJpopdamTuY5duC/KnTTNBraPK54YwpenP4lzxU8H91GudWpFv38u0CKjclE1Wi2EH2EDz5LRcHcKbCIzqGyg==", + "dev": true, + "requires": { + "isexe": "2.0.0" + } + }, + "window-size": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.0.tgz", + "integrity": "sha1-VDjNLqk7IC76Ohn+iIeu58lPnJ0=", + "dev": true, + "optional": true + }, + "wordwrap": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", + "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=", + "dev": true + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "dev": true + }, + "xml2js": { + "version": "0.4.19", + "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.19.tgz", + "integrity": "sha512-esZnJZJOiJR9wWKMyuvSE1y6Dq5LCuJanqhxslH2bxM6duahNZ+HMpCLhBQGZkbX6xRf8x1Y2eJlgt2q3qo49Q==", + "dev": true, + "requires": { + "sax": "1.2.4", + "xmlbuilder": "9.0.4" + } + }, + "xmlbuilder": { + "version": "9.0.4", + "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-9.0.4.tgz", + "integrity": "sha1-UZy0ymhtAFqEINNJbz8MruzKWA8=", + "dev": true + }, + "xtend": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", + "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=", + "dev": true + }, + "yargs": { + "version": "3.10.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.10.0.tgz", + "integrity": "sha1-9+572FfdfB0tOMDnTvvWgdFDH9E=", + "dev": true, + "optional": true, + "requires": { + "camelcase": "1.2.1", + "cliui": "2.1.0", + "decamelize": "1.2.0", + "window-size": "0.1.0" + }, + "dependencies": { + "camelcase": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-1.2.1.tgz", + "integrity": "sha1-m7UwTS4LVmmLLHWLCKPqqdqlijk=", + "dev": true, + "optional": true + } + } + }, + "yn": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/yn/-/yn-2.0.0.tgz", + "integrity": "sha1-5a2ryKz0CPY4X8dklWhMiOavaJo=", + "dev": true + } + } +} diff --git a/pull_request_template.md b/pull_request_template.md index 683e6acbf89..2c49c84641b 100644 --- a/pull_request_template.md +++ b/pull_request_template.md @@ -3,7 +3,7 @@ Thank you for submitting a pull request! Here's a checklist you might find useful. [ ] There is an associated issue that is labelled - 'Bug' or 'Accepting PRs' or is in the Community milestone + 'Bug' or 'help wanted' or is in the Community milestone [ ] Code is up-to-date with the `master` branch [ ] You've successfully run `jake runtests` locally [ ] You've signed the CLA diff --git a/src/compiler/binder.ts b/src/compiler/binder.ts index 796c9603423..35a62a644d8 100644 --- a/src/compiler/binder.ts +++ b/src/compiler/binder.ts @@ -143,6 +143,15 @@ namespace ts { let subtreeTransformFlags: TransformFlags = TransformFlags.None; let skipTransformFlagAggregation: boolean; + /** + * Inside the binder, we may create a diagnostic for an as-yet unbound node (with potentially no parent pointers, implying no accessible source file) + * If so, the node _must_ be in the current file (as that's the only way anything could have traversed to it to yield it as the error node) + * This version of `createDiagnosticForNode` uses the binder's context to account for this, and always yields correct diagnostics even in these situations. + */ + function createDiagnosticForNode(node: Node, message: DiagnosticMessage, arg0?: string | number, arg1?: string | number, arg2?: string | number): Diagnostic { + return createDiagnosticForNodeInSourceFile(getSourceFileOfNode(node) || file, node, message, arg0, arg1, arg2); + } + function bindSourceFile(f: SourceFile, opts: CompilerOptions) { file = f; options = opts; @@ -230,6 +239,10 @@ namespace ts { // Should not be called on a declaration with a computed property name, // unless it is a well known Symbol. function getDeclarationName(node: Declaration): __String { + if (node.kind === SyntaxKind.ExportAssignment) { + return (node).isExportEquals ? InternalSymbolName.ExportEquals : InternalSymbolName.Default; + } + const name = getNameOfDeclaration(node); if (name) { if (isAmbientModule(node)) { @@ -261,8 +274,6 @@ namespace ts { return InternalSymbolName.Index; case SyntaxKind.ExportDeclaration: return InternalSymbolName.ExportStar; - case SyntaxKind.ExportAssignment: - return (node).isExportEquals ? InternalSymbolName.ExportEquals : InternalSymbolName.Default; case SyntaxKind.BinaryExpression: if (getSpecialPropertyAssignmentKind(node as BinaryExpression) === SpecialPropertyAssignmentKind.ModuleExports) { // module.exports = ... @@ -2144,7 +2155,7 @@ namespace ts { // falls through case SyntaxKind.JSDocPropertyTag: const propTag = node as JSDocPropertyLikeTag; - const flags = propTag.isBracketed || propTag.typeExpression.type.kind === SyntaxKind.JSDocOptionalType ? + const flags = propTag.isBracketed || propTag.typeExpression && propTag.typeExpression.type.kind === SyntaxKind.JSDocOptionalType ? SymbolFlags.Property | SymbolFlags.Optional : SymbolFlags.Property; return declareSymbolAndAddToSymbolTable(propTag, flags, SymbolFlags.PropertyExcludes); @@ -2269,16 +2280,13 @@ namespace ts { function isExportsOrModuleExportsOrAlias(node: Node): boolean { return isExportsIdentifier(node) || isModuleExportsPropertyAccessExpression(node) || - isNameOfExportsOrModuleExportsAliasDeclaration(node); + isIdentifier(node) && isNameOfExportsOrModuleExportsAliasDeclaration(node); } - function isNameOfExportsOrModuleExportsAliasDeclaration(node: Node) { - if (isIdentifier(node)) { - const symbol = lookupSymbolForName(node.escapedText); - return symbol && symbol.valueDeclaration && isVariableDeclaration(symbol.valueDeclaration) && - symbol.valueDeclaration.initializer && isExportsOrModuleExportsOrAliasOrAssignment(symbol.valueDeclaration.initializer); - } - return false; + function isNameOfExportsOrModuleExportsAliasDeclaration(node: Identifier): boolean { + const symbol = lookupSymbolForName(node.escapedText); + return symbol && symbol.valueDeclaration && isVariableDeclaration(symbol.valueDeclaration) && + symbol.valueDeclaration.initializer && isExportsOrModuleExportsOrAliasOrAssignment(symbol.valueDeclaration.initializer); } function isExportsOrModuleExportsOrAliasOrAssignment(node: Node): boolean { @@ -2352,20 +2360,22 @@ namespace ts { // Look up the function in the local scope, since prototype assignments should // follow the function declaration const leftSideOfAssignment = node.left as PropertyAccessExpression; - const target = leftSideOfAssignment.expression as Identifier; + const target = leftSideOfAssignment.expression; - // Fix up parent pointers since we're going to use these nodes before we bind into them - leftSideOfAssignment.parent = node; - target.parent = leftSideOfAssignment; + if (isIdentifier(target)) { + // Fix up parent pointers since we're going to use these nodes before we bind into them + leftSideOfAssignment.parent = node; + target.parent = leftSideOfAssignment; - if (isNameOfExportsOrModuleExportsAliasDeclaration(target)) { - // This can be an alias for the 'exports' or 'module.exports' names, e.g. - // var util = module.exports; - // util.property = function ... - bindExportsPropertyAssignment(node); - } - else { - bindPropertyAssignment(target.escapedText, leftSideOfAssignment, /*isPrototypeProperty*/ false); + if (isNameOfExportsOrModuleExportsAliasDeclaration(target)) { + // This can be an alias for the 'exports' or 'module.exports' names, e.g. + // var util = module.exports; + // util.property = function ... + bindExportsPropertyAssignment(node); + } + else { + bindPropertyAssignment(target.escapedText, leftSideOfAssignment, /*isPrototypeProperty*/ false); + } } } @@ -2697,6 +2707,12 @@ namespace ts { if (expression.kind === SyntaxKind.ImportKeyword) { transformFlags |= TransformFlags.ContainsDynamicImport; + + // A dynamic 'import()' call that contains a lexical 'this' will + // require a captured 'this' when emitting down-level. + if (subtreeFlags & TransformFlags.ContainsLexicalThis) { + transformFlags |= TransformFlags.ContainsCapturedLexicalThis; + } } node.transformFlags = transformFlags | TransformFlags.HasComputedFlags; diff --git a/src/compiler/builder.ts b/src/compiler/builder.ts index 6bb94ea2de7..192f1e43027 100644 --- a/src/compiler/builder.ts +++ b/src/compiler/builder.ts @@ -73,12 +73,16 @@ namespace ts { */ onRemoveSourceFile(path: Path): void; /** - * Called when sourceFile is changed + * For all source files, either "onUpdateSourceFile" or "onUpdateSourceFileWithSameVersion" will be called. + * If the builder is sure that the source file needs an update, "onUpdateSourceFile" will be called; + * otherwise "onUpdateSourceFileWithSameVersion" will be called. */ onUpdateSourceFile(program: Program, sourceFile: SourceFile): void; /** - * Called when source file has not changed but has some of the resolutions invalidated - * If returned true, builder will mark the file as changed (noting that something associated with file has changed) + * For all source files, either "onUpdateSourceFile" or "onUpdateSourceFileWithSameVersion" will be called. + * If the builder is sure that the source file needs an update, "onUpdateSourceFile" will be called; + * otherwise "onUpdateSourceFileWithSameVersion" will be called. + * This function should return whether the source file should be marked as changed (meaning that something associated with file has changed, e.g. module resolution) */ onUpdateSourceFileWithSameVersion(program: Program, sourceFile: SourceFile): boolean; /** @@ -161,8 +165,7 @@ namespace ts { existingInfo.version = sourceFile.version; emitHandler.onUpdateSourceFile(program, sourceFile); } - else if (program.hasInvalidatedResolution(sourceFile.path) && - emitHandler.onUpdateSourceFileWithSameVersion(program, sourceFile)) { + else if (emitHandler.onUpdateSourceFileWithSameVersion(program, sourceFile)) { registerChangedFile(sourceFile.path, sourceFile.fileName); } } diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index fbe192c5629..9347329e624 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -226,6 +226,23 @@ namespace ts { return tryFindAmbientModule(moduleName, /*withAugmentations*/ false); }, getApparentType, + getUnionType, + createAnonymousType, + createSignature, + createSymbol, + createIndexInfo, + getAnyType: () => anyType, + getStringType: () => stringType, + getNumberType: () => numberType, + createPromiseType, + createArrayType, + getBooleanType: () => booleanType, + getVoidType: () => voidType, + getUndefinedType: () => undefinedType, + getNullType: () => nullType, + getESSymbolType: () => esSymbolType, + getNeverType: () => neverType, + isSymbolAccessible, isArrayLikeType, getAllPossiblePropertiesOfTypes, getSuggestionForNonexistentProperty: (node, type) => getSuggestionForNonexistentProperty(node, type), @@ -281,6 +298,7 @@ namespace ts { const noConstraintType = createAnonymousType(undefined, emptySymbols, emptyArray, emptyArray, undefined, undefined); const circularConstraintType = createAnonymousType(undefined, emptySymbols, emptyArray, emptyArray, undefined, undefined); + const resolvingDefaultType = createAnonymousType(undefined, emptySymbols, emptyArray, emptyArray, undefined, undefined); const markerSuperType = createType(TypeFlags.TypeParameter); const markerSubType = createType(TypeFlags.TypeParameter); @@ -503,6 +521,12 @@ namespace ts { Inferential = 2, // Inferential typing } + const enum CallbackCheck { + None, + Bivariant, + Strict, + } + const builtinGlobals = createSymbolTable(); builtinGlobals.set(undefinedSymbol.escapedName, undefinedSymbol); @@ -902,6 +926,7 @@ namespace ts { const originalLocation = location; // needed for did-you-mean error reporting, which gathers candidates starting from the original location let result: Symbol; let lastLocation: Node; + let lastNonBlockLocation: Node; let propertyWithInvalidInitializer: Node; const errorLocation = location; let grandparent: Node; @@ -1120,6 +1145,9 @@ namespace ts { } break; } + if (location.kind !== SyntaxKind.Block) { + lastNonBlockLocation = location; + } lastLocation = location; location = location.parent; } @@ -1127,7 +1155,7 @@ namespace ts { // We just climbed up parents looking for the name, meaning that we started in a descendant node of `lastLocation`. // If `result === lastLocation.symbol`, that means that we are somewhere inside `lastLocation` looking up a name, and resolving to `lastLocation` itself. // That means that this is a self-reference of `lastLocation`, and shouldn't count this when considering whether `lastLocation` is used. - if (isUse && result && nameNotFoundMessage && noUnusedIdentifiers && result !== lastLocation.symbol) { + if (isUse && result && nameNotFoundMessage && noUnusedIdentifiers && result !== lastNonBlockLocation.symbol) { result.isReferenced = true; } @@ -3664,6 +3692,7 @@ namespace ts { function buildParameterDisplay(p: Symbol, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags, symbolStack?: Symbol[]) { const parameterNode = p.valueDeclaration; + if (parameterNode ? isRestParameter(parameterNode) : isTransientSymbol(p) && p.isRestParameter) { writePunctuation(writer, SyntaxKind.DotDotDotToken); } @@ -4151,13 +4180,13 @@ namespace ts { if (parentType === unknownType) { return unknownType; } - // If no type was specified or inferred for parent, or if the specified or inferred type is any, - // infer from the initializer of the binding element if one is present. Otherwise, go with the - // undefined or any type of the parent. - if (!parentType || isTypeAny(parentType)) { - if (declaration.initializer) { - return checkDeclarationInitializer(declaration); - } + // If no type was specified or inferred for parent, + // infer from the initializer of the binding element if one is present. + // Otherwise, go with the undefined type of the parent. + if (!parentType) { + return declaration.initializer ? checkDeclarationInitializer(declaration) : parentType; + } + if (isTypeAny(parentType)) { return parentType; } @@ -4183,9 +4212,6 @@ namespace ts { // computed properties with non-literal names are treated as 'any' return anyType; } - if (declaration.initializer) { - getContextualType(declaration.initializer); - } // Use type of the specified property, or otherwise, for a numeric name, the type of the numeric index signature, // or otherwise the type of the string index signature. @@ -6048,27 +6074,51 @@ namespace ts { return type.resolvedApparentType || (type.resolvedApparentType = getTypeWithThisArgument(type, type)); } + function getResolvedTypeParameterDefault(typeParameter: TypeParameter): Type | undefined { + if (!typeParameter.default) { + if (typeParameter.target) { + const targetDefault = getResolvedTypeParameterDefault(typeParameter.target); + typeParameter.default = targetDefault ? instantiateType(targetDefault, typeParameter.mapper) : noConstraintType; + } + else { + // To block recursion, set the initial value to the resolvingDefaultType. + typeParameter.default = resolvingDefaultType; + const defaultDeclaration = typeParameter.symbol && forEach(typeParameter.symbol.declarations, decl => isTypeParameterDeclaration(decl) && decl.default); + const defaultType = defaultDeclaration ? getTypeFromTypeNode(defaultDeclaration) : noConstraintType; + if (typeParameter.default === resolvingDefaultType) { + // If we have not been called recursively, set the correct default type. + typeParameter.default = defaultType; + } + } + } + else if (typeParameter.default === resolvingDefaultType) { + // If we are called recursively for this type parameter, mark the default as circular. + typeParameter.default = circularConstraintType; + } + return typeParameter.default; + } + /** * Gets the default type for a type parameter. * * If the type parameter is the result of an instantiation, this gets the instantiated - * default type of its target. If the type parameter has no default type, `undefined` - * is returned. - * - * This function *does not* perform a circularity check. + * default type of its target. If the type parameter has no default type or the default is + * circular, `undefined` is returned. */ function getDefaultFromTypeParameter(typeParameter: TypeParameter): Type | undefined { - if (!typeParameter.default) { - if (typeParameter.target) { - const targetDefault = getDefaultFromTypeParameter(typeParameter.target); - typeParameter.default = targetDefault ? instantiateType(targetDefault, typeParameter.mapper) : noConstraintType; - } - else { - const defaultDeclaration = typeParameter.symbol && forEach(typeParameter.symbol.declarations, decl => isTypeParameterDeclaration(decl) && decl.default); - typeParameter.default = defaultDeclaration ? getTypeFromTypeNode(defaultDeclaration) : noConstraintType; - } - } - return typeParameter.default === noConstraintType ? undefined : typeParameter.default; + const defaultType = getResolvedTypeParameterDefault(typeParameter); + return defaultType !== noConstraintType && defaultType !== circularConstraintType ? defaultType : undefined; + } + + function hasNonCircularTypeParameterDefault(typeParameter: TypeParameter) { + return getResolvedTypeParameterDefault(typeParameter) !== circularConstraintType; + } + + /** + * Indicates whether the declaration of a typeParameter has a default type. + */ + function hasTypeParameterDefault(typeParameter: TypeParameter): boolean { + return !!(typeParameter.symbol && forEach(typeParameter.symbol.declarations, decl => isTypeParameterDeclaration(decl) && decl.default)); } /** @@ -6242,7 +6292,7 @@ namespace ts { } function getImplicitIndexTypeOfType(type: Type, kind: IndexKind): Type { - if (isObjectLiteralType(type)) { + if (isObjectTypeWithInferableIndex(type)) { const propTypes: Type[] = []; for (const prop of getPropertiesOfType(type)) { if (kind === IndexKind.String || isNumericLiteralName(prop.escapedName)) { @@ -6354,7 +6404,7 @@ namespace ts { let minTypeArgumentCount = 0; if (typeParameters) { for (let i = 0; i < typeParameters.length; i++) { - if (!getDefaultFromTypeParameter(typeParameters[i])) { + if (!hasTypeParameterDefault(typeParameters[i])) { minTypeArgumentCount = i + 1; } } @@ -7846,7 +7896,7 @@ namespace ts { * this function should be called in a left folding style, with left = previous result of getSpreadType * and right = the new element to be spread. */ - function getSpreadType(left: Type, right: Type): Type { + function getSpreadType(left: Type, right: Type, symbol: Symbol, propagatedFlags: TypeFlags): Type { if (left.flags & TypeFlags.Any || right.flags & TypeFlags.Any) { return anyType; } @@ -7857,10 +7907,10 @@ namespace ts { return left; } if (left.flags & TypeFlags.Union) { - return mapType(left, t => getSpreadType(t, right)); + return mapType(left, t => getSpreadType(t, right, symbol, propagatedFlags)); } if (right.flags & TypeFlags.Union) { - return mapType(right, t => getSpreadType(left, t)); + return mapType(right, t => getSpreadType(left, t, symbol, propagatedFlags)); } if (right.flags & TypeFlags.NonPrimitive) { return nonPrimitiveType; @@ -7918,7 +7968,13 @@ namespace ts { members.set(leftProp.escapedName, getNonReadonlySymbol(leftProp)); } } - return createAnonymousType(undefined, members, emptyArray, emptyArray, stringIndexInfo, numberIndexInfo); + + const spread = createAnonymousType(undefined, members, emptyArray, emptyArray, stringIndexInfo, numberIndexInfo); + spread.flags |= propagatedFlags; + spread.flags |= TypeFlags.FreshLiteral; + (spread as ObjectType).objectFlags |= ObjectFlags.ObjectLiteral; + spread.symbol = symbol; + return spread; } function getNonReadonlySymbol(prop: Symbol) { @@ -8251,11 +8307,11 @@ namespace ts { // The first time an anonymous type is instantiated we compute and store a list of the type // parameters that are in scope (and therefore potentially referenced). For type literals that // aren't the right hand side of a generic type alias declaration we optimize by reducing the - // set of type parameters to those that are actually referenced somewhere in the literal. + // set of type parameters to those that are possibly referenced in the literal. const declaration = symbol.declarations[0]; const outerTypeParameters = getOuterTypeParameters(declaration, /*includeThisTypes*/ true) || emptyArray; typeParameters = symbol.flags & SymbolFlags.TypeLiteral && !target.aliasTypeArguments ? - filter(outerTypeParameters, tp => isTypeParameterReferencedWithin(tp, declaration)) : + filter(outerTypeParameters, tp => isTypeParameterPossiblyReferenced(tp, declaration)) : outerTypeParameters; links.typeParameters = typeParameters; if (typeParameters.length) { @@ -8281,13 +8337,27 @@ namespace ts { return type; } - function isTypeParameterReferencedWithin(tp: TypeParameter, node: Node) { - return tp.isThisType ? forEachChild(node, checkThis) : forEachChild(node, checkIdentifier); - function checkThis(node: Node): boolean { - return node.kind === SyntaxKind.ThisType || forEachChild(node, checkThis); + function isTypeParameterPossiblyReferenced(tp: TypeParameter, node: Node) { + // If the type parameter doesn't have exactly one declaration, if there are invening statement blocks + // between the node and the type parameter declaration, if the node contains actual references to the + // type parameter, or if the node contains type queries, we consider the type parameter possibly referenced. + if (tp.symbol && tp.symbol.declarations && tp.symbol.declarations.length === 1) { + const container = tp.symbol.declarations[0].parent; + if (findAncestor(node, n => n.kind === SyntaxKind.Block ? "quit" : n === container)) { + return forEachChild(node, containsReference); + } } - function checkIdentifier(node: Node): boolean { - return node.kind === SyntaxKind.Identifier && isPartOfTypeNode(node) && getTypeFromTypeNode(node) === tp || forEachChild(node, checkIdentifier); + return true; + function containsReference(node: Node): boolean { + switch (node.kind) { + case SyntaxKind.ThisType: + return tp.isThisType; + case SyntaxKind.Identifier: + return !tp.isThisType && isPartOfTypeNode(node) && getTypeFromTypeNode(node) === tp; + case SyntaxKind.TypeQuery: + return true; + } + return forEachChild(node, containsReference); } } @@ -8513,7 +8583,7 @@ namespace ts { function isSignatureAssignableTo(source: Signature, target: Signature, ignoreReturnTypes: boolean): boolean { - return compareSignaturesRelated(source, target, /*checkAsCallback*/ false, ignoreReturnTypes, /*reportErrors*/ false, + return compareSignaturesRelated(source, target, CallbackCheck.None, ignoreReturnTypes, /*reportErrors*/ false, /*errorReporter*/ undefined, compareTypesAssignable) !== Ternary.False; } @@ -8524,7 +8594,7 @@ namespace ts { */ function compareSignaturesRelated(source: Signature, target: Signature, - checkAsCallback: boolean, + callbackCheck: CallbackCheck, ignoreReturnTypes: boolean, reportErrors: boolean, errorReporter: ErrorReporter, @@ -8543,7 +8613,7 @@ namespace ts { } const kind = target.declaration ? target.declaration.kind : SyntaxKind.Unknown; - const strictVariance = strictFunctionTypes && kind !== SyntaxKind.MethodDeclaration && + const strictVariance = !callbackCheck && strictFunctionTypes && kind !== SyntaxKind.MethodDeclaration && kind !== SyntaxKind.MethodSignature && kind !== SyntaxKind.Constructor; let result = Ternary.True; @@ -8572,21 +8642,21 @@ namespace ts { for (let i = 0; i < checkCount; i++) { const sourceType = i < sourceMax ? getTypeOfParameter(sourceParams[i]) : getRestTypeOfSignature(source); const targetType = i < targetMax ? getTypeOfParameter(targetParams[i]) : getRestTypeOfSignature(target); - const sourceSig = getSingleCallSignature(getNonNullableType(sourceType)); - const targetSig = getSingleCallSignature(getNonNullableType(targetType)); // In order to ensure that any generic type Foo is at least co-variant with respect to T no matter // how Foo uses T, we need to relate parameters bi-variantly (given that parameters are input positions, // they naturally relate only contra-variantly). However, if the source and target parameters both have - // function types with a single call signature, we known we are relating two callback parameters. In + // function types with a single call signature, we know we are relating two callback parameters. In // that case it is sufficient to only relate the parameters of the signatures co-variantly because, // similar to return values, callback parameters are output positions. This means that a Promise, // where T is used only in callback parameter positions, will be co-variant (as opposed to bi-variant) // with respect to T. + const sourceSig = callbackCheck ? undefined : getSingleCallSignature(getNonNullableType(sourceType)); + const targetSig = callbackCheck ? undefined : getSingleCallSignature(getNonNullableType(targetType)); const callbacks = sourceSig && targetSig && !sourceSig.typePredicate && !targetSig.typePredicate && (getFalsyFlags(sourceType) & TypeFlags.Nullable) === (getFalsyFlags(targetType) & TypeFlags.Nullable); const related = callbacks ? - compareSignaturesRelated(targetSig, sourceSig, /*checkAsCallback*/ true, /*ignoreReturnTypes*/ false, reportErrors, errorReporter, compareTypes) : - !checkAsCallback && !strictVariance && compareTypes(sourceType, targetType, /*reportErrors*/ false) || compareTypes(targetType, sourceType, reportErrors); + compareSignaturesRelated(targetSig, sourceSig, strictVariance ? CallbackCheck.Strict : CallbackCheck.Bivariant, /*ignoreReturnTypes*/ false, reportErrors, errorReporter, compareTypes) : + !callbackCheck && !strictVariance && compareTypes(sourceType, targetType, /*reportErrors*/ false) || compareTypes(targetType, sourceType, reportErrors); if (!related) { if (reportErrors) { errorReporter(Diagnostics.Types_of_parameters_0_and_1_are_incompatible, @@ -8621,7 +8691,7 @@ namespace ts { // When relating callback signatures, we still need to relate return types bi-variantly as otherwise // the containing type wouldn't be co-variant. For example, interface Foo { add(cb: () => T): void } // wouldn't be co-variant for T without this rule. - result &= checkAsCallback && compareTypes(targetReturnType, sourceReturnType, /*reportErrors*/ false) || + result &= callbackCheck === CallbackCheck.Bivariant && compareTypes(targetReturnType, sourceReturnType, /*reportErrors*/ false) || compareTypes(sourceReturnType, targetReturnType, reportErrors); } @@ -9065,6 +9135,13 @@ namespace ts { (isTypeSubsetOf(globalObjectType, target) || (!isComparingJsxAttributes && isEmptyObjectType(target)))) { return false; } + if (target.flags & TypeFlags.Union) { + const discriminantType = findMatchingDiscriminantType(source, target as UnionType); + if (discriminantType) { + // check excess properties against discriminant type only, not the entire union + return hasExcessProperties(source, discriminantType, reportErrors); + } + } for (const prop of getPropertiesOfObjectType(source)) { if (!isKnownProperty(target, prop.escapedName, isComparingJsxAttributes)) { if (reportErrors) { @@ -9141,20 +9218,24 @@ namespace ts { } function findMatchingDiscriminantType(source: Type, target: UnionOrIntersectionType) { + let match: Type; const sourceProperties = getPropertiesOfObjectType(source); if (sourceProperties) { - for (const sourceProperty of sourceProperties) { - if (isDiscriminantProperty(target, sourceProperty.escapedName)) { - const sourceType = getTypeOfSymbol(sourceProperty); - for (const type of target.types) { - const targetType = getTypeOfPropertyOfType(type, sourceProperty.escapedName); - if (targetType && isRelatedTo(sourceType, targetType)) { - return type; + const sourceProperty = findSingleDiscriminantProperty(sourceProperties, target); + if (sourceProperty) { + const sourceType = getTypeOfSymbol(sourceProperty); + for (const type of target.types) { + const targetType = getTypeOfPropertyOfType(type, sourceProperty.escapedName); + if (targetType && isRelatedTo(sourceType, targetType)) { + if (match) { + return undefined; } + match = type; } } } } + return match; } function typeRelatedToEachType(source: Type, target: IntersectionType, reportErrors: boolean): Ternary { @@ -9718,7 +9799,7 @@ namespace ts { */ function signatureRelatedTo(source: Signature, target: Signature, erase: boolean, reportErrors: boolean): Ternary { return compareSignaturesRelated(erase ? getErasedSignature(source) : source, erase ? getErasedSignature(target) : target, - /*checkAsCallback*/ false, /*ignoreReturnTypes*/ false, reportErrors, reportError, isRelatedTo); + CallbackCheck.None, /*ignoreReturnTypes*/ false, reportErrors, reportError, isRelatedTo); } function signaturesIdenticalTo(source: Type, target: Type, kind: SignatureKind): Ternary { @@ -9782,7 +9863,7 @@ namespace ts { // if T is related to U. return kind === IndexKind.String && isRelatedTo(getTemplateTypeFromMappedType(source), targetInfo.type, reportErrors); } - if (isObjectLiteralType(source)) { + if (isObjectTypeWithInferableIndex(source)) { let related = Ternary.True; if (kind === IndexKind.String) { const sourceNumberInfo = getIndexInfoOfType(source, IndexKind.Number); @@ -10295,11 +10376,11 @@ namespace ts { } /** - * Return true if type was inferred from an object literal or written as an object type literal + * Return true if type was inferred from an object literal, written as an object type literal, or is the shape of a module * with no call or construct signatures. */ - function isObjectLiteralType(type: Type) { - return type.symbol && (type.symbol.flags & (SymbolFlags.ObjectLiteral | SymbolFlags.TypeLiteral)) !== 0 && + function isObjectTypeWithInferableIndex(type: Type) { + return type.symbol && (type.symbol.flags & (SymbolFlags.ObjectLiteral | SymbolFlags.TypeLiteral | SymbolFlags.ValueModule)) !== 0 && getSignaturesOfType(type, SignatureKind.Call).length === 0 && getSignaturesOfType(type, SignatureKind.Construct).length === 0; } @@ -11157,6 +11238,19 @@ namespace ts { return false; } + function findSingleDiscriminantProperty(sourceProperties: Symbol[], target: Type): Symbol | undefined { + let result: Symbol; + for (const sourceProperty of sourceProperties) { + if (isDiscriminantProperty(target, sourceProperty.escapedName)) { + if (result) { + return undefined; + } + result = sourceProperty; + } + } + return result; + } + function isOrContainsMatchingReference(source: Node, target: Node) { return isMatchingReference(source, target) || containsMatchingReference(source, target); } @@ -13858,7 +13952,7 @@ namespace ts { checkExternalEmitHelpers(memberDecl, ExternalEmitHelpers.Assign); } if (propertiesArray.length > 0) { - spread = getSpreadType(spread, createObjectLiteralType()); + spread = getSpreadType(spread, createObjectLiteralType(), node.symbol, propagatedFlags); propertiesArray = []; propertiesTable = createSymbolTable(); hasComputedStringProperty = false; @@ -13870,7 +13964,7 @@ namespace ts { error(memberDecl, Diagnostics.Spread_types_may_only_be_created_from_object_types); return unknownType; } - spread = getSpreadType(spread, type); + spread = getSpreadType(spread, type, node.symbol, propagatedFlags); offset = i + 1; continue; } @@ -13915,14 +14009,7 @@ namespace ts { if (spread !== emptyObjectType) { if (propertiesArray.length > 0) { - spread = getSpreadType(spread, createObjectLiteralType()); - } - if (spread.flags & TypeFlags.Object) { - // only set the symbol and flags if this is a (fresh) object type - spread.flags |= propagatedFlags; - spread.flags |= TypeFlags.FreshLiteral; - (spread as ObjectType).objectFlags |= ObjectFlags.ObjectLiteral; - spread.symbol = node.symbol; + spread = getSpreadType(spread, createObjectLiteralType(), node.symbol, propagatedFlags); } return spread; } @@ -13981,7 +14068,7 @@ namespace ts { */ function isUnhyphenatedJsxName(name: string | __String) { // - is the only character supported in JSX attribute names that isn't valid in JavaScript identifiers - return (name as string).indexOf("-") < 0; + return !stringContains(name as string, "-"); } /** @@ -14043,7 +14130,7 @@ namespace ts { else { Debug.assert(attributeDecl.kind === SyntaxKind.JsxSpreadAttribute); if (attributesArray.length > 0) { - spread = getSpreadType(spread, createJsxAttributesType(attributes.symbol, attributesTable)); + spread = getSpreadType(spread, createJsxAttributesType(attributes.symbol, attributesTable), openingLikeElement.symbol, /*propagatedFlags*/ 0); attributesArray = []; attributesTable = createSymbolTable(); } @@ -14052,7 +14139,7 @@ namespace ts { hasSpreadAnyType = true; } if (isValidSpreadType(exprType)) { - spread = getSpreadType(spread, exprType); + spread = getSpreadType(spread, exprType, openingLikeElement.symbol, /*propagatedFlags*/ 0); } else { typeToIntersect = typeToIntersect ? getIntersectionType([typeToIntersect, exprType]) : exprType; @@ -14063,7 +14150,7 @@ namespace ts { if (!hasSpreadAnyType) { if (spread !== emptyObjectType) { if (attributesArray.length > 0) { - spread = getSpreadType(spread, createJsxAttributesType(attributes.symbol, attributesTable)); + spread = getSpreadType(spread, createJsxAttributesType(attributes.symbol, attributesTable), openingLikeElement.symbol, /*propagatedFlags*/ 0); } attributesArray = getPropertiesOfType(spread); } @@ -14799,11 +14886,7 @@ namespace ts { // where this references the constructor function object of a derived class, // a super property access is permitted and must specify a public static member function of the base class. if (languageVersion < ScriptTarget.ES2015) { - const hasNonMethodDeclaration = forEachProperty(prop, p => { - const propKind = getDeclarationKindFromSymbol(p); - return propKind !== SyntaxKind.MethodDeclaration && propKind !== SyntaxKind.MethodSignature; - }); - if (hasNonMethodDeclaration) { + if (symbolHasNonMethodDeclaration(prop)) { error(errorNode, Diagnostics.Only_public_and_protected_methods_of_the_base_class_are_accessible_via_the_super_keyword); return false; } @@ -14818,6 +14901,16 @@ namespace ts { } } + // Referencing Abstract Properties within Constructors is not allowed + if ((flags & ModifierFlags.Abstract) && symbolHasNonMethodDeclaration(prop)) { + const declaringClassDeclaration = getClassLikeDeclarationOfSymbol(getParentOfSymbol(prop)); + + if (declaringClassDeclaration && isNodeWithinConstructor(node, declaringClassDeclaration)) { + error(errorNode, Diagnostics.Abstract_property_0_in_class_1_cannot_be_accessed_in_the_constructor, symbolToString(prop), typeToString(getDeclaringClass(prop))); + return false; + } + } + // Public properties are otherwise accessible. if (!(flags & ModifierFlags.NonPublicAccessibilityModifier)) { return true; @@ -14869,6 +14962,13 @@ namespace ts { return true; } + function symbolHasNonMethodDeclaration(symbol: Symbol) { + return forEachProperty(symbol, prop => { + const propKind = getDeclarationKindFromSymbol(prop); + return propKind !== SyntaxKind.MethodDeclaration && propKind !== SyntaxKind.MethodSignature; + }); + } + function checkNonNullExpression(node: Expression | QualifiedName) { return checkNonNullType(checkExpression(node), node); } @@ -15575,34 +15675,32 @@ namespace ts { return getInferredTypes(context); } - function checkTypeArguments(signature: Signature, typeArgumentNodes: ReadonlyArray, typeArgumentTypes: Type[], reportErrors: boolean, headMessage?: DiagnosticMessage): boolean { + function checkTypeArguments(signature: Signature, typeArgumentNodes: ReadonlyArray, reportErrors: boolean, headMessage?: DiagnosticMessage): Type[] | false { + const isJavascript = isInJavaScriptFile(signature.declaration); const typeParameters = signature.typeParameters; - let typeArgumentsAreAssignable = true; + const typeArgumentTypes = fillMissingTypeArguments(map(typeArgumentNodes, getTypeFromTypeNode), typeParameters, getMinTypeArgumentCount(typeParameters), isJavascript); let mapper: TypeMapper; for (let i = 0; i < typeArgumentNodes.length; i++) { - if (typeArgumentsAreAssignable /* so far */) { - const constraint = getConstraintOfTypeParameter(typeParameters[i]); - if (constraint) { - let errorInfo: DiagnosticMessageChain; - let typeArgumentHeadMessage = Diagnostics.Type_0_does_not_satisfy_the_constraint_1; - if (reportErrors && headMessage) { - errorInfo = chainDiagnosticMessages(errorInfo, typeArgumentHeadMessage); - typeArgumentHeadMessage = headMessage; - } - if (!mapper) { - mapper = createTypeMapper(typeParameters, typeArgumentTypes); - } - const typeArgument = typeArgumentTypes[i]; - typeArgumentsAreAssignable = checkTypeAssignableTo( - typeArgument, - getTypeWithThisArgument(instantiateType(constraint, mapper), typeArgument), - reportErrors ? typeArgumentNodes[i] : undefined, - typeArgumentHeadMessage, - errorInfo); - } + Debug.assert(typeParameters[i] !== undefined, "Should not call checkTypeArguments with too many type arguments"); + const constraint = getConstraintOfTypeParameter(typeParameters[i]); + if (!constraint) continue; + + const errorInfo = reportErrors && headMessage && chainDiagnosticMessages(/*details*/ undefined, Diagnostics.Type_0_does_not_satisfy_the_constraint_1); + const typeArgumentHeadMessage = headMessage || Diagnostics.Type_0_does_not_satisfy_the_constraint_1; + if (!mapper) { + mapper = createTypeMapper(typeParameters, typeArgumentTypes); + } + const typeArgument = typeArgumentTypes[i]; + if (!checkTypeAssignableTo( + typeArgument, + getTypeWithThisArgument(instantiateType(constraint, mapper), typeArgument), + reportErrors ? typeArgumentNodes[i] : undefined, + typeArgumentHeadMessage, + errorInfo)) { + return false; } } - return typeArgumentsAreAssignable; + return typeArgumentTypes; } /** @@ -16135,8 +16233,7 @@ namespace ts { checkApplicableSignature(node, args, candidateForArgumentError, assignableRelation, /*excludeArgument*/ undefined, /*reportErrors*/ true); } else if (candidateForTypeArgumentError) { - const typeArguments = (node).typeArguments; - checkTypeArguments(candidateForTypeArgumentError, typeArguments, map(typeArguments, getTypeFromTypeNode), /*reportErrors*/ true, fallbackError); + checkTypeArguments(candidateForTypeArgumentError, (node as CallExpression).typeArguments, /*reportErrors*/ true, fallbackError); } else if (typeArguments && every(signatures, sig => length(sig.typeParameters) !== typeArguments.length)) { let min = Number.POSITIVE_INFINITY; @@ -16235,10 +16332,12 @@ namespace ts { candidate = originalCandidate; if (candidate.typeParameters) { let typeArgumentTypes: Type[]; - const isJavascript = isInJavaScriptFile(candidate.declaration); if (typeArguments) { - typeArgumentTypes = fillMissingTypeArguments(map(typeArguments, getTypeFromTypeNode), candidate.typeParameters, getMinTypeArgumentCount(candidate.typeParameters), isJavascript); - if (!checkTypeArguments(candidate, typeArguments, typeArgumentTypes, /*reportErrors*/ false)) { + const typeArgumentResult = checkTypeArguments(candidate, typeArguments, /*reportErrors*/ false); + if (typeArgumentResult) { + typeArgumentTypes = typeArgumentResult; + } + else { candidateForTypeArgumentError = originalCandidate; break; } @@ -16246,6 +16345,7 @@ namespace ts { else { typeArgumentTypes = inferTypeArguments(node, candidate, args, excludeArgument, inferenceContext); } + const isJavascript = isInJavaScriptFile(candidate.declaration); candidate = getSignatureInstantiation(candidate, typeArgumentTypes, isJavascript); } if (!checkApplicableSignature(node, args, candidate, relation, excludeArgument, /*reportErrors*/ false)) { @@ -16551,6 +16651,12 @@ namespace ts { return resolveUntypedCall(node); } + if (isPotentiallyUncalledDecorator(node, callSignatures)) { + const nodeStr = getTextOfNode(node.expression, /*includeTrivia*/ false); + error(node, Diagnostics._0_accepts_too_few_arguments_to_be_used_as_a_decorator_here_Did_you_mean_to_call_it_first_and_write_0, nodeStr); + return resolveErrorCall(node); + } + const headMessage = getDiagnosticHeadMessageForDecoratorResolution(node); if (!callSignatures.length) { let errorInfo: DiagnosticMessageChain; @@ -16563,6 +16669,18 @@ namespace ts { return resolveCall(node, callSignatures, candidatesOutArray, headMessage); } + /** + * Sometimes, we have a decorator that could accept zero arguments, + * but is receiving too many arguments as part of the decorator invocation. + * In those cases, a user may have meant to *call* the expression before using it as a decorator. + */ + function isPotentiallyUncalledDecorator(decorator: Decorator, signatures: Signature[]) { + return signatures.length && every(signatures, signature => + signature.minArgumentCount === 0 && + !signature.hasRestParameter && + signature.parameters.length < getEffectiveArgumentCount(decorator, /*args*/ undefined, signature)); + } + /** * This function is similar to getResolvedSignature but is exclusively for trying to resolve JSX stateless-function component. * The main reason we have to use this function instead of getResolvedSignature because, the caller of this function will already check the type of openingLikeElement's tagName @@ -18416,6 +18534,9 @@ namespace ts { if (!hasNonCircularBaseConstraint(typeParameter)) { error(node.constraint, Diagnostics.Type_parameter_0_has_a_circular_constraint, typeToString(typeParameter)); } + if (!hasNonCircularTypeParameterDefault(typeParameter)) { + error(node.default, Diagnostics.Type_parameter_0_has_a_circular_default, typeToString(typeParameter)); + } const constraintType = getConstraintOfTypeParameter(typeParameter); const defaultType = getDefaultFromTypeParameter(typeParameter); if (constraintType && defaultType) { @@ -18436,9 +18557,8 @@ namespace ts { checkGrammarDecorators(node) || checkGrammarModifiers(node); checkVariableLikeDeclaration(node); - let func = getContainingFunction(node); + const func = getContainingFunction(node); if (hasModifier(node, ModifierFlags.ParameterPropertyModifier)) { - func = getContainingFunction(node); if (!(func.kind === SyntaxKind.Constructor && nodeIsPresent(func.body))) { error(node, Diagnostics.A_parameter_property_is_only_allowed_in_a_constructor_implementation); } @@ -19971,18 +20091,24 @@ namespace ts { } function checkJSDocAugmentsTag(node: JSDocAugmentsTag): void { - const cls = getJSDocHost(node); - if (!isClassDeclaration(cls) && !isClassExpression(cls)) { - error(cls, Diagnostics.JSDoc_augments_is_not_attached_to_a_class_declaration); + const classLike = getJSDocHost(node); + if (!isClassDeclaration(classLike) && !isClassExpression(classLike)) { + error(classLike, Diagnostics.JSDoc_0_is_not_attached_to_a_class, idText(node.tagName)); return; } + const augmentsTags = getAllJSDocTagsOfKind(classLike, SyntaxKind.JSDocAugmentsTag); + Debug.assert(augmentsTags.length > 0); + if (augmentsTags.length > 1) { + error(augmentsTags[1], Diagnostics.Class_declarations_cannot_have_more_than_one_augments_or_extends_tag); + } + const name = getIdentifierFromEntityNameExpression(node.class.expression); - const extend = getClassExtendsHeritageClauseElement(cls); + const extend = getClassExtendsHeritageClauseElement(classLike); if (extend) { const className = getIdentifierFromEntityNameExpression(extend.expression); if (className && name.escapedText !== className.escapedText) { - error(name, Diagnostics.JSDoc_augments_0_does_not_match_the_extends_1_clause, idText(name), idText(className)); + error(name, Diagnostics.JSDoc_0_1_does_not_match_the_extends_2_clause, idText(node.tagName), idText(name), idText(className)); } } } @@ -20254,7 +20380,7 @@ namespace ts { function checkCollisionWithArgumentsInGeneratedCode(node: SignatureDeclaration) { // no rest parameters \ declaration context \ overload - no codegen impact - if (!hasDeclaredRestParameter(node) || isInAmbientContext(node) || nodeIsMissing((node).body)) { + if (!hasRestParameter(node) || isInAmbientContext(node) || nodeIsMissing((node).body)) { return; } @@ -23095,6 +23221,19 @@ namespace ts { return result; } + function isNodeWithinConstructor(node: Node, classDeclaration: ClassLikeDeclaration) { + return findAncestor(node, element => { + if (isConstructorDeclaration(element) && nodeIsPresent(element.body)) { + return true; + } + else if (element === classDeclaration || isFunctionLikeDeclaration(element)) { + return "quit"; + } + + return false; + }); + } + function isNodeWithinClass(node: Node, classDeclaration: ClassLikeDeclaration) { return !!forEachEnclosingClass(node, n => n === classDeclaration); } diff --git a/src/compiler/core.ts b/src/compiler/core.ts index 45a4a04b6ab..f838d6abfef 100644 --- a/src/compiler/core.ts +++ b/src/compiler/core.ts @@ -213,11 +213,13 @@ namespace ts { return undefined; } - export function zipWith(arrayA: ReadonlyArray, arrayB: ReadonlyArray, callback: (a: T, b: U, index: number) => void): void { + export function zipWith(arrayA: ReadonlyArray, arrayB: ReadonlyArray, callback: (a: T, b: U, index: number) => V): V[] { + const result: V[] = []; Debug.assert(arrayA.length === arrayB.length); for (let i = 0; i < arrayA.length; i++) { - callback(arrayA[i], arrayB[i], i); + result.push(callback(arrayA[i], arrayB[i], i)); } + return result; } export function zipToMap(keys: ReadonlyArray, values: ReadonlyArray): Map { @@ -356,21 +358,6 @@ namespace ts { return array; } - export function removeWhere(array: T[], f: (x: T) => boolean): boolean { - let outIndex = 0; - for (const item of array) { - if (!f(item)) { - array[outIndex] = item; - outIndex++; - } - } - if (outIndex !== array.length) { - array.length = outIndex; - return true; - } - return false; - } - export function filterMutate(array: T[], f: (x: T, i: number, array: T[]) => boolean): void { let outIndex = 0; for (let i = 0; i < array.length; i++) { @@ -1663,7 +1650,7 @@ namespace ts { } export function isUrl(path: string) { - return path && !isRootedDiskPath(path) && path.indexOf("://") !== -1; + return path && !isRootedDiskPath(path) && stringContains(path, "://"); } export function pathIsRelative(path: string): boolean { @@ -1932,8 +1919,12 @@ namespace ts { return expectedPos >= 0 && str.indexOf(suffix, expectedPos) === expectedPos; } + export function stringContains(str: string, substring: string): boolean { + return str.indexOf(substring) !== -1; + } + export function hasExtension(fileName: string): boolean { - return getBaseFileName(fileName).indexOf(".") >= 0; + return stringContains(getBaseFileName(fileName), "."); } export function fileExtensionIs(path: string, extension: string): boolean { diff --git a/src/compiler/declarationEmitter.ts b/src/compiler/declarationEmitter.ts index 3de20915029..48b97b048e9 100644 --- a/src/compiler/declarationEmitter.ts +++ b/src/compiler/declarationEmitter.ts @@ -172,7 +172,7 @@ namespace ts { function hasInternalAnnotation(range: CommentRange) { const comment = currentText.substring(range.pos, range.end); - return comment.indexOf("@internal") >= 0; + return stringContains(comment, "@internal"); } function stripInternal(node: Node) { diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index 3b32ba174f1..1db368bb541 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -907,6 +907,10 @@ "category": "Error", "code": 1328 }, + "'{0}' accepts too few arguments to be used as a decorator here. Did you mean to call it first and write '@{0}()'?": { + "category": "Error", + "code": 1329 + }, "Duplicate identifier '{0}'.": { "category": "Error", @@ -2216,6 +2220,14 @@ "category": "Error", "code": 2714 }, + "Abstract property '{0}' in class '{1}' cannot be accessed in the constructor.": { + "category": "Error", + "code": 2715 + }, + "Type parameter '{0}' has a circular default.": { + "category": "Error", + "code": 2716 + }, "Import declaration '{0}' is using private name '{1}'.": { "category": "Error", @@ -3511,11 +3523,11 @@ "category": "Error", "code": 8021 }, - "JSDoc '@augments' is not attached to a class declaration.": { + "JSDoc '@{0}' is not attached to a class.": { "category": "Error", "code": 8022 }, - "JSDoc '@augments {0}' does not match the 'extends {1}' clause.": { + "JSDoc '@{0} {1}' does not match the 'extends {2}' clause.": { "category": "Error", "code": 8023 }, @@ -3523,6 +3535,10 @@ "category": "Error", "code": 8024 }, + "Class declarations cannot have more than one `@augments` or `@extends` tag.": { + "category": "Error", + "code": 8025 + }, "Only identifiers/qualified-names with optional type arguments are currently supported in a class 'extends' clause.": { "category": "Error", "code": 9002 @@ -3649,7 +3665,7 @@ "category": "Message", "code": 90013 }, - "Change {0} to {1}.": { + "Change '{0}' to '{1}'.": { "category": "Message", "code": 90014 }, @@ -3665,6 +3681,7 @@ "category": "Message", "code": 90017 }, + "Disable checking for this file.": { "category": "Message", "code": 90018 @@ -3705,7 +3722,10 @@ "category": "Message", "code": 90027 }, - + "Call decorator expression.": { + "category": "Message", + "code": 90028 + }, "Convert function to an ES2015 class": { "category": "Message", "code": 95001 @@ -3714,34 +3734,36 @@ "category": "Message", "code": 95002 }, - "Extract symbol": { "category": "Message", "code": 95003 }, - "Extract to {0} in {1}": { "category": "Message", "code": 95004 }, - "Extract function": { "category": "Message", "code": 95005 }, - "Extract constant": { "category": "Message", "code": 95006 }, - "Extract to {0} in enclosing scope": { "category": "Message", "code": 95007 }, - "Extract to {0} in {1} scope": { "category": "Message", "code": 95008 + }, + "Infer type of '{0}' from usage.": { + "category": "Message", + "code": 95009 + }, + "Infer parameter types from usage.": { + "category": "Message", + "code": 95010 } } diff --git a/src/compiler/emitter.ts b/src/compiler/emitter.ts old mode 100755 new mode 100644 index 8083b3841c8..da6c0e0fca8 --- a/src/compiler/emitter.ts +++ b/src/compiler/emitter.ts @@ -1226,7 +1226,7 @@ namespace ts { // check if numeric literal is a decimal literal that was originally written with a dot const text = getLiteralTextOfNode(expression); return !expression.numericLiteralFlags - && text.indexOf(tokenToString(SyntaxKind.DotToken)) < 0; + && !stringContains(text, tokenToString(SyntaxKind.DotToken)); } else if (isPropertyAccessExpression(expression) || isElementAccessExpression(expression)) { // check if constant enum value is integer diff --git a/src/compiler/factory.ts b/src/compiler/factory.ts index 968144c0fc7..65c1c92f366 100644 --- a/src/compiler/factory.ts +++ b/src/compiler/factory.ts @@ -47,10 +47,15 @@ namespace ts { * Creates a shallow, memberwise clone of a node with no source map location. */ /* @internal */ - export function getSynthesizedClone(node: T | undefined): T { + export function getSynthesizedClone(node: T | undefined): T | undefined { // We don't use "clone" from core.ts here, as we need to preserve the prototype chain of // the original node. We also need to exclude specific properties and only include own- // properties (to skip members already defined on the shared prototype). + + if (node === undefined) { + return undefined; + } + const clone = createSynthesizedNode(node.kind); clone.flags |= node.flags; setOriginalNode(clone, node); @@ -2607,6 +2612,16 @@ namespace ts { return node; } + /** + * Sets flags that control emit behavior of a node. + */ + /* @internal */ + export function addEmitFlags(node: T, emitFlags: EmitFlags) { + const emitNode = getOrCreateEmitNode(node); + emitNode.flags = emitNode.flags | emitFlags; + return node; + } + /** * Gets a custom text range to use when emitting source maps. */ diff --git a/src/compiler/moduleNameResolver.ts b/src/compiler/moduleNameResolver.ts index 560beb39557..ac83dd41311 100644 --- a/src/compiler/moduleNameResolver.ts +++ b/src/compiler/moduleNameResolver.ts @@ -1061,7 +1061,7 @@ namespace ts { export function getPackageNameFromAtTypesDirectory(mangledName: string): string { const withoutAtTypePrefix = removePrefix(mangledName, "@types/"); if (withoutAtTypePrefix !== mangledName) { - return withoutAtTypePrefix.indexOf(mangledScopedPackageSeparator) !== -1 ? + return stringContains(withoutAtTypePrefix, mangledScopedPackageSeparator) ? "@" + withoutAtTypePrefix.replace(mangledScopedPackageSeparator, ts.directorySeparator) : withoutAtTypePrefix; } diff --git a/src/compiler/parser.ts b/src/compiler/parser.ts index ebdf390f5b2..e2bae71e6bf 100644 --- a/src/compiler/parser.ts +++ b/src/compiler/parser.ts @@ -6373,6 +6373,7 @@ namespace ts { if (tagName) { switch (tagName.escapedText) { case "augments": + case "extends": tag = parseAugmentsTag(atToken, tagName); break; case "class": @@ -6699,7 +6700,7 @@ namespace ts { if (typeExpression && typeExpression.type.kind === SyntaxKind.ArrayType) { jsdocTypeLiteral.isArrayType = true; } - typedefTag.typeExpression = childTypeTag && !isObjectOrObjectArrayTypeReference(childTypeTag.typeExpression.type) ? + typedefTag.typeExpression = childTypeTag && childTypeTag.typeExpression && !isObjectOrObjectArrayTypeReference(childTypeTag.typeExpression.type) ? childTypeTag.typeExpression : finishNode(jsdocTypeLiteral); } diff --git a/src/compiler/program.ts b/src/compiler/program.ts index 24d7707f50d..b8c402dbb7f 100755 --- a/src/compiler/program.ts +++ b/src/compiler/program.ts @@ -663,8 +663,7 @@ namespace ts { dropDiagnosticsProducingTypeChecker, getSourceFileFromReference, sourceFileToPackageName, - redirectTargetsSet, - hasInvalidatedResolution + redirectTargetsSet }; verifyCompilerOptions(); @@ -1092,11 +1091,18 @@ namespace ts { return true; } - if (defaultLibraryPath && defaultLibraryPath.length !== 0) { - return containsPath(defaultLibraryPath, file.path, currentDirectory, /*ignoreCase*/ !host.useCaseSensitiveFileNames()); + if (!options.noLib) { + return false; } - return compareStrings(file.fileName, getDefaultLibraryFileName(), /*ignoreCase*/ !host.useCaseSensitiveFileNames()) === Comparison.EqualTo; + // If '--lib' is not specified, include default library file according to '--target' + // otherwise, using options specified in '--lib' instead of '--target' default library file + if (!options.lib) { + return compareStrings(file.fileName, getDefaultLibraryFileName(), /*ignoreCase*/ !host.useCaseSensitiveFileNames()) === Comparison.EqualTo; + } + else { + return forEach(options.lib, libFileName => compareStrings(file.fileName, combinePaths(defaultLibraryPath, libFileName), /*ignoreCase*/ !host.useCaseSensitiveFileNames()) === Comparison.EqualTo); + } } function getDiagnosticsProducingTypeChecker() { diff --git a/src/compiler/resolutionCache.ts b/src/compiler/resolutionCache.ts index aecc6989891..84fffbe6f5e 100644 --- a/src/compiler/resolutionCache.ts +++ b/src/compiler/resolutionCache.ts @@ -107,7 +107,9 @@ namespace ts { return { startRecordingFilesWithChangedResolutions, finishRecordingFilesWithChangedResolutions, - startCachingPerDirectoryResolution, + // perDirectoryResolvedModuleNames and perDirectoryResolvedTypeReferenceDirectives could be non empty if there was exception during program update + // (between startCachingPerDirectoryResolution and finishCachingPerDirectoryResolution) + startCachingPerDirectoryResolution: clearPerDirectoryResolutions, finishCachingPerDirectoryResolution, resolveModuleNames, resolveTypeReferenceDirectives, @@ -141,7 +143,9 @@ namespace ts { resolvedModuleNames.clear(); resolvedTypeReferenceDirectives.clear(); allFilesHaveInvalidatedResolution = false; - Debug.assert(perDirectoryResolvedModuleNames.size === 0 && perDirectoryResolvedTypeReferenceDirectives.size === 0); + // perDirectoryResolvedModuleNames and perDirectoryResolvedTypeReferenceDirectives could be non empty if there was exception during program update + // (between startCachingPerDirectoryResolution and finishCachingPerDirectoryResolution) + clearPerDirectoryResolutions(); } function startRecordingFilesWithChangedResolutions() { @@ -165,8 +169,9 @@ namespace ts { return path => collected && collected.has(path); } - function startCachingPerDirectoryResolution() { - Debug.assert(perDirectoryResolvedModuleNames.size === 0 && perDirectoryResolvedTypeReferenceDirectives.size === 0); + function clearPerDirectoryResolutions() { + perDirectoryResolvedModuleNames.clear(); + perDirectoryResolvedTypeReferenceDirectives.clear(); } function finishCachingPerDirectoryResolution() { @@ -178,8 +183,7 @@ namespace ts { } }); - perDirectoryResolvedModuleNames.clear(); - perDirectoryResolvedTypeReferenceDirectives.clear(); + clearPerDirectoryResolutions(); } function resolveModuleName(moduleName: string, containingFile: string, compilerOptions: CompilerOptions, host: ModuleResolutionHost): ResolvedModuleWithFailedLookupLocations { @@ -323,17 +327,14 @@ namespace ts { let dir = getDirectoryPath(getNormalizedAbsolutePath(failedLookupLocation, getCurrentDirectory())); let dirPath = getDirectoryPath(failedLookupLocationPath); - // If the directory is node_modules use it to watch - if (isNodeModulesDirectory(dirPath)) { - return { dir, dirPath }; + // If directory path contains node module, get the most parent node_modules directory for watching + while (stringContains(dirPath, "/node_modules/")) { + dir = getDirectoryPath(dir); + dirPath = getDirectoryPath(dirPath); } - // If directory path contains node module, get the node_modules directory for watching - if (dirPath.indexOf("/node_modules/") !== -1) { - while (!isNodeModulesDirectory(dirPath)) { - dir = getDirectoryPath(dir); - dirPath = getDirectoryPath(dirPath); - } + // If the directory is node_modules use it to watch + if (isNodeModulesDirectory(dirPath)) { return { dir, dirPath }; } diff --git a/src/compiler/transformers/generators.ts b/src/compiler/transformers/generators.ts index 84ed997a70e..7ede62b1540 100644 --- a/src/compiler/transformers/generators.ts +++ b/src/compiler/transformers/generators.ts @@ -1112,7 +1112,7 @@ namespace ts { } function visitCallExpression(node: CallExpression) { - if (forEach(node.arguments, containsYield)) { + if (!isImportCall(node) && forEach(node.arguments, containsYield)) { // [source] // a.b(1, yield, 2); // @@ -1123,7 +1123,6 @@ namespace ts { // .yield resumeLabel // .mark resumeLabel // _b.apply(_a, _c.concat([%sent%, 2])); - const { target, thisArg } = createCallBinding(node.expression, hoistVariableDeclaration, languageVersion, /*cacheIdentifiers*/ true); return setOriginalNode( createFunctionApply( diff --git a/src/compiler/transformers/module/module.ts b/src/compiler/transformers/module/module.ts index 145ac07c2f2..bd360fdffe4 100644 --- a/src/compiler/transformers/module/module.ts +++ b/src/compiler/transformers/module/module.ts @@ -21,7 +21,8 @@ namespace ts { const { startLexicalEnvironment, - endLexicalEnvironment + endLexicalEnvironment, + hoistVariableDeclaration } = context; const compilerOptions = context.getCompilerOptions(); @@ -519,18 +520,20 @@ namespace ts { } function visitImportCallExpression(node: ImportCall): Expression { + const argument = visitNode(firstOrUndefined(node.arguments), importCallExpressionVisitor); + const containsLexicalThis = !!(node.transformFlags & TransformFlags.ContainsLexicalThis); switch (compilerOptions.module) { case ModuleKind.AMD: - return transformImportCallExpressionAMD(node); + return createImportCallExpressionAMD(argument, containsLexicalThis); case ModuleKind.UMD: - return transformImportCallExpressionUMD(node); + return createImportCallExpressionUMD(argument, containsLexicalThis); case ModuleKind.CommonJS: default: - return transformImportCallExpressionCommonJS(node); + return createImportCallExpressionCommonJS(argument, containsLexicalThis); } } - function transformImportCallExpressionUMD(node: ImportCall): Expression { + function createImportCallExpressionUMD(arg: Expression | undefined, containsLexicalThis: boolean): Expression { // (function (factory) { // ... (regular UMD) // } @@ -545,14 +548,25 @@ namespace ts { // : new Promise(function (_a, _b) { require([x], _a, _b); }); /*Amd Require*/ // }); needUMDDynamicImportHelper = true; - return createConditional( - /*condition*/ createIdentifier("__syncRequire"), - /*whenTrue*/ transformImportCallExpressionCommonJS(node), - /*whenFalse*/ transformImportCallExpressionAMD(node) - ); + if (isSimpleCopiableExpression(arg)) { + const argClone = isGeneratedIdentifier(arg) ? arg : isStringLiteral(arg) ? createLiteral(arg) : setEmitFlags(setTextRange(getSynthesizedClone(arg), arg), EmitFlags.NoComments); + return createConditional( + /*condition*/ createIdentifier("__syncRequire"), + /*whenTrue*/ createImportCallExpressionCommonJS(arg, containsLexicalThis), + /*whenFalse*/ createImportCallExpressionAMD(argClone, containsLexicalThis) + ); + } + else { + const temp = createTempVariable(hoistVariableDeclaration); + return createComma(createAssignment(temp, arg), createConditional( + /*condition*/ createIdentifier("__syncRequire"), + /*whenTrue*/ createImportCallExpressionCommonJS(temp, containsLexicalThis), + /*whenFalse*/ createImportCallExpressionAMD(temp, containsLexicalThis) + )); + } } - function transformImportCallExpressionAMD(node: ImportCall): Expression { + function createImportCallExpressionAMD(arg: Expression | undefined, containsLexicalThis: boolean): Expression { // improt("./blah") // emit as // define(["require", "exports", "blah"], function (require, exports) { @@ -561,46 +575,89 @@ namespace ts { // }); const resolve = createUniqueName("resolve"); const reject = createUniqueName("reject"); - return createNew( - createIdentifier("Promise"), - /*typeArguments*/ undefined, - [createFunctionExpression( + const parameters = [ + createParameter(/*decorator*/ undefined, /*modifiers*/ undefined, /*dotDotDotToken*/ undefined, /*name*/ resolve), + createParameter(/*decorator*/ undefined, /*modifiers*/ undefined, /*dotDotDotToken*/ undefined, /*name*/ reject) + ]; + const body = createBlock([ + createStatement( + createCall( + createIdentifier("require"), + /*typeArguments*/ undefined, + [createArrayLiteral([arg || createOmittedExpression()]), resolve, reject] + ) + ) + ]); + + let func: FunctionExpression | ArrowFunction; + if (languageVersion >= ScriptTarget.ES2015) { + func = createArrowFunction( + /*modifiers*/ undefined, + /*typeParameters*/ undefined, + parameters, + /*type*/ undefined, + /*equalsGreaterThanToken*/ undefined, + body); + } + else { + func = createFunctionExpression( /*modifiers*/ undefined, /*asteriskToken*/ undefined, /*name*/ undefined, /*typeParameters*/ undefined, - [createParameter(/*decorator*/ undefined, /*modifiers*/ undefined, /*dotDotDotToken*/ undefined, /*name*/ resolve), - createParameter(/*decorator*/ undefined, /*modifiers*/ undefined, /*dotDotDotToken*/ undefined, /*name*/ reject)], + parameters, /*type*/ undefined, - createBlock([createStatement( - createCall( - createIdentifier("require"), - /*typeArguments*/ undefined, - [createArrayLiteral([firstOrUndefined(node.arguments) || createOmittedExpression()]), resolve, reject] - ))]) - )]); + body); + + // if there is a lexical 'this' in the import call arguments, ensure we indicate + // that this new function expression indicates it captures 'this' so that the + // es2015 transformer will properly substitute 'this' with '_this'. + if (containsLexicalThis) { + setEmitFlags(func, EmitFlags.CapturesThis); + } + } + + return createNew(createIdentifier("Promise"), /*typeArguments*/ undefined, [func]); } - function transformImportCallExpressionCommonJS(node: ImportCall): Expression { + function createImportCallExpressionCommonJS(arg: Expression | undefined, containsLexicalThis: boolean): Expression { // import("./blah") // emit as // Promise.resolve().then(function () { return require(x); }) /*CommonJs Require*/ // We have to wrap require in then callback so that require is done in asynchronously // if we simply do require in resolve callback in Promise constructor. We will execute the loading immediately - return createCall( - createPropertyAccess( - createCall(createPropertyAccess(createIdentifier("Promise"), "resolve"), /*typeArguments*/ undefined, /*argumentsArray*/ []), - "then"), - /*typeArguments*/ undefined, - [createFunctionExpression( + const promiseResolveCall = createCall(createPropertyAccess(createIdentifier("Promise"), "resolve"), /*typeArguments*/ undefined, /*argumentsArray*/ []); + const requireCall = createCall(createIdentifier("require"), /*typeArguments*/ undefined, arg ? [arg] : []); + + let func: FunctionExpression | ArrowFunction; + if (languageVersion >= ScriptTarget.ES2015) { + func = createArrowFunction( + /*modifiers*/ undefined, + /*typeParameters*/ undefined, + /*parameters*/ [], + /*type*/ undefined, + /*equalsGreaterThanToken*/ undefined, + requireCall); + } + else { + func = createFunctionExpression( /*modifiers*/ undefined, /*asteriskToken*/ undefined, /*name*/ undefined, /*typeParameters*/ undefined, - /*parameters*/ undefined, + /*parameters*/ [], /*type*/ undefined, - createBlock([createReturn(createCall(createIdentifier("require"), /*typeArguments*/ undefined, node.arguments))]) - )]); + createBlock([createReturn(requireCall)])); + + // if there is a lexical 'this' in the import call arguments, ensure we indicate + // that this new function expression indicates it captures 'this' so that the + // es2015 transformer will properly substitute 'this' with '_this'. + if (containsLexicalThis) { + setEmitFlags(func, EmitFlags.CapturesThis); + } + } + + return createCall(createPropertyAccess(promiseResolveCall, "then"), /*typeArguments*/ undefined, [func]); } /** @@ -861,10 +918,10 @@ namespace ts { if (original && hasAssociatedEndOfDeclarationMarker(original)) { // Defer exports until we encounter an EndOfDeclarationMarker node const id = getOriginalNodeId(node); - deferredExports[id] = appendExportStatement(deferredExports[id], createIdentifier("default"), node.expression, /*location*/ node, /*allowComments*/ true); + deferredExports[id] = appendExportStatement(deferredExports[id], createIdentifier("default"), visitNode(node.expression, importCallExpressionVisitor), /*location*/ node, /*allowComments*/ true); } else { - statements = appendExportStatement(statements, createIdentifier("default"), node.expression, /*location*/ node, /*allowComments*/ true); + statements = appendExportStatement(statements, createIdentifier("default"), visitNode(node.expression, importCallExpressionVisitor), /*location*/ node, /*allowComments*/ true); } return singleOrMany(statements); diff --git a/src/compiler/transformers/module/system.ts b/src/compiler/transformers/module/system.ts index af77c499e8d..ed943eb90ce 100644 --- a/src/compiler/transformers/module/system.ts +++ b/src/compiler/transformers/module/system.ts @@ -1495,7 +1495,7 @@ namespace ts { createIdentifier("import") ), /*typeArguments*/ undefined, - node.arguments + some(node.arguments) ? [visitNode(node.arguments[0], destructuringAndImportCallVisitor)] : [] ); } diff --git a/src/compiler/transformers/ts.ts b/src/compiler/transformers/ts.ts index 4feb3ca0c26..ba4b5fcdf52 100644 --- a/src/compiler/transformers/ts.ts +++ b/src/compiler/transformers/ts.ts @@ -26,7 +26,7 @@ namespace ts { IsExportOfNamespace = 1 << 3, IsNamedExternalExport = 1 << 4, IsDefaultExternalExport = 1 << 5, - HasExtendsClause = 1 << 6, + IsDerivedClass = 1 << 6, UseImmediatelyInvokedFunctionExpression = 1 << 7, HasAnyDecorators = HasConstructorDecorators | HasMemberDecorators, @@ -45,6 +45,7 @@ namespace ts { const resolver = context.getEmitResolver(); const compilerOptions = context.getCompilerOptions(); + const strictNullChecks = typeof compilerOptions.strictNullChecks === "undefined" ? compilerOptions.strict : compilerOptions.strictNullChecks; const languageVersion = getEmitScriptTarget(compilerOptions); const moduleKind = getEmitModuleKind(compilerOptions); @@ -553,7 +554,8 @@ namespace ts { function getClassFacts(node: ClassDeclaration, staticProperties: ReadonlyArray) { let facts = ClassFacts.None; if (some(staticProperties)) facts |= ClassFacts.HasStaticInitializedProperties; - if (getClassExtendsHeritageClauseElement(node)) facts |= ClassFacts.HasExtendsClause; + const extendsClauseElement = getClassExtendsHeritageClauseElement(node); + if (extendsClauseElement && skipOuterExpressions(extendsClauseElement.expression).kind !== SyntaxKind.NullKeyword) facts |= ClassFacts.IsDerivedClass; if (shouldEmitDecorateCallForClass(node)) facts |= ClassFacts.HasConstructorDecorators; if (childIsDecorated(node)) facts |= ClassFacts.HasMemberDecorators; if (isExportOfNamespace(node)) facts |= ClassFacts.IsExportOfNamespace; @@ -699,7 +701,7 @@ namespace ts { name, /*typeParameters*/ undefined, visitNodes(node.heritageClauses, visitor, isHeritageClause), - transformClassMembers(node, (facts & ClassFacts.HasExtendsClause) !== 0) + transformClassMembers(node, (facts & ClassFacts.IsDerivedClass) !== 0) ); // To better align with the old emitter, we should not emit a trailing source map @@ -814,7 +816,7 @@ namespace ts { // ${members} // } const heritageClauses = visitNodes(node.heritageClauses, visitor, isHeritageClause); - const members = transformClassMembers(node, (facts & ClassFacts.HasExtendsClause) !== 0); + const members = transformClassMembers(node, (facts & ClassFacts.IsDerivedClass) !== 0); const classExpression = createClassExpression(/*modifiers*/ undefined, name, /*typeParameters*/ undefined, heritageClauses, members); setOriginalNode(classExpression, node); setTextRange(classExpression, location); @@ -887,11 +889,11 @@ namespace ts { * Transforms the members of a class. * * @param node The current class. - * @param hasExtendsClause A value indicating whether the class has an extends clause. + * @param isDerivedClass A value indicating whether the class has an extends clause that does not extend 'null'. */ - function transformClassMembers(node: ClassDeclaration | ClassExpression, hasExtendsClause: boolean) { + function transformClassMembers(node: ClassDeclaration | ClassExpression, isDerivedClass: boolean) { const members: ClassElement[] = []; - const constructor = transformConstructor(node, hasExtendsClause); + const constructor = transformConstructor(node, isDerivedClass); if (constructor) { members.push(constructor); } @@ -904,9 +906,9 @@ namespace ts { * Transforms (or creates) a constructor for a class. * * @param node The current class. - * @param hasExtendsClause A value indicating whether the class has an extends clause. + * @param isDerivedClass A value indicating whether the class has an extends clause that does not extend 'null'. */ - function transformConstructor(node: ClassDeclaration | ClassExpression, hasExtendsClause: boolean) { + function transformConstructor(node: ClassDeclaration | ClassExpression, isDerivedClass: boolean) { // Check if we have property assignment inside class declaration. // If there is a property assignment, we need to emit constructor whether users define it or not // If there is no property assignment, we can omit constructor if users do not define it @@ -921,7 +923,7 @@ namespace ts { } const parameters = transformConstructorParameters(constructor); - const body = transformConstructorBody(node, constructor, hasExtendsClause); + const body = transformConstructorBody(node, constructor, isDerivedClass); // constructor(${parameters}) { // ${body} @@ -947,7 +949,6 @@ namespace ts { * parameter property assignments or instance property initializers. * * @param constructor The constructor declaration. - * @param hasExtendsClause A value indicating whether the class has an extends clause. */ function transformConstructorParameters(constructor: ConstructorDeclaration) { // The ES2015 spec specifies in 14.5.14. Runtime Semantics: ClassDefinitionEvaluation: @@ -975,9 +976,9 @@ namespace ts { * * @param node The current class. * @param constructor The current class constructor. - * @param hasExtendsClause A value indicating whether the class has an extends clause. + * @param isDerivedClass A value indicating whether the class has an extends clause that does not extend 'null'. */ - function transformConstructorBody(node: ClassExpression | ClassDeclaration, constructor: ConstructorDeclaration, hasExtendsClause: boolean) { + function transformConstructorBody(node: ClassExpression | ClassDeclaration, constructor: ConstructorDeclaration, isDerivedClass: boolean) { let statements: Statement[] = []; let indexOfFirstStatement = 0; @@ -1001,7 +1002,7 @@ namespace ts { const propertyAssignments = getParametersWithPropertyAssignments(constructor); addRange(statements, map(propertyAssignments, transformParameterWithPropertyAssignment)); } - else if (hasExtendsClause) { + else if (isDerivedClass) { // Add a synthetic `super` call: // // super(...arguments); @@ -1869,7 +1870,16 @@ namespace ts { // Note when updating logic here also update getEntityNameForDecoratorMetadata // so that aliases can be marked as referenced let serializedUnion: SerializedTypeNode; - for (const typeNode of node.types) { + for (let typeNode of node.types) { + while (typeNode.kind === SyntaxKind.ParenthesizedType) { + typeNode = (typeNode as ParenthesizedTypeNode).type; // Skip parens if need be + } + if (typeNode.kind === SyntaxKind.NeverKeyword) { + continue; // Always elide `never` from the union/intersection if possible + } + if (!strictNullChecks && (typeNode.kind === SyntaxKind.NullKeyword || typeNode.kind === SyntaxKind.UndefinedKeyword)) { + continue; // Elide null and undefined from unions for metadata, just like what we did prior to the implementation of strict null checks + } const serializedIndividual = serializeTypeNode(typeNode); if (isIdentifier(serializedIndividual) && serializedIndividual.escapedText === "Object") { @@ -1893,7 +1903,7 @@ namespace ts { } // If we were able to find common type, use it - return serializedUnion; + return serializedUnion || createVoidZero(); // Fallback is only hit if all union constituients are null/undefined/never } /** diff --git a/src/compiler/transformers/utilities.ts b/src/compiler/transformers/utilities.ts index 00a0753eaa1..a012c9be7db 100644 --- a/src/compiler/transformers/utilities.ts +++ b/src/compiler/transformers/utilities.ts @@ -178,4 +178,17 @@ namespace ts { } return values; } + + /** + * Used in the module transformer to check if an expression is reasonably without sideeffect, + * and thus better to copy into multiple places rather than to cache in a temporary variable + * - this is mostly subjective beyond the requirement that the expression not be sideeffecting + */ + export function isSimpleCopiableExpression(expression: Expression) { + return expression.kind === SyntaxKind.StringLiteral || + expression.kind === SyntaxKind.NumericLiteral || + expression.kind === SyntaxKind.NoSubstitutionTemplateLiteral || + isKeyword(expression.kind) || + isIdentifier(expression); + } } \ No newline at end of file diff --git a/src/compiler/types.ts b/src/compiler/types.ts index 578c2d23c4f..42e8292b13b 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -2159,6 +2159,10 @@ namespace ts { kind: SyntaxKind.JSDocTag; } + /** + * Note that `@extends` is a synonym of `@augments`. + * Both tags are represented by this interface. + */ export interface JSDocAugmentsTag extends JSDocTag { kind: SyntaxKind.JSDocAugmentsTag; class: ExpressionWithTypeArguments & { expression: Identifier | PropertyAccessEntityNameExpression }; @@ -2194,7 +2198,7 @@ namespace ts { export interface JSDocPropertyLikeTag extends JSDocTag, Declaration { parent: JSDoc; name: EntityName; - typeExpression: JSDocTypeExpression; + typeExpression?: JSDocTypeExpression; /** Whether the property name came before the type -- non-standard for JSDoc, but Typescript-like */ isNameFirst: boolean; isBracketed: boolean; @@ -2525,8 +2529,6 @@ namespace ts { /* @internal */ sourceFileToPackageName: Map; /** Set of all source files that some other source file redirects to. */ /* @internal */ redirectTargetsSet: Map; - /** Returns true when file in the program had invalidated resolution at the time of program creation. */ - /* @internal */ hasInvalidatedResolution: HasInvalidatedResolution; } /* @internal */ @@ -2649,6 +2651,10 @@ namespace ts { signatureToString(signature: Signature, enclosingDeclaration?: Node, flags?: TypeFormatFlags, kind?: SignatureKind): string; typeToString(type: Type, enclosingDeclaration?: Node, flags?: TypeFormatFlags): string; symbolToString(symbol: Symbol, enclosingDeclaration?: Node, meaning?: SymbolFlags): string; + /** + * @deprecated Use the createX factory functions or XToY typechecker methods and `createPrinter` or the `xToString` methods instead + * This will be removed in a future version. + */ getSymbolDisplayBuilder(): SymbolDisplayBuilder; getFullyQualifiedName(symbol: Symbol): string; getAugmentedPropertiesOfType(type: Type): Symbol[]; @@ -2689,6 +2695,24 @@ namespace ts { getSuggestionForNonexistentSymbol(location: Node, name: string, meaning: SymbolFlags): string | undefined; /* @internal */ getBaseConstraintOfType(type: Type): Type | undefined; + /* @internal */ getAnyType(): Type; + /* @internal */ getStringType(): Type; + /* @internal */ getNumberType(): Type; + /* @internal */ getBooleanType(): Type; + /* @internal */ getVoidType(): Type; + /* @internal */ getUndefinedType(): Type; + /* @internal */ getNullType(): Type; + /* @internal */ getESSymbolType(): Type; + /* @internal */ getNeverType(): Type; + /* @internal */ getUnionType(types: Type[], subtypeReduction?: boolean): Type; + /* @internal */ createArrayType(elementType: Type): Type; + /* @internal */ createPromiseType(type: Type): Type; + + /* @internal */ createAnonymousType(symbol: Symbol, members: SymbolTable, callSignatures: Signature[], constructSignatures: Signature[], stringIndexInfo: IndexInfo, numberIndexInfo: IndexInfo): Type; + /* @internal */ createSignature(declaration: SignatureDeclaration, typeParameters: TypeParameter[], thisParameter: Symbol | undefined, parameters: Symbol[], resolvedReturnType: Type, typePredicate: TypePredicate, minArgumentCount: number, hasRestParameter: boolean, hasLiteralTypes: boolean): Signature; + /* @internal */ createSymbol(flags: SymbolFlags, name: __String): TransientSymbol; + /* @internal */ createIndexInfo(type: Type, isReadonly: boolean, declaration?: SignatureDeclaration): IndexInfo; + /* @internal */ isSymbolAccessible(symbol: Symbol, enclosingDeclaration: Node, meaning: SymbolFlags, shouldComputeAliasToMarkVisible: boolean): SymbolAccessibilityResult; /* @internal */ tryFindAmbientModuleWithoutAugmentations(moduleName: string): Symbol | undefined; /* @internal */ getSymbolWalker(accept?: (symbol: Symbol) => boolean): SymbolWalker; diff --git a/src/compiler/utilities.ts b/src/compiler/utilities.ts index f0eb394adb7..4688a7779e3 100644 --- a/src/compiler/utilities.ts +++ b/src/compiler/utilities.ts @@ -1604,26 +1604,12 @@ namespace ts { } export function hasRestParameter(s: SignatureDeclaration): boolean { - return isRestParameter(lastOrUndefined(s.parameters)); + const last = lastOrUndefined(s.parameters); + return last && isRestParameter(last); } - export function hasDeclaredRestParameter(s: SignatureDeclaration): boolean { - return isDeclaredRestParam(lastOrUndefined(s.parameters)); - } - - export function isRestParameter(node: ParameterDeclaration) { - if (isInJavaScriptFile(node)) { - if (node.type && node.type.kind === SyntaxKind.JSDocVariadicType || - forEach(getJSDocParameterTags(node), - t => t.typeExpression && t.typeExpression.type.kind === SyntaxKind.JSDocVariadicType)) { - return true; - } - } - return isDeclaredRestParam(node); - } - - export function isDeclaredRestParam(node: ParameterDeclaration) { - return node && node.dotDotDotToken !== undefined; + export function isRestParameter(node: ParameterDeclaration): boolean { + return node.dotDotDotToken !== undefined; } export const enum AssignmentKind { @@ -4112,27 +4098,35 @@ namespace ts { if (!declaration) { return undefined; } - if (isJSDocPropertyLikeTag(declaration) && declaration.name.kind === SyntaxKind.QualifiedName) { - return declaration.name.right; - } - if (declaration.kind === SyntaxKind.BinaryExpression) { - const expr = declaration as BinaryExpression; - switch (getSpecialPropertyAssignmentKind(expr)) { - case SpecialPropertyAssignmentKind.ExportsProperty: - case SpecialPropertyAssignmentKind.ThisProperty: - case SpecialPropertyAssignmentKind.Property: - case SpecialPropertyAssignmentKind.PrototypeProperty: - return (expr.left as PropertyAccessExpression).name; - default: - return undefined; + switch (declaration.kind) { + case SyntaxKind.JSDocPropertyTag: + case SyntaxKind.JSDocParameterTag: { + const { name } = declaration as JSDocPropertyLikeTag; + if (name.kind === SyntaxKind.QualifiedName) { + return name.right; + } + break; + } + case SyntaxKind.BinaryExpression: { + const expr = declaration as BinaryExpression; + switch (getSpecialPropertyAssignmentKind(expr)) { + case SpecialPropertyAssignmentKind.ExportsProperty: + case SpecialPropertyAssignmentKind.ThisProperty: + case SpecialPropertyAssignmentKind.Property: + case SpecialPropertyAssignmentKind.PrototypeProperty: + return (expr.left as PropertyAccessExpression).name; + default: + return undefined; + } + } + case SyntaxKind.JSDocTypedefTag: + return getNameOfJSDocTypedef(declaration as JSDocTypedefTag); + case SyntaxKind.ExportAssignment: { + const { expression } = declaration as ExportAssignment; + return isIdentifier(expression) ? expression : undefined; } } - else if (declaration.kind === SyntaxKind.JSDocTypedefTag) { - return getNameOfJSDocTypedef(declaration as JSDocTypedefTag); - } - else { - return (declaration as NamedDeclaration).name; - } + return (declaration as NamedDeclaration).name; } /** @@ -4247,6 +4241,12 @@ namespace ts { return find(tags, doc => doc.kind === kind); } + /** Gets all JSDoc tags of a specified kind, or undefined if not present. */ + export function getAllJSDocTagsOfKind(node: Node, kind: SyntaxKind): ReadonlyArray | undefined { + const tags = getJSDocTags(node); + return filter(tags, doc => doc.kind === kind); + } + } // Simple node tests of the form `node.kind === SyntaxKind.Foo`. @@ -5649,6 +5649,14 @@ namespace ts { return node.kind >= SyntaxKind.FirstJSDocTagNode && node.kind <= SyntaxKind.LastJSDocTagNode; } + export function isSetAccessor(node: Node): node is SetAccessorDeclaration { + return node.kind === SyntaxKind.SetAccessor; + } + + export function isGetAccessor(node: Node): node is GetAccessorDeclaration { + return node.kind === SyntaxKind.GetAccessor; + } + /** True if has jsdoc nodes attached to it. */ /* @internal */ export function hasJSDocNodes(node: Node): node is HasJSDoc { diff --git a/src/compiler/watch.ts b/src/compiler/watch.ts index 779efb62c46..4fc67c1cc8f 100644 --- a/src/compiler/watch.ts +++ b/src/compiler/watch.ts @@ -249,10 +249,10 @@ namespace ts { let hasChangedAutomaticTypeDirectiveNames = false; // True if the automatic type directives have changed const loggingEnabled = compilerOptions.diagnostics || compilerOptions.extendedDiagnostics; - const writeLog: (s: string) => void = loggingEnabled ? s => system.write(s) : noop; - const watchFile = loggingEnabled ? ts.addFileWatcherWithLogging : ts.addFileWatcher; - const watchFilePath = loggingEnabled ? ts.addFilePathWatcherWithLogging : ts.addFilePathWatcher; - const watchDirectoryWorker = loggingEnabled ? ts.addDirectoryWatcherWithLogging : ts.addDirectoryWatcher; + const writeLog: (s: string) => void = loggingEnabled ? s => { system.write(s); system.write(system.newLine); } : noop; + const watchFile = compilerOptions.extendedDiagnostics ? ts.addFileWatcherWithLogging : loggingEnabled ? ts.addFileWatcherWithOnlyTriggerLogging : ts.addFileWatcher; + const watchFilePath = compilerOptions.extendedDiagnostics ? ts.addFilePathWatcherWithLogging : ts.addFilePathWatcher; + const watchDirectoryWorker = compilerOptions.extendedDiagnostics ? ts.addDirectoryWatcherWithLogging : ts.addDirectoryWatcher; watchingHost = watchingHost || createWatchingSystemHost(compilerOptions.pretty); const { system, parseConfigFile, reportDiagnostic, reportWatchDiagnostic, beforeCompile, afterCompile } = watchingHost; @@ -322,6 +322,9 @@ namespace ts { if (hasChangedCompilerOptions) { newLine = getNewLineCharacter(compilerOptions, system); + if (program && changesAffectModuleResolution(program.getCompilerOptions(), compilerOptions)) { + resolutionCache.clear(); + } } const hasInvalidatedResolution = resolutionCache.createHasInvalidatedResolution(); @@ -329,14 +332,11 @@ namespace ts { return; } - if (hasChangedCompilerOptions && changesAffectModuleResolution(program && program.getCompilerOptions(), compilerOptions)) { - resolutionCache.clear(); - } - const needsUpdateInTypeRootWatch = hasChangedCompilerOptions || !program; - hasChangedCompilerOptions = false; beforeCompile(compilerOptions); // Compile the program + const needsUpdateInTypeRootWatch = hasChangedCompilerOptions || !program; + hasChangedCompilerOptions = false; resolutionCache.startCachingPerDirectoryResolution(); compilerHost.hasInvalidatedResolution = hasInvalidatedResolution; compilerHost.hasChangedAutomaticTypeDirectiveNames = hasChangedAutomaticTypeDirectiveNames; diff --git a/src/compiler/watchUtilities.ts b/src/compiler/watchUtilities.ts index de415293954..26bf689401a 100644 --- a/src/compiler/watchUtilities.ts +++ b/src/compiler/watchUtilities.ts @@ -82,7 +82,12 @@ namespace ts { export function addFileWatcherWithLogging(host: System, file: string, cb: FileWatcherCallback, log: (s: string) => void): FileWatcher { const watcherCaption = `FileWatcher:: `; - return createWatcherWithLogging(addFileWatcher, watcherCaption, log, host, file, cb); + return createWatcherWithLogging(addFileWatcher, watcherCaption, log, /*logOnlyTrigger*/ false, host, file, cb); + } + + export function addFileWatcherWithOnlyTriggerLogging(host: System, file: string, cb: FileWatcherCallback, log: (s: string) => void): FileWatcher { + const watcherCaption = `FileWatcher:: `; + return createWatcherWithLogging(addFileWatcher, watcherCaption, log, /*logOnlyTrigger*/ true, host, file, cb); } export type FilePathWatcherCallback = (fileName: string, eventKind: FileWatcherEventKind, filePath: Path) => void; @@ -92,7 +97,12 @@ namespace ts { export function addFilePathWatcherWithLogging(host: System, file: string, cb: FilePathWatcherCallback, path: Path, log: (s: string) => void): FileWatcher { const watcherCaption = `FileWatcher:: `; - return createWatcherWithLogging(addFileWatcher, watcherCaption, log, host, file, cb, path); + return createWatcherWithLogging(addFileWatcher, watcherCaption, log, /*logOnlyTrigger*/ false, host, file, cb, path); + } + + export function addFilePathWatcherWithOnlyTriggerLogging(host: System, file: string, cb: FilePathWatcherCallback, path: Path, log: (s: string) => void): FileWatcher { + const watcherCaption = `FileWatcher:: `; + return createWatcherWithLogging(addFileWatcher, watcherCaption, log, /*logOnlyTrigger*/ true, host, file, cb, path); } export function addDirectoryWatcher(host: System, directory: string, cb: DirectoryWatcherCallback, flags: WatchDirectoryFlags): FileWatcher { @@ -102,14 +112,21 @@ namespace ts { export function addDirectoryWatcherWithLogging(host: System, directory: string, cb: DirectoryWatcherCallback, flags: WatchDirectoryFlags, log: (s: string) => void): FileWatcher { const watcherCaption = `DirectoryWatcher ${(flags & WatchDirectoryFlags.Recursive) !== 0 ? "recursive" : ""}:: `; - return createWatcherWithLogging(addDirectoryWatcher, watcherCaption, log, host, directory, cb, flags); + return createWatcherWithLogging(addDirectoryWatcher, watcherCaption, log, /*logOnlyTrigger*/ false, host, directory, cb, flags); + } + + export function addDirectoryWatcherWithOnlyTriggerLogging(host: System, directory: string, cb: DirectoryWatcherCallback, flags: WatchDirectoryFlags, log: (s: string) => void): FileWatcher { + const watcherCaption = `DirectoryWatcher ${(flags & WatchDirectoryFlags.Recursive) !== 0 ? "recursive" : ""}:: `; + return createWatcherWithLogging(addDirectoryWatcher, watcherCaption, log, /*logOnlyTrigger*/ true, host, directory, cb, flags); } type WatchCallback = (fileName: string, cbOptional1?: T, optional?: U) => void; type AddWatch = (host: System, file: string, cb: WatchCallback, optional?: U) => FileWatcher; - function createWatcherWithLogging(addWatch: AddWatch, watcherCaption: string, log: (s: string) => void, host: System, file: string, cb: WatchCallback, optional?: U): FileWatcher { + function createWatcherWithLogging(addWatch: AddWatch, watcherCaption: string, log: (s: string) => void, logOnlyTrigger: boolean, host: System, file: string, cb: WatchCallback, optional?: U): FileWatcher { const info = `PathInfo: ${file}`; - log(`${watcherCaption}Added: ${info}`); + if (!logOnlyTrigger) { + log(`${watcherCaption}Added: ${info}`); + } const watcher = addWatch(host, file, (fileName, cbOptional1?) => { const optionalInfo = cbOptional1 !== undefined ? ` ${cbOptional1}` : ""; log(`${watcherCaption}Trigger: ${fileName}${optionalInfo} ${info}`); @@ -120,7 +137,9 @@ namespace ts { }, optional); return { close: () => { - log(`${watcherCaption}Close: ${info}`); + if (!logOnlyTrigger) { + log(`${watcherCaption}Close: ${info}`); + } watcher.close(); } }; diff --git a/src/harness/fourslash.ts b/src/harness/fourslash.ts index debb7290678..de6d92eda05 100644 --- a/src/harness/fourslash.ts +++ b/src/harness/fourslash.ts @@ -2381,7 +2381,7 @@ Actual: ${stringify(fullActual)}`); })); return ts.flatMap(ts.deduplicate(diagnosticsForCodeFix, ts.equalOwnProperties), diagnostic => { - if (errorCode && errorCode !== diagnostic.code) { + if (errorCode !== undefined && errorCode !== diagnostic.code) { return; } diff --git a/src/harness/parallel/host.ts b/src/harness/parallel/host.ts index 2aaa4f78728..d7bba70408e 100644 --- a/src/harness/parallel/host.ts +++ b/src/harness/parallel/host.ts @@ -38,20 +38,45 @@ namespace Harness.Parallel.Host { return undefined; } - function hashName(runner: TestRunnerKind, test: string) { + function hashName(runner: TestRunnerKind | "unittest", test: string) { return `tsrunner-${runner}://${test}`; } + let tasks: { runner: TestRunnerKind | "unittest", file: string, size: number }[] = []; + const newTasks: { runner: TestRunnerKind | "unittest", file: string, size: number }[] = []; + let unknownValue: string | undefined; export function start() { - initializeProgressBarsDependencies(); - console.log("Discovering tests..."); - const discoverStart = +(new Date()); - const { statSync }: { statSync(path: string): { size: number }; } = require("fs"); - let tasks: { runner: TestRunnerKind, file: string, size: number }[] = []; - const newTasks: { runner: TestRunnerKind, file: string, size: number }[] = []; const perfData = readSavedPerfData(configOption); let totalCost = 0; - let unknownValue: string | undefined; + if (runUnitTests) { + (global as any).describe = (suiteName: string) => { + // Note, sub-suites are not indexed (we assume such granularity is not required) + let size = 0; + if (perfData) { + size = perfData[hashName("unittest", suiteName)]; + if (size === undefined) { + newTasks.push({ runner: "unittest", file: suiteName, size: 0 }); + unknownValue = suiteName; + return; + } + } + tasks.push({ runner: "unittest", file: suiteName, size }); + totalCost += size; + }; + } + else { + (global as any).describe = ts.noop; + } + + setTimeout(() => startDelayed(perfData, totalCost), 0); // Do real startup on next tick, so all unit tests have been collected + } + + function startDelayed(perfData: {[testHash: string]: number}, totalCost: number) { + initializeProgressBarsDependencies(); + console.log(`Discovered ${tasks.length} unittest suites` + (newTasks.length ? ` and ${newTasks.length} new suites.` : ".")); + console.log("Discovering runner-based tests..."); + const discoverStart = +(new Date()); + const { statSync }: { statSync(path: string): { size: number }; } = require("fs"); for (const runner of runners) { const files = runner.enumerateTestFiles(); for (const file of files) { @@ -87,8 +112,7 @@ namespace Harness.Parallel.Host { } tasks.sort((a, b) => a.size - b.size); tasks = tasks.concat(newTasks); - // 1 fewer batches than threads to account for unittests running on the final thread - const batchCount = runners.length === 1 ? workerCount : workerCount - 1; + const batchCount = workerCount; const packfraction = 0.9; const chunkSize = 1000; // ~1KB or 1s for sending batches near the end of a test const batchSize = (totalCost / workerCount) * packfraction; // Keep spare tests for unittest thread in reserve @@ -113,7 +137,7 @@ namespace Harness.Parallel.Host { let closedWorkers = 0; for (let i = 0; i < workerCount; i++) { // TODO: Just send the config over the IPC channel or in the command line arguments - const config: TestConfig = { light: Harness.lightMode, listenForWork: true, runUnitTests: runners.length === 1 ? false : i === workerCount - 1 }; + const config: TestConfig = { light: Harness.lightMode, listenForWork: true, runUnitTests: runners.length !== 1 }; const configPath = ts.combinePaths(taskConfigsFolder, `task-config${i}.json`); Harness.IO.writeFile(configPath, JSON.stringify(config)); const child = fork(__filename, [`--config="${configPath}"`]); @@ -187,7 +211,7 @@ namespace Harness.Parallel.Host { // It's only really worth doing an initial batching if there are a ton of files to go through if (totalFiles > 1000) { console.log("Batching initial test lists..."); - const batches: { runner: TestRunnerKind, file: string, size: number }[][] = new Array(batchCount); + const batches: { runner: TestRunnerKind | "unittest", file: string, size: number }[][] = new Array(batchCount); const doneBatching = new Array(batchCount); let scheduledTotal = 0; batcher: while (true) { @@ -230,7 +254,7 @@ namespace Harness.Parallel.Host { if (payload) { worker.send({ type: "batch", payload }); } - else { // Unittest thread - send off just one test + else { // Out of batches, send off just one test const payload = tasks.pop(); ts.Debug.assert(!!payload); // The reserve kept above should ensure there is always an initial task available, even in suboptimal scenarios worker.send({ type: "test", payload }); diff --git a/src/harness/parallel/shared.ts b/src/harness/parallel/shared.ts index 85d885c14a1..2eb7777f828 100644 --- a/src/harness/parallel/shared.ts +++ b/src/harness/parallel/shared.ts @@ -1,14 +1,14 @@ /// /// namespace Harness.Parallel { - export type ParallelTestMessage = { type: "test", payload: { runner: TestRunnerKind, file: string } } | never; + export type ParallelTestMessage = { type: "test", payload: { runner: TestRunnerKind | "unittest", file: string } } | never; export type ParallelBatchMessage = { type: "batch", payload: ParallelTestMessage["payload"][] } | never; export type ParallelCloseMessage = { type: "close" } | never; export type ParallelHostMessage = ParallelTestMessage | ParallelCloseMessage | ParallelBatchMessage; export type ParallelErrorMessage = { type: "error", payload: { error: string, stack: string, name?: string[] } } | never; export type ErrorInfo = ParallelErrorMessage["payload"] & { name: string[] }; - export type ParallelResultMessage = { type: "result", payload: { passing: number, errors: ErrorInfo[], duration: number, runner: TestRunnerKind, file: string } } | never; + export type ParallelResultMessage = { type: "result", payload: { passing: number, errors: ErrorInfo[], duration: number, runner: TestRunnerKind | "unittest", file: string } } | never; export type ParallelBatchProgressMessage = { type: "progress", payload: ParallelResultMessage["payload"] } | never; export type ParallelClientMessage = ParallelErrorMessage | ParallelResultMessage | ParallelBatchProgressMessage; } \ No newline at end of file diff --git a/src/harness/parallel/worker.ts b/src/harness/parallel/worker.ts index 7e95831535a..c32b9660a39 100644 --- a/src/harness/parallel/worker.ts +++ b/src/harness/parallel/worker.ts @@ -1,22 +1,13 @@ namespace Harness.Parallel.Worker { let errors: ErrorInfo[] = []; let passing = 0; - let reportedUnitTests = false; type Executor = {name: string, callback: Function, kind: "suite" | "test"} | never; function resetShimHarnessAndExecute(runner: RunnerBase) { - if (reportedUnitTests) { - errors = []; - passing = 0; - testList.length = 0; - } - reportedUnitTests = true; - if (testList.length) { - // Execute unit tests - testList.forEach(({ name, callback, kind }) => executeCallback(name, callback, kind)); - testList.length = 0; - } + errors = []; + passing = 0; + testList.length = 0; const start = +(new Date()); runner.initializeTests(); testList.forEach(({ name, callback, kind }) => executeCallback(name, callback, kind)); @@ -226,13 +217,46 @@ namespace Harness.Parallel.Worker { shimMochaHarness(); } - function handleTest(runner: TestRunnerKind, file: string) { - if (!runners.has(runner)) { - runners.set(runner, createRunner(runner)); + function handleTest(runner: TestRunnerKind | "unittest", file: string) { + collectUnitTestsIfNeeded(); + if (runner === unittest) { + return executeUnitTest(file); + } + else { + if (!runners.has(runner)) { + runners.set(runner, createRunner(runner)); + } + const instance = runners.get(runner); + instance.tests = [file]; + return { ...resetShimHarnessAndExecute(instance), runner, file }; } - const instance = runners.get(runner); - instance.tests = [file]; - return { ...resetShimHarnessAndExecute(instance), runner, file }; } } + + const unittest: "unittest" = "unittest"; + let unitTests: {[name: string]: Function}; + function collectUnitTestsIfNeeded() { + if (!unitTests && testList.length) { + unitTests = {}; + for (const test of testList) { + unitTests[test.name] = test.callback; + } + testList.length = 0; + } + } + + function executeUnitTest(name: string) { + if (!unitTests) { + throw new Error(`Asked to run unit test ${name}, but no unit tests were discovered!`); + } + if (unitTests[name]) { + errors = []; + passing = 0; + const start = +(new Date()); + executeSuiteCallback(name, unitTests[name]); + delete unitTests[name]; + return { file: name, runner: unittest, errors, passing, duration: +(new Date()) - start }; + } + throw new Error(`Unit test with name "${name}" was asked to be run, but such a test does not exist!`); + } } \ No newline at end of file diff --git a/src/harness/unittests/compileOnSave.ts b/src/harness/unittests/compileOnSave.ts index 4ddda5fcbea..fdec5b192ee 100644 --- a/src/harness/unittests/compileOnSave.ts +++ b/src/harness/unittests/compileOnSave.ts @@ -563,7 +563,7 @@ namespace ts.projectSystem { path: "/a/b/file3.js", content: "console.log('file3');" }; - const externalProjectName = "externalproject"; + const externalProjectName = "/a/b/externalproject"; const host = createServerHost([file1, file2, file3, libFile]); const session = createSession(host); const projectService = session.getProjectService(); @@ -588,5 +588,48 @@ namespace ts.projectSystem { assert.isTrue(outFileContent.indexOf(file2.content) === -1); assert.isTrue(outFileContent.indexOf(file3.content) === -1); }); + + it("should use project root as current directory so that compile on save results in correct file mapping", () => { + const inputFileName = "Foo.ts"; + const file1 = { + path: `/root/TypeScriptProject3/TypeScriptProject3/${inputFileName}`, + content: "consonle.log('file1');" + }; + const externalProjectName = "/root/TypeScriptProject3/TypeScriptProject3/TypeScriptProject3.csproj"; + const host = createServerHost([file1, libFile]); + const session = createSession(host); + const projectService = session.getProjectService(); + + const outFileName = "bar.js"; + projectService.openExternalProject({ + rootFiles: toExternalFiles([file1.path]), + options: { + outFile: outFileName, + sourceMap: true, + compileOnSave: true + }, + projectFileName: externalProjectName + }); + + const emitRequest = makeSessionRequest(CommandNames.CompileOnSaveEmitFile, { file: file1.path }); + session.executeCommand(emitRequest); + + // Verify js file + const expectedOutFileName = "/root/TypeScriptProject3/TypeScriptProject3/" + outFileName; + assert.isTrue(host.fileExists(expectedOutFileName)); + const outFileContent = host.readFile(expectedOutFileName); + verifyContentHasString(outFileContent, file1.content); + verifyContentHasString(outFileContent, `//# ${"sourceMappingURL"}=${outFileName}.map`); // Sometimes tools can sometimes see this line as a source mapping url comment, so we obfuscate it a little + + // Verify map file + const expectedMapFileName = expectedOutFileName + ".map"; + assert.isTrue(host.fileExists(expectedMapFileName)); + const mapFileContent = host.readFile(expectedMapFileName); + verifyContentHasString(mapFileContent, `"sources":["${inputFileName}"]`); + + function verifyContentHasString(content: string, string: string) { + assert.isTrue(content.indexOf(string) !== -1, `Expected "${content}" to have "${string}"`); + } + }); }); } diff --git a/src/harness/unittests/extractConstants.ts b/src/harness/unittests/extractConstants.ts index c5ddc18fea4..61ffbd01a63 100644 --- a/src/harness/unittests/extractConstants.ts +++ b/src/harness/unittests/extractConstants.ts @@ -223,6 +223,14 @@ const f = () => { testExtractConstant("extractConstant_ArrowFunction_Expression", `const f = () => [#|2 + 1|];`); + testExtractConstant("extractConstant_PreserveTrivia", ` +// a +var q = /*b*/ //c + /*d*/ [#|1 /*e*/ //f + /*g*/ + /*h*/ //i + /*j*/ 2|] /*k*/ //l + /*m*/; /*n*/ //o`); + testExtractConstantFailed("extractConstant_Void", ` function f(): void { } [#|f();|]`); @@ -230,6 +238,30 @@ function f(): void { } testExtractConstantFailed("extractConstant_Never", ` function f(): never { } [#|f();|]`); + + testExtractConstant("extractConstant_This_Constructor", ` +class C { + constructor() { + [#|this.m2()|]; + } + m2() { return 1; } +}`); + + testExtractConstant("extractConstant_This_Method", ` +class C { + m1() { + [#|this.m2()|]; + } + m2() { return 1; } +}`); + + testExtractConstant("extractConstant_This_Property", ` +namespace N { // Force this test to be TS-only + class C { + x = 1; + y = [#|this.x|]; + } +}`); }); function testExtractConstant(caption: string, text: string) { diff --git a/src/harness/unittests/extractFunctions.ts b/src/harness/unittests/extractFunctions.ts index 750e590ca4c..789882ffd50 100644 --- a/src/harness/unittests/extractFunctions.ts +++ b/src/harness/unittests/extractFunctions.ts @@ -360,6 +360,186 @@ function parsePrimaryExpression(): any { export const j = 10; export const y = [#|j * j|]; }`); + + testExtractFunction("extractFunction_VariableDeclaration_Var", ` +[#|var x = 1;|] +x; +`); + + testExtractFunction("extractFunction_VariableDeclaration_Let_Type", ` +[#|let x: number = 1;|] +x; +`); + + testExtractFunction("extractFunction_VariableDeclaration_Let_NoType", ` +[#|let x = 1;|] +x; +`); + + testExtractFunction("extractFunction_VariableDeclaration_Const_Type", ` +[#|const x: number = 1;|] +x; +`); + + testExtractFunction("extractFunction_VariableDeclaration_Const_NoType", ` +[#|const x = 1;|] +x; +`); + + testExtractFunction("extractFunction_VariableDeclaration_Multiple1", ` +[#|const x = 1, y: string = "a";|] +x; y; +`); + + testExtractFunction("extractFunction_VariableDeclaration_Multiple2", ` +[#|const x = 1, y = "a"; +const z = 3;|] +x; y; z; +`); + + testExtractFunction("extractFunction_VariableDeclaration_Multiple3", ` +[#|const x = 1, y: string = "a"; +let z = 3;|] +x; y; z; +`); + + testExtractFunction("extractFunction_VariableDeclaration_ConsumedTwice", ` +[#|const x: number = 1;|] +x; x; +`); + + testExtractFunction("extractFunction_VariableDeclaration_DeclaredTwice", ` +[#|var x = 1; +var x = 2;|] +x; +`); + + testExtractFunction("extractFunction_VariableDeclaration_Writes_Var", ` +function f() { + let a = 1; + [#|var x = 1; + a++;|] + a; x; +}`); + + testExtractFunction("extractFunction_VariableDeclaration_Writes_Let_NoType", ` +function f() { + let a = 1; + [#|let x = 1; + a++;|] + a; x; +}`); + + testExtractFunction("extractFunction_VariableDeclaration_Writes_Let_Type", ` +function f() { + let a = 1; + [#|let x: number = 1; + a++;|] + a; x; +}`); + + // We propagate numericLiteralFlags, but it's not consumed by the emitter, + // so everything comes out decimal. It would be nice to improve this. + testExtractFunction("extractFunction_VariableDeclaration_Writes_Let_LiteralType1", ` +function f() { + let a = 1; + [#|let x: 0o10 | 10 | 0b10 = 10; + a++;|] + a; x; +}`); + + testExtractFunction("extractFunction_VariableDeclaration_Writes_Let_LiteralType2", ` +function f() { + let a = 1; + [#|let x: "a" | 'b' = 'a'; + a++;|] + a; x; +}`); + + // We propagate numericLiteralFlags, but it's not consumed by the emitter, + // so everything comes out decimal. It would be nice to improve this. + testExtractFunction("extractFunction_VariableDeclaration_Writes_Let_LiteralType1", ` +function f() { + let a = 1; + [#|let x: 0o10 | 10 | 0b10 = 10; + a++;|] + a; x; +}`); + + testExtractFunction("extractFunction_VariableDeclaration_Writes_Let_TypeWithComments", ` +function f() { + let a = 1; + [#|let x: /*A*/ "a" /*B*/ | /*C*/ 'b' /*D*/ = 'a'; + a++;|] + a; x; +}`); + + testExtractFunction("extractFunction_VariableDeclaration_Writes_Const_NoType", ` +function f() { + let a = 1; + [#|const x = 1; + a++;|] + a; x; +}`); + + testExtractFunction("extractFunction_VariableDeclaration_Writes_Const_Type", ` +function f() { + let a = 1; + [#|const x: number = 1; + a++;|] + a; x; +}`); + + testExtractFunction("extractFunction_VariableDeclaration_Writes_Mixed1", ` +function f() { + let a = 1; + [#|const x = 1; + let y = 2; + a++;|] + a; x; y; +}`); + + testExtractFunction("extractFunction_VariableDeclaration_Writes_Mixed2", ` +function f() { + let a = 1; + [#|var x = 1; + let y = 2; + a++;|] + a; x; y; +}`); + + testExtractFunction("extractFunction_VariableDeclaration_Writes_Mixed3", ` +function f() { + let a = 1; + [#|let x: number = 1; + let y = 2; + a++;|] + a; x; y; +}`); + + testExtractFunction("extractFunction_VariableDeclaration_Writes_UnionUndefined", ` +function f() { + let a = 1; + [#|let x: number | undefined = 1; + let y: undefined | number = 2; + let z: (undefined | number) = 3; + a++;|] + a; x; y; z; +}`); + + testExtractFunction("extractFunction_VariableDeclaration_ShorthandProperty", ` +function f() { + [#|let x;|] + return { x }; +}`); + + testExtractFunction("extractFunction_PreserveTrivia", ` +// a +var q = /*b*/ //c + /*d*/ [#|1 /*e*/ //f + /*g*/ + /*h*/ //i + /*j*/ 2|] /*k*/ //l + /*m*/; /*n*/ //o`); }); function testExtractFunction(caption: string, text: string) { diff --git a/src/harness/unittests/extractRanges.ts b/src/harness/unittests/extractRanges.ts index 2ddcac482a9..a467bb23e0f 100644 --- a/src/harness/unittests/extractRanges.ts +++ b/src/harness/unittests/extractRanges.ts @@ -152,6 +152,16 @@ namespace ts { } } `); + testExtractRange(` + function f(x: number) { + [#|[$|try { + x++; + } + finally { + return 1; + }|]|] + } + `); }); testExtractRangeFailed("extractRangeFailed1", @@ -313,6 +323,23 @@ switch (x) { refactor.extractSymbol.Messages.CannotExtractRange.message ]); + testExtractRangeFailed("extractRangeFailed11", + ` + function f(x: number) { + while (true) { + [#|try { + x++; + } + finally { + break; + }|] + } + } + `, + [ + refactor.extractSymbol.Messages.CannotExtractRangeContainingConditionalBreakOrContinueStatements.message + ]); + testExtractRangeFailed("extract-method-not-for-token-expression-statement", `[#|a|]`, [refactor.extractSymbol.Messages.CannotExtractIdentifier.message]); }); } \ No newline at end of file diff --git a/src/harness/unittests/publicApi.ts b/src/harness/unittests/publicApi.ts index bb37dbe9d8d..35acfec57f5 100644 --- a/src/harness/unittests/publicApi.ts +++ b/src/harness/unittests/publicApi.ts @@ -1,10 +1,34 @@ /// describe("Public APIs", () => { - it("for the language service and compiler should be acknowledged when they change", () => { - Harness.Baseline.runBaseline("api/typescript.d.ts", () => Harness.IO.readFile("built/local/typescript.d.ts")); + function verifyApi(fileName: string) { + const builtFile = `built/local/${fileName}`; + const api = `api/${fileName}`; + let fileContent: string; + before(() => { + fileContent = Harness.IO.readFile(builtFile); + }); + + it("should be acknowledged when they change", () => { + Harness.Baseline.runBaseline(api, () => fileContent); + }); + + it("should compile", () => { + const testFile: Harness.Compiler.TestFile = { + unitName: builtFile, + content: fileContent + }; + const inputFiles = [testFile]; + const output = Harness.Compiler.compileFiles(inputFiles, [], /*harnessSettings*/ undefined, /*options*/ {}, /*currentDirectory*/ undefined); + assert(!output.result.errors || !output.result.errors.length, Harness.Compiler.minimalDiagnosticsToString(output.result.errors, /*pretty*/ true)); + }); + } + + describe("for the language service and compiler", () => { + verifyApi("typescript.d.ts"); }); - it("for the language server should be acknowledged when they change", () => { - Harness.Baseline.runBaseline("api/tsserverlibrary.d.ts", () => Harness.IO.readFile("built/local/tsserverlibrary.d.ts")); + + describe("for the language server", () => { + verifyApi("tsserverlibrary.d.ts"); }); -}); \ No newline at end of file +}); diff --git a/src/harness/unittests/session.ts b/src/harness/unittests/session.ts index 1e5d9847ce8..3b5efc2d6de 100644 --- a/src/harness/unittests/session.ts +++ b/src/harness/unittests/session.ts @@ -16,8 +16,8 @@ namespace ts.server { directoryExists: () => false, getDirectories: () => [], createDirectory: noop, - getExecutingFilePath(): string { return void 0; }, - getCurrentDirectory(): string { return void 0; }, + getExecutingFilePath(): string { return ""; }, + getCurrentDirectory(): string { return ""; }, getEnvironmentVariable(): string { return ""; }, readDirectory() { return []; }, exit: noop, @@ -386,6 +386,61 @@ namespace ts.server { }); }); + describe("exceptions", () => { + const command = "testhandler"; + class TestSession extends Session { + lastSent: protocol.Message; + private exceptionRaisingHandler(_request: protocol.Request): { response?: any, responseRequired: boolean } { + f1(); + return; + function f1() { + throw new Error("myMessage"); + } + } + + constructor() { + super({ + host: mockHost, + cancellationToken: nullCancellationToken, + useSingleInferredProject: false, + useInferredProjectPerProjectRoot: false, + typingsInstaller: undefined, + byteLength: Utils.byteLength, + hrtime: process.hrtime, + logger: projectSystem.nullLogger, + canUseEvents: true + }); + this.addProtocolHandler(command, this.exceptionRaisingHandler); + } + send(msg: protocol.Message) { + this.lastSent = msg; + } + } + + it("raised in a protocol handler generate an event", () => { + + const session = new TestSession(); + + const request = { + command, + seq: 0, + type: "request" + }; + + session.onMessage(JSON.stringify(request)); + const lastSent = session.lastSent as protocol.Response; + + expect(lastSent).to.contain({ + seq: 0, + type: "response", + command, + success: false + }); + + expect(lastSent.message).has.string("myMessage").and.has.string("f1"); + }); + }); + describe("how Session is extendable via subclassing", () => { class TestSession extends Session { lastSent: protocol.Message; diff --git a/src/harness/unittests/telemetry.ts b/src/harness/unittests/telemetry.ts index 7c098066321..9bb2db73801 100644 --- a/src/harness/unittests/telemetry.ts +++ b/src/harness/unittests/telemetry.ts @@ -5,9 +5,9 @@ namespace ts.projectSystem { describe("project telemetry", () => { it("does nothing for inferred project", () => { const file = makeFile("/a.js"); - const et = new EventTracker([file]); + const et = new TestServerEventManager([file]); et.service.openClientFile(file.path); - assert.equal(et.getEvents().length, 0); + et.hasZeroEvent(ts.server.ProjectInfoTelemetryEvent); }); it("only sends an event once", () => { @@ -15,7 +15,7 @@ namespace ts.projectSystem { const file2 = makeFile("/b.ts"); const tsconfig = makeFile("/a/tsconfig.json", {}); - const et = new EventTracker([file, file2, tsconfig]); + const et = new TestServerEventManager([file, file2, tsconfig]); et.service.openClientFile(file.path); et.assertProjectInfoTelemetryEvent({}, tsconfig.path); @@ -25,12 +25,12 @@ namespace ts.projectSystem { et.service.openClientFile(file2.path); checkNumberOfProjects(et.service, { inferredProjects: 1 }); - assert.equal(et.getEvents().length, 0); + et.hasZeroEvent(ts.server.ProjectInfoTelemetryEvent); et.service.openClientFile(file.path); checkNumberOfProjects(et.service, { configuredProjects: 1, inferredProjects: 1 }); - assert.equal(et.getEvents().length, 0); + et.hasZeroEvent(ts.server.ProjectInfoTelemetryEvent); }); it("counts files by extension", () => { @@ -39,7 +39,7 @@ namespace ts.projectSystem { const compilerOptions: ts.CompilerOptions = { allowJs: true }; const tsconfig = makeFile("/tsconfig.json", { compilerOptions, include: ["src"] }); - const et = new EventTracker([...files, notIncludedFile, tsconfig]); + const et = new TestServerEventManager([...files, notIncludedFile, tsconfig]); et.service.openClientFile(files[0].path); et.assertProjectInfoTelemetryEvent({ fileStats: { ts: 2, tsx: 1, js: 1, jsx: 1, dts: 1 }, @@ -50,7 +50,7 @@ namespace ts.projectSystem { it("works with external project", () => { const file1 = makeFile("/a.ts"); - const et = new EventTracker([file1]); + const et = new TestServerEventManager([file1]); const compilerOptions: ts.server.protocol.CompilerOptions = { strict: true }; const projectFileName = "/hunter2/foo.csproj"; @@ -148,7 +148,7 @@ namespace ts.projectSystem { (compilerOptions as any).unknownCompilerOption = "hunter2"; // These are always ignored. const tsconfig = makeFile("/tsconfig.json", { compilerOptions, files: ["/a.ts"] }); - const et = new EventTracker([file, tsconfig]); + const et = new TestServerEventManager([file, tsconfig]); et.service.openClientFile(file.path); et.assertProjectInfoTelemetryEvent({ @@ -168,7 +168,7 @@ namespace ts.projectSystem { compileOnSave: true, }); - const et = new EventTracker([tsconfig, file]); + const et = new TestServerEventManager([tsconfig, file]); et.service.openClientFile(file.path); et.assertProjectInfoTelemetryEvent({ extends: true, @@ -198,7 +198,7 @@ namespace ts.projectSystem { exclude: [], }, }); - const et = new EventTracker([jsconfig, file]); + const et = new TestServerEventManager([jsconfig, file]); et.service.openClientFile(file.path); et.assertProjectInfoTelemetryEvent({ projectId: Harness.mockHash("/jsconfig.json"), @@ -216,10 +216,10 @@ namespace ts.projectSystem { it("detects whether language service was disabled", () => { const file = makeFile("/a.js"); const tsconfig = makeFile("/jsconfig.json", {}); - const et = new EventTracker([tsconfig, file]); + const et = new TestServerEventManager([tsconfig, file]); et.host.getFileSize = () => server.maxProgramSizeForNonTsFiles + 1; et.service.openClientFile(file.path); - et.getEvent(server.ProjectLanguageServiceStateEvent, /*mayBeMore*/ true); + et.getEvent(server.ProjectLanguageServiceStateEvent); et.assertProjectInfoTelemetryEvent({ projectId: Harness.mockHash("/jsconfig.json"), fileStats: fileStats({ js: 1 }), @@ -235,63 +235,7 @@ namespace ts.projectSystem { }); }); - class EventTracker { - private events: server.ProjectServiceEvent[] = []; - readonly service: TestProjectService; - readonly host: projectSystem.TestServerHost; - - constructor(files: projectSystem.FileOrFolder[]) { - this.host = createServerHost(files); - this.service = createProjectService(this.host, { - eventHandler: event => { - this.events.push(event); - }, - }); - } - - getEvents(): ReadonlyArray { - const events = this.events; - this.events = []; - return events; - } - - assertProjectInfoTelemetryEvent(partial: Partial, configFile?: string): void { - assert.deepEqual(this.getEvent(ts.server.ProjectInfoTelemetryEvent), { - projectId: Harness.mockHash(configFile || "/tsconfig.json"), - fileStats: fileStats({ ts: 1 }), - compilerOptions: {}, - extends: false, - files: false, - include: false, - exclude: false, - compileOnSave: false, - typeAcquisition: { - enable: false, - exclude: false, - include: false, - }, - configFileName: "tsconfig.json", - projectType: "configured", - languageServiceEnabled: true, - version: ts.version, - ...partial, - }); - } - - getEvent(eventName: T["eventName"], mayBeMore = false): T["data"] { - if (mayBeMore) { assert(this.events.length !== 0); } - else { assert.equal(this.events.length, 1); } - const event = this.events.shift(); - assert.equal(event.eventName, eventName); - return event.data; - } - } - function makeFile(path: string, content: {} = ""): projectSystem.FileOrFolder { return { path, content: isString(content) ? "" : JSON.stringify(content) }; } - - function fileStats(nonZeroStats: Partial): server.FileStats { - return { ts: 0, tsx: 0, dts: 0, js: 0, jsx: 0, ...nonZeroStats }; - } } diff --git a/src/harness/unittests/tscWatchMode.ts b/src/harness/unittests/tscWatchMode.ts index 5267bbcf047..b25a7b1eb53 100644 --- a/src/harness/unittests/tscWatchMode.ts +++ b/src/harness/unittests/tscWatchMode.ts @@ -80,6 +80,92 @@ namespace ts.tscWatch { checkOutputDoesNotContain(host, expectedNonAffectedFiles); } + function checkOutputErrors(host: WatchedSystem, errors?: ReadonlyArray, isInitial?: true, skipWaiting?: true) { + const outputs = host.getOutput(); + const expectedOutputCount = (isInitial ? 0 : 1) + (errors ? errors.length : 0) + (skipWaiting ? 0 : 1); + assert.equal(outputs.length, expectedOutputCount, "Outputs = " + outputs.toString()); + let index = 0; + if (!isInitial) { + assertWatchDiagnosticAt(host, index, Diagnostics.File_change_detected_Starting_incremental_compilation); + index++; + } + forEach(errors, error => { + assertDiagnosticAt(host, index, error); + index++; + }); + if (!skipWaiting) { + assertWatchDiagnosticAt(host, index, Diagnostics.Compilation_complete_Watching_for_file_changes); + } + host.clearOutput(); + } + + function assertDiagnosticAt(host: WatchedSystem, outputAt: number, diagnostic: Diagnostic) { + const output = host.getOutput()[outputAt]; + assert.equal(output, formatDiagnostic(diagnostic, host), "outputs[" + outputAt + "] is " + output); + } + + function assertWatchDiagnosticAt(host: WatchedSystem, outputAt: number, diagnosticMessage: DiagnosticMessage) { + const output = host.getOutput()[outputAt]; + assert.isTrue(endsWith(output, getWatchDiagnosticWithoutDate(host, diagnosticMessage)), "outputs[" + outputAt + "] is " + output); + } + + function getWatchDiagnosticWithoutDate(host: WatchedSystem, diagnosticMessage: DiagnosticMessage) { + return ` - ${flattenDiagnosticMessageText(getLocaleSpecificMessage(diagnosticMessage), host.newLine)}${host.newLine + host.newLine + host.newLine}`; + } + + function getDiagnosticOfFileFrom(file: SourceFile, text: string, start: number, length: number, message: DiagnosticMessage): Diagnostic { + return { + file, + start, + length, + + messageText: text, + category: message.category, + code: message.code, + }; + } + + function getDiagnosticWithoutFile(message: DiagnosticMessage, ..._args: (string | number)[]): Diagnostic { + let text = getLocaleSpecificMessage(message); + + if (arguments.length > 1) { + text = formatStringFromArgs(text, arguments, 1); + } + + return getDiagnosticOfFileFrom(/*file*/ undefined, text, /*start*/ undefined, /*length*/ undefined, message); + } + + function getDiagnosticOfFile(file: SourceFile, start: number, length: number, message: DiagnosticMessage, ..._args: (string | number)[]): Diagnostic { + let text = getLocaleSpecificMessage(message); + + if (arguments.length > 4) { + text = formatStringFromArgs(text, arguments, 4); + } + + return getDiagnosticOfFileFrom(file, text, start, length, message); + } + + function getUnknownCompilerOption(program: Program, configFile: FileOrFolder, option: string) { + const quotedOption = `"${option}"`; + return getDiagnosticOfFile(program.getCompilerOptions().configFile, configFile.content.indexOf(quotedOption), quotedOption.length, Diagnostics.Unknown_compiler_option_0, option); + } + + function getDiagnosticOfFileFromProgram(program: Program, filePath: string, start: number, length: number, message: DiagnosticMessage, ..._args: (string | number)[]): Diagnostic { + let text = getLocaleSpecificMessage(message); + + if (arguments.length > 5) { + text = formatStringFromArgs(text, arguments, 5); + } + + return getDiagnosticOfFileFrom(program.getSourceFileByPath(toPath(filePath, program.getCurrentDirectory(), s => s.toLowerCase())), + text, start, length, message); + } + + function getDiagnosticModuleNotFoundOfFile(program: Program, file: FileOrFolder, moduleName: string) { + const quotedModuleName = `"${moduleName}"`; + return getDiagnosticOfFileFromProgram(program, file.path, file.content.indexOf(quotedModuleName), quotedModuleName.length, Diagnostics.Cannot_find_module_0, moduleName); + } + describe("tsc-watch program updates", () => { const commonFile1: FileOrFolder = { path: "/a/b/commonFile1.ts", @@ -233,9 +319,10 @@ namespace ts.tscWatch { }); it("handles the missing files - that were added to program because they were added with /// { + const commonFile2Name = "commonFile2.ts"; const file1: FileOrFolder = { path: "/a/b/commonFile1.ts", - content: `/// + content: `/// let x = y` }; const host = createWatchedSystem([file1, libFile]); @@ -243,18 +330,16 @@ namespace ts.tscWatch { checkProgramRootFiles(watch(), [file1.path]); checkProgramActualFiles(watch(), [file1.path, libFile.path]); - const errors = [ - `a/b/commonFile1.ts(1,22): error TS6053: File '${commonFile2.path}' not found.${host.newLine}`, - `a/b/commonFile1.ts(2,29): error TS2304: Cannot find name 'y'.${host.newLine}` - ]; - checkOutputContains(host, errors); - host.clearOutput(); + checkOutputErrors(host, [ + getDiagnosticOfFileFromProgram(watch(), file1.path, file1.content.indexOf(commonFile2Name), commonFile2Name.length, Diagnostics.File_0_not_found, commonFile2.path), + getDiagnosticOfFileFromProgram(watch(), file1.path, file1.content.indexOf("y"), 1, Diagnostics.Cannot_find_name_0, "y") + ], /*isInitial*/ true); host.reloadFS([file1, commonFile2, libFile]); host.runQueuedTimeoutCallbacks(); checkProgramRootFiles(watch(), [file1.path]); checkProgramActualFiles(watch(), [file1.path, libFile.path, commonFile2.path]); - checkOutputDoesNotContain(host, errors); + checkOutputErrors(host); }); it("should reflect change in config file", () => { @@ -578,17 +663,19 @@ namespace ts.tscWatch { path: "/a/b/tsconfig.json", content: JSON.stringify({ compilerOptions: {} }) }; - const host = createWatchedSystem([file1, file2, config]); + const host = createWatchedSystem([file1, file2, libFile, config]); const watch = createWatchModeWithConfigFile(config.path, host); - checkProgramActualFiles(watch(), [file1.path, file2.path]); + checkProgramActualFiles(watch(), [file1.path, file2.path, libFile.path]); + checkOutputErrors(host, emptyArray, /*isInitial*/ true); - host.clearOutput(); - host.reloadFS([file1, file2]); + host.reloadFS([file1, file2, libFile]); host.checkTimeoutQueueLengthAndRun(1); assert.equal(host.exitCode, ExitStatus.DiagnosticsPresent_OutputsSkipped); - checkOutputContains(host, [`error TS6053: File '${config.path}' not found.${host.newLine}`]); + checkOutputErrors(host, [ + getDiagnosticWithoutFile(Diagnostics.File_0_not_found, config.path) + ], /*isInitial*/ undefined, /*skipWaiting*/ true); }); it("Proper errors: document is not contained in project", () => { @@ -687,25 +774,25 @@ namespace ts.tscWatch { }; const file1 = { path: "/a/b/file1.ts", - content: "import * as T from './moduleFile'; T.bar();" + content: 'import * as T from "./moduleFile"; T.bar();' }; const host = createWatchedSystem([moduleFile, file1, libFile]); - createWatchModeWithoutConfigFile([file1.path], host); - const error = "a/b/file1.ts(1,20): error TS2307: Cannot find module \'./moduleFile\'.\n"; - checkOutputDoesNotContain(host, [error]); + const watch = createWatchModeWithoutConfigFile([file1.path], host); + checkOutputErrors(host, emptyArray, /*isInitial*/ true); const moduleFileOldPath = moduleFile.path; const moduleFileNewPath = "/a/b/moduleFile1.ts"; moduleFile.path = moduleFileNewPath; host.reloadFS([moduleFile, file1, libFile]); host.runQueuedTimeoutCallbacks(); - checkOutputContains(host, [error]); + checkOutputErrors(host, [ + getDiagnosticModuleNotFoundOfFile(watch(), file1, "./moduleFile") + ]); - host.clearOutput(); moduleFile.path = moduleFileOldPath; host.reloadFS([moduleFile, file1, libFile]); host.runQueuedTimeoutCallbacks(); - checkOutputDoesNotContain(host, [error]); + checkOutputErrors(host); }); it("rename a module file and rename back should restore the states for configured projects", () => { @@ -715,31 +802,29 @@ namespace ts.tscWatch { }; const file1 = { path: "/a/b/file1.ts", - content: "import * as T from './moduleFile'; T.bar();" + content: 'import * as T from "./moduleFile"; T.bar();' }; const configFile = { path: "/a/b/tsconfig.json", content: `{}` }; const host = createWatchedSystem([moduleFile, file1, configFile, libFile]); - createWatchModeWithConfigFile(configFile.path, host); - - const error = "a/b/file1.ts(1,20): error TS2307: Cannot find module \'./moduleFile\'.\n"; - checkOutputDoesNotContain(host, [error]); + const watch = createWatchModeWithConfigFile(configFile.path, host); + checkOutputErrors(host, emptyArray, /*isInitial*/ true); const moduleFileOldPath = moduleFile.path; const moduleFileNewPath = "/a/b/moduleFile1.ts"; moduleFile.path = moduleFileNewPath; - host.clearOutput(); host.reloadFS([moduleFile, file1, configFile, libFile]); host.runQueuedTimeoutCallbacks(); - checkOutputContains(host, [error]); + checkOutputErrors(host, [ + getDiagnosticModuleNotFoundOfFile(watch(), file1, "./moduleFile") + ]); - host.clearOutput(); moduleFile.path = moduleFileOldPath; host.reloadFS([moduleFile, file1, configFile, libFile]); host.runQueuedTimeoutCallbacks(); - checkOutputDoesNotContain(host, [error]); + checkOutputErrors(host); }); it("types should load from config file path if config exists", () => { @@ -771,18 +856,18 @@ namespace ts.tscWatch { }; const file1 = { path: "/a/b/file1.ts", - content: "import * as T from './moduleFile'; T.bar();" + content: 'import * as T from "./moduleFile"; T.bar();' }; const host = createWatchedSystem([file1, libFile]); - createWatchModeWithoutConfigFile([file1.path], host); + const watch = createWatchModeWithoutConfigFile([file1.path], host); - const error = `a/b/file1.ts(1,20): error TS2307: Cannot find module \'./moduleFile\'.${host.newLine}`; - checkOutputContains(host, [error]); - host.clearOutput(); + checkOutputErrors(host, [ + getDiagnosticModuleNotFoundOfFile(watch(), file1, "./moduleFile") + ], /*isInitial*/ true); host.reloadFS([file1, moduleFile, libFile]); host.runQueuedTimeoutCallbacks(); - checkOutputDoesNotContain(host, [error]); + checkOutputErrors(host); }); it("Configure file diagnostics events are generated when the config file has errors", () => { @@ -801,14 +886,14 @@ namespace ts.tscWatch { }; const host = createWatchedSystem([file, configFile, libFile]); - createWatchModeWithConfigFile(configFile.path, host); - checkOutputContains(host, [ - `a/b/tsconfig.json(3,29): error TS5023: Unknown compiler option \'foo\'.${host.newLine}`, - `a/b/tsconfig.json(4,29): error TS5023: Unknown compiler option \'allowJS\'.${host.newLine}` - ]); + const watch = createWatchModeWithConfigFile(configFile.path, host); + checkOutputErrors(host, [ + getUnknownCompilerOption(watch(), configFile, "foo"), + getUnknownCompilerOption(watch(), configFile, "allowJS") + ], /*isInitial*/ true); }); - it("Configure file diagnostics events are generated when the config file doesn't have errors", () => { + it("If config file doesnt have errors, they are not reported", () => { const file = { path: "/a/b/app.ts", content: "let x = 10" @@ -822,13 +907,10 @@ namespace ts.tscWatch { const host = createWatchedSystem([file, configFile, libFile]); createWatchModeWithConfigFile(configFile.path, host); - checkOutputDoesNotContain(host, [ - `a/b/tsconfig.json(3,29): error TS5023: Unknown compiler option \'foo\'.${host.newLine}`, - `a/b/tsconfig.json(4,29): error TS5023: Unknown compiler option \'allowJS\'.${host.newLine}` - ]); + checkOutputErrors(host, emptyArray, /*isInitial*/ true); }); - it("Configure file diagnostics events are generated when the config file changes", () => { + it("Reports errors when the config file changes", () => { const file = { path: "/a/b/app.ts", content: "let x = 10" @@ -841,9 +923,8 @@ namespace ts.tscWatch { }; const host = createWatchedSystem([file, configFile, libFile]); - createWatchModeWithConfigFile(configFile.path, host); - const error = `a/b/tsconfig.json(3,25): error TS5023: Unknown compiler option 'haha'.${host.newLine}`; - checkOutputDoesNotContain(host, [error]); + const watch = createWatchModeWithConfigFile(configFile.path, host); + checkOutputErrors(host, emptyArray, /*isInitial*/ true); configFile.content = `{ "compilerOptions": { @@ -852,15 +933,16 @@ namespace ts.tscWatch { }`; host.reloadFS([file, configFile, libFile]); host.runQueuedTimeoutCallbacks(); - checkOutputContains(host, [error]); + checkOutputErrors(host, [ + getUnknownCompilerOption(watch(), configFile, "haha") + ]); - host.clearOutput(); configFile.content = `{ "compilerOptions": {} }`; host.reloadFS([file, configFile, libFile]); host.runQueuedTimeoutCallbacks(); - checkOutputDoesNotContain(host, [error]); + checkOutputErrors(host); }); it("non-existing directories listed in config file input array should be tolerated without crashing the server", () => { @@ -935,29 +1017,28 @@ namespace ts.tscWatch { }`; const configFileContentWithComment = configFileContentBeforeComment + configFileContentComment + configFileContentAfterComment; const configFileContentWithoutCommentLine = configFileContentBeforeComment + configFileContentAfterComment; - - const line = 5; - const errors = (line: number) => [ - `a/b/tsconfig.json(${line},25): error TS5053: Option \'allowJs\' cannot be specified with option \'declaration\'.\n`, - `a/b/tsconfig.json(${line + 1},25): error TS5053: Option \'allowJs\' cannot be specified with option \'declaration\'.\n` - ]; - const configFile = { path: "/a/b/tsconfig.json", content: configFileContentWithComment }; - const host = createWatchedSystem([file, libFile, configFile]); - createWatchModeWithConfigFile(configFile.path, host); - checkOutputContains(host, errors(line)); - checkOutputDoesNotContain(host, errors(line - 2)); - host.clearOutput(); + const files = [file, libFile, configFile]; + const host = createWatchedSystem(files); + const watch = createWatchModeWithConfigFile(configFile.path, host); + const errors = () => [ + getDiagnosticOfFile(watch().getCompilerOptions().configFile, configFile.content.indexOf('"allowJs"'), '"allowJs"'.length, Diagnostics.Option_0_cannot_be_specified_with_option_1, "allowJs", "declaration"), + getDiagnosticOfFile(watch().getCompilerOptions().configFile, configFile.content.indexOf('"declaration"'), '"declaration"'.length, Diagnostics.Option_0_cannot_be_specified_with_option_1, "allowJs", "declaration") + ]; + const intialErrors = errors(); + checkOutputErrors(host, intialErrors, /*isInitial*/ true); configFile.content = configFileContentWithoutCommentLine; - host.reloadFS([file, configFile]); + host.reloadFS(files); host.runQueuedTimeoutCallbacks(); - checkOutputContains(host, errors(line - 2)); - checkOutputDoesNotContain(host, errors(line)); + const nowErrors = errors(); + checkOutputErrors(host, nowErrors); + assert.equal(nowErrors[0].start, intialErrors[0].start - configFileContentComment.length); + assert.equal(nowErrors[1].start, intialErrors[1].start - configFileContentComment.length); }); }); @@ -1485,23 +1566,20 @@ namespace ts.tscWatch { path: "/a/d/f0.ts", content: `import {x} from "f1"` }; - const imported = { path: "/a/f1.ts", content: `foo()` }; - const f1IsNotModule = `a/d/f0.ts(1,17): error TS2306: File '${imported.path}' is not a module.\n`; - const cannotFindFoo = `a/f1.ts(1,1): error TS2304: Cannot find name 'foo'.\n`; - const cannotAssignValue = "a/d/f0.ts(2,21): error TS2322: Type '1' is not assignable to type 'string'.\n"; - const files = [root, imported, libFile]; const host = createWatchedSystem(files); - createWatchModeWithoutConfigFile([root.path], host, { module: ModuleKind.AMD }); + const watch = createWatchModeWithoutConfigFile([root.path], host, { module: ModuleKind.AMD }); + + const f1IsNotModule = getDiagnosticOfFileFromProgram(watch(), root.path, root.content.indexOf('"f1"'), '"f1"'.length, Diagnostics.File_0_is_not_a_module, imported.path); + const cannotFindFoo = getDiagnosticOfFileFromProgram(watch(), imported.path, imported.content.indexOf("foo"), "foo".length, Diagnostics.Cannot_find_name_0, "foo"); // ensure that imported file was found - checkOutputContains(host, [f1IsNotModule, cannotFindFoo]); - host.clearOutput(); + checkOutputErrors(host, [f1IsNotModule, cannotFindFoo], /*isInitial*/ true); const originalFileExists = host.fileExists; { @@ -1517,8 +1595,11 @@ namespace ts.tscWatch { host.runQueuedTimeoutCallbacks(); // ensure file has correct number of errors after edit - checkOutputContains(host, [f1IsNotModule, cannotAssignValue]); - host.clearOutput(); + checkOutputErrors(host, [ + f1IsNotModule, + getDiagnosticOfFileFromProgram(watch(), root.path, newContent.indexOf("var x") + "var ".length, "x".length, Diagnostics.Type_0_is_not_assignable_to_type_1, 1, "string"), + cannotFindFoo + ]); } { let fileExistsIsCalled = false; @@ -1534,13 +1615,13 @@ namespace ts.tscWatch { root.content = `import {x} from "f2"`; host.reloadFS(files); - // trigger synchronization to make sure that LSHost will try to find 'f2' module on disk - host.runQueuedTimeoutCallbacks(); + // trigger synchronization to make sure that LSHost will try to find 'f2' module on disk + host.runQueuedTimeoutCallbacks(); - // ensure file has correct number of errors after edit - const cannotFindModuleF2 = `a/d/f0.ts(1,17): error TS2307: Cannot find module 'f2'.\n`; - checkOutputContains(host, [cannotFindModuleF2]); - host.clearOutput(); + // ensure file has correct number of errors after edit + checkOutputErrors(host, [ + getDiagnosticModuleNotFoundOfFile(watch(), root, "f2") + ]); assert.isTrue(fileExistsIsCalled); } @@ -1561,7 +1642,7 @@ namespace ts.tscWatch { host.reloadFS(files); host.runQueuedTimeoutCallbacks(); - checkOutputContains(host, [f1IsNotModule, cannotFindFoo]); + checkOutputErrors(host, [f1IsNotModule, cannotFindFoo]); assert.isTrue(fileExistsCalled); } }); @@ -1593,12 +1674,12 @@ namespace ts.tscWatch { return originalFileExists.call(host, fileName); }; - createWatchModeWithoutConfigFile([root.path], host, { module: ModuleKind.AMD }); + const watch = createWatchModeWithoutConfigFile([root.path], host, { module: ModuleKind.AMD }); - const barNotFound = `a/foo.ts(1,17): error TS2307: Cannot find module 'bar'.\n`; assert.isTrue(fileExistsCalledForBar, "'fileExists' should be called"); - checkOutputContains(host, [barNotFound]); - host.clearOutput(); + checkOutputErrors(host, [ + getDiagnosticModuleNotFoundOfFile(watch(), root, "bar") + ], /*isInitial*/ true); fileExistsCalledForBar = false; root.content = `import {y} from "bar"`; @@ -1606,7 +1687,7 @@ namespace ts.tscWatch { host.runQueuedTimeoutCallbacks(); assert.isTrue(fileExistsCalledForBar, "'fileExists' should be called."); - checkOutputDoesNotContain(host, [barNotFound]); + checkOutputErrors(host); }); it("should compile correctly when resolved module goes missing and then comes back (module is not part of the root)", () => { @@ -1617,7 +1698,7 @@ namespace ts.tscWatch { const imported = { path: `/a/bar.d.ts`, - content: `export const y = 1;` + content: `export const y = 1;export const x = 10;` }; const files = [root, libFile]; @@ -1635,25 +1716,107 @@ namespace ts.tscWatch { return originalFileExists.call(host, fileName); }; - createWatchModeWithoutConfigFile([root.path], host, { module: ModuleKind.AMD }); + const watch = createWatchModeWithoutConfigFile([root.path], host, { module: ModuleKind.AMD }); - const barNotFound = `a/foo.ts(1,17): error TS2307: Cannot find module 'bar'.\n`; assert.isTrue(fileExistsCalledForBar, "'fileExists' should be called"); - checkOutputDoesNotContain(host, [barNotFound]); - host.clearOutput(); + checkOutputErrors(host, emptyArray, /*isInitial*/ true); fileExistsCalledForBar = false; host.reloadFS(files); host.runQueuedTimeoutCallbacks(); assert.isTrue(fileExistsCalledForBar, "'fileExists' should be called."); - checkOutputContains(host, [barNotFound]); - host.clearOutput(); + checkOutputErrors(host, [ + getDiagnosticModuleNotFoundOfFile(watch(), root, "bar") + ]); fileExistsCalledForBar = false; host.reloadFS(filesWithImported); host.checkTimeoutQueueLengthAndRun(1); assert.isTrue(fileExistsCalledForBar, "'fileExists' should be called."); - checkOutputDoesNotContain(host, [barNotFound]); + checkOutputErrors(host); + }); + + it("works when module resolution changes to ambient module", () => { + const root = { + path: "/a/b/foo.ts", + content: `import * as fs from "fs";` + }; + + const packageJson = { + path: "/a/b/node_modules/@types/node/package.json", + content: ` +{ + "main": "" +} +` + }; + + const nodeType = { + path: "/a/b/node_modules/@types/node/index.d.ts", + content: ` +declare module "fs" { + export interface Stats { + isFile(): boolean; + } +}` + }; + + const files = [root, libFile]; + const filesWithNodeType = files.concat(packageJson, nodeType); + const host = createWatchedSystem(files, { currentDirectory: "/a/b" }); + + const watch = createWatchModeWithoutConfigFile([root.path], host, { }); + + checkOutputErrors(host, [ + getDiagnosticModuleNotFoundOfFile(watch(), root, "fs") + ], /*isInitial*/ true); + + host.reloadFS(filesWithNodeType); + host.runQueuedTimeoutCallbacks(); + checkOutputErrors(host); + }); + + it("works when included file with ambient module changes", () => { + const root = { + path: "/a/b/foo.ts", + content: ` +import * as fs from "fs"; +import * as u from "url"; +` + }; + + const file = { + path: "/a/b/bar.d.ts", + content: ` +declare module "url" { + export interface Url { + href?: string; + } +} +` + }; + + const fileContentWithFS = ` +declare module "fs" { + export interface Stats { + isFile(): boolean; + } +} +`; + + const files = [root, file, libFile]; + const host = createWatchedSystem(files, { currentDirectory: "/a/b" }); + + const watch = createWatchModeWithoutConfigFile([root.path, file.path], host, {}); + + checkOutputErrors(host, [ + getDiagnosticModuleNotFoundOfFile(watch(), root, "fs") + ], /*isInitial*/ true); + + file.content += fileContentWithFS; + host.reloadFS(files); + host.runQueuedTimeoutCallbacks(); + checkOutputErrors(host); }); }); } diff --git a/src/harness/unittests/tsserverProjectSystem.ts b/src/harness/unittests/tsserverProjectSystem.ts index 06e2beeaaa6..4929cbfbaa5 100644 --- a/src/harness/unittests/tsserverProjectSystem.ts +++ b/src/harness/unittests/tsserverProjectSystem.ts @@ -132,16 +132,77 @@ namespace ts.projectSystem { return map(fileNames, toExternalFile); } - class TestServerEventManager { - public events: server.ProjectServiceEvent[] = []; + export function fileStats(nonZeroStats: Partial): server.FileStats { + return { ts: 0, tsx: 0, dts: 0, js: 0, jsx: 0, ...nonZeroStats }; + } - handler: server.ProjectServiceEventHandler = (event: server.ProjectServiceEvent) => { - this.events.push(event); + export class TestServerEventManager { + private events: server.ProjectServiceEvent[] = []; + readonly session: TestSession; + readonly service: server.ProjectService; + readonly host: projectSystem.TestServerHost; + constructor(files: projectSystem.FileOrFolder[]) { + this.host = createServerHost(files); + this.session = createSession(this.host, { + canUseEvents: true, + eventHandler: event => this.events.push(event), + }); + this.service = this.session.getProjectService(); } - checkEventCountOfType(eventType: "configFileDiag", expectedCount: number) { - const eventsOfType = filter(this.events, e => e.eventName === eventType); - assert.equal(eventsOfType.length, expectedCount, `The actual event counts of type ${eventType} is ${eventsOfType.length}, while expected ${expectedCount}`); + getEvents(): ReadonlyArray { + const events = this.events; + this.events = []; + return events; + } + + getEvent(eventName: T["eventName"]): T["data"] { + let eventData: T["data"]; + filterMutate(this.events, e => { + if (e.eventName === eventName) { + if (eventData !== undefined) { + assert(false, "more than one event found"); + } + eventData = e.data; + return false; + } + return true; + }); + assert.isDefined(eventData); + return eventData; + } + + hasZeroEvent(eventName: T["eventName"]) { + this.events.forEach(event => assert.notEqual(event.eventName, eventName)); + } + + checkSingleConfigFileDiagEvent(configFileName: string, triggerFile: string) { + const eventData = this.getEvent(server.ConfigFileDiagEvent); + assert.equal(eventData.configFileName, configFileName); + assert.equal(eventData.triggerFile, triggerFile); + } + + assertProjectInfoTelemetryEvent(partial: Partial, configFile?: string): void { + assert.deepEqual(this.getEvent(ts.server.ProjectInfoTelemetryEvent), { + projectId: Harness.mockHash(configFile || "/tsconfig.json"), + fileStats: fileStats({ ts: 1 }), + compilerOptions: {}, + extends: false, + files: false, + include: false, + exclude: false, + compileOnSave: false, + typeAcquisition: { + enable: false, + exclude: false, + include: false, + }, + configFileName: "tsconfig.json", + projectType: "configured", + languageServiceEnabled: true, + version: ts.version, + ...partial, + }); } } @@ -220,11 +281,11 @@ namespace ts.projectSystem { checkNumberOfProjects(this, count); } } - export function createProjectService(host: server.ServerHost, parameters: CreateProjectServiceParameters = {}) { + export function createProjectService(host: server.ServerHost, parameters: CreateProjectServiceParameters = {}, options?: Partial) { const cancellationToken = parameters.cancellationToken || server.nullCancellationToken; const logger = parameters.logger || nullLogger; const useSingleInferredProject = parameters.useSingleInferredProject !== undefined ? parameters.useSingleInferredProject : false; - return new TestProjectService(host, logger, cancellationToken, useSingleInferredProject, parameters.typingsInstaller, parameters.eventHandler); + return new TestProjectService(host, logger, cancellationToken, useSingleInferredProject, parameters.typingsInstaller, parameters.eventHandler, options); } export function checkNumberOfConfiguredProjects(projectService: server.ProjectService, expected: number) { @@ -352,8 +413,6 @@ namespace ts.projectSystem { verifyDiagnostics(actual, []); } - const typeRootFromTsserverLocation = "/node_modules/@types"; - export function getTypeRootsFromLocation(currentDirectory: string) { currentDirectory = normalizePath(currentDirectory); const result: string[] = []; @@ -401,7 +460,7 @@ namespace ts.projectSystem { const configFiles = flatMap(configFileLocations, location => [location + "tsconfig.json", location + "jsconfig.json"]); checkWatchedFiles(host, configFiles.concat(libFile.path, moduleFile.path)); checkWatchedDirectories(host, [], /*recursive*/ false); - checkWatchedDirectories(host, ["/a/b/c", typeRootFromTsserverLocation], /*recursive*/ true); + checkWatchedDirectories(host, ["/a/b/c", ...getTypeRootsFromLocation(getDirectoryPath(appFile.path))], /*recursive*/ true); }); it("can handle tsconfig file name with difference casing", () => { @@ -463,7 +522,7 @@ namespace ts.projectSystem { const { configFileName, configFileErrors } = projectService.openClientFile(file1.path); assert(configFileName, "should find config file"); - assert.isTrue(!configFileErrors, `expect no errors in config file, got ${JSON.stringify(configFileErrors)}`); + assert.isTrue(!configFileErrors || configFileErrors.length === 0, `expect no errors in config file, got ${JSON.stringify(configFileErrors)}`); checkNumberOfInferredProjects(projectService, 0); checkNumberOfConfiguredProjects(projectService, 1); @@ -503,7 +562,7 @@ namespace ts.projectSystem { const { configFileName, configFileErrors } = projectService.openClientFile(file1.path); assert(configFileName, "should find config file"); - assert.isTrue(!configFileErrors, `expect no errors in config file, got ${JSON.stringify(configFileErrors)}`); + assert.isTrue(!configFileErrors || configFileErrors.length === 0, `expect no errors in config file, got ${JSON.stringify(configFileErrors)}`); checkNumberOfInferredProjects(projectService, 0); checkNumberOfConfiguredProjects(projectService, 1); @@ -2399,6 +2458,43 @@ namespace ts.projectSystem { checkWatchedDirectories(host, watchedRecursiveDirectories, /*recursive*/ true); }); + + it("Failed lookup locations are uses parent most node_modules directory", () => { + const file1: FileOrFolder = { + path: "/a/b/src/file1.ts", + content: 'import { classc } from "module1"' + }; + const module1: FileOrFolder = { + path: "/a/b/node_modules/module1/index.d.ts", + content: `import { class2 } from "module2"; + export classc { method2a(): class2; }` + }; + const module2: FileOrFolder = { + path: "/a/b/node_modules/module2/index.d.ts", + content: "export class2 { method2() { return 10; } }" + }; + const module3: FileOrFolder = { + path: "/a/b/node_modules/module/node_modules/module3/index.d.ts", + content: "export class3 { method2() { return 10; } }" + }; + const configFile: FileOrFolder = { + path: "/a/b/src/tsconfig.json", + content: JSON.stringify({ files: [file1.path] }) + }; + const files = [file1, module1, module2, module3, configFile, libFile]; + const host = createServerHost(files); + const projectService = createProjectService(host); + projectService.openClientFile(file1.path); + checkNumberOfProjects(projectService, { configuredProjects: 1 }); + const project = projectService.configuredProjects.get(configFile.path); + assert.isDefined(project); + checkProjectActualFiles(project, [file1.path, libFile.path, module1.path, module2.path, configFile.path]); + checkWatchedFiles(host, [libFile.path, module1.path, module2.path, configFile.path]); + checkWatchedDirectories(host, [], /*recursive*/ false); + const watchedRecursiveDirectories = getTypeRootsFromLocation("/a/b/src"); + watchedRecursiveDirectories.push("/a/b/src", "/a/b/node_modules"); + checkWatchedDirectories(host, watchedRecursiveDirectories, /*recursive*/ true); + }); }); describe("Proper errors", () => { @@ -2882,6 +2978,52 @@ namespace ts.projectSystem { function checkSnapLength(snap: IScriptSnapshot, expectedLength: number) { assert.equal(snap.getLength(), expectedLength, "Incorrect snapshot size"); } + + function verifyOpenFileWorks(useCaseSensitiveFileNames: boolean) { + const file1: FileOrFolder = { + path: "/a/b/src/app.ts", + content: "let x = 10;" + }; + const file2: FileOrFolder = { + path: "/a/B/lib/module2.ts", + content: "let z = 10;" + }; + const configFile: FileOrFolder = { + path: "/a/b/tsconfig.json", + content: "" + }; + const configFile2: FileOrFolder = { + path: "/a/tsconfig.json", + content: "" + }; + const host = createServerHost([file1, file2, configFile, configFile2], { + useCaseSensitiveFileNames + }); + const service = createProjectService(host); + + // Open file1 -> configFile + verifyConfigFileName(file1, "/a", configFile); + verifyConfigFileName(file1, "/a/b", configFile); + verifyConfigFileName(file1, "/a/B", useCaseSensitiveFileNames ? undefined : configFile); + + // Open file2 use root "/a/b" + verifyConfigFileName(file2, "/a", useCaseSensitiveFileNames ? configFile2 : configFile); + verifyConfigFileName(file2, "/a/b", useCaseSensitiveFileNames ? undefined : configFile); + verifyConfigFileName(file2, "/a/B", useCaseSensitiveFileNames ? undefined : configFile); + + function verifyConfigFileName(file: FileOrFolder, projectRoot: string, expectedConfigFile: FileOrFolder | undefined) { + const { configFileName } = service.openClientFile(file.path, /*fileContent*/ undefined, /*scriptKind*/ undefined, projectRoot); + assert.equal(configFileName, expectedConfigFile && expectedConfigFile.path); + service.closeClientFile(file.path); + } + } + it("works when project root is used with case-sensitive system", () => { + verifyOpenFileWorks(/*useCaseSensitiveFileNames*/ true); + }); + + it("works when project root is used with case-insensitive system", () => { + verifyOpenFileWorks(/*useCaseSensitiveFileNames*/ false); + }); }); describe("Language service", () => { @@ -3078,7 +3220,6 @@ namespace ts.projectSystem { describe("Configure file diagnostics events", () => { it("are generated when the config file has errors", () => { - const serverEventManager = new TestServerEventManager(); const file = { path: "/a/b/app.ts", content: "let x = 10" @@ -3092,26 +3233,12 @@ namespace ts.projectSystem { } }` }; - - const host = createServerHost([file, configFile]); - const session = createSession(host, { - canUseEvents: true, - eventHandler: serverEventManager.handler - }); - openFilesForSession([file], session); - serverEventManager.checkEventCountOfType("configFileDiag", 1); - - for (const event of serverEventManager.events) { - if (event.eventName === "configFileDiag") { - assert.equal(event.data.configFileName, configFile.path); - assert.equal(event.data.triggerFile, file.path); - return; - } - } + const serverEventManager = new TestServerEventManager([file, configFile]); + openFilesForSession([file], serverEventManager.session); + serverEventManager.checkSingleConfigFileDiagEvent(configFile.path, file.path); }); it("are generated when the config file doesn't have errors", () => { - const serverEventManager = new TestServerEventManager(); const file = { path: "/a/b/app.ts", content: "let x = 10" @@ -3122,18 +3249,12 @@ namespace ts.projectSystem { "compilerOptions": {} }` }; - - const host = createServerHost([file, configFile]); - const session = createSession(host, { - canUseEvents: true, - eventHandler: serverEventManager.handler - }); - openFilesForSession([file], session); - serverEventManager.checkEventCountOfType("configFileDiag", 1); + const serverEventManager = new TestServerEventManager([file, configFile]); + openFilesForSession([file], serverEventManager.session); + serverEventManager.checkSingleConfigFileDiagEvent(configFile.path, file.path); }); it("are generated when the config file changes", () => { - const serverEventManager = new TestServerEventManager(); const file = { path: "/a/b/app.ts", content: "let x = 10" @@ -3145,29 +3266,70 @@ namespace ts.projectSystem { }` }; - const host = createServerHost([file, configFile]); - const session = createSession(host, { - canUseEvents: true, - eventHandler: serverEventManager.handler - }); - openFilesForSession([file], session); - serverEventManager.checkEventCountOfType("configFileDiag", 1); + const serverEventManager = new TestServerEventManager([file, configFile]); + openFilesForSession([file], serverEventManager.session); + serverEventManager.checkSingleConfigFileDiagEvent(configFile.path, file.path); configFile.content = `{ "compilerOptions": { "haha": 123 } }`; - host.reloadFS([file, configFile]); - host.runQueuedTimeoutCallbacks(); - serverEventManager.checkEventCountOfType("configFileDiag", 2); + serverEventManager.host.reloadFS([file, configFile]); + serverEventManager.host.runQueuedTimeoutCallbacks(); + serverEventManager.checkSingleConfigFileDiagEvent(configFile.path, configFile.path); configFile.content = `{ "compilerOptions": {} }`; - host.reloadFS([file, configFile]); - host.runQueuedTimeoutCallbacks(); - serverEventManager.checkEventCountOfType("configFileDiag", 3); + serverEventManager.host.reloadFS([file, configFile]); + serverEventManager.host.runQueuedTimeoutCallbacks(); + serverEventManager.checkSingleConfigFileDiagEvent(configFile.path, configFile.path); + }); + + it("are not generated when the config file doesnot include file opened and config file has errors", () => { + const file = { + path: "/a/b/app.ts", + content: "let x = 10" + }; + const file2 = { + path: "/a/b/test.ts", + content: "let x = 10" + }; + const configFile = { + path: "/a/b/tsconfig.json", + content: `{ + "compilerOptions": { + "foo": "bar", + "allowJS": true + }, + "files": ["app.ts"] + }` + }; + const serverEventManager = new TestServerEventManager([file, file2, libFile, configFile]); + openFilesForSession([file2], serverEventManager.session); + serverEventManager.hasZeroEvent("configFileDiag"); + }); + + it("are not generated when the config file doesnot include file opened and doesnt contain any errors", () => { + const file = { + path: "/a/b/app.ts", + content: "let x = 10" + }; + const file2 = { + path: "/a/b/test.ts", + content: "let x = 10" + }; + const configFile = { + path: "/a/b/tsconfig.json", + content: `{ + "files": ["app.ts"] + }` + }; + + const serverEventManager = new TestServerEventManager([file, file2, libFile, configFile]); + openFilesForSession([file2], serverEventManager.session); + serverEventManager.hasZeroEvent("configFileDiag"); }); }); @@ -3622,6 +3784,113 @@ namespace ts.projectSystem { assert.equal(projectService.inferredProjects[1].getCompilationSettings().target, ScriptTarget.ESNext); assert.equal(projectService.inferredProjects[2].getCompilationSettings().target, ScriptTarget.ES2015); }); + + function checkInferredProject(inferredProject: server.InferredProject, actualFiles: FileOrFolder[], target: ScriptTarget) { + checkProjectActualFiles(inferredProject, actualFiles.map(f => f.path)); + assert.equal(inferredProject.getCompilationSettings().target, target); + } + + function verifyProjectRootWithCaseSensitivity(useCaseSensitiveFileNames: boolean) { + const files: [FileOrFolder, FileOrFolder, FileOrFolder, FileOrFolder] = [ + { path: "/a/file1.ts", content: "let x = 1;" }, + { path: "/A/file2.ts", content: "let y = 2;" }, + { path: "/b/file2.ts", content: "let x = 3;" }, + { path: "/c/file3.ts", content: "let z = 4;" } + ]; + const host = createServerHost(files, { useCaseSensitiveFileNames }); + const projectService = createProjectService(host, { useSingleInferredProject: true, }, { useInferredProjectPerProjectRoot: true }); + projectService.setCompilerOptionsForInferredProjects({ + allowJs: true, + target: ScriptTarget.ESNext + }); + projectService.setCompilerOptionsForInferredProjects({ + allowJs: true, + target: ScriptTarget.ES2015 + }, "/a"); + + openClientFiles(["/a", "/a", "/b", undefined]); + verifyInferredProjectsState([ + [[files[3]], ScriptTarget.ESNext], + [[files[0], files[1]], ScriptTarget.ES2015], + [[files[2]], ScriptTarget.ESNext] + ]); + closeClientFiles(); + + openClientFiles(["/a", "/A", "/b", undefined]); + if (useCaseSensitiveFileNames) { + verifyInferredProjectsState([ + [[files[3]], ScriptTarget.ESNext], + [[files[0]], ScriptTarget.ES2015], + [[files[1]], ScriptTarget.ESNext], + [[files[2]], ScriptTarget.ESNext] + ]); + } + else { + verifyInferredProjectsState([ + [[files[3]], ScriptTarget.ESNext], + [[files[0], files[1]], ScriptTarget.ES2015], + [[files[2]], ScriptTarget.ESNext] + ]); + } + closeClientFiles(); + + projectService.setCompilerOptionsForInferredProjects({ + allowJs: true, + target: ScriptTarget.ES2017 + }, "/A"); + + openClientFiles(["/a", "/a", "/b", undefined]); + verifyInferredProjectsState([ + [[files[3]], ScriptTarget.ESNext], + [[files[0], files[1]], useCaseSensitiveFileNames ? ScriptTarget.ES2015 : ScriptTarget.ES2017], + [[files[2]], ScriptTarget.ESNext] + ]); + closeClientFiles(); + + openClientFiles(["/a", "/A", "/b", undefined]); + if (useCaseSensitiveFileNames) { + verifyInferredProjectsState([ + [[files[3]], ScriptTarget.ESNext], + [[files[0]], ScriptTarget.ES2015], + [[files[1]], ScriptTarget.ES2017], + [[files[2]], ScriptTarget.ESNext] + ]); + } + else { + verifyInferredProjectsState([ + [[files[3]], ScriptTarget.ESNext], + [[files[0], files[1]], ScriptTarget.ES2017], + [[files[2]], ScriptTarget.ESNext] + ]); + } + closeClientFiles(); + + function openClientFiles(projectRoots: [string | undefined, string | undefined, string | undefined, string | undefined]) { + files.forEach((file, index) => { + projectService.openClientFile(file.path, file.content, ScriptKind.JS, projectRoots[index]); + }); + } + + function closeClientFiles() { + files.forEach(file => projectService.closeClientFile(file.path)); + } + + function verifyInferredProjectsState(expected: [FileOrFolder[], ScriptTarget][]) { + checkNumberOfProjects(projectService, { inferredProjects: expected.length }); + projectService.inferredProjects.forEach((p, index) => { + const [actualFiles, target] = expected[index]; + checkInferredProject(p, actualFiles, target); + }); + } + } + + it("inferred projects per project root with case sensitive system", () => { + verifyProjectRootWithCaseSensitivity(/*useCaseSensitiveFileNames*/ true); + }); + + it("inferred projects per project root with case insensitive system", () => { + verifyProjectRootWithCaseSensitivity(/*useCaseSensitiveFileNames*/ false); + }); }); describe("No overwrite emit error", () => { @@ -4250,14 +4519,14 @@ namespace ts.projectSystem { fileName: "/a.ts", textChanges: [ { - start: { line: 2, offset: 1 }, - end: { line: 3, offset: 1 }, - newText: " newFunction();\n", + start: { line: 2, offset: 3 }, + end: { line: 2, offset: 5 }, + newText: "newFunction();", }, { start: { line: 3, offset: 2 }, end: { line: 3, offset: 2 }, - newText: "\nfunction newFunction() {\n 1;\n}\n", + newText: "\n\nfunction newFunction() {\n 1;\n}\n", }, ] } @@ -4331,7 +4600,7 @@ namespace ts.projectSystem { function verifyCalledOnEachEntry(callback: CalledMaps, expectedKeys: Map) { const calledMap = calledMaps[callback]; - assert.equal(calledMap.size, expectedKeys.size, `${callback}: incorrect size of map: Actual keys: ${arrayFrom(calledMap.keys())} Expected: ${arrayFrom(expectedKeys.keys())}`); + ts.TestFSWithWatch.verifyMapSize(callback, calledMap, arrayFrom(expectedKeys.keys())); expectedKeys.forEach((called, name) => { assert.isTrue(calledMap.has(name), `${callback} is expected to contain ${name}, actual keys: ${arrayFrom(calledMap.keys())}`); assert.equal(calledMap.get(name).length, called, `${callback} is expected to be called ${called} times with ${name}. Actual entry: ${calledMap.get(name)}`); @@ -4413,6 +4682,7 @@ namespace ts.projectSystem { } const f2Lookups = getLocationsForModuleLookup("f2"); callsTrackingHost.verifyCalledOnEachEntryNTimes(CalledMapsWithSingleArg.fileExists, f2Lookups, 1); + const typeRootLocations = getTypeRootsFromLocation(getDirectoryPath(root.path)); const f2DirLookups = getLocationsForDirectoryLookup(); callsTrackingHost.verifyCalledOnEachEntry(CalledMapsWithSingleArg.directoryExists, f2DirLookups); callsTrackingHost.verifyNoCall(CalledMapsWithSingleArg.getDirectories); @@ -4423,7 +4693,7 @@ namespace ts.projectSystem { verifyImportedDiagnostics(); const f1Lookups = f2Lookups.map(s => s.replace("f2", "f1")); f1Lookups.length = f1Lookups.indexOf(imported.path) + 1; - const f1DirLookups = ["/c/d", "/c", typeRootFromTsserverLocation]; + const f1DirLookups = ["/c/d", "/c", ...typeRootLocations]; vertifyF1Lookups(); // setting compiler options discards module resolution cache @@ -4475,7 +4745,7 @@ namespace ts.projectSystem { function getLocationsForDirectoryLookup() { const result = createMap(); // Type root - result.set(typeRootFromTsserverLocation, 1); + typeRootLocations.forEach(location => result.set(location, 1)); forEachAncestorDirectory(getDirectoryPath(root.path), ancestor => { // To resolve modules result.set(ancestor, 2); diff --git a/src/harness/virtualFileSystemWithWatch.ts b/src/harness/virtualFileSystemWithWatch.ts index c16f57235e4..67b3e264db4 100644 --- a/src/harness/virtualFileSystemWithWatch.ts +++ b/src/harness/virtualFileSystemWithWatch.ts @@ -95,7 +95,7 @@ namespace ts.TestFSWithWatch { } } - function getDiffInKeys(map: Map, expectedKeys: ReadonlyArray) { + function getDiffInKeys(map: Map, expectedKeys: ReadonlyArray) { if (map.size === expectedKeys.length) { return ""; } @@ -122,8 +122,12 @@ namespace ts.TestFSWithWatch { return `\n\nNotInActual: ${notInActual}\nDuplicates: ${duplicates}\nInActualButNotInExpected: ${inActualNotExpected}`; } - function checkMapKeys(caption: string, map: Map, expectedKeys: ReadonlyArray) { + export function verifyMapSize(caption: string, map: Map, expectedKeys: ReadonlyArray) { assert.equal(map.size, expectedKeys.length, `${caption}: incorrect size of map: Actual keys: ${arrayFrom(map.keys())} Expected: ${expectedKeys}${getDiffInKeys(map, expectedKeys)}`); + } + + function checkMapKeys(caption: string, map: Map, expectedKeys: ReadonlyArray) { + verifyMapSize(caption, map, expectedKeys); for (const name of expectedKeys) { assert.isTrue(map.has(name), `${caption} is expected to contain ${name}, actual keys: ${arrayFrom(map.keys())}`); } @@ -212,13 +216,13 @@ namespace ts.TestFSWithWatch { directoryName: string; } - export class TestServerHost implements server.ServerHost { + export class TestServerHost implements server.ServerHost, FormatDiagnosticsHost { args: string[] = []; private readonly output: string[] = []; private fs: Map = createMap(); - private getCanonicalFileName: (s: string) => string; + getCanonicalFileName: (s: string) => string; private toPath: (f: string) => Path; private timeoutCallbacks = new Callbacks(); private immediateCallbacks = new Callbacks(); @@ -234,6 +238,10 @@ namespace ts.TestFSWithWatch { this.reloadFS(fileOrFolderList); } + getNewLine() { + return this.newLine; + } + toNormalizedAbsolutePath(s: string) { return getNormalizedAbsolutePath(s, this.currentDirectory); } @@ -548,7 +556,7 @@ namespace ts.TestFSWithWatch { const folder = this.toFolder(directoryName); // base folder has to be present - const base = getDirectoryPath(folder.fullPath); + const base = getDirectoryPath(folder.path); const baseFolder = this.fs.get(base) as Folder; Debug.assert(isFolder(baseFolder)); @@ -560,7 +568,7 @@ namespace ts.TestFSWithWatch { const file = this.toFile({ path, content }); // base folder has to be present - const base = getDirectoryPath(file.fullPath); + const base = getDirectoryPath(file.path); const folder = this.fs.get(base) as Folder; Debug.assert(isFolder(folder)); diff --git a/src/lib/es2015.core.d.ts b/src/lib/es2015.core.d.ts index 5c2438d9052..9ea773e3eef 100644 --- a/src/lib/es2015.core.d.ts +++ b/src/lib/es2015.core.d.ts @@ -10,6 +10,7 @@ interface Array { * @param thisArg If provided, it will be used as the this value for each invocation of * predicate. If it is not provided, undefined is used instead. */ + find(predicate: (this: void, value: T, index: number, obj: T[]) => value is S, thisArg?: any): S | undefined; find(predicate: (value: T, index: number, obj: T[]) => boolean, thisArg?: any): T | undefined; /** @@ -350,6 +351,7 @@ interface ReadonlyArray { * @param thisArg If provided, it will be used as the this value for each invocation of * predicate. If it is not provided, undefined is used instead. */ + find(predicate: (this: void, value: T, index: number, obj: ReadonlyArray) => value is S, thisArg?: any): S | undefined; find(predicate: (value: T, index: number, obj: ReadonlyArray) => boolean, thisArg?: any): T | undefined; /** diff --git a/src/lib/es2017.object.d.ts b/src/lib/es2017.object.d.ts index 1d8a52da758..4014e8c2927 100644 --- a/src/lib/es2017.object.d.ts +++ b/src/lib/es2017.object.d.ts @@ -3,7 +3,7 @@ interface ObjectConstructor { * Returns an array of values of the enumerable properties of an object * @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object. */ - values(o: { [s: string]: T }): T[]; + values(o: { [s: string]: T } | { [n: number]: T }): T[]; /** * Returns an array of values of the enumerable properties of an object @@ -15,7 +15,7 @@ interface ObjectConstructor { * Returns an array of key/values of the enumerable properties of an object * @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object. */ - entries(o: { [s: string]: T }): [string, T][]; + entries(o: { [s: string]: T } | { [n: number]: T }): [string, T][]; /** * Returns an array of key/values of the enumerable properties of an object diff --git a/src/lib/es5.d.ts b/src/lib/es5.d.ts index e08534d8ba9..fd2ae5b3fdf 100644 --- a/src/lib/es5.d.ts +++ b/src/lib/es5.d.ts @@ -1050,7 +1050,8 @@ interface ReadonlyArray { * @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array. * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value. */ - reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: ReadonlyArray) => T, initialValue?: T): T; + reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: ReadonlyArray) => T): T; + reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: ReadonlyArray) => T, initialValue: T): T; /** * Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. * @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array. @@ -1062,7 +1063,8 @@ interface ReadonlyArray { * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array. * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value. */ - reduceRight(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: ReadonlyArray) => T, initialValue?: T): T; + reduceRight(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: ReadonlyArray) => T): T; + reduceRight(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: ReadonlyArray) => T, initialValue: T): T; /** * Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array. @@ -1200,7 +1202,8 @@ interface Array { * @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array. * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value. */ - reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T, initialValue?: T): T; + reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T): T; + reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T, initialValue: T): T; /** * Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. * @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array. @@ -1212,7 +1215,8 @@ interface Array { * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array. * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value. */ - reduceRight(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T, initialValue?: T): T; + reduceRight(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T): T; + reduceRight(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T, initialValue: T): T; /** * Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array. @@ -1647,7 +1651,8 @@ interface Int8Array { * the accumulation. The first call to the callbackfn function provides this value as an argument * instead of an array value. */ - reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int8Array) => number, initialValue?: number): number; + reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int8Array) => number): number; + reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int8Array) => number, initialValue: number): number; /** * Calls the specified callback function for all the elements in an array. The return value of @@ -1671,7 +1676,8 @@ interface Int8Array { * the accumulation. The first call to the callbackfn function provides this value as an * argument instead of an array value. */ - reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int8Array) => number, initialValue?: number): number; + reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int8Array) => number): number; + reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int8Array) => number, initialValue: number): number; /** * Calls the specified callback function for all the elements in an array, in descending order. @@ -1914,7 +1920,8 @@ interface Uint8Array { * the accumulation. The first call to the callbackfn function provides this value as an argument * instead of an array value. */ - reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint8Array) => number, initialValue?: number): number; + reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint8Array) => number): number; + reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint8Array) => number, initialValue: number): number; /** * Calls the specified callback function for all the elements in an array. The return value of @@ -1938,7 +1945,8 @@ interface Uint8Array { * the accumulation. The first call to the callbackfn function provides this value as an * argument instead of an array value. */ - reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint8Array) => number, initialValue?: number): number; + reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint8Array) => number): number; + reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint8Array) => number, initialValue: number): number; /** * Calls the specified callback function for all the elements in an array, in descending order. @@ -2181,7 +2189,8 @@ interface Uint8ClampedArray { * the accumulation. The first call to the callbackfn function provides this value as an argument * instead of an array value. */ - reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint8ClampedArray) => number, initialValue?: number): number; + reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint8ClampedArray) => number): number; + reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint8ClampedArray) => number, initialValue: number): number; /** * Calls the specified callback function for all the elements in an array. The return value of @@ -2205,7 +2214,8 @@ interface Uint8ClampedArray { * the accumulation. The first call to the callbackfn function provides this value as an * argument instead of an array value. */ - reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint8ClampedArray) => number, initialValue?: number): number; + reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint8ClampedArray) => number): number; + reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint8ClampedArray) => number, initialValue: number): number; /** * Calls the specified callback function for all the elements in an array, in descending order. @@ -2446,7 +2456,8 @@ interface Int16Array { * the accumulation. The first call to the callbackfn function provides this value as an argument * instead of an array value. */ - reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int16Array) => number, initialValue?: number): number; + reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int16Array) => number): number; + reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int16Array) => number, initialValue: number): number; /** * Calls the specified callback function for all the elements in an array. The return value of @@ -2470,7 +2481,8 @@ interface Int16Array { * the accumulation. The first call to the callbackfn function provides this value as an * argument instead of an array value. */ - reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int16Array) => number, initialValue?: number): number; + reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int16Array) => number): number; + reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int16Array) => number, initialValue: number): number; /** * Calls the specified callback function for all the elements in an array, in descending order. @@ -2714,7 +2726,8 @@ interface Uint16Array { * the accumulation. The first call to the callbackfn function provides this value as an argument * instead of an array value. */ - reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint16Array) => number, initialValue?: number): number; + reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint16Array) => number): number; + reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint16Array) => number, initialValue: number): number; /** * Calls the specified callback function for all the elements in an array. The return value of @@ -2738,7 +2751,8 @@ interface Uint16Array { * the accumulation. The first call to the callbackfn function provides this value as an * argument instead of an array value. */ - reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint16Array) => number, initialValue?: number): number; + reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint16Array) => number): number; + reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint16Array) => number, initialValue: number): number; /** * Calls the specified callback function for all the elements in an array, in descending order. @@ -2981,7 +2995,8 @@ interface Int32Array { * the accumulation. The first call to the callbackfn function provides this value as an argument * instead of an array value. */ - reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int32Array) => number, initialValue?: number): number; + reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int32Array) => number): number; + reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int32Array) => number, initialValue: number): number; /** * Calls the specified callback function for all the elements in an array. The return value of @@ -3005,7 +3020,8 @@ interface Int32Array { * the accumulation. The first call to the callbackfn function provides this value as an * argument instead of an array value. */ - reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int32Array) => number, initialValue?: number): number; + reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int32Array) => number): number; + reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int32Array) => number, initialValue: number): number; /** * Calls the specified callback function for all the elements in an array, in descending order. @@ -3247,7 +3263,8 @@ interface Uint32Array { * the accumulation. The first call to the callbackfn function provides this value as an argument * instead of an array value. */ - reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint32Array) => number, initialValue?: number): number; + reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint32Array) => number): number; + reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint32Array) => number, initialValue: number): number; /** * Calls the specified callback function for all the elements in an array. The return value of @@ -3271,7 +3288,8 @@ interface Uint32Array { * the accumulation. The first call to the callbackfn function provides this value as an * argument instead of an array value. */ - reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint32Array) => number, initialValue?: number): number; + reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint32Array) => number): number; + reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint32Array) => number, initialValue: number): number; /** * Calls the specified callback function for all the elements in an array, in descending order. @@ -3514,7 +3532,8 @@ interface Float32Array { * the accumulation. The first call to the callbackfn function provides this value as an argument * instead of an array value. */ - reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float32Array) => number, initialValue?: number): number; + reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float32Array) => number): number; + reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float32Array) => number, initialValue: number): number; /** * Calls the specified callback function for all the elements in an array. The return value of @@ -3538,7 +3557,8 @@ interface Float32Array { * the accumulation. The first call to the callbackfn function provides this value as an * argument instead of an array value. */ - reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float32Array) => number, initialValue?: number): number; + reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float32Array) => number): number; + reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float32Array) => number, initialValue: number): number; /** * Calls the specified callback function for all the elements in an array, in descending order. @@ -3782,7 +3802,8 @@ interface Float64Array { * the accumulation. The first call to the callbackfn function provides this value as an argument * instead of an array value. */ - reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float64Array) => number, initialValue?: number): number; + reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float64Array) => number): number; + reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float64Array) => number, initialValue: number): number; /** * Calls the specified callback function for all the elements in an array. The return value of @@ -3806,7 +3827,8 @@ interface Float64Array { * the accumulation. The first call to the callbackfn function provides this value as an * argument instead of an array value. */ - reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float64Array) => number, initialValue?: number): number; + reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float64Array) => number): number; + reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float64Array) => number, initialValue: number): number; /** * Calls the specified callback function for all the elements in an array, in descending order. diff --git a/src/server/editorServices.ts b/src/server/editorServices.ts index 25a285929be..70598313a73 100644 --- a/src/server/editorServices.ts +++ b/src/server/editorServices.ts @@ -403,7 +403,7 @@ namespace ts.server { this.globalPlugins = opts.globalPlugins || emptyArray; this.pluginProbeLocations = opts.pluginProbeLocations || emptyArray; this.allowLocalPluginLoads = !!opts.allowLocalPluginLoads; - this.typesMapLocation = (opts.typesMapLocation === undefined) ? combinePaths(this.host.getExecutingFilePath(), "../typesMap.json") : opts.typesMapLocation; + this.typesMapLocation = (opts.typesMapLocation === undefined) ? combinePaths(this.getExecutingFilePath(), "../typesMap.json") : opts.typesMapLocation; Debug.assert(!!this.host.createHash, "'ServerHost.createHash' is required for ProjectService"); @@ -431,6 +431,11 @@ namespace ts.server { this.watchFilePath = (host, file, cb, path, watchType, project) => ts.addFilePathWatcherWithLogging(host, file, cb, path, this.createWatcherLog(watchType, project)); this.watchDirectory = (host, dir, cb, flags, watchType, project) => ts.addDirectoryWatcherWithLogging(host, dir, cb, flags, this.createWatcherLog(watchType, project)); } + else if (this.logger.loggingEnabled()) { + this.watchFile = (host, file, cb, watchType, project) => ts.addFileWatcherWithOnlyTriggerLogging(host, file, cb, this.createWatcherLog(watchType, project)); + this.watchFilePath = (host, file, cb, path, watchType, project) => ts.addFilePathWatcherWithOnlyTriggerLogging(host, file, cb, path, this.createWatcherLog(watchType, project)); + this.watchDirectory = (host, dir, cb, flags, watchType, project) => ts.addDirectoryWatcherWithOnlyTriggerLogging(host, dir, cb, flags, this.createWatcherLog(watchType, project)); + } else { this.watchFile = ts.addFileWatcher; this.watchFilePath = ts.addFilePathWatcher; @@ -447,6 +452,16 @@ namespace ts.server { return toPath(fileName, this.currentDirectory, this.toCanonicalFileName); } + /*@internal*/ + getExecutingFilePath() { + return this.getNormalizedAbsolutePath(this.host.getExecutingFilePath()); + } + + /*@internal*/ + getNormalizedAbsolutePath(fileName: string) { + return getNormalizedAbsolutePath(fileName, this.host.getCurrentDirectory()); + } + /* @internal */ getChangedFiles_TestOnly() { return this.changedFiles; @@ -575,9 +590,9 @@ namespace ts.server { // always set 'allowNonTsExtensions' for inferred projects since user cannot configure it from the outside // previously we did not expose a way for user to change these settings and this option was enabled by default compilerOptions.allowNonTsExtensions = true; - - if (projectRootPath) { - this.compilerOptionsForInferredProjectsPerProjectRoot.set(projectRootPath, compilerOptions); + const canonicalProjectRootPath = projectRootPath && this.toCanonicalFileName(projectRootPath); + if (canonicalProjectRootPath) { + this.compilerOptionsForInferredProjectsPerProjectRoot.set(canonicalProjectRootPath, compilerOptions); } else { this.compilerOptionsForInferredProjects = compilerOptions; @@ -593,9 +608,9 @@ namespace ts.server { // root path // - Inferred projects with a projectRootPath, if the new options apply to that // project root path. - if (projectRootPath ? - project.projectRootPath === projectRootPath : - !project.projectRootPath || !this.compilerOptionsForInferredProjectsPerProjectRoot.has(project.projectRootPath)) { + if (canonicalProjectRootPath ? + project.projectRootPath === canonicalProjectRootPath : + !project.projectRootPath || !this.compilerOptionsForInferredProjectsPerProjectRoot.has(project.projectRootPath)) { project.setCompilerOptions(compilerOptions); project.compileOnSaveEnabled = compilerOptions.compileOnSave; project.markAsDirty(); @@ -827,6 +842,9 @@ namespace ts.server { this.logger.info(`remove project: ${project.getRootFiles().toString()}`); project.close(); + if (Debug.shouldAssert(AssertionLevel.Normal)) { + this.filenameToScriptInfo.forEach(info => Debug.assert(!info.isAttached(project))); + } // Remove the project from pending project updates this.pendingProjectUpdates.delete(project.getProjectName()); @@ -1200,7 +1218,7 @@ namespace ts.server { projectRootPath?: NormalizedPath) { let searchPath = asNormalizedPath(getDirectoryPath(info.fileName)); - while (!projectRootPath || searchPath.indexOf(projectRootPath) >= 0) { + while (!projectRootPath || containsPath(projectRootPath, searchPath, this.currentDirectory, !this.host.useCaseSensitiveFileNames)) { const canonicalSearchPath = normalizedPathToPath(searchPath, this.currentDirectory, this.toCanonicalFileName); const tsconfigFileName = asNormalizedPath(combinePaths(searchPath, "tsconfig.json")); let result = action(tsconfigFileName, combinePaths(canonicalSearchPath, "tsconfig.json")); @@ -1561,14 +1579,17 @@ namespace ts.server { project.watchWildcards(projectOptions.wildcardDirectories); } this.updateNonInferredProject(project, projectOptions.files, fileNamePropertyReader, projectOptions.compilerOptions, projectOptions.typeAcquisition, projectOptions.compileOnSave); + this.sendConfigFileDiagEvent(project, configFileName); + } + private sendConfigFileDiagEvent(project: ConfiguredProject, triggerFile: NormalizedPath) { if (!this.eventHandler) { return; } this.eventHandler({ eventName: ConfigFileDiagEvent, - data: { configFileName, diagnostics: project.getGlobalProjectErrors() || [], triggerFile: configFileName } + data: { configFileName: project.getConfigFilePath(), diagnostics: project.getAllProjectErrors(), triggerFile } }); } @@ -1578,9 +1599,10 @@ namespace ts.server { } if (projectRootPath) { + const canonicalProjectRootPath = this.toCanonicalFileName(projectRootPath); // if we have an explicit project root path, find (or create) the matching inferred project. for (const project of this.inferredProjects) { - if (project.projectRootPath === projectRootPath) { + if (project.projectRootPath === canonicalProjectRootPath) { return project; } } @@ -1621,12 +1643,13 @@ namespace ts.server { return this.inferredProjects[0]; } - return this.createInferredProject(/*rootDirectoryForResolution*/ undefined, /*isSingleInferredProject*/ true); + // Single inferred project does not have a project root and hence no current directory + return this.createInferredProject(/*currentDirectory*/ undefined, /*isSingleInferredProject*/ true); } - private createInferredProject(rootDirectoryForResolution: string | undefined, isSingleInferredProject?: boolean, projectRootPath?: string): InferredProject { + private createInferredProject(currentDirectory: string | undefined, isSingleInferredProject?: boolean, projectRootPath?: string): InferredProject { const compilerOptions = projectRootPath && this.compilerOptionsForInferredProjectsPerProjectRoot.get(projectRootPath) || this.compilerOptionsForInferredProjects; - const project = new InferredProject(this, this.documentRegistry, compilerOptions, projectRootPath, rootDirectoryForResolution); + const project = new InferredProject(this, this.documentRegistry, compilerOptions, projectRootPath, currentDirectory); if (isSingleInferredProject) { this.inferredProjects.unshift(project); } @@ -1888,6 +1911,7 @@ namespace ts.server { openClientFileWithNormalizedPath(fileName: NormalizedPath, fileContent?: string, scriptKind?: ScriptKind, hasMixedContent?: boolean, projectRootPath?: NormalizedPath): OpenConfiguredProjectResult { let configFileName: NormalizedPath; + let sendConfigFileDiagEvent = false; let configFileErrors: ReadonlyArray; const info = this.getOrCreateScriptInfoOpenedByClientForNormalizedPath(fileName, fileContent, scriptKind, hasMixedContent); @@ -1898,14 +1922,8 @@ namespace ts.server { project = this.findConfiguredProjectByProjectName(configFileName); if (!project) { project = this.createConfiguredProject(configFileName); - - // even if opening config file was successful, it could still - // contain errors that were tolerated. - const errors = project.getGlobalProjectErrors(); - if (errors && errors.length > 0) { - // set configFileErrors only when the errors array is non-empty - configFileErrors = errors; - } + // Send the event only if the project got created as part of this open request + sendConfigFileDiagEvent = true; } } } @@ -1919,10 +1937,19 @@ namespace ts.server { // At this point if file is part of any any configured or external project, then it would be present in the containing projects // So if it still doesnt have any containing projects, it needs to be part of inferred project if (info.isOrphan()) { + // Since the file isnt part of configured project, do not send config file event + configFileName = undefined; + sendConfigFileDiagEvent = false; + this.assignOrphanScriptInfoToInferredProject(info, projectRootPath); } this.addToListOfOpenFiles(info); + if (sendConfigFileDiagEvent) { + configFileErrors = project.getAllProjectErrors(); + this.sendConfigFileDiagEvent(project as ConfiguredProject, fileName); + } + // Remove the configured projects that have zero references from open files. // This was postponed from closeOpenFile to after opening next file, // so that we can reuse the project if we need to right away @@ -1938,6 +1965,7 @@ namespace ts.server { // the file from that old project is reopened because of opening file from here. this.deleteOrphanScriptInfoNotInAnyProject(); this.printProjects(); + return { configFileName, configFileErrors }; } diff --git a/src/server/project.ts b/src/server/project.ts index 655f3ed0cfc..7653fbf93cf 100644 --- a/src/server/project.ts +++ b/src/server/project.ts @@ -195,6 +195,9 @@ namespace ts.server { return result.module; } + /*@internal*/ + readonly currentDirectory: string; + /*@internal*/ constructor( /*@internal*/readonly projectName: string, @@ -206,7 +209,8 @@ namespace ts.server { private compilerOptions: CompilerOptions, public compileOnSaveEnabled: boolean, /*@internal*/public directoryStructureHost: DirectoryStructureHost, - rootDirectoryForResolution: string | undefined) { + currentDirectory: string | undefined) { + this.currentDirectory = this.projectService.getNormalizedAbsolutePath(currentDirectory || ""); this.cancellationToken = new ThrottledCancellationToken(this.projectService.cancellationToken, this.projectService.throttleWaitMilliseconds); if (!this.compilerOptions) { @@ -229,8 +233,9 @@ namespace ts.server { this.realpath = path => host.realpath(path); } + // Use the current directory as resolution root only if the project created using current directory string + this.resolutionCache = createResolutionCache(this, currentDirectory && this.currentDirectory); this.languageService = createLanguageService(this, this.documentRegistry); - this.resolutionCache = createResolutionCache(this, rootDirectoryForResolution); if (!languageServiceEnabled) { this.disableLanguageService(); } @@ -296,16 +301,16 @@ namespace ts.server { } } - getCancellationToken() { + getCancellationToken(): HostCancellationToken { return this.cancellationToken; } getCurrentDirectory(): string { - return this.directoryStructureHost.getCurrentDirectory(); + return this.currentDirectory; } getDefaultLibFileName() { - const nodeModuleBinDir = getDirectoryPath(normalizePath(this.projectService.host.getExecutingFilePath())); + const nodeModuleBinDir = getDirectoryPath(normalizePath(this.projectService.getExecutingFilePath())); return combinePaths(nodeModuleBinDir, getDefaultLibFileName(this.compilerOptions)); } @@ -448,9 +453,8 @@ namespace ts.server { this.ensureBuilder(); const { emitSkipped, outputFiles } = this.builder.emitFile(this.program, scriptInfo.path); if (!emitSkipped) { - const projectRootPath = this.getProjectRootPath(); for (const outputFile of outputFiles) { - const outputFileAbsoluteFileName = getNormalizedAbsolutePath(outputFile.name, projectRootPath ? projectRootPath : getDirectoryPath(scriptInfo.fileName)); + const outputFileAbsoluteFileName = getNormalizedAbsolutePath(outputFile.name, this.currentDirectory); writeFile(outputFileAbsoluteFileName, outputFile.text, outputFile.writeByteOrderMark); } } @@ -479,7 +483,6 @@ namespace ts.server { getProjectName() { return this.projectName; } - abstract getProjectRootPath(): string | undefined; abstract getTypeAcquisition(): TypeAcquisition; getExternalFiles(): SortedReadonlyArray { @@ -495,25 +498,23 @@ namespace ts.server { close() { if (this.program) { - // if we have a program - release all files that are enlisted in program + // if we have a program - release all files that are enlisted in program but arent root + // The releasing of the roots happens later + // The project could have pending update remaining and hence the info could be in the files but not in program graph for (const f of this.program.getSourceFiles()) { - const info = this.projectService.getScriptInfo(f.fileName); - // We might not find the script info in case its not associated with the project any more - // and project graph was not updated (eg delayed update graph in case of files changed/deleted on the disk) - if (info) { - info.detachFromProject(this); - } + this.detachScriptInfoIfNotRoot(f.fileName); } } - if (!this.program || !this.languageServiceEnabled) { - // release all root files either if there is no program or language service is disabled. - // in the latter case set of root files can be larger than the set of files in program. - for (const root of this.rootFiles) { - root.detachFromProject(this); - } + // Release external files + forEach(this.externalFiles, externalFile => this.detachScriptInfoIfNotRoot(externalFile)); + // Always remove root files from the project + for (const root of this.rootFiles) { + root.detachFromProject(this); } + this.rootFiles = undefined; this.rootFilesMap = undefined; + this.externalFiles = undefined; this.program = undefined; this.builder = undefined; this.resolutionCache.clear(); @@ -532,6 +533,15 @@ namespace ts.server { this.languageService = undefined; } + private detachScriptInfoIfNotRoot(uncheckedFilename: string) { + const info = this.projectService.getScriptInfo(uncheckedFilename); + // We might not find the script info in case its not associated with the project any more + // and project graph was not updated (eg delayed update graph in case of files changed/deleted on the disk) + if (info && !this.isRoot(info)) { + info.detachFromProject(this); + } + } + isClosed() { return this.rootFiles === undefined; } @@ -561,7 +571,7 @@ namespace ts.server { return map(this.program.getSourceFiles(), sourceFile => { const scriptInfo = this.projectService.getScriptInfoForPath(sourceFile.path); if (!scriptInfo) { - Debug.fail(`scriptInfo for a file '${sourceFile.fileName}' is missing.`); + Debug.fail(`scriptInfo for a file '${sourceFile.fileName}' Path: '${sourceFile.path}' is missing.`); } return scriptInfo; }); @@ -732,7 +742,6 @@ namespace ts.server { */ updateGraph(): boolean { this.resolutionCache.startRecordingFilesWithChangedResolutions(); - this.hasInvalidatedResolution = this.resolutionCache.createHasInvalidatedResolution(); let hasChanges = this.updateGraphWorker(); @@ -792,9 +801,10 @@ namespace ts.server { private updateGraphWorker() { const oldProgram = this.program; - + Debug.assert(!this.isClosed(), "Called update graph worker of closed project"); this.writeLog(`Starting updateGraphWorker: Project: ${this.getProjectName()}`); const start = timestamp(); + this.hasInvalidatedResolution = this.resolutionCache.createHasInvalidatedResolution(); this.resolutionCache.startCachingPerDirectoryResolution(); this.program = this.languageService.getProgram(); this.resolutionCache.finishCachingPerDirectoryResolution(); @@ -1037,13 +1047,16 @@ namespace ts.server { super.setCompilerOptions(newOptions); } + /** this is canonical project root path */ + readonly projectRootPath: string | undefined; + /*@internal*/ constructor( projectService: ProjectService, documentRegistry: DocumentRegistry, compilerOptions: CompilerOptions, - public readonly projectRootPath: string | undefined, - rootDirectoryForResolution: string | undefined) { + projectRootPath: string | undefined, + currentDirectory: string | undefined) { super(InferredProject.newName(), ProjectKind.Inferred, projectService, @@ -1053,7 +1066,8 @@ namespace ts.server { compilerOptions, /*compileOnSaveEnabled*/ false, projectService.host, - rootDirectoryForResolution); + currentDirectory); + this.projectRootPath = projectRootPath && projectService.toCanonicalFileName(projectRootPath); } addRoot(info: ScriptInfo) { @@ -1082,12 +1096,6 @@ namespace ts.server { this.getRootScriptInfos().length === 1; } - getProjectRootPath() { - return this.projectRootPath || - // Single inferred project does not have a project root. - !this.projectService.useSingleInferredProject && getDirectoryPath(this.getRootFiles()[0]); - } - close() { forEach(this.getRootScriptInfos(), info => this.projectService.stopWatchingConfigFilesForInferredProjectRoot(info)); super.close(); @@ -1183,7 +1191,7 @@ namespace ts.server { // Search our peer node_modules, then any globally-specified probe paths // ../../.. to walk from X/node_modules/typescript/lib/tsserver.js to X/node_modules/ - const searchPaths = [combinePaths(host.getExecutingFilePath(), "../../.."), ...this.projectService.pluginProbeLocations]; + const searchPaths = [combinePaths(this.projectService.getExecutingFilePath(), "../../.."), ...this.projectService.pluginProbeLocations]; if (this.projectService.allowLocalPluginLoads) { const local = getDirectoryPath(this.canonicalConfigFilePath); @@ -1263,22 +1271,18 @@ namespace ts.server { } } - getProjectRootPath() { - return getDirectoryPath(this.getConfigFilePath()); - } - /** * Get the errors that dont have any file name associated */ getGlobalProjectErrors(): ReadonlyArray { - return filter(this.projectErrors, diagnostic => !diagnostic.file); + return filter(this.projectErrors, diagnostic => !diagnostic.file) || emptyArray; } /** * Get all the project errors */ getAllProjectErrors(): ReadonlyArray { - return this.projectErrors; + return this.projectErrors || emptyArray; } setProjectErrors(projectErrors: Diagnostic[]) { @@ -1327,14 +1331,15 @@ namespace ts.server { } close() { - super.close(); - if (this.configFileWatcher) { this.configFileWatcher.close(); this.configFileWatcher = undefined; } this.stopWatchingWildCards(); + this.projectErrors = undefined; + this.configFileSpecs = undefined; + super.close(); } addOpenRef() { @@ -1379,13 +1384,14 @@ namespace ts.server { compilerOptions: CompilerOptions, languageServiceEnabled: boolean, public compileOnSaveEnabled: boolean, - private readonly projectFilePath?: string) { + projectFilePath?: string) { super(externalProjectName, ProjectKind.External, projectService, documentRegistry, /*hasExplicitListOfFiles*/ true, - languageServiceEnabled, compilerOptions, + languageServiceEnabled, + compilerOptions, compileOnSaveEnabled, projectService.host, getDirectoryPath(projectFilePath || normalizeSlashes(externalProjectName))); @@ -1395,16 +1401,6 @@ namespace ts.server { return this.excludedFiles; } - getProjectRootPath() { - if (this.projectFilePath) { - return getDirectoryPath(this.projectFilePath); - } - // if the projectFilePath is not given, we make the assumption that the project name - // is the path of the project file. AS the project name is provided by VS, we need to - // normalize slashes before using it as a file name. - return getDirectoryPath(normalizeSlashes(this.getProjectName())); - } - getTypeAcquisition() { return this.typeAcquisition; } diff --git a/src/server/server.ts b/src/server/server.ts index 6fab1a3d08a..f24251ee6ac 100644 --- a/src/server/server.ts +++ b/src/server/server.ts @@ -753,10 +753,23 @@ namespace ts.server { const sys = ts.sys; // use watchGuard process on Windows when node version is 4 or later const useWatchGuard = process.platform === "win32" && getNodeMajorVersion() >= 4; + const originalWatchDirectory: ServerHost["watchDirectory"] = sys.watchDirectory.bind(sys); + const noopWatcher: FileWatcher = { close: noop }; + // This is the function that catches the exceptions when watching directory, and yet lets project service continue to function + // Eg. on linux the number of watches are limited and one could easily exhaust watches and the exception ENOSPC is thrown when creating watcher at that point + function watchDirectorySwallowingException(path: string, callback: DirectoryWatcherCallback, recursive?: boolean): FileWatcher { + try { + return originalWatchDirectory(path, callback, recursive); + } + catch (e) { + logger.info(`Exception when creating directory watcher: ${e.message}`); + return noopWatcher; + } + } + if (useWatchGuard) { const currentDrive = extractWatchDirectoryCacheKey(sys.resolvePath(sys.getCurrentDirectory()), /*currentDriveKey*/ undefined); const statusCache = createMap(); - const originalWatchDirectory = sys.watchDirectory; sys.watchDirectory = function (path: string, callback: DirectoryWatcherCallback, recursive?: boolean): FileWatcher { const cacheKey = extractWatchDirectoryCacheKey(path, currentDrive); let status = cacheKey && statusCache.get(cacheKey); @@ -790,14 +803,17 @@ namespace ts.server { } if (status) { // this drive is safe to use - call real 'watchDirectory' - return originalWatchDirectory.call(sys, path, callback, recursive); + return watchDirectorySwallowingException(path, callback, recursive); } else { // this drive is unsafe - return no-op watcher - return { close() { } }; + return noopWatcher; } }; } + else { + sys.watchDirectory = watchDirectorySwallowingException; + } // Override sys.write because fs.writeSync is not reliable on Node 4 sys.write = (s: string) => writeMessage(new Buffer(s, "utf8")); diff --git a/src/server/session.ts b/src/server/session.ts index 57dac7ec799..800d09ff6c2 100644 --- a/src/server/session.ts +++ b/src/server/session.ts @@ -969,13 +969,7 @@ namespace ts.server { * @param fileContent is a version of the file content that is known to be more up to date than the one on disk */ private openClientFile(fileName: NormalizedPath, fileContent?: string, scriptKind?: ScriptKind, projectRootPath?: NormalizedPath) { - const { configFileName, configFileErrors } = this.projectService.openClientFileWithNormalizedPath(fileName, fileContent, scriptKind, /*hasMixedContent*/ false, projectRootPath); - if (this.eventHandler) { - this.eventHandler({ - eventName: "configFileDiag", - data: { triggerFile: fileName, configFileName, diagnostics: configFileErrors || emptyArray } - }); - } + this.projectService.openClientFileWithNormalizedPath(fileName, fileContent, scriptKind, /*hasMixedContent*/ false, projectRootPath); } private getPosition(args: protocol.FileLocationRequestArgs, scriptInfo: ScriptInfo): number { @@ -1608,7 +1602,7 @@ namespace ts.server { } // No need to analyze lib.d.ts - const fileNamesInProject = fileNames.filter(value => value.indexOf("lib.d.ts") < 0); + const fileNamesInProject = fileNames.filter(value => !stringContains(value, "lib.d.ts")); if (fileNamesInProject.length === 0) { return; } diff --git a/src/server/typingsInstaller/nodeTypingsInstaller.ts b/src/server/typingsInstaller/nodeTypingsInstaller.ts index 6a31a114d23..98478c2d5fc 100644 --- a/src/server/typingsInstaller/nodeTypingsInstaller.ts +++ b/src/server/typingsInstaller/nodeTypingsInstaller.ts @@ -68,10 +68,14 @@ namespace ts.server.typingsInstaller { return combinePaths(normalizeSlashes(globalTypingsCacheLocation), `node_modules/${TypesRegistryPackageName}/index.json`); } - type ExecSync = (command: string, options: { cwd: string, stdio?: "ignore" }) => any; + interface ExecSyncOptions { + cwd: string; + encoding: "utf-8"; + } + type ExecSync = (command: string, options: ExecSyncOptions) => string; export class NodeTypingsInstaller extends TypingsInstaller { - private readonly execSync: ExecSync; + private readonly nodeExecSync: ExecSync; private readonly npmPath: string; readonly typesRegistry: Map; @@ -88,14 +92,14 @@ namespace ts.server.typingsInstaller { this.npmPath = npmLocation !== undefined ? npmLocation : getDefaultNPMLocation(process.argv[0]); // If the NPM path contains spaces and isn't wrapped in quotes, do so. - if (this.npmPath.indexOf(" ") !== -1 && this.npmPath[0] !== `"`) { + if (stringContains(this.npmPath, " ") && this.npmPath[0] !== `"`) { this.npmPath = `"${this.npmPath}"`; } if (this.log.isEnabled()) { this.log.writeLine(`Process id: ${process.pid}`); this.log.writeLine(`NPM location: ${this.npmPath} (explicit '${Arguments.NpmLocation}' ${npmLocation === undefined ? "not " : ""} provided)`); } - ({ execSync: this.execSync } = require("child_process")); + ({ execSync: this.nodeExecSync } = require("child_process")); this.ensurePackageDirectoryExists(globalTypingsCacheLocation); @@ -103,7 +107,7 @@ namespace ts.server.typingsInstaller { if (this.log.isEnabled()) { this.log.writeLine(`Updating ${TypesRegistryPackageName} npm package...`); } - this.execSync(`${this.npmPath} install --ignore-scripts ${TypesRegistryPackageName}`, { cwd: globalTypingsCacheLocation, stdio: "ignore" }); + this.execSyncAndLog(`${this.npmPath} install --ignore-scripts ${TypesRegistryPackageName}`, { cwd: globalTypingsCacheLocation }); if (this.log.isEnabled()) { this.log.writeLine(`Updated ${TypesRegistryPackageName} npm package`); } @@ -155,22 +159,31 @@ namespace ts.server.typingsInstaller { } const command = `${this.npmPath} install --ignore-scripts ${args.join(" ")} --save-dev --user-agent="typesInstaller/${version}"`; const start = Date.now(); - let stdout: Buffer; - let stderr: Buffer; - let hasError = false; - try { - stdout = this.execSync(command, { cwd }); - } - catch (e) { - stdout = e.stdout; - stderr = e.stderr; - hasError = true; - } + const hasError = this.execSyncAndLog(command, { cwd }); if (this.log.isEnabled()) { - this.log.writeLine(`npm install #${requestId} took: ${Date.now() - start} ms${sys.newLine}stdout: ${stdout && stdout.toString()}${sys.newLine}stderr: ${stderr && stderr.toString()}`); + this.log.writeLine(`npm install #${requestId} took: ${Date.now() - start} ms`); } onRequestCompleted(!hasError); } + + /** Returns 'true' in case of error. */ + private execSyncAndLog(command: string, options: Pick): boolean { + if (this.log.isEnabled()) { + this.log.writeLine(`Exec: ${command}`); + } + try { + const stdout = this.nodeExecSync(command, { ...options, encoding: "utf-8" }); + if (this.log.isEnabled()) { + this.log.writeLine(` Succeeded. stdout:${indent(sys.newLine, stdout)}`); + } + return false; + } + catch (error) { + const { stdout, stderr } = error; + this.log.writeLine(` Failed. stdout:${indent(sys.newLine, stdout)}${sys.newLine} stderr:${indent(sys.newLine, stderr)}`); + return true; + } + } } const logFilePath = findArgument(server.Arguments.LogFile); @@ -193,4 +206,8 @@ namespace ts.server.typingsInstaller { }); const installer = new NodeTypingsInstaller(globalTypingsCacheLocation, typingSafeListLocation, typesMapLocation, npmLocation, /*throttleLimit*/5, log); installer.listen(); + + function indent(newline: string, string: string): string { + return `${newline} ` + string.replace(/\r?\n/, `${newline} `); + } } diff --git a/src/services/codefixes/addMissingInvocationForDecorator.ts b/src/services/codefixes/addMissingInvocationForDecorator.ts new file mode 100644 index 00000000000..7f17aab6db2 --- /dev/null +++ b/src/services/codefixes/addMissingInvocationForDecorator.ts @@ -0,0 +1,20 @@ +/* @internal */ +namespace ts.codefix { + registerCodeFix({ + errorCodes: [Diagnostics._0_accepts_too_few_arguments_to_be_used_as_a_decorator_here_Did_you_mean_to_call_it_first_and_write_0.code], + getCodeActions: (context: CodeFixContext) => { + const sourceFile = context.sourceFile; + const token = getTokenAtPosition(sourceFile, context.span.start, /*includeJsDocComment*/ false); + const decorator = getAncestor(token, SyntaxKind.Decorator) as Decorator; + Debug.assert(!!decorator, "Expected position to be owned by a decorator."); + const replacement = createCall(decorator.expression, /*typeArguments*/ undefined, /*argumentsArray*/ undefined); + const changeTracker = textChanges.ChangeTracker.fromContext(context); + changeTracker.replaceNode(sourceFile, decorator.expression, replacement); + + return [{ + description: getLocaleSpecificMessage(Diagnostics.Call_decorator_expression), + changes: changeTracker.getChanges() + }]; + } + }); +} diff --git a/src/services/codefixes/fixAddMissingMember.ts b/src/services/codefixes/fixAddMissingMember.ts index a9583106fc6..19bd592b7a7 100644 --- a/src/services/codefixes/fixAddMissingMember.ts +++ b/src/services/codefixes/fixAddMissingMember.ts @@ -92,7 +92,7 @@ namespace ts.codefix { classDeclarationSourceFile, classDeclaration, staticInitialization, - { suffix: context.newLineCharacter }); + { prefix: context.newLineCharacter, suffix: context.newLineCharacter }); const initializeStaticAction = { description: formatStringFromArgs(getLocaleSpecificMessage(Diagnostics.Initialize_static_property_0), [tokenName]), changes: staticInitializationChangeTracker.getChanges() @@ -112,11 +112,11 @@ namespace ts.codefix { createIdentifier("undefined"))); const propertyInitializationChangeTracker = textChanges.ChangeTracker.fromContext(context); - propertyInitializationChangeTracker.insertNodeAt( + propertyInitializationChangeTracker.insertNodeBefore( classDeclarationSourceFile, - classConstructor.body.getEnd() - 1, + classConstructor.body.getLastToken(), propertyInitialization, - { prefix: context.newLineCharacter, suffix: context.newLineCharacter }); + { suffix: context.newLineCharacter }); const initializeAction = { description: formatStringFromArgs(getLocaleSpecificMessage(Diagnostics.Initialize_property_0_in_the_constructor), [tokenName]), diff --git a/src/services/codefixes/fixes.ts b/src/services/codefixes/fixes.ts index 9bc80cad691..7ee0aaa6799 100644 --- a/src/services/codefixes/fixes.ts +++ b/src/services/codefixes/fixes.ts @@ -1,3 +1,4 @@ +/// /// /// /// @@ -12,3 +13,4 @@ /// /// /// +/// diff --git a/src/services/codefixes/importFixes.ts b/src/services/codefixes/importFixes.ts index f516bc15de3..9b54543231d 100644 --- a/src/services/codefixes/importFixes.ts +++ b/src/services/codefixes/importFixes.ts @@ -16,7 +16,7 @@ namespace ts.codefix { moduleSpecifier?: string; } - enum ModuleSpecifierComparison { + const enum ModuleSpecifierComparison { Better, Equal, Worse @@ -26,10 +26,6 @@ namespace ts.codefix { private symbolIdToActionMap: ImportCodeAction[][] = []; addAction(symbolId: number, newAction: ImportCodeAction) { - if (!newAction) { - return; - } - const actions = this.symbolIdToActionMap[symbolId]; if (!actions) { this.symbolIdToActionMap[symbolId] = [newAction]; diff --git a/src/services/codefixes/inferFromUsage.ts b/src/services/codefixes/inferFromUsage.ts new file mode 100644 index 00000000000..046eb915c1e --- /dev/null +++ b/src/services/codefixes/inferFromUsage.ts @@ -0,0 +1,653 @@ +/* @internal */ +namespace ts.codefix { + registerCodeFix({ + errorCodes: [ + // Variable declarations + Diagnostics.Variable_0_implicitly_has_type_1_in_some_locations_where_its_type_cannot_be_determined.code, + + // Variable uses + Diagnostics.Variable_0_implicitly_has_an_1_type.code, + + // Parameter declarations + Diagnostics.Parameter_0_implicitly_has_an_1_type.code, + Diagnostics.Rest_parameter_0_implicitly_has_an_any_type.code, + + // Get Accessor declarations + Diagnostics.Property_0_implicitly_has_type_any_because_its_get_accessor_lacks_a_return_type_annotation.code, + Diagnostics._0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type.code, + + // Set Accessor declarations + Diagnostics.Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_parameter_type_annotation.code, + + // Property declarations + Diagnostics.Member_0_implicitly_has_an_1_type.code, + ], + getCodeActions: getActionsForAddExplicitTypeAnnotation + }); + + function getActionsForAddExplicitTypeAnnotation({ sourceFile, program, span: { start }, errorCode, cancellationToken }: CodeFixContext): CodeAction[] | undefined { + const token = getTokenAtPosition(sourceFile, start, /*includeJsDocComment*/ false); + let writer: StringSymbolWriter; + + if (isInJavaScriptFile(token)) { + return undefined; + } + + switch (token.kind) { + case SyntaxKind.Identifier: + case SyntaxKind.DotDotDotToken: + case SyntaxKind.PublicKeyword: + case SyntaxKind.PrivateKeyword: + case SyntaxKind.ProtectedKeyword: + case SyntaxKind.ReadonlyKeyword: + // Allowed + break; + default: + return undefined; + } + + const containingFunction = getContainingFunction(token); + const checker = program.getTypeChecker(); + + switch (errorCode) { + // Variable and Property declarations + case Diagnostics.Member_0_implicitly_has_an_1_type.code: + case Diagnostics.Variable_0_implicitly_has_type_1_in_some_locations_where_its_type_cannot_be_determined.code: + return getCodeActionForVariableDeclaration(token.parent); + case Diagnostics.Variable_0_implicitly_has_an_1_type.code: + return getCodeActionForVariableUsage(token); + + // Parameter declarations + case Diagnostics.Parameter_0_implicitly_has_an_1_type.code: + if (isSetAccessor(containingFunction)) { + return getCodeActionForSetAccessor(containingFunction); + } + // falls through + case Diagnostics.Rest_parameter_0_implicitly_has_an_any_type.code: + return getCodeActionForParameters(token.parent); + + // Get Accessor declarations + case Diagnostics.Property_0_implicitly_has_type_any_because_its_get_accessor_lacks_a_return_type_annotation.code: + case Diagnostics._0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type.code: + return isGetAccessor(containingFunction) ? getCodeActionForGetAccessor(containingFunction) : undefined; + + // Set Accessor declarations + case Diagnostics.Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_parameter_type_annotation.code: + return isSetAccessor(containingFunction) ? getCodeActionForSetAccessor(containingFunction) : undefined; + } + + return undefined; + + function getCodeActionForVariableDeclaration(declaration: VariableDeclaration | PropertyDeclaration | PropertySignature) { + if (!isIdentifier(declaration.name)) { + return undefined; + } + + const type = inferTypeForVariableFromUsage(declaration.name); + const typeString = type && typeToString(type, declaration); + + if (!typeString) { + return undefined; + } + + return createCodeActions(declaration.name.getText(), declaration.name.getEnd(), `: ${typeString}`); + } + + function getCodeActionForVariableUsage(token: Identifier) { + const symbol = checker.getSymbolAtLocation(token); + return symbol && symbol.valueDeclaration && getCodeActionForVariableDeclaration(symbol.valueDeclaration); + } + + function isApplicableFunctionForInference(declaration: FunctionLike): declaration is MethodDeclaration | FunctionDeclaration | ConstructorDeclaration { + switch (declaration.kind) { + case SyntaxKind.FunctionDeclaration: + case SyntaxKind.MethodDeclaration: + case SyntaxKind.Constructor: + return true; + case SyntaxKind.FunctionExpression: + return !!(declaration as FunctionExpression).name; + } + return false; + } + + function getCodeActionForParameters(parameterDeclaration: ParameterDeclaration): CodeAction[] { + if (!isIdentifier(parameterDeclaration.name) || !isApplicableFunctionForInference(containingFunction)) { + return undefined; + } + + const types = inferTypeForParametersFromUsage(containingFunction) || + map(containingFunction.parameters, p => isIdentifier(p.name) && inferTypeForVariableFromUsage(p.name)); + + if (!types) { + return undefined; + } + + const textChanges: TextChange[] = zipWith(containingFunction.parameters, types, (parameter, type) => { + if (type && !parameter.type && !parameter.initializer) { + const typeString = typeToString(type, containingFunction); + return typeString ? { + span: { start: parameter.end, length: 0 }, + newText: `: ${typeString}` + } : undefined; + } + }).filter(c => !!c); + + return textChanges.length ? [{ + description: formatStringFromArgs(getLocaleSpecificMessage(Diagnostics.Infer_parameter_types_from_usage), [parameterDeclaration.name.getText()]), + changes: [{ + fileName: sourceFile.fileName, + textChanges + }] + }] : undefined; + } + + function getCodeActionForSetAccessor(setAccessorDeclaration: SetAccessorDeclaration) { + const setAccessorParameter = setAccessorDeclaration.parameters[0]; + if (!setAccessorParameter || !isIdentifier(setAccessorDeclaration.name) || !isIdentifier(setAccessorParameter.name)) { + return undefined; + } + + const type = inferTypeForVariableFromUsage(setAccessorDeclaration.name) || + inferTypeForVariableFromUsage(setAccessorParameter.name); + const typeString = type && typeToString(type, containingFunction); + if (!typeString) { + return undefined; + } + + return createCodeActions(setAccessorDeclaration.name.getText(), setAccessorParameter.name.getEnd(), `: ${typeString}`); + } + + function getCodeActionForGetAccessor(getAccessorDeclaration: GetAccessorDeclaration) { + if (!isIdentifier(getAccessorDeclaration.name)) { + return undefined; + } + + const type = inferTypeForVariableFromUsage(getAccessorDeclaration.name); + const typeString = type && typeToString(type, containingFunction); + if (!typeString) { + return undefined; + } + + const closeParenToken = getFirstChildOfKind(getAccessorDeclaration, sourceFile, SyntaxKind.CloseParenToken); + return createCodeActions(getAccessorDeclaration.name.getText(), closeParenToken.getEnd(), `: ${typeString}`); + } + + function createCodeActions(name: string, start: number, typeString: string) { + return [{ + description: formatStringFromArgs(getLocaleSpecificMessage(Diagnostics.Infer_type_of_0_from_usage), [name]), + changes: [{ + fileName: sourceFile.fileName, + textChanges: [{ + span: { start, length: 0 }, + newText: typeString + }] + }] + }]; + } + + function getReferences(token: PropertyName | Token) { + const references = FindAllReferences.findReferencedSymbols( + program, + cancellationToken, + program.getSourceFiles(), + token.getSourceFile(), + token.getStart()); + + Debug.assert(!!references, "Found no references!"); + Debug.assert(references.length === 1, "Found more references than expected"); + + return map(references[0].references, r => getTokenAtPosition(program.getSourceFile(r.fileName), r.textSpan.start, /*includeJsDocComment*/ false)); + } + + function inferTypeForVariableFromUsage(token: Identifier) { + return InferFromReference.inferTypeFromReferences(getReferences(token), checker, cancellationToken); + } + + function inferTypeForParametersFromUsage(containingFunction: FunctionLikeDeclaration) { + switch (containingFunction.kind) { + case SyntaxKind.Constructor: + case SyntaxKind.FunctionExpression: + case SyntaxKind.FunctionDeclaration: + case SyntaxKind.MethodDeclaration: + const isConstructor = containingFunction.kind === SyntaxKind.Constructor; + const searchToken = isConstructor ? + >getFirstChildOfKind(containingFunction, sourceFile, SyntaxKind.ConstructorKeyword) : + containingFunction.name; + if (searchToken) { + return InferFromReference.inferTypeForParametersFromReferences(getReferences(searchToken), containingFunction, checker, cancellationToken); + } + } + } + + function getTypeAccessiblityWriter() { + if (!writer) { + let str = ""; + let typeIsAccessible = true; + + const writeText: (text: string) => void = text => str += text; + writer = { + string: () => typeIsAccessible ? str : undefined, + writeKeyword: writeText, + writeOperator: writeText, + writePunctuation: writeText, + writeSpace: writeText, + writeStringLiteral: writeText, + writeParameter: writeText, + writeProperty: writeText, + writeSymbol: writeText, + writeLine: () => str += " ", + increaseIndent: noop, + decreaseIndent: noop, + clear: () => { str = ""; typeIsAccessible = true; }, + trackSymbol: (symbol, declaration, meaning) => { + if (checker.isSymbolAccessible(symbol, declaration, meaning, /*shouldComputeAliasToMarkVisible*/ false).accessibility !== SymbolAccessibility.Accessible) { + typeIsAccessible = false; + } + }, + reportInaccessibleThisError: () => { typeIsAccessible = false; }, + reportPrivateInBaseOfClassExpression: () => { typeIsAccessible = false; }, + }; + } + writer.clear(); + return writer; + } + + function typeToString(type: Type, enclosingDeclaration: Declaration) { + const writer = getTypeAccessiblityWriter(); + checker.getSymbolDisplayBuilder().buildTypeDisplay(type, writer, enclosingDeclaration); + return writer.string(); + } + + function getFirstChildOfKind(node: Node, sourcefile: SourceFile, kind: SyntaxKind) { + for (const child of node.getChildren(sourcefile)) { + if (child.kind === kind) return child; + } + return undefined; + } + } + + namespace InferFromReference { + interface CallContext { + argumentTypes: Type[]; + returnType: UsageContext; + } + + interface UsageContext { + isNumber?: boolean; + isString?: boolean; + isNumberOrString?: boolean; + candidateTypes?: Type[]; + properties?: UnderscoreEscapedMap; + callContexts?: CallContext[]; + constructContexts?: CallContext[]; + numberIndexContext?: UsageContext; + stringIndexContext?: UsageContext; + } + + export function inferTypeFromReferences(references: Identifier[], checker: TypeChecker, cancellationToken: CancellationToken): Type | undefined { + const usageContext: UsageContext = {}; + for (const reference of references) { + cancellationToken.throwIfCancellationRequested(); + inferTypeFromContext(reference, checker, usageContext); + } + return getTypeFromUsageContext(usageContext, checker); + } + + export function inferTypeForParametersFromReferences(references: Identifier[], declaration: FunctionLikeDeclaration, checker: TypeChecker, cancellationToken: CancellationToken): (Type | undefined)[] | undefined { + if (declaration.parameters) { + const usageContext: UsageContext = {}; + for (const reference of references) { + cancellationToken.throwIfCancellationRequested(); + inferTypeFromContext(reference, checker, usageContext); + } + const isConstructor = declaration.kind === SyntaxKind.Constructor; + const callContexts = isConstructor ? usageContext.constructContexts : usageContext.callContexts; + if (callContexts) { + const paramTypes: Type[] = []; + for (let parameterIndex = 0; parameterIndex < declaration.parameters.length; parameterIndex++) { + let types: Type[] = []; + const isRestParameter = ts.isRestParameter(declaration.parameters[parameterIndex]); + for (const callContext of callContexts) { + if (callContext.argumentTypes.length > parameterIndex) { + if (isRestParameter) { + types = concatenate(types, map(callContext.argumentTypes.slice(parameterIndex), a => checker.getBaseTypeOfLiteralType(a))); + } + else { + types.push(checker.getBaseTypeOfLiteralType(callContext.argumentTypes[parameterIndex])); + } + } + } + if (types.length) { + const type = checker.getWidenedType(checker.getUnionType(types, /*subtypeReduction*/ true)); + paramTypes[parameterIndex] = isRestParameter ? checker.createArrayType(type) : type; + } + } + return paramTypes; + } + } + return undefined; + } + + function inferTypeFromContext(node: Expression, checker: TypeChecker, usageContext: UsageContext): void { + while (isRightSideOfQualifiedNameOrPropertyAccess(node)) { + node = node.parent; + } + + switch (node.parent.kind) { + case SyntaxKind.PostfixUnaryExpression: + usageContext.isNumber = true; + break; + case SyntaxKind.PrefixUnaryExpression: + inferTypeFromPrefixUnaryExpressionContext(node.parent, usageContext); + break; + case SyntaxKind.BinaryExpression: + inferTypeFromBinaryExpressionContext(node, node.parent, checker, usageContext); + break; + case SyntaxKind.CaseClause: + case SyntaxKind.DefaultClause: + inferTypeFromSwitchStatementLabelContext(node.parent, checker, usageContext); + break; + case SyntaxKind.CallExpression: + case SyntaxKind.NewExpression: + if ((node.parent).expression === node) { + inferTypeFromCallExpressionContext(node.parent, checker, usageContext); + } + else { + inferTypeFromContextualType(node, checker, usageContext); + } + break; + case SyntaxKind.PropertyAccessExpression: + inferTypeFromPropertyAccessExpressionContext(node.parent, checker, usageContext); + break; + case SyntaxKind.ElementAccessExpression: + inferTypeFromPropertyElementExpressionContext(node.parent, node, checker, usageContext); + break; + default: + return inferTypeFromContextualType(node, checker, usageContext); + } + } + + function inferTypeFromContextualType(node: Expression, checker: TypeChecker, usageContext: UsageContext): void { + if (isPartOfExpression(node)) { + addCandidateType(usageContext, checker.getContextualType(node)); + } + } + + function inferTypeFromPrefixUnaryExpressionContext(node: PrefixUnaryExpression, usageContext: UsageContext): void { + switch (node.operator) { + case SyntaxKind.PlusPlusToken: + case SyntaxKind.MinusMinusToken: + case SyntaxKind.MinusToken: + case SyntaxKind.TildeToken: + usageContext.isNumber = true; + break; + + case SyntaxKind.PlusToken: + usageContext.isNumberOrString = true; + break; + + // case SyntaxKind.ExclamationToken: + // no inferences here; + } + } + + function inferTypeFromBinaryExpressionContext(node: Expression, parent: BinaryExpression, checker: TypeChecker, usageContext: UsageContext): void { + switch (parent.operatorToken.kind) { + // ExponentiationOperator + case SyntaxKind.AsteriskAsteriskToken: + + // MultiplicativeOperator + case SyntaxKind.AsteriskToken: + case SyntaxKind.SlashToken: + case SyntaxKind.PercentToken: + + // ShiftOperator + case SyntaxKind.LessThanLessThanToken: + case SyntaxKind.GreaterThanGreaterThanToken: + case SyntaxKind.GreaterThanGreaterThanGreaterThanToken: + + // BitwiseOperator + case SyntaxKind.AmpersandToken: + case SyntaxKind.BarToken: + case SyntaxKind.CaretToken: + + // CompoundAssignmentOperator + case SyntaxKind.MinusEqualsToken: + case SyntaxKind.AsteriskAsteriskEqualsToken: + case SyntaxKind.AsteriskEqualsToken: + case SyntaxKind.SlashEqualsToken: + case SyntaxKind.PercentEqualsToken: + case SyntaxKind.AmpersandEqualsToken: + case SyntaxKind.BarEqualsToken: + case SyntaxKind.CaretEqualsToken: + case SyntaxKind.LessThanLessThanEqualsToken: + case SyntaxKind.GreaterThanGreaterThanGreaterThanEqualsToken: + case SyntaxKind.GreaterThanGreaterThanEqualsToken: + + // AdditiveOperator + case SyntaxKind.MinusToken: + + // RelationalOperator + case SyntaxKind.LessThanToken: + case SyntaxKind.LessThanEqualsToken: + case SyntaxKind.GreaterThanToken: + case SyntaxKind.GreaterThanEqualsToken: + const operandType = checker.getTypeAtLocation(parent.left === node ? parent.right : parent.left); + if (operandType.flags & TypeFlags.EnumLike) { + addCandidateType(usageContext, operandType); + } + else { + usageContext.isNumber = true; + } + break; + + case SyntaxKind.PlusEqualsToken: + case SyntaxKind.PlusToken: + const otherOperandType = checker.getTypeAtLocation(parent.left === node ? parent.right : parent.left); + if (otherOperandType.flags & TypeFlags.EnumLike) { + addCandidateType(usageContext, otherOperandType); + } + else if (otherOperandType.flags & TypeFlags.NumberLike) { + usageContext.isNumber = true; + } + else if (otherOperandType.flags & TypeFlags.StringLike) { + usageContext.isString = true; + } + else { + usageContext.isNumberOrString = true; + } + break; + + // AssignmentOperators + case SyntaxKind.EqualsToken: + case SyntaxKind.EqualsEqualsToken: + case SyntaxKind.EqualsEqualsEqualsToken: + case SyntaxKind.ExclamationEqualsEqualsToken: + case SyntaxKind.ExclamationEqualsToken: + addCandidateType(usageContext, checker.getTypeAtLocation(parent.left === node ? parent.right : parent.left)); + break; + + case SyntaxKind.InKeyword: + if (node === parent.left) { + usageContext.isString = true; + } + break; + + // LogicalOperator + case SyntaxKind.BarBarToken: + if (node === parent.left && + (node.parent.parent.kind === SyntaxKind.VariableDeclaration || isAssignmentExpression(node.parent.parent, /*excludeCompoundAssignment*/ true))) { + // var x = x || {}; + // TODO: use getFalsyflagsOfType + addCandidateType(usageContext, checker.getTypeAtLocation(parent.right)); + } + break; + + case SyntaxKind.AmpersandAmpersandToken: + case SyntaxKind.CommaToken: + case SyntaxKind.InstanceOfKeyword: + // nothing to infer here + break; + } + } + + function inferTypeFromSwitchStatementLabelContext(parent: CaseOrDefaultClause, checker: TypeChecker, usageContext: UsageContext): void { + addCandidateType(usageContext, checker.getTypeAtLocation((parent.parent.parent).expression)); + } + + function inferTypeFromCallExpressionContext(parent: CallExpression | NewExpression, checker: TypeChecker, usageContext: UsageContext): void { + const callContext: CallContext = { + argumentTypes: [], + returnType: {} + }; + + if (parent.arguments) { + for (const argument of parent.arguments) { + callContext.argumentTypes.push(checker.getTypeAtLocation(argument)); + } + } + + inferTypeFromContext(parent, checker, callContext.returnType); + if (parent.kind === SyntaxKind.CallExpression) { + (usageContext.callContexts || (usageContext.callContexts = [])).push(callContext); + } + else { + (usageContext.constructContexts || (usageContext.constructContexts = [])).push(callContext); + } + } + + function inferTypeFromPropertyAccessExpressionContext(parent: PropertyAccessExpression, checker: TypeChecker, usageContext: UsageContext): void { + const name = escapeLeadingUnderscores(parent.name.text); + if (!usageContext.properties) { + usageContext.properties = createUnderscoreEscapedMap(); + } + const propertyUsageContext = {}; + inferTypeFromContext(parent, checker, propertyUsageContext); + usageContext.properties.set(name, propertyUsageContext); + } + + function inferTypeFromPropertyElementExpressionContext(parent: ElementAccessExpression, node: Expression, checker: TypeChecker, usageContext: UsageContext): void { + if (node === parent.argumentExpression) { + usageContext.isNumberOrString = true; + return; + } + else { + const indexType = checker.getTypeAtLocation(parent); + const indexUsageContext = {}; + inferTypeFromContext(parent, checker, indexUsageContext); + if (indexType.flags & TypeFlags.NumberLike) { + usageContext.numberIndexContext = indexUsageContext; + } + else { + usageContext.stringIndexContext = indexUsageContext; + } + } + } + + function getTypeFromUsageContext(usageContext: UsageContext, checker: TypeChecker): Type | undefined { + if (usageContext.isNumberOrString && !usageContext.isNumber && !usageContext.isString) { + return checker.getUnionType([checker.getNumberType(), checker.getStringType()]); + } + else if (usageContext.isNumber) { + return checker.getNumberType(); + } + else if (usageContext.isString) { + return checker.getStringType(); + } + else if (usageContext.candidateTypes) { + return checker.getWidenedType(checker.getUnionType(map(usageContext.candidateTypes, t => checker.getBaseTypeOfLiteralType(t)), /*subtypeReduction*/ true)); + } + else if (usageContext.properties && hasCallContext(usageContext.properties.get("then" as __String))) { + const paramType = getParameterTypeFromCallContexts(0, usageContext.properties.get("then" as __String).callContexts, /*isRestParameter*/ false, checker); + const types = paramType.getCallSignatures().map(c => c.getReturnType()); + return checker.createPromiseType(types.length ? checker.getUnionType(types, /*subtypeReduction*/ true) : checker.getAnyType()); + } + else if (usageContext.properties && hasCallContext(usageContext.properties.get("push" as __String))) { + return checker.createArrayType(getParameterTypeFromCallContexts(0, usageContext.properties.get("push" as __String).callContexts, /*isRestParameter*/ false, checker)); + } + else if (usageContext.properties || usageContext.callContexts || usageContext.constructContexts || usageContext.numberIndexContext || usageContext.stringIndexContext) { + const members = createUnderscoreEscapedMap(); + const callSignatures: Signature[] = []; + const constructSignatures: Signature[] = []; + let stringIndexInfo: IndexInfo; + let numberIndexInfo: IndexInfo; + + if (usageContext.properties) { + usageContext.properties.forEach((context, name) => { + const symbol = checker.createSymbol(SymbolFlags.Property, name); + symbol.type = getTypeFromUsageContext(context, checker); + members.set(name, symbol); + }); + } + + if (usageContext.callContexts) { + for (const callContext of usageContext.callContexts) { + callSignatures.push(getSignatureFromCallContext(callContext, checker)); + } + } + + if (usageContext.constructContexts) { + for (const constructContext of usageContext.constructContexts) { + constructSignatures.push(getSignatureFromCallContext(constructContext, checker)); + } + } + + if (usageContext.numberIndexContext) { + numberIndexInfo = checker.createIndexInfo(getTypeFromUsageContext(usageContext.numberIndexContext, checker), /*isReadonly*/ false); + } + + if (usageContext.stringIndexContext) { + stringIndexInfo = checker.createIndexInfo(getTypeFromUsageContext(usageContext.stringIndexContext, checker), /*isReadonly*/ false); + } + + return checker.createAnonymousType(/*symbol*/ undefined, members, callSignatures, constructSignatures, stringIndexInfo, numberIndexInfo); + } + else { + return undefined; + } + } + + function getParameterTypeFromCallContexts(parameterIndex: number, callContexts: CallContext[], isRestParameter: boolean, checker: TypeChecker) { + let types: Type[] = []; + if (callContexts) { + for (const callContext of callContexts) { + if (callContext.argumentTypes.length > parameterIndex) { + if (isRestParameter) { + types = concatenate(types, map(callContext.argumentTypes.slice(parameterIndex), a => checker.getBaseTypeOfLiteralType(a))); + } + else { + types.push(checker.getBaseTypeOfLiteralType(callContext.argumentTypes[parameterIndex])); + } + } + } + } + + if (types.length) { + const type = checker.getWidenedType(checker.getUnionType(types, /*subtypeReduction*/ true)); + return isRestParameter ? checker.createArrayType(type) : type; + } + return undefined; + } + + function getSignatureFromCallContext(callContext: CallContext, checker: TypeChecker): Signature { + const parameters: Symbol[] = []; + for (let i = 0; i < callContext.argumentTypes.length; i++) { + const symbol = checker.createSymbol(SymbolFlags.FunctionScopedVariable, escapeLeadingUnderscores(`arg${i}`)); + symbol.type = checker.getWidenedType(checker.getBaseTypeOfLiteralType(callContext.argumentTypes[i])); + parameters.push(symbol); + } + const returnType = getTypeFromUsageContext(callContext.returnType, checker); + return checker.createSignature(/*declaration*/ undefined, /*typeParameters*/ undefined, /*thisParameter*/ undefined, parameters, returnType, /*typePredicate*/ undefined, callContext.argumentTypes.length, /*hasRestParameter*/ false, /*hasLiteralTypes*/ false); + } + + function addCandidateType(context: UsageContext, type: Type) { + if (type && !(type.flags & TypeFlags.Any) && !(type.flags & TypeFlags.Never)) { + (context.candidateTypes || (context.candidateTypes = [])).push(type); + } + } + + function hasCallContext(usageContext: UsageContext) { + return usageContext && usageContext.callContexts; + } + } +} diff --git a/src/services/completions.ts b/src/services/completions.ts index 44ad611de79..c2224256937 100644 --- a/src/services/completions.ts +++ b/src/services/completions.ts @@ -1195,6 +1195,11 @@ namespace ts.Completions { if (isClassLike(location)) { return location; } + // class c { method() { } b| } + if (isFromClassElementDeclaration(location) && + (location.parent as ClassElement).name === location) { + return location.parent.parent as ClassLikeDeclaration; + } break; default: diff --git a/src/services/findAllReferences.ts b/src/services/findAllReferences.ts index d4e660295a0..e43a2cbfd8e 100644 --- a/src/services/findAllReferences.ts +++ b/src/services/findAllReferences.ts @@ -482,7 +482,10 @@ namespace ts.FindAllReferences.Core { /** @param allSearchSymbols set of additinal symbols for use by `includes`. */ createSearch(location: Node, symbol: Symbol, comingFrom: ImportExport | undefined, searchOptions: { text?: string, allSearchSymbols?: Symbol[] } = {}): Search { // Note: if this is an external module symbol, the name doesn't include quotes. - const { text = stripQuotes(getDeclaredName(this.checker, symbol, location)), allSearchSymbols = undefined } = searchOptions; + const { + text = stripQuotes(unescapeLeadingUnderscores((getLocalSymbolForExportDefault(symbol) || symbol).escapedName)), + allSearchSymbols = undefined, + } = searchOptions; const escapedText = escapeLeadingUnderscores(text); const parents = this.options.implementations && getParentSymbolsOfPropertyAccess(location, symbol, this.checker); return { diff --git a/src/services/importTracker.ts b/src/services/importTracker.ts index a6152230218..f12df4613c0 100644 --- a/src/services/importTracker.ts +++ b/src/services/importTracker.ts @@ -609,9 +609,6 @@ namespace ts.FindAllReferences { } return forEach(symbol.declarations, decl => { - if (isExportAssignment(decl)) { - return isIdentifier(decl.expression) ? decl.expression.escapedText : undefined; - } const name = getNameOfDeclaration(decl); return name && name.kind === SyntaxKind.Identifier && name.escapedText; }); diff --git a/src/services/pathCompletions.ts b/src/services/pathCompletions.ts index c41ed798b1d..e3bf9deac89 100644 --- a/src/services/pathCompletions.ts +++ b/src/services/pathCompletions.ts @@ -195,7 +195,7 @@ namespace ts.Completions.PathCompletions { const normalizedPrefixDirectory = getDirectoryPath(normalizedPrefix); const normalizedPrefixBase = getBaseFileName(normalizedPrefix); - const fragmentHasPath = fragment.indexOf(directorySeparator) !== -1; + const fragmentHasPath = stringContains(fragment, directorySeparator); // Try and expand the prefix to include any path from the fragment so that we can limit the readDirectory call const expandedPrefixDirectory = fragmentHasPath ? combinePaths(normalizedPrefixDirectory, normalizedPrefixBase + getDirectoryPath(fragment)) : normalizedPrefixDirectory; @@ -235,7 +235,7 @@ namespace ts.Completions.PathCompletions { function enumeratePotentialNonRelativeModules(fragment: string, scriptPath: string, options: CompilerOptions, typeChecker: TypeChecker, host: LanguageServiceHost): string[] { // Check If this is a nested module - const isNestedModule = fragment.indexOf(directorySeparator) !== -1; + const isNestedModule = stringContains(fragment, directorySeparator); const moduleNameFragment = isNestedModule ? fragment.substr(0, fragment.lastIndexOf(directorySeparator)) : undefined; // Get modules that the type checker picked up diff --git a/src/services/refactors/convertFunctionToEs6Class.ts b/src/services/refactors/convertFunctionToEs6Class.ts index e4cd1a42083..1b02b11678b 100644 --- a/src/services/refactors/convertFunctionToEs6Class.ts +++ b/src/services/refactors/convertFunctionToEs6Class.ts @@ -172,7 +172,8 @@ namespace ts.refactor.convertFunctionToES6Class { switch (assignmentBinaryExpression.right.kind) { case SyntaxKind.FunctionExpression: { const functionExpression = assignmentBinaryExpression.right as FunctionExpression; - const method = createMethod(/*decorators*/ undefined, modifiers, /*asteriskToken*/ undefined, memberDeclaration.name, /*questionToken*/ undefined, + const fullModifiers = concatenate(modifiers, getModifierKindFromSource(functionExpression, SyntaxKind.AsyncKeyword)); + const method = createMethod(/*decorators*/ undefined, fullModifiers, /*asteriskToken*/ undefined, memberDeclaration.name, /*questionToken*/ undefined, /*typeParameters*/ undefined, functionExpression.parameters, /*type*/ undefined, functionExpression.body); copyComments(assignmentBinaryExpression, method); return method; @@ -192,7 +193,8 @@ namespace ts.refactor.convertFunctionToES6Class { const expression = arrowFunctionBody as Expression; bodyBlock = createBlock([createReturn(expression)]); } - const method = createMethod(/*decorators*/ undefined, modifiers, /*asteriskToken*/ undefined, memberDeclaration.name, /*questionToken*/ undefined, + const fullModifiers = concatenate(modifiers, getModifierKindFromSource(arrowFunction, SyntaxKind.AsyncKeyword)); + const method = createMethod(/*decorators*/ undefined, fullModifiers, /*asteriskToken*/ undefined, memberDeclaration.name, /*questionToken*/ undefined, /*typeParameters*/ undefined, arrowFunction.parameters, /*type*/ undefined, bodyBlock); copyComments(assignmentBinaryExpression, method); return method; @@ -243,7 +245,8 @@ namespace ts.refactor.convertFunctionToES6Class { memberElements.unshift(createConstructor(/*decorators*/ undefined, /*modifiers*/ undefined, initializer.parameters, initializer.body)); } - const cls = createClassDeclaration(/*decorators*/ undefined, /*modifiers*/ undefined, node.name, + const modifiers = getModifierKindFromSource(precedingNode, SyntaxKind.ExportKeyword); + const cls = createClassDeclaration(/*decorators*/ undefined, modifiers, node.name, /*typeParameters*/ undefined, /*heritageClauses*/ undefined, memberElements); // Don't call copyComments here because we'll already leave them in place return cls; @@ -255,10 +258,15 @@ namespace ts.refactor.convertFunctionToES6Class { memberElements.unshift(createConstructor(/*decorators*/ undefined, /*modifiers*/ undefined, node.parameters, node.body)); } - const cls = createClassDeclaration(/*decorators*/ undefined, /*modifiers*/ undefined, node.name, + const modifiers = getModifierKindFromSource(node, SyntaxKind.ExportKeyword); + const cls = createClassDeclaration(/*decorators*/ undefined, modifiers, node.name, /*typeParameters*/ undefined, /*heritageClauses*/ undefined, memberElements); // Don't call copyComments here because we'll already leave them in place return cls; } + + function getModifierKindFromSource(source: Node, kind: SyntaxKind) { + return filter(source.modifiers, modifier => modifier.kind === kind); + } } } \ No newline at end of file diff --git a/src/services/refactors/extractSymbol.ts b/src/services/refactors/extractSymbol.ts index c16a290a30f..ebe0cb4fa44 100644 --- a/src/services/refactors/extractSymbol.ts +++ b/src/services/refactors/extractSymbol.ts @@ -137,7 +137,7 @@ namespace ts.refactor.extractSymbol { export const FunctionWillNotBeVisibleInTheNewScope = createMessage("Function will not visible in the new scope."); export const CannotExtractIdentifier = createMessage("Select more than a single identifier."); export const CannotExtractExportedEntity = createMessage("Cannot extract exported declaration"); - export const CannotCombineWritesAndReturns = createMessage("Cannot combine writes and returns"); + export const CannotWriteInExpression = createMessage("Cannot write back side-effects when extracting an expression"); export const CannotExtractReadonlyPropertyInitializerOutsideConstructor = createMessage("Cannot move initialization of read-only class property outside of the constructor"); export const CannotExtractAmbientBlock = createMessage("Cannot extract code from ambient contexts"); export const CannotAccessVariablesFromNestedScopes = createMessage("Cannot access variables from nested scopes"); @@ -375,7 +375,7 @@ namespace ts.refactor.extractSymbol { permittedJumps = PermittedJumps.None; break; case SyntaxKind.Block: - if (node.parent && node.parent.kind === SyntaxKind.TryStatement && (node).finallyBlock === node) { + if (node.parent && node.parent.kind === SyntaxKind.TryStatement && (node.parent).finallyBlock === node) { // allow unconditional returns from finally blocks permittedJumps = PermittedJumps.Return; } @@ -476,7 +476,10 @@ namespace ts.refactor.extractSymbol { // if range uses this as keyword or as type inside the class then it can only be extracted to a method of the containing class const containingClass = getContainingClass(current); if (containingClass) { - return [containingClass]; + const containingFunction = findAncestor(current, isFunctionLikeDeclaration); + return containingFunction + ? [containingFunction, containingClass] + : [containingClass]; } } @@ -507,15 +510,16 @@ namespace ts.refactor.extractSymbol { } function getFunctionExtractionAtIndex(targetRange: TargetRange, context: RefactorContext, requestedChangesIndex: number): RefactorEditInfo { - const { scopes, readsAndWrites: { target, usagesPerScope, functionErrorsPerScope } } = getPossibleExtractionsWorker(targetRange, context); + const { scopes, readsAndWrites: { target, usagesPerScope, functionErrorsPerScope, exposedVariableDeclarations } } = getPossibleExtractionsWorker(targetRange, context); Debug.assert(!functionErrorsPerScope[requestedChangesIndex].length, "The extraction went missing? How?"); context.cancellationToken.throwIfCancellationRequested(); - return extractFunctionInScope(target, scopes[requestedChangesIndex], usagesPerScope[requestedChangesIndex], targetRange, context); + return extractFunctionInScope(target, scopes[requestedChangesIndex], usagesPerScope[requestedChangesIndex], exposedVariableDeclarations, targetRange, context); } function getConstantExtractionAtIndex(targetRange: TargetRange, context: RefactorContext, requestedChangesIndex: number): RefactorEditInfo { - const { scopes, readsAndWrites: { target, usagesPerScope, constantErrorsPerScope } } = getPossibleExtractionsWorker(targetRange, context); + const { scopes, readsAndWrites: { target, usagesPerScope, constantErrorsPerScope, exposedVariableDeclarations } } = getPossibleExtractionsWorker(targetRange, context); Debug.assert(!constantErrorsPerScope[requestedChangesIndex].length, "The extraction went missing? How?"); + Debug.assert(exposedVariableDeclarations.length === 0, "Extract constant accepted a range containing a variable declaration?"); context.cancellationToken.throwIfCancellationRequested(); const expression = isExpression(target) ? target @@ -660,7 +664,7 @@ namespace ts.refactor.extractSymbol { function getUniqueName(baseName: string, fileText: string): string { let nameText = baseName; - for (let i = 1; fileText.indexOf(nameText) !== -1; i++) { + for (let i = 1; stringContains(fileText, nameText); i++) { nameText = `${baseName}_${i}`; } return nameText; @@ -674,6 +678,7 @@ namespace ts.refactor.extractSymbol { node: Statement | Expression | Block, scope: Scope, { usages: usagesInScope, typeParameterUsages, substitutions }: ScopeUsages, + exposedVariableDeclarations: ReadonlyArray, range: TargetRange, context: RefactorContext): RefactorEditInfo { @@ -731,10 +736,12 @@ namespace ts.refactor.extractSymbol { // to avoid problems when there are literal types present if (isExpression(node) && !isJS) { const contextualType = checker.getContextualType(node); - returnType = checker.typeToTypeNode(contextualType); + returnType = checker.typeToTypeNode(contextualType, scope, NodeBuilderFlags.NoTruncation); } - const { body, returnValueProperty } = transformFunctionBody(node, writes, substitutions, !!(range.facts & RangeFacts.HasReturn)); + const { body, returnValueProperty } = transformFunctionBody(node, exposedVariableDeclarations, writes, substitutions, !!(range.facts & RangeFacts.HasReturn)); + suppressLeadingAndTrailingTrivia(body); + let newFunction: MethodDeclaration | FunctionDeclaration; if (isClassLike(scope)) { @@ -778,7 +785,10 @@ namespace ts.refactor.extractSymbol { changeTracker.insertNodeBefore(context.file, nodeToInsertBefore, newFunction, { suffix: context.newLineCharacter + context.newLineCharacter }); } else { - changeTracker.insertNodeBefore(context.file, scope.getLastToken(), newFunction, { prefix: context.newLineCharacter, suffix: context.newLineCharacter }); + changeTracker.insertNodeBefore(context.file, scope.getLastToken(), newFunction, { + prefix: isLineBreak(file.text.charCodeAt(scope.getLastToken().pos)) ? context.newLineCharacter : context.newLineCharacter + context.newLineCharacter, + suffix: context.newLineCharacter + }); } const newNodes: Node[] = []; @@ -796,38 +806,114 @@ namespace ts.refactor.extractSymbol { call = createAwait(call); } - if (writes) { + if (exposedVariableDeclarations.length && !writes) { + // No need to mix declarations and writes. + + // How could any variables be exposed if there's a return statement? + Debug.assert(!returnValueProperty); + Debug.assert(!(range.facts & RangeFacts.HasReturn)); + + if (exposedVariableDeclarations.length === 1) { + // Declaring exactly one variable: let x = newFunction(); + const variableDeclaration = exposedVariableDeclarations[0]; + newNodes.push(createVariableStatement( + /*modifiers*/ undefined, + createVariableDeclarationList( + [createVariableDeclaration(getSynthesizedDeepClone(variableDeclaration.name), /*type*/ getSynthesizedDeepClone(variableDeclaration.type), /*initializer*/ call)], // TODO (acasey): test binding patterns + variableDeclaration.parent.flags))); + } + else { + // Declaring multiple variables / return properties: + // let {x, y} = newFunction(); + const bindingElements: BindingElement[] = []; + const typeElements: TypeElement[] = []; + let commonNodeFlags = exposedVariableDeclarations[0].parent.flags; + let sawExplicitType = false; + for (const variableDeclaration of exposedVariableDeclarations) { + bindingElements.push(createBindingElement( + /*dotDotDotToken*/ undefined, + /*propertyName*/ undefined, + /*name*/ getSynthesizedDeepClone(variableDeclaration.name))); + + // Being returned through an object literal will have widened the type. + const variableType: TypeNode = checker.typeToTypeNode( + checker.getBaseTypeOfLiteralType(checker.getTypeAtLocation(variableDeclaration)), + scope, + NodeBuilderFlags.NoTruncation); + + typeElements.push(createPropertySignature( + /*modifiers*/ undefined, + /*name*/ variableDeclaration.symbol.name, + /*questionToken*/ undefined, + /*type*/ variableType, + /*initializer*/ undefined)); + sawExplicitType = sawExplicitType || variableDeclaration.type !== undefined; + commonNodeFlags = commonNodeFlags & variableDeclaration.parent.flags; + } + + const typeLiteral: TypeLiteralNode | undefined = sawExplicitType ? createTypeLiteralNode(typeElements) : undefined; + if (typeLiteral) { + setEmitFlags(typeLiteral, EmitFlags.SingleLine); + } + + newNodes.push(createVariableStatement( + /*modifiers*/ undefined, + createVariableDeclarationList( + [createVariableDeclaration( + createObjectBindingPattern(bindingElements), + /*type*/ typeLiteral, + /*initializer*/call)], + commonNodeFlags))); + } + } + else if (exposedVariableDeclarations.length || writes) { + if (exposedVariableDeclarations.length) { + // CONSIDER: we're going to create one statement per variable, but we could actually preserve their original grouping. + for (const variableDeclaration of exposedVariableDeclarations) { + let flags: NodeFlags = variableDeclaration.parent.flags; + if (flags & NodeFlags.Const) { + flags = (flags & ~NodeFlags.Const) | NodeFlags.Let; + } + + newNodes.push(createVariableStatement( + /*modifiers*/ undefined, + createVariableDeclarationList( + [createVariableDeclaration(variableDeclaration.symbol.name, getTypeDeepCloneUnionUndefined(variableDeclaration.type))], + flags))); + } + } + if (returnValueProperty) { // has both writes and return, need to create variable declaration to hold return value; newNodes.push(createVariableStatement( /*modifiers*/ undefined, - [createVariableDeclaration(returnValueProperty, createKeywordTypeNode(SyntaxKind.AnyKeyword))] - )); + createVariableDeclarationList( + [createVariableDeclaration(returnValueProperty, getTypeDeepCloneUnionUndefined(returnType))], + NodeFlags.Let))); } - const assignments = getPropertyAssignmentsForWrites(writes); + const assignments = getPropertyAssignmentsForWritesAndVariableDeclarations(exposedVariableDeclarations, writes); if (returnValueProperty) { assignments.unshift(createShorthandPropertyAssignment(returnValueProperty)); } // propagate writes back if (assignments.length === 1) { - if (returnValueProperty) { - newNodes.push(createReturn(createIdentifier(returnValueProperty))); - } - else { - newNodes.push(createStatement(createBinary(assignments[0].name, SyntaxKind.EqualsToken, call))); + // We would only have introduced a return value property if there had been + // other assignments to make. + Debug.assert(!returnValueProperty); - if (range.facts & RangeFacts.HasReturn) { - newNodes.push(createReturn()); - } + newNodes.push(createStatement(createAssignment(assignments[0].name, call))); + + if (range.facts & RangeFacts.HasReturn) { + newNodes.push(createReturn()); } } else { // emit e.g. // { a, b, __return } = newFunction(a, b); // return __return; - newNodes.push(createStatement(createBinary(createObjectLiteral(assignments), SyntaxKind.EqualsToken, call))); + newNodes.push(createStatement(createAssignment(createObjectLiteral(assignments), call))); if (returnValueProperty) { newNodes.push(createReturn(createIdentifier(returnValueProperty))); } @@ -845,15 +931,10 @@ namespace ts.refactor.extractSymbol { } } - if (isReadonlyArray(range.range)) { - changeTracker.replaceNodesWithNodes(context.file, range.range, newNodes, { - nodeSeparator: context.newLineCharacter, - suffix: context.newLineCharacter // insert newline only when replacing statements - }); - } - else { - changeTracker.replaceNodeWithNodes(context.file, range.range, newNodes, { nodeSeparator: context.newLineCharacter }); - } + const replacementRange = isReadonlyArray(range.range) + ? { pos: first(range.range).getStart(), end: last(range.range).end } + : { pos: range.range.getStart(), end: range.range.end }; + changeTracker.replaceRangeWithNodes(context.file, replacementRange, newNodes, { nodeSeparator: context.newLineCharacter }); const edits = changeTracker.getChanges(); const renameRange = isReadonlyArray(range.range) ? first(range.range) : range.range; @@ -861,6 +942,21 @@ namespace ts.refactor.extractSymbol { const renameFilename = renameRange.getSourceFile().fileName; const renameLocation = getRenameLocation(edits, renameFilename, functionNameText, /*isDeclaredBeforeUse*/ false); return { renameFilename, renameLocation, edits }; + + function getTypeDeepCloneUnionUndefined(typeNode: TypeNode | undefined): TypeNode | undefined { + if (typeNode === undefined) { + return undefined; + } + + const clone = getSynthesizedDeepClone(typeNode); + let withoutParens = clone; + while (isParenthesizedTypeNode(withoutParens)) { + withoutParens = withoutParens.type; + } + return isUnionTypeNode(withoutParens) && find(withoutParens.types, t => t.kind === SyntaxKind.UndefinedKeyword) + ? clone + : createUnionTypeNode([clone, createKeywordTypeNode(SyntaxKind.UndefinedKeyword)]); + } } /** @@ -883,9 +979,10 @@ namespace ts.refactor.extractSymbol { const variableType = isJS ? undefined - : checker.typeToTypeNode(checker.getContextualType(node)); + : checker.typeToTypeNode(checker.getContextualType(node), scope, NodeBuilderFlags.NoTruncation); const initializer = transformConstantInitializer(node, substitutions); + suppressLeadingAndTrailingTrivia(initializer); const changeTracker = textChanges.ChangeTracker.fromContext(context); @@ -918,7 +1015,7 @@ namespace ts.refactor.extractSymbol { changeTracker.insertNodeBefore(context.file, nodeToInsertBefore, newVariable, { suffix: context.newLineCharacter + context.newLineCharacter }); // Consume - changeTracker.replaceNodeWithNodes(context.file, node, [localReference], { nodeSeparator: context.newLineCharacter }); + changeTracker.replaceRange(context.file, { pos: node.getStart(), end: node.end }, localReference); } else { const newVariableDeclaration = createVariableDeclaration(localNameText, variableType, initializer); @@ -1088,21 +1185,22 @@ namespace ts.refactor.extractSymbol { } } - function transformFunctionBody(body: Node, writes: ReadonlyArray, substitutions: ReadonlyMap<() => Node>, hasReturn: boolean): { body: Block, returnValueProperty: string } { - if (isBlock(body) && !writes && substitutions.size === 0) { - // already block, no writes to propagate back, no substitutions - can use node as is + function transformFunctionBody(body: Node, exposedVariableDeclarations: ReadonlyArray, writes: ReadonlyArray, substitutions: ReadonlyMap, hasReturn: boolean): { body: Block, returnValueProperty: string } { + const hasWritesOrVariableDeclarations = writes !== undefined || exposedVariableDeclarations.length > 0; + if (isBlock(body) && !hasWritesOrVariableDeclarations && substitutions.size === 0) { + // already block, no declarations or writes to propagate back, no substitutions - can use node as is return { body: createBlock(body.statements, /*multLine*/ true), returnValueProperty: undefined }; } let returnValueProperty: string; let ignoreReturns = false; const statements = createNodeArray(isBlock(body) ? body.statements.slice(0) : [isStatement(body) ? body : createReturn(body)]); // rewrite body if either there are writes that should be propagated back via return statements or there are substitutions - if (writes || substitutions.size) { + if (hasWritesOrVariableDeclarations || substitutions.size) { const rewrittenStatements = visitNodes(statements, visitor).slice(); - if (writes && !hasReturn && isStatement(body)) { + if (hasWritesOrVariableDeclarations && !hasReturn && isStatement(body)) { // add return at the end to propagate writes back in case if control flow falls out of the function body // it is ok to know that range has at least one return since it we only allow unconditional returns - const assignments = getPropertyAssignmentsForWrites(writes); + const assignments = getPropertyAssignmentsForWritesAndVariableDeclarations(exposedVariableDeclarations, writes); if (assignments.length === 1) { rewrittenStatements.push(createReturn(assignments[0].name)); } @@ -1117,8 +1215,8 @@ namespace ts.refactor.extractSymbol { } function visitor(node: Node): VisitResult { - if (!ignoreReturns && node.kind === SyntaxKind.ReturnStatement && writes) { - const assignments: ObjectLiteralElementLike[] = getPropertyAssignmentsForWrites(writes); + if (!ignoreReturns && node.kind === SyntaxKind.ReturnStatement && hasWritesOrVariableDeclarations) { + const assignments: ObjectLiteralElementLike[] = getPropertyAssignmentsForWritesAndVariableDeclarations(exposedVariableDeclarations, writes); if ((node).expression) { if (!returnValueProperty) { returnValueProperty = "__return"; @@ -1136,21 +1234,21 @@ namespace ts.refactor.extractSymbol { const oldIgnoreReturns = ignoreReturns; ignoreReturns = ignoreReturns || isFunctionLikeDeclaration(node) || isClassLike(node); const substitution = substitutions.get(getNodeId(node).toString()); - const result = substitution ? substitution() : visitEachChild(node, visitor, nullTransformationContext); + const result = substitution ? getSynthesizedDeepClone(substitution) : visitEachChild(node, visitor, nullTransformationContext); ignoreReturns = oldIgnoreReturns; return result; } } } - function transformConstantInitializer(initializer: Expression, substitutions: ReadonlyMap<() => Node>): Expression { + function transformConstantInitializer(initializer: Expression, substitutions: ReadonlyMap): Expression { return substitutions.size ? visitor(initializer) as Expression : initializer; function visitor(node: Node): VisitResult { const substitution = substitutions.get(getNodeId(node).toString()); - return substitution ? substitution() : visitEachChild(node, visitor, nullTransformationContext); + return substitution ? getSynthesizedDeepClone(substitution) : visitEachChild(node, visitor, nullTransformationContext); } } @@ -1240,8 +1338,18 @@ namespace ts.refactor.extractSymbol { } } - function getPropertyAssignmentsForWrites(writes: ReadonlyArray): ShorthandPropertyAssignment[] { - return writes.map(w => createShorthandPropertyAssignment(w.symbol.name)); + function getPropertyAssignmentsForWritesAndVariableDeclarations( + exposedVariableDeclarations: ReadonlyArray, + writes: ReadonlyArray) { + + const variableAssignments = map(exposedVariableDeclarations, v => createShorthandPropertyAssignment(v.symbol.name)); + const writeAssignments = map(writes, w => createShorthandPropertyAssignment(w.symbol.name)); + + return variableAssignments === undefined + ? writeAssignments + : writeAssignments === undefined + ? variableAssignments + : variableAssignments.concat(writeAssignments); } function isReadonlyArray(v: any): v is ReadonlyArray { @@ -1279,7 +1387,7 @@ namespace ts.refactor.extractSymbol { interface ScopeUsages { readonly usages: Map; readonly typeParameterUsages: Map; // Key is type ID - readonly substitutions: Map<() => Node>; + readonly substitutions: Map; } interface ReadsAndWrites { @@ -1287,6 +1395,7 @@ namespace ts.refactor.extractSymbol { readonly usagesPerScope: ReadonlyArray; readonly functionErrorsPerScope: ReadonlyArray>; readonly constantErrorsPerScope: ReadonlyArray>; + readonly exposedVariableDeclarations: ReadonlyArray; } function collectReadsAndWrites( targetRange: TargetRange, @@ -1298,10 +1407,13 @@ namespace ts.refactor.extractSymbol { const allTypeParameterUsages = createMap(); // Key is type ID const usagesPerScope: ScopeUsages[] = []; - const substitutionsPerScope: Map<() => Node>[] = []; + const substitutionsPerScope: Map[] = []; const functionErrorsPerScope: Diagnostic[][] = []; const constantErrorsPerScope: Diagnostic[][] = []; - const visibleDeclarationsInExtractedRange: Symbol[] = []; + const visibleDeclarationsInExtractedRange: NamedDeclaration[] = []; + const exposedVariableSymbolSet = createMap(); // Key is symbol ID + const exposedVariableDeclarations: VariableDeclaration[] = []; + let firstExposedNonVariableDeclaration: NamedDeclaration | undefined = undefined; const expression = !isReadonlyArray(targetRange.range) ? targetRange.range @@ -1322,8 +1434,8 @@ namespace ts.refactor.extractSymbol { // initialize results for (const scope of scopes) { - usagesPerScope.push({ usages: createMap(), typeParameterUsages: createMap(), substitutions: createMap<() => Expression>() }); - substitutionsPerScope.push(createMap<() => Expression>()); + usagesPerScope.push({ usages: createMap(), typeParameterUsages: createMap(), substitutions: createMap() }); + substitutionsPerScope.push(createMap()); functionErrorsPerScope.push( isFunctionLikeDeclaration(scope) && scope.kind !== SyntaxKind.FunctionDeclaration @@ -1346,7 +1458,6 @@ namespace ts.refactor.extractSymbol { const seenUsages = createMap(); const target = isReadonlyArray(targetRange.range) ? createBlock(targetRange.range) : targetRange.range; - const containingLexicalScopeOfExtraction = isBlockScope(scopes[0], scopes[0].parent) ? scopes[0] : getEnclosingBlockScopeContainer(scopes[0]); const unmodifiedNode = isReadonlyArray(targetRange.range) ? first(targetRange.range) : targetRange.range; const inGenericContext = isInGenericContext(unmodifiedNode); @@ -1392,6 +1503,15 @@ namespace ts.refactor.extractSymbol { Debug.assert(i === scopes.length); } + // If there are any declarations in the extracted block that are used in the same enclosing + // lexical scope, we can't move the extraction "up" as those declarations will become unreachable + if (visibleDeclarationsInExtractedRange.length) { + const containingLexicalScopeOfExtraction = isBlockScope(scopes[0], scopes[0].parent) + ? scopes[0] + : getEnclosingBlockScopeContainer(scopes[0]); + forEachChild(containingLexicalScopeOfExtraction, checkForUsedDeclarations); + } + for (let i = 0; i < scopes.length; i++) { const scopeUsages = usagesPerScope[i]; // Special case: in the innermost scope, all usages are available. @@ -1415,8 +1535,11 @@ namespace ts.refactor.extractSymbol { } }); - if (hasWrite && !isReadonlyArray(targetRange.range) && isExpression(targetRange.range)) { - const diag = createDiagnosticForNode(targetRange.range, Messages.CannotCombineWritesAndReturns); + // If an expression was extracted, then there shouldn't have been any variable declarations. + Debug.assert(isReadonlyArray(targetRange.range) || exposedVariableDeclarations.length === 0); + + if (hasWrite && !isReadonlyArray(targetRange.range)) { + const diag = createDiagnosticForNode(targetRange.range, Messages.CannotWriteInExpression); functionErrorsPerScope[i].push(diag); constantErrorsPerScope[i].push(diag); } @@ -1425,15 +1548,14 @@ namespace ts.refactor.extractSymbol { functionErrorsPerScope[i].push(diag); constantErrorsPerScope[i].push(diag); } + else if (firstExposedNonVariableDeclaration) { + const diag = createDiagnosticForNode(firstExposedNonVariableDeclaration, Messages.CannotExtractExportedEntity); + functionErrorsPerScope[i].push(diag); + constantErrorsPerScope[i].push(diag); + } } - // If there are any declarations in the extracted block that are used in the same enclosing - // lexical scope, we can't move the extraction "up" as those declarations will become unreachable - if (visibleDeclarationsInExtractedRange.length) { - forEachChild(containingLexicalScopeOfExtraction, checkForUsedDeclarations); - } - - return { target, usagesPerScope, functionErrorsPerScope, constantErrorsPerScope }; + return { target, usagesPerScope, functionErrorsPerScope, constantErrorsPerScope, exposedVariableDeclarations }; function hasTypeParameters(node: Node) { return isDeclarationWithTypeParameters(node) && @@ -1472,7 +1594,7 @@ namespace ts.refactor.extractSymbol { } if (isDeclaration(node) && node.symbol) { - visibleDeclarationsInExtractedRange.push(node.symbol); + visibleDeclarationsInExtractedRange.push(node); } if (isAssignmentExpression(node)) { @@ -1518,11 +1640,7 @@ namespace ts.refactor.extractSymbol { } function recordUsagebySymbol(identifier: Identifier, usage: Usage, isTypeName: boolean) { - // If the identifier is both a property name and its value, we're only interested in its value - // (since the name is a declaration and will be included in the extracted range). - const symbol = identifier.parent && isShorthandPropertyAssignment(identifier.parent) && identifier.parent.name === identifier - ? checker.getShorthandAssignmentValueSymbol(identifier.parent) - : checker.getSymbolAtLocation(identifier); + const symbol = getSymbolReferencedByIdentifier(identifier); if (!symbol) { // cannot find symbol - do nothing return undefined; @@ -1606,36 +1724,55 @@ namespace ts.refactor.extractSymbol { } // Otherwise check and recurse. - const sym = checker.getSymbolAtLocation(node); - if (sym && visibleDeclarationsInExtractedRange.some(d => d === sym)) { - const diag = createDiagnosticForNode(node, Messages.CannotExtractExportedEntity); - for (const errors of functionErrorsPerScope) { - errors.push(diag); + const sym = isIdentifier(node) + ? getSymbolReferencedByIdentifier(node) + : checker.getSymbolAtLocation(node); + if (sym) { + const decl = find(visibleDeclarationsInExtractedRange, d => d.symbol === sym); + if (decl) { + if (isVariableDeclaration(decl)) { + const idString = decl.symbol.id.toString(); + if (!exposedVariableSymbolSet.has(idString)) { + exposedVariableDeclarations.push(decl); + exposedVariableSymbolSet.set(idString, true); + } + } + else { + // CONSIDER: this includes binding elements, which we could + // expose in the same way as variables. + firstExposedNonVariableDeclaration = firstExposedNonVariableDeclaration || decl; + } } - for (const errors of constantErrorsPerScope) { - errors.push(diag); - } - return true; - } - else { - forEachChild(node, checkForUsedDeclarations); } + + forEachChild(node, checkForUsedDeclarations); } - function tryReplaceWithQualifiedNameOrPropertyAccess(symbol: Symbol, scopeDecl: Node, isTypeNode: boolean): () => (PropertyAccessExpression | EntityName) { + /** + * Return the symbol referenced by an identifier (even if it declares a different symbol). + */ + function getSymbolReferencedByIdentifier(identifier: Identifier) { + // If the identifier is both a property name and its value, we're only interested in its value + // (since the name is a declaration and will be included in the extracted range). + return identifier.parent && isShorthandPropertyAssignment(identifier.parent) && identifier.parent.name === identifier + ? checker.getShorthandAssignmentValueSymbol(identifier.parent) + : checker.getSymbolAtLocation(identifier); + } + + function tryReplaceWithQualifiedNameOrPropertyAccess(symbol: Symbol, scopeDecl: Node, isTypeNode: boolean): PropertyAccessExpression | EntityName { if (!symbol) { return undefined; } if (symbol.getDeclarations().some(d => d.parent === scopeDecl)) { - return () => createIdentifier(symbol.name); + return createIdentifier(symbol.name); } const prefix = tryReplaceWithQualifiedNameOrPropertyAccess(symbol.parent, scopeDecl, isTypeNode); if (prefix === undefined) { return undefined; } return isTypeNode - ? () => createQualifiedName(prefix(), createIdentifier(symbol.name)) - : () => createPropertyAccess(prefix(), symbol.name); + ? createQualifiedName(prefix, createIdentifier(symbol.name)) + : createPropertyAccess(prefix, symbol.name); } } diff --git a/src/services/services.ts b/src/services/services.ts index bc733a4e2fe..6bdc96d8b4d 100644 --- a/src/services/services.ts +++ b/src/services/services.ts @@ -1952,7 +1952,7 @@ namespace ts { function isNodeModulesFile(path: string): boolean { const node_modulesFolderName = "/node_modules/"; - return path.indexOf(node_modulesFolderName) !== -1; + return stringContains(path, node_modulesFolderName); } } diff --git a/src/services/shims.ts b/src/services/shims.ts index 737db44b83f..9d4baccc3c4 100644 --- a/src/services/shims.ts +++ b/src/services/shims.ts @@ -16,7 +16,7 @@ /// /* @internal */ -let debugObjectHost = (function (this: any) { return this; })(); +let debugObjectHost: { CollectGarbage(): void } = (function (this: any) { return this; })(); // We need to use 'null' to interface with the managed side. /* tslint:disable:no-null-keyword */ @@ -119,13 +119,13 @@ namespace ts { } export interface Shim { - dispose(_dummy: any): void; + dispose(_dummy: {}): void; } export interface LanguageServiceShim extends Shim { languageService: LanguageService; - dispose(_dummy: any): void; + dispose(_dummy: {}): void; refresh(throwOnError: boolean): void; @@ -417,7 +417,7 @@ namespace ts { return this.shimHost.getScriptVersion(fileName); } - public getLocalizedDiagnosticMessages(): any { + public getLocalizedDiagnosticMessages() { const diagnosticMessagesJson = this.shimHost.getLocalizedDiagnosticMessages(); if (diagnosticMessagesJson === null || diagnosticMessagesJson === "") { return null; @@ -515,7 +515,7 @@ namespace ts { } } - function simpleForwardCall(logger: Logger, actionDescription: string, action: () => any, logPerformance: boolean): any { + function simpleForwardCall(logger: Logger, actionDescription: string, action: () => {}, logPerformance: boolean): {} { let start: number; if (logPerformance) { logger.log(actionDescription); @@ -539,14 +539,14 @@ namespace ts { return result; } - function forwardJSONCall(logger: Logger, actionDescription: string, action: () => any, logPerformance: boolean): string { + function forwardJSONCall(logger: Logger, actionDescription: string, action: () => {}, logPerformance: boolean): string { return forwardCall(logger, actionDescription, /*returnJson*/ true, action, logPerformance); } function forwardCall(logger: Logger, actionDescription: string, returnJson: boolean, action: () => T, logPerformance: boolean): T | string { try { const result = simpleForwardCall(logger, actionDescription, action, logPerformance); - return returnJson ? JSON.stringify({ result }) : result; + return returnJson ? JSON.stringify({ result }) : result as T; } catch (err) { if (err instanceof OperationCanceledException) { @@ -563,7 +563,7 @@ namespace ts { constructor(private factory: ShimFactory) { factory.registerShim(this); } - public dispose(_dummy: any): void { + public dispose(_dummy: {}): void { this.factory.unregisterShim(this); } } @@ -601,7 +601,7 @@ namespace ts { this.logger = this.host; } - public forwardJSONCall(actionDescription: string, action: () => any): string { + public forwardJSONCall(actionDescription: string, action: () => {}): string { return forwardJSONCall(this.logger, actionDescription, action, this.logPerformance); } @@ -611,7 +611,7 @@ namespace ts { * Ensure (almost) deterministic release of internal Javascript resources when * some external native objects holds onto us (e.g. Com/Interop). */ - public dispose(dummy: any): void { + public dispose(dummy: {}): void { this.logger.log("dispose()"); this.languageService.dispose(); this.languageService = null; @@ -635,7 +635,7 @@ namespace ts { public refresh(throwOnError: boolean): void { this.forwardJSONCall( `refresh(${throwOnError})`, - () => null + () => null ); } @@ -644,7 +644,7 @@ namespace ts { "cleanupSemanticCache()", () => { this.languageService.cleanupSemanticCache(); - return null; + return null; }); } @@ -980,13 +980,13 @@ namespace ts { ); } - public getEmitOutputObject(fileName: string): any { + public getEmitOutputObject(fileName: string): EmitOutput { return forwardCall( this.logger, `getEmitOutput('${fileName}')`, /*returnJson*/ false, () => this.languageService.getEmitOutput(fileName), - this.logPerformance); + this.logPerformance) as EmitOutput; } } @@ -1030,7 +1030,7 @@ namespace ts { super(factory); } - private forwardJSONCall(actionDescription: string, action: () => any): any { + private forwardJSONCall(actionDescription: string, action: () => {}): string { return forwardJSONCall(this.logger, actionDescription, action, this.logPerformance); } @@ -1221,7 +1221,7 @@ namespace ts { // Here we expose the TypeScript services as an external module // so that it may be consumed easily like a node module. - declare const module: any; + declare const module: { exports: {} }; if (typeof module !== "undefined" && module.exports) { module.exports = ts; } diff --git a/src/services/symbolDisplay.ts b/src/services/symbolDisplay.ts index a399610d823..d38d21f1092 100644 --- a/src/services/symbolDisplay.ts +++ b/src/services/symbolDisplay.ts @@ -341,13 +341,19 @@ namespace ts.SymbolDisplay { } if (symbolFlags & SymbolFlags.Alias) { addNewLineIfDisplayPartsExist(); - if (symbol.declarations[0].kind === SyntaxKind.NamespaceExportDeclaration) { - displayParts.push(keywordPart(SyntaxKind.ExportKeyword)); - displayParts.push(spacePart()); - displayParts.push(keywordPart(SyntaxKind.NamespaceKeyword)); - } - else { - displayParts.push(keywordPart(SyntaxKind.ImportKeyword)); + switch (symbol.declarations[0].kind) { + case SyntaxKind.NamespaceExportDeclaration: + displayParts.push(keywordPart(SyntaxKind.ExportKeyword)); + displayParts.push(spacePart()); + displayParts.push(keywordPart(SyntaxKind.NamespaceKeyword)); + break; + case SyntaxKind.ExportAssignment: + displayParts.push(keywordPart(SyntaxKind.ExportKeyword)); + displayParts.push(spacePart()); + displayParts.push(keywordPart((symbol.declarations[0] as ExportAssignment).isExportEquals ? SyntaxKind.EqualsToken : SyntaxKind.DefaultKeyword)); + break; + default: + displayParts.push(keywordPart(SyntaxKind.ImportKeyword)); } displayParts.push(spacePart()); addFullSymbolName(symbol); diff --git a/src/services/utilities.ts b/src/services/utilities.ts index 6166ceea28c..df3f3c5c6b4 100644 --- a/src/services/utilities.ts +++ b/src/services/utilities.ts @@ -1334,4 +1334,74 @@ namespace ts { } return position; } + + /** + * Creates a deep, memberwise clone of a node with no source map location. + * + * WARNING: This is an expensive operation and is only intended to be used in refactorings + * and code fixes (because those are triggered by explicit user actions). + */ + export function getSynthesizedDeepClone(node: T | undefined): T | undefined { + if (node === undefined) { + return undefined; + } + + const visited = visitEachChild(node, getSynthesizedDeepClone, nullTransformationContext); + if (visited === node) { + // This only happens for leaf nodes - internal nodes always see their children change. + const clone = getSynthesizedClone(node); + if (isStringLiteral(clone)) { + clone.textSourceNode = node as any; + } + else if (isNumericLiteral(clone)) { + clone.numericLiteralFlags = (node as any).numericLiteralFlags; + } + clone.pos = node.pos; + clone.end = node.end; + return clone; + } + + // PERF: As an optimization, rather than calling getSynthesizedClone, we'll update + // the new node created by visitEachChild with the extra changes getSynthesizedClone + // would have made. + + visited.parent = undefined; + + return visited; + } + + /** + * Sets EmitFlags to suppress leading and trailing trivia on the node. + */ + /* @internal */ + export function suppressLeadingAndTrailingTrivia(node: Node) { + Debug.assert(node !== undefined); + + suppressLeading(node); + suppressTrailing(node); + + function suppressLeading(node: Node) { + addEmitFlags(node, EmitFlags.NoLeadingComments); + + const firstChild = forEachChild(node, child => child); + firstChild && suppressLeading(firstChild); + } + + function suppressTrailing(node: Node) { + addEmitFlags(node, EmitFlags.NoTrailingComments); + + let lastChild: Node = undefined; + forEachChild( + node, + child => (lastChild = child, undefined), + children => { + // As an optimization, jump straight to the end of the list. + if (children.length) { + lastChild = last(children); + } + return undefined; + }); + lastChild && suppressTrailing(lastChild); + } + } } diff --git a/tests/baselines/reference/abstractPropertyInConstructor.errors.txt b/tests/baselines/reference/abstractPropertyInConstructor.errors.txt new file mode 100644 index 00000000000..461dd713d3b --- /dev/null +++ b/tests/baselines/reference/abstractPropertyInConstructor.errors.txt @@ -0,0 +1,37 @@ +tests/cases/compiler/abstractPropertyInConstructor.ts(4,24): error TS2715: Abstract property 'prop' in class 'AbstractClass' cannot be accessed in the constructor. +tests/cases/compiler/abstractPropertyInConstructor.ts(7,18): error TS2715: Abstract property 'prop' in class 'AbstractClass' cannot be accessed in the constructor. +tests/cases/compiler/abstractPropertyInConstructor.ts(9,14): error TS2715: Abstract property 'cb' in class 'AbstractClass' cannot be accessed in the constructor. + + +==== tests/cases/compiler/abstractPropertyInConstructor.ts (3 errors) ==== + abstract class AbstractClass { + constructor(str: string) { + this.method(parseInt(str)); + let val = this.prop.toLowerCase(); + ~~~~ +!!! error TS2715: Abstract property 'prop' in class 'AbstractClass' cannot be accessed in the constructor. + + if (!str) { + this.prop = "Hello World"; + ~~~~ +!!! error TS2715: Abstract property 'prop' in class 'AbstractClass' cannot be accessed in the constructor. + } + this.cb(str); + ~~ +!!! error TS2715: Abstract property 'cb' in class 'AbstractClass' cannot be accessed in the constructor. + + const innerFunction = () => { + return this.prop; + } + } + + abstract prop: string; + abstract cb: (s: string) => void; + + abstract method(num: number): void; + + method2() { + this.prop = this.prop + "!"; + } + } + \ No newline at end of file diff --git a/tests/baselines/reference/abstractPropertyInConstructor.js b/tests/baselines/reference/abstractPropertyInConstructor.js new file mode 100644 index 00000000000..18a2937a191 --- /dev/null +++ b/tests/baselines/reference/abstractPropertyInConstructor.js @@ -0,0 +1,46 @@ +//// [abstractPropertyInConstructor.ts] +abstract class AbstractClass { + constructor(str: string) { + this.method(parseInt(str)); + let val = this.prop.toLowerCase(); + + if (!str) { + this.prop = "Hello World"; + } + this.cb(str); + + const innerFunction = () => { + return this.prop; + } + } + + abstract prop: string; + abstract cb: (s: string) => void; + + abstract method(num: number): void; + + method2() { + this.prop = this.prop + "!"; + } +} + + +//// [abstractPropertyInConstructor.js] +var AbstractClass = /** @class */ (function () { + function AbstractClass(str) { + var _this = this; + this.method(parseInt(str)); + var val = this.prop.toLowerCase(); + if (!str) { + this.prop = "Hello World"; + } + this.cb(str); + var innerFunction = function () { + return _this.prop; + }; + } + AbstractClass.prototype.method2 = function () { + this.prop = this.prop + "!"; + }; + return AbstractClass; +}()); diff --git a/tests/baselines/reference/abstractPropertyInConstructor.symbols b/tests/baselines/reference/abstractPropertyInConstructor.symbols new file mode 100644 index 00000000000..0d542ffb0a8 --- /dev/null +++ b/tests/baselines/reference/abstractPropertyInConstructor.symbols @@ -0,0 +1,70 @@ +=== tests/cases/compiler/abstractPropertyInConstructor.ts === +abstract class AbstractClass { +>AbstractClass : Symbol(AbstractClass, Decl(abstractPropertyInConstructor.ts, 0, 0)) + + constructor(str: string) { +>str : Symbol(str, Decl(abstractPropertyInConstructor.ts, 1, 16)) + + this.method(parseInt(str)); +>this.method : Symbol(AbstractClass.method, Decl(abstractPropertyInConstructor.ts, 16, 37)) +>this : Symbol(AbstractClass, Decl(abstractPropertyInConstructor.ts, 0, 0)) +>method : Symbol(AbstractClass.method, Decl(abstractPropertyInConstructor.ts, 16, 37)) +>parseInt : Symbol(parseInt, Decl(lib.d.ts, --, --)) +>str : Symbol(str, Decl(abstractPropertyInConstructor.ts, 1, 16)) + + let val = this.prop.toLowerCase(); +>val : Symbol(val, Decl(abstractPropertyInConstructor.ts, 3, 11)) +>this.prop.toLowerCase : Symbol(String.toLowerCase, Decl(lib.d.ts, --, --)) +>this.prop : Symbol(AbstractClass.prop, Decl(abstractPropertyInConstructor.ts, 13, 5)) +>this : Symbol(AbstractClass, Decl(abstractPropertyInConstructor.ts, 0, 0)) +>prop : Symbol(AbstractClass.prop, Decl(abstractPropertyInConstructor.ts, 13, 5)) +>toLowerCase : Symbol(String.toLowerCase, Decl(lib.d.ts, --, --)) + + if (!str) { +>str : Symbol(str, Decl(abstractPropertyInConstructor.ts, 1, 16)) + + this.prop = "Hello World"; +>this.prop : Symbol(AbstractClass.prop, Decl(abstractPropertyInConstructor.ts, 13, 5)) +>this : Symbol(AbstractClass, Decl(abstractPropertyInConstructor.ts, 0, 0)) +>prop : Symbol(AbstractClass.prop, Decl(abstractPropertyInConstructor.ts, 13, 5)) + } + this.cb(str); +>this.cb : Symbol(AbstractClass.cb, Decl(abstractPropertyInConstructor.ts, 15, 26)) +>this : Symbol(AbstractClass, Decl(abstractPropertyInConstructor.ts, 0, 0)) +>cb : Symbol(AbstractClass.cb, Decl(abstractPropertyInConstructor.ts, 15, 26)) +>str : Symbol(str, Decl(abstractPropertyInConstructor.ts, 1, 16)) + + const innerFunction = () => { +>innerFunction : Symbol(innerFunction, Decl(abstractPropertyInConstructor.ts, 10, 13)) + + return this.prop; +>this.prop : Symbol(AbstractClass.prop, Decl(abstractPropertyInConstructor.ts, 13, 5)) +>this : Symbol(AbstractClass, Decl(abstractPropertyInConstructor.ts, 0, 0)) +>prop : Symbol(AbstractClass.prop, Decl(abstractPropertyInConstructor.ts, 13, 5)) + } + } + + abstract prop: string; +>prop : Symbol(AbstractClass.prop, Decl(abstractPropertyInConstructor.ts, 13, 5)) + + abstract cb: (s: string) => void; +>cb : Symbol(AbstractClass.cb, Decl(abstractPropertyInConstructor.ts, 15, 26)) +>s : Symbol(s, Decl(abstractPropertyInConstructor.ts, 16, 18)) + + abstract method(num: number): void; +>method : Symbol(AbstractClass.method, Decl(abstractPropertyInConstructor.ts, 16, 37)) +>num : Symbol(num, Decl(abstractPropertyInConstructor.ts, 18, 20)) + + method2() { +>method2 : Symbol(AbstractClass.method2, Decl(abstractPropertyInConstructor.ts, 18, 39)) + + this.prop = this.prop + "!"; +>this.prop : Symbol(AbstractClass.prop, Decl(abstractPropertyInConstructor.ts, 13, 5)) +>this : Symbol(AbstractClass, Decl(abstractPropertyInConstructor.ts, 0, 0)) +>prop : Symbol(AbstractClass.prop, Decl(abstractPropertyInConstructor.ts, 13, 5)) +>this.prop : Symbol(AbstractClass.prop, Decl(abstractPropertyInConstructor.ts, 13, 5)) +>this : Symbol(AbstractClass, Decl(abstractPropertyInConstructor.ts, 0, 0)) +>prop : Symbol(AbstractClass.prop, Decl(abstractPropertyInConstructor.ts, 13, 5)) + } +} + diff --git a/tests/baselines/reference/abstractPropertyInConstructor.types b/tests/baselines/reference/abstractPropertyInConstructor.types new file mode 100644 index 00000000000..0ffb5f1bdfd --- /dev/null +++ b/tests/baselines/reference/abstractPropertyInConstructor.types @@ -0,0 +1,81 @@ +=== tests/cases/compiler/abstractPropertyInConstructor.ts === +abstract class AbstractClass { +>AbstractClass : AbstractClass + + constructor(str: string) { +>str : string + + this.method(parseInt(str)); +>this.method(parseInt(str)) : void +>this.method : (num: number) => void +>this : this +>method : (num: number) => void +>parseInt(str) : number +>parseInt : (s: string, radix?: number) => number +>str : string + + let val = this.prop.toLowerCase(); +>val : string +>this.prop.toLowerCase() : string +>this.prop.toLowerCase : () => string +>this.prop : string +>this : this +>prop : string +>toLowerCase : () => string + + if (!str) { +>!str : boolean +>str : string + + this.prop = "Hello World"; +>this.prop = "Hello World" : "Hello World" +>this.prop : string +>this : this +>prop : string +>"Hello World" : "Hello World" + } + this.cb(str); +>this.cb(str) : void +>this.cb : (s: string) => void +>this : this +>cb : (s: string) => void +>str : string + + const innerFunction = () => { +>innerFunction : () => string +>() => { return this.prop; } : () => string + + return this.prop; +>this.prop : string +>this : this +>prop : string + } + } + + abstract prop: string; +>prop : string + + abstract cb: (s: string) => void; +>cb : (s: string) => void +>s : string + + abstract method(num: number): void; +>method : (num: number) => void +>num : number + + method2() { +>method2 : () => void + + this.prop = this.prop + "!"; +>this.prop = this.prop + "!" : string +>this.prop : string +>this : this +>prop : string +>this.prop + "!" : string +>this.prop : string +>this : this +>prop : string +>"!" : "!" + } +} + diff --git a/tests/baselines/reference/anyInferenceAnonymousFunctions.symbols b/tests/baselines/reference/anyInferenceAnonymousFunctions.symbols index c1b5df88fb0..4aad165f40a 100644 --- a/tests/baselines/reference/anyInferenceAnonymousFunctions.symbols +++ b/tests/baselines/reference/anyInferenceAnonymousFunctions.symbols @@ -3,9 +3,9 @@ var paired: any[]; >paired : Symbol(paired, Decl(anyInferenceAnonymousFunctions.ts, 0, 3)) paired.reduce(function (a1, a2) { ->paired.reduce : Symbol(Array.reduce, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>paired.reduce : Symbol(Array.reduce, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >paired : Symbol(paired, Decl(anyInferenceAnonymousFunctions.ts, 0, 3)) ->reduce : Symbol(Array.reduce, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>reduce : Symbol(Array.reduce, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >a1 : Symbol(a1, Decl(anyInferenceAnonymousFunctions.ts, 2, 24)) >a2 : Symbol(a2, Decl(anyInferenceAnonymousFunctions.ts, 2, 27)) @@ -15,9 +15,9 @@ paired.reduce(function (a1, a2) { } , []); paired.reduce((b1, b2) => { ->paired.reduce : Symbol(Array.reduce, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>paired.reduce : Symbol(Array.reduce, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >paired : Symbol(paired, Decl(anyInferenceAnonymousFunctions.ts, 0, 3)) ->reduce : Symbol(Array.reduce, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>reduce : Symbol(Array.reduce, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >b1 : Symbol(b1, Decl(anyInferenceAnonymousFunctions.ts, 8, 15)) >b2 : Symbol(b2, Decl(anyInferenceAnonymousFunctions.ts, 8, 18)) @@ -27,9 +27,9 @@ paired.reduce((b1, b2) => { } , []); paired.reduce((b3, b4) => b3.concat({}), []); ->paired.reduce : Symbol(Array.reduce, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>paired.reduce : Symbol(Array.reduce, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >paired : Symbol(paired, Decl(anyInferenceAnonymousFunctions.ts, 0, 3)) ->reduce : Symbol(Array.reduce, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>reduce : Symbol(Array.reduce, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >b3 : Symbol(b3, Decl(anyInferenceAnonymousFunctions.ts, 13, 15)) >b4 : Symbol(b4, Decl(anyInferenceAnonymousFunctions.ts, 13, 18)) >b3 : Symbol(b3, Decl(anyInferenceAnonymousFunctions.ts, 13, 15)) diff --git a/tests/baselines/reference/anyInferenceAnonymousFunctions.types b/tests/baselines/reference/anyInferenceAnonymousFunctions.types index 8dc7fdcb90f..d5f693b5453 100644 --- a/tests/baselines/reference/anyInferenceAnonymousFunctions.types +++ b/tests/baselines/reference/anyInferenceAnonymousFunctions.types @@ -4,9 +4,9 @@ var paired: any[]; paired.reduce(function (a1, a2) { >paired.reduce(function (a1, a2) { return a1.concat({});} , []) : any ->paired.reduce : { (callbackfn: (previousValue: any, currentValue: any, currentIndex: number, array: any[]) => any, initialValue?: any): any; (callbackfn: (previousValue: U, currentValue: any, currentIndex: number, array: any[]) => U, initialValue: U): U; } +>paired.reduce : { (callbackfn: (previousValue: any, currentValue: any, currentIndex: number, array: any[]) => any): any; (callbackfn: (previousValue: any, currentValue: any, currentIndex: number, array: any[]) => any, initialValue: any): any; (callbackfn: (previousValue: U, currentValue: any, currentIndex: number, array: any[]) => U, initialValue: U): U; } >paired : any[] ->reduce : { (callbackfn: (previousValue: any, currentValue: any, currentIndex: number, array: any[]) => any, initialValue?: any): any; (callbackfn: (previousValue: U, currentValue: any, currentIndex: number, array: any[]) => U, initialValue: U): U; } +>reduce : { (callbackfn: (previousValue: any, currentValue: any, currentIndex: number, array: any[]) => any): any; (callbackfn: (previousValue: any, currentValue: any, currentIndex: number, array: any[]) => any, initialValue: any): any; (callbackfn: (previousValue: U, currentValue: any, currentIndex: number, array: any[]) => U, initialValue: U): U; } >function (a1, a2) { return a1.concat({});} : (a1: any, a2: any) => any >a1 : any >a2 : any @@ -23,9 +23,9 @@ paired.reduce(function (a1, a2) { paired.reduce((b1, b2) => { >paired.reduce((b1, b2) => { return b1.concat({});} , []) : any ->paired.reduce : { (callbackfn: (previousValue: any, currentValue: any, currentIndex: number, array: any[]) => any, initialValue?: any): any; (callbackfn: (previousValue: U, currentValue: any, currentIndex: number, array: any[]) => U, initialValue: U): U; } +>paired.reduce : { (callbackfn: (previousValue: any, currentValue: any, currentIndex: number, array: any[]) => any): any; (callbackfn: (previousValue: any, currentValue: any, currentIndex: number, array: any[]) => any, initialValue: any): any; (callbackfn: (previousValue: U, currentValue: any, currentIndex: number, array: any[]) => U, initialValue: U): U; } >paired : any[] ->reduce : { (callbackfn: (previousValue: any, currentValue: any, currentIndex: number, array: any[]) => any, initialValue?: any): any; (callbackfn: (previousValue: U, currentValue: any, currentIndex: number, array: any[]) => U, initialValue: U): U; } +>reduce : { (callbackfn: (previousValue: any, currentValue: any, currentIndex: number, array: any[]) => any): any; (callbackfn: (previousValue: any, currentValue: any, currentIndex: number, array: any[]) => any, initialValue: any): any; (callbackfn: (previousValue: U, currentValue: any, currentIndex: number, array: any[]) => U, initialValue: U): U; } >(b1, b2) => { return b1.concat({});} : (b1: any, b2: any) => any >b1 : any >b2 : any @@ -42,9 +42,9 @@ paired.reduce((b1, b2) => { paired.reduce((b3, b4) => b3.concat({}), []); >paired.reduce((b3, b4) => b3.concat({}), []) : any ->paired.reduce : { (callbackfn: (previousValue: any, currentValue: any, currentIndex: number, array: any[]) => any, initialValue?: any): any; (callbackfn: (previousValue: U, currentValue: any, currentIndex: number, array: any[]) => U, initialValue: U): U; } +>paired.reduce : { (callbackfn: (previousValue: any, currentValue: any, currentIndex: number, array: any[]) => any): any; (callbackfn: (previousValue: any, currentValue: any, currentIndex: number, array: any[]) => any, initialValue: any): any; (callbackfn: (previousValue: U, currentValue: any, currentIndex: number, array: any[]) => U, initialValue: U): U; } >paired : any[] ->reduce : { (callbackfn: (previousValue: any, currentValue: any, currentIndex: number, array: any[]) => any, initialValue?: any): any; (callbackfn: (previousValue: U, currentValue: any, currentIndex: number, array: any[]) => U, initialValue: U): U; } +>reduce : { (callbackfn: (previousValue: any, currentValue: any, currentIndex: number, array: any[]) => any): any; (callbackfn: (previousValue: any, currentValue: any, currentIndex: number, array: any[]) => any, initialValue: any): any; (callbackfn: (previousValue: U, currentValue: any, currentIndex: number, array: any[]) => U, initialValue: U): U; } >(b3, b4) => b3.concat({}) : (b3: any, b4: any) => any >b3 : any >b4 : any diff --git a/tests/baselines/reference/api/tsserverlibrary.d.ts b/tests/baselines/reference/api/tsserverlibrary.d.ts index 1feb6b7d073..151c948602d 100644 --- a/tests/baselines/reference/api/tsserverlibrary.d.ts +++ b/tests/baselines/reference/api/tsserverlibrary.d.ts @@ -1442,6 +1442,10 @@ declare namespace ts { interface JSDocUnknownTag extends JSDocTag { kind: SyntaxKind.JSDocTag; } + /** + * Note that `@extends` is a synonym of `@augments`. + * Both tags are represented by this interface. + */ interface JSDocAugmentsTag extends JSDocTag { kind: SyntaxKind.JSDocAugmentsTag; class: ExpressionWithTypeArguments & { @@ -1473,7 +1477,7 @@ declare namespace ts { interface JSDocPropertyLikeTag extends JSDocTag, Declaration { parent: JSDoc; name: EntityName; - typeExpression: JSDocTypeExpression; + typeExpression?: JSDocTypeExpression; /** Whether the property name came before the type -- non-standard for JSDoc, but Typescript-like */ isNameFirst: boolean; isBracketed: boolean; @@ -1727,6 +1731,10 @@ declare namespace ts { signatureToString(signature: Signature, enclosingDeclaration?: Node, flags?: TypeFormatFlags, kind?: SignatureKind): string; typeToString(type: Type, enclosingDeclaration?: Node, flags?: TypeFormatFlags): string; symbolToString(symbol: Symbol, enclosingDeclaration?: Node, meaning?: SymbolFlags): string; + /** + * @deprecated Use the createX factory functions or XToY typechecker methods and `createPrinter` or the `xToString` methods instead + * This will be removed in a future version. + */ getSymbolDisplayBuilder(): SymbolDisplayBuilder; getFullyQualifiedName(symbol: Symbol): string; getAugmentedPropertiesOfType(type: Type): Symbol[]; @@ -2866,6 +2874,8 @@ declare namespace ts { function getJSDocReturnType(node: Node): TypeNode | undefined; /** Get all JSDoc tags related to a node, including those on parent nodes. */ function getJSDocTags(node: Node): ReadonlyArray | undefined; + /** Gets all JSDoc tags of a specified kind, or undefined if not present. */ + function getAllJSDocTagsOfKind(node: Node, kind: SyntaxKind): ReadonlyArray | undefined; } declare namespace ts { function isNumericLiteral(node: Node): node is NumericLiteral; @@ -3058,6 +3068,8 @@ declare namespace ts { function isCaseOrDefaultClause(node: Node): node is CaseOrDefaultClause; /** True if node is of a kind that may contain comment text. */ function isJSDocCommentContainingNode(node: Node): boolean; + function isSetAccessor(node: Node): node is SetAccessorDeclaration; + function isGetAccessor(node: Node): node is GetAccessorDeclaration; } declare namespace ts { interface ErrorCallback { @@ -7104,7 +7116,7 @@ declare namespace ts.server { getScriptKind(fileName: string): ScriptKind; getScriptVersion(filename: string): string; getScriptSnapshot(filename: string): IScriptSnapshot; - getCancellationToken(): ThrottledCancellationToken; + getCancellationToken(): HostCancellationToken; getCurrentDirectory(): string; getDefaultLibFileName(): string; useCaseSensitiveFileNames(): boolean; @@ -7131,11 +7143,11 @@ declare namespace ts.server { enableLanguageService(): void; disableLanguageService(): void; getProjectName(): string; - abstract getProjectRootPath(): string | undefined; abstract getTypeAcquisition(): TypeAcquisition; getExternalFiles(): SortedReadonlyArray; getSourceFile(path: Path): SourceFile; close(): void; + private detachScriptInfoIfNotRoot(uncheckedFilename); isClosed(): boolean; hasRoots(): boolean; getRootFiles(): NormalizedPath[]; @@ -7176,15 +7188,15 @@ declare namespace ts.server { * the file and its imports/references are put into an InferredProject. */ class InferredProject extends Project { - readonly projectRootPath: string | undefined; private static readonly newName; private _isJsInferredProject; toggleJsInferredProject(isJsInferredProject: boolean): void; setCompilerOptions(options?: CompilerOptions): void; + /** this is canonical project root path */ + readonly projectRootPath: string | undefined; addRoot(info: ScriptInfo): void; removeRoot(info: ScriptInfo): void; isProjectWithSingleRoot(): boolean; - getProjectRootPath(): string; close(): void; getTypeAcquisition(): TypeAcquisition; } @@ -7211,7 +7223,6 @@ declare namespace ts.server { enablePlugins(): void; private enablePlugin(pluginConfigEntry, searchPaths); private enableProxy(pluginModuleFactory, configEntry); - getProjectRootPath(): string; /** * Get the errors that dont have any file name associated */ @@ -7237,11 +7248,9 @@ declare namespace ts.server { class ExternalProject extends Project { externalProjectName: string; compileOnSaveEnabled: boolean; - private readonly projectFilePath; excludedFiles: ReadonlyArray; private typeAcquisition; getExcludedFiles(): ReadonlyArray; - getProjectRootPath(): string; getTypeAcquisition(): TypeAcquisition; setTypeAcquisition(newTypeAcquisition: TypeAcquisition): void; } @@ -7517,9 +7526,10 @@ declare namespace ts.server { private createConfiguredProject(configFileName); private updateNonInferredProjectFiles(project, files, propertyReader); private updateNonInferredProject(project, newUncheckedFiles, propertyReader, newOptions, newTypeAcquisition, compileOnSave); + private sendConfigFileDiagEvent(project, triggerFile); private getOrCreateInferredProjectForProjectRootPathIfEnabled(info, projectRootPath); private getOrCreateSingleInferredProjectIfEnabled(); - private createInferredProject(rootDirectoryForResolution, isSingleInferredProject?, projectRootPath?); + private createInferredProject(currentDirectory, isSingleInferredProject?, projectRootPath?); getScriptInfo(uncheckedFileName: string): ScriptInfo; private watchClosedScriptInfo(info); private stopWatchingScriptInfo(info); diff --git a/tests/baselines/reference/api/typescript.d.ts b/tests/baselines/reference/api/typescript.d.ts index d41db2eb413..14fae7d0d77 100644 --- a/tests/baselines/reference/api/typescript.d.ts +++ b/tests/baselines/reference/api/typescript.d.ts @@ -1442,6 +1442,10 @@ declare namespace ts { interface JSDocUnknownTag extends JSDocTag { kind: SyntaxKind.JSDocTag; } + /** + * Note that `@extends` is a synonym of `@augments`. + * Both tags are represented by this interface. + */ interface JSDocAugmentsTag extends JSDocTag { kind: SyntaxKind.JSDocAugmentsTag; class: ExpressionWithTypeArguments & { @@ -1473,7 +1477,7 @@ declare namespace ts { interface JSDocPropertyLikeTag extends JSDocTag, Declaration { parent: JSDoc; name: EntityName; - typeExpression: JSDocTypeExpression; + typeExpression?: JSDocTypeExpression; /** Whether the property name came before the type -- non-standard for JSDoc, but Typescript-like */ isNameFirst: boolean; isBracketed: boolean; @@ -1727,6 +1731,10 @@ declare namespace ts { signatureToString(signature: Signature, enclosingDeclaration?: Node, flags?: TypeFormatFlags, kind?: SignatureKind): string; typeToString(type: Type, enclosingDeclaration?: Node, flags?: TypeFormatFlags): string; symbolToString(symbol: Symbol, enclosingDeclaration?: Node, meaning?: SymbolFlags): string; + /** + * @deprecated Use the createX factory functions or XToY typechecker methods and `createPrinter` or the `xToString` methods instead + * This will be removed in a future version. + */ getSymbolDisplayBuilder(): SymbolDisplayBuilder; getFullyQualifiedName(symbol: Symbol): string; getAugmentedPropertiesOfType(type: Type): Symbol[]; @@ -2921,6 +2929,8 @@ declare namespace ts { function getJSDocReturnType(node: Node): TypeNode | undefined; /** Get all JSDoc tags related to a node, including those on parent nodes. */ function getJSDocTags(node: Node): ReadonlyArray | undefined; + /** Gets all JSDoc tags of a specified kind, or undefined if not present. */ + function getAllJSDocTagsOfKind(node: Node, kind: SyntaxKind): ReadonlyArray | undefined; } declare namespace ts { function isNumericLiteral(node: Node): node is NumericLiteral; @@ -3113,6 +3123,8 @@ declare namespace ts { function isCaseOrDefaultClause(node: Node): node is CaseOrDefaultClause; /** True if node is of a kind that may contain comment text. */ function isJSDocCommentContainingNode(node: Node): boolean; + function isSetAccessor(node: Node): node is SetAccessorDeclaration; + function isGetAccessor(node: Node): node is GetAccessorDeclaration; } declare namespace ts { function createNode(kind: SyntaxKind, pos?: number, end?: number): Node; diff --git a/tests/baselines/reference/arrayFind.js b/tests/baselines/reference/arrayFind.js new file mode 100644 index 00000000000..1926c3a8dcc --- /dev/null +++ b/tests/baselines/reference/arrayFind.js @@ -0,0 +1,22 @@ +//// [arrayFind.ts] +// test fix for #18112, type guard predicates should narrow returned element +function isNumber(x: any): x is number { + return typeof x === "number"; +} + +const arrayOfStringsNumbersAndBooleans = ["string", false, 0, "strung", 1, true]; +const foundNumber: number | undefined = arrayOfStringsNumbersAndBooleans.find(isNumber); + +const readonlyArrayOfStringsNumbersAndBooleans = arrayOfStringsNumbersAndBooleans as ReadonlyArray; +const readonlyFoundNumber: number | undefined = readonlyArrayOfStringsNumbersAndBooleans.find(isNumber); + + +//// [arrayFind.js] +// test fix for #18112, type guard predicates should narrow returned element +function isNumber(x) { + return typeof x === "number"; +} +var arrayOfStringsNumbersAndBooleans = ["string", false, 0, "strung", 1, true]; +var foundNumber = arrayOfStringsNumbersAndBooleans.find(isNumber); +var readonlyArrayOfStringsNumbersAndBooleans = arrayOfStringsNumbersAndBooleans; +var readonlyFoundNumber = readonlyArrayOfStringsNumbersAndBooleans.find(isNumber); diff --git a/tests/baselines/reference/arrayFind.symbols b/tests/baselines/reference/arrayFind.symbols new file mode 100644 index 00000000000..163d5d818ba --- /dev/null +++ b/tests/baselines/reference/arrayFind.symbols @@ -0,0 +1,33 @@ +=== tests/cases/compiler/arrayFind.ts === +// test fix for #18112, type guard predicates should narrow returned element +function isNumber(x: any): x is number { +>isNumber : Symbol(isNumber, Decl(arrayFind.ts, 0, 0)) +>x : Symbol(x, Decl(arrayFind.ts, 1, 18)) +>x : Symbol(x, Decl(arrayFind.ts, 1, 18)) + + return typeof x === "number"; +>x : Symbol(x, Decl(arrayFind.ts, 1, 18)) +} + +const arrayOfStringsNumbersAndBooleans = ["string", false, 0, "strung", 1, true]; +>arrayOfStringsNumbersAndBooleans : Symbol(arrayOfStringsNumbersAndBooleans, Decl(arrayFind.ts, 5, 5)) + +const foundNumber: number | undefined = arrayOfStringsNumbersAndBooleans.find(isNumber); +>foundNumber : Symbol(foundNumber, Decl(arrayFind.ts, 6, 5)) +>arrayOfStringsNumbersAndBooleans.find : Symbol(Array.find, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>arrayOfStringsNumbersAndBooleans : Symbol(arrayOfStringsNumbersAndBooleans, Decl(arrayFind.ts, 5, 5)) +>find : Symbol(Array.find, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>isNumber : Symbol(isNumber, Decl(arrayFind.ts, 0, 0)) + +const readonlyArrayOfStringsNumbersAndBooleans = arrayOfStringsNumbersAndBooleans as ReadonlyArray; +>readonlyArrayOfStringsNumbersAndBooleans : Symbol(readonlyArrayOfStringsNumbersAndBooleans, Decl(arrayFind.ts, 8, 5)) +>arrayOfStringsNumbersAndBooleans : Symbol(arrayOfStringsNumbersAndBooleans, Decl(arrayFind.ts, 5, 5)) +>ReadonlyArray : Symbol(ReadonlyArray, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) + +const readonlyFoundNumber: number | undefined = readonlyArrayOfStringsNumbersAndBooleans.find(isNumber); +>readonlyFoundNumber : Symbol(readonlyFoundNumber, Decl(arrayFind.ts, 9, 5)) +>readonlyArrayOfStringsNumbersAndBooleans.find : Symbol(ReadonlyArray.find, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>readonlyArrayOfStringsNumbersAndBooleans : Symbol(readonlyArrayOfStringsNumbersAndBooleans, Decl(arrayFind.ts, 8, 5)) +>find : Symbol(ReadonlyArray.find, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>isNumber : Symbol(isNumber, Decl(arrayFind.ts, 0, 0)) + diff --git a/tests/baselines/reference/arrayFind.types b/tests/baselines/reference/arrayFind.types new file mode 100644 index 00000000000..5c0769cb606 --- /dev/null +++ b/tests/baselines/reference/arrayFind.types @@ -0,0 +1,46 @@ +=== tests/cases/compiler/arrayFind.ts === +// test fix for #18112, type guard predicates should narrow returned element +function isNumber(x: any): x is number { +>isNumber : (x: any) => x is number +>x : any +>x : any + + return typeof x === "number"; +>typeof x === "number" : boolean +>typeof x : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>x : any +>"number" : "number" +} + +const arrayOfStringsNumbersAndBooleans = ["string", false, 0, "strung", 1, true]; +>arrayOfStringsNumbersAndBooleans : (string | number | boolean)[] +>["string", false, 0, "strung", 1, true] : (string | number | boolean)[] +>"string" : "string" +>false : false +>0 : 0 +>"strung" : "strung" +>1 : 1 +>true : true + +const foundNumber: number | undefined = arrayOfStringsNumbersAndBooleans.find(isNumber); +>foundNumber : number +>arrayOfStringsNumbersAndBooleans.find(isNumber) : number +>arrayOfStringsNumbersAndBooleans.find : { (predicate: (this: void, value: string | number | boolean, index: number, obj: (string | number | boolean)[]) => value is S, thisArg?: any): S; (predicate: (value: string | number | boolean, index: number, obj: (string | number | boolean)[]) => boolean, thisArg?: any): string | number | boolean; } +>arrayOfStringsNumbersAndBooleans : (string | number | boolean)[] +>find : { (predicate: (this: void, value: string | number | boolean, index: number, obj: (string | number | boolean)[]) => value is S, thisArg?: any): S; (predicate: (value: string | number | boolean, index: number, obj: (string | number | boolean)[]) => boolean, thisArg?: any): string | number | boolean; } +>isNumber : (x: any) => x is number + +const readonlyArrayOfStringsNumbersAndBooleans = arrayOfStringsNumbersAndBooleans as ReadonlyArray; +>readonlyArrayOfStringsNumbersAndBooleans : ReadonlyArray +>arrayOfStringsNumbersAndBooleans as ReadonlyArray : ReadonlyArray +>arrayOfStringsNumbersAndBooleans : (string | number | boolean)[] +>ReadonlyArray : ReadonlyArray + +const readonlyFoundNumber: number | undefined = readonlyArrayOfStringsNumbersAndBooleans.find(isNumber); +>readonlyFoundNumber : number +>readonlyArrayOfStringsNumbersAndBooleans.find(isNumber) : number +>readonlyArrayOfStringsNumbersAndBooleans.find : { (predicate: (this: void, value: string | number | boolean, index: number, obj: ReadonlyArray) => value is S, thisArg?: any): S; (predicate: (value: string | number | boolean, index: number, obj: ReadonlyArray) => boolean, thisArg?: any): string | number | boolean; } +>readonlyArrayOfStringsNumbersAndBooleans : ReadonlyArray +>find : { (predicate: (this: void, value: string | number | boolean, index: number, obj: ReadonlyArray) => value is S, thisArg?: any): S; (predicate: (value: string | number | boolean, index: number, obj: ReadonlyArray) => boolean, thisArg?: any): string | number | boolean; } +>isNumber : (x: any) => x is number + diff --git a/tests/baselines/reference/asyncImportNestedYield.js b/tests/baselines/reference/asyncImportNestedYield.js new file mode 100644 index 00000000000..0dd76a13ace --- /dev/null +++ b/tests/baselines/reference/asyncImportNestedYield.js @@ -0,0 +1,58 @@ +//// [asyncImportNestedYield.ts] +async function* foo() { + import((await import(yield "foo")).default); +} + +//// [asyncImportNestedYield.js] +var __generator = (this && this.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) try { + if (f = 1, y && (t = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [0, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +}; +var __await = (this && this.__await) || function (v) { return this instanceof __await ? (this.v = v, this) : new __await(v); } +var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var g = generator.apply(thisArg, _arguments || []), i, q = []; + return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i; + function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; } + function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } + function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } + function fulfill(value) { resume("next", value); } + function reject(value) { resume("throw", value); } + function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); } +}; +function foo() { + return __asyncGenerator(this, arguments, function foo_1() { + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, "foo"]; + case 1: return [4 /*yield*/, __await.apply(void 0, [Promise.resolve().then(function () { return require(_a.sent()); })])]; + case 2: + Promise.resolve().then(function () { return require((_a.sent())["default"]); }); + return [2 /*return*/]; + } + }); + }); +} diff --git a/tests/baselines/reference/asyncImportNestedYield.symbols b/tests/baselines/reference/asyncImportNestedYield.symbols new file mode 100644 index 00000000000..01107ba5bf6 --- /dev/null +++ b/tests/baselines/reference/asyncImportNestedYield.symbols @@ -0,0 +1,6 @@ +=== tests/cases/compiler/asyncImportNestedYield.ts === +async function* foo() { +>foo : Symbol(foo, Decl(asyncImportNestedYield.ts, 0, 0)) + + import((await import(yield "foo")).default); +} diff --git a/tests/baselines/reference/asyncImportNestedYield.types b/tests/baselines/reference/asyncImportNestedYield.types new file mode 100644 index 00000000000..872e3141500 --- /dev/null +++ b/tests/baselines/reference/asyncImportNestedYield.types @@ -0,0 +1,14 @@ +=== tests/cases/compiler/asyncImportNestedYield.ts === +async function* foo() { +>foo : () => AsyncIterableIterator<"foo"> + + import((await import(yield "foo")).default); +>import((await import(yield "foo")).default) : Promise +>(await import(yield "foo")).default : any +>(await import(yield "foo")) : any +>await import(yield "foo") : any +>import(yield "foo") : Promise +>yield "foo" : any +>"foo" : "foo" +>default : any +} diff --git a/tests/baselines/reference/castFunctionExpressionShouldBeParenthesized.js b/tests/baselines/reference/castFunctionExpressionShouldBeParenthesized.js new file mode 100644 index 00000000000..e96b93bae85 --- /dev/null +++ b/tests/baselines/reference/castFunctionExpressionShouldBeParenthesized.js @@ -0,0 +1,5 @@ +//// [castFunctionExpressionShouldBeParenthesized.ts] +(function a() { } as any)().foo() + +//// [castFunctionExpressionShouldBeParenthesized.js] +(function a() { }().foo()); diff --git a/tests/baselines/reference/castFunctionExpressionShouldBeParenthesized.symbols b/tests/baselines/reference/castFunctionExpressionShouldBeParenthesized.symbols new file mode 100644 index 00000000000..975a9480c3c --- /dev/null +++ b/tests/baselines/reference/castFunctionExpressionShouldBeParenthesized.symbols @@ -0,0 +1,4 @@ +=== tests/cases/compiler/castFunctionExpressionShouldBeParenthesized.ts === +(function a() { } as any)().foo() +>a : Symbol(a, Decl(castFunctionExpressionShouldBeParenthesized.ts, 0, 1)) + diff --git a/tests/baselines/reference/castFunctionExpressionShouldBeParenthesized.types b/tests/baselines/reference/castFunctionExpressionShouldBeParenthesized.types new file mode 100644 index 00000000000..337c5163ff2 --- /dev/null +++ b/tests/baselines/reference/castFunctionExpressionShouldBeParenthesized.types @@ -0,0 +1,11 @@ +=== tests/cases/compiler/castFunctionExpressionShouldBeParenthesized.ts === +(function a() { } as any)().foo() +>(function a() { } as any)().foo() : any +>(function a() { } as any)().foo : any +>(function a() { } as any)() : any +>(function a() { } as any) : any +>function a() { } as any : any +>function a() { } : () => void +>a : () => void +>foo : any + diff --git a/tests/baselines/reference/classExtendingNull.js b/tests/baselines/reference/classExtendingNull.js index 6c6ae8a0167..f405f6da84c 100644 --- a/tests/baselines/reference/classExtendingNull.js +++ b/tests/baselines/reference/classExtendingNull.js @@ -1,7 +1,8 @@ //// [classExtendingNull.ts] class C1 extends null { } class C2 extends (null) { } - +class C3 extends null { x = 1; } +class C4 extends (null) { x = 1; } //// [classExtendingNull.js] var __extends = (this && this.__extends) || (function () { @@ -26,3 +27,17 @@ var C2 = /** @class */ (function (_super) { } return C2; }((null))); +var C3 = /** @class */ (function (_super) { + __extends(C3, _super); + function C3() { + this.x = 1; + } + return C3; +}(null)); +var C4 = /** @class */ (function (_super) { + __extends(C4, _super); + function C4() { + this.x = 1; + } + return C4; +}((null))); diff --git a/tests/baselines/reference/classExtendingNull.symbols b/tests/baselines/reference/classExtendingNull.symbols index 37a6162f414..eff1f18c0ca 100644 --- a/tests/baselines/reference/classExtendingNull.symbols +++ b/tests/baselines/reference/classExtendingNull.symbols @@ -5,3 +5,11 @@ class C1 extends null { } class C2 extends (null) { } >C2 : Symbol(C2, Decl(classExtendingNull.ts, 0, 25)) +class C3 extends null { x = 1; } +>C3 : Symbol(C3, Decl(classExtendingNull.ts, 1, 27)) +>x : Symbol(C3.x, Decl(classExtendingNull.ts, 2, 23)) + +class C4 extends (null) { x = 1; } +>C4 : Symbol(C4, Decl(classExtendingNull.ts, 2, 32)) +>x : Symbol(C4.x, Decl(classExtendingNull.ts, 3, 25)) + diff --git a/tests/baselines/reference/classExtendingNull.types b/tests/baselines/reference/classExtendingNull.types index 3c572a3406c..e98f8daba06 100644 --- a/tests/baselines/reference/classExtendingNull.types +++ b/tests/baselines/reference/classExtendingNull.types @@ -8,3 +8,16 @@ class C2 extends (null) { } >(null) : null >null : null +class C3 extends null { x = 1; } +>C3 : C3 +>null : null +>x : number +>1 : 1 + +class C4 extends (null) { x = 1; } +>C4 : C4 +>(null) : null +>null : null +>x : number +>1 : 1 + diff --git a/tests/baselines/reference/complexRecursiveCollections.errors.txt b/tests/baselines/reference/complexRecursiveCollections.errors.txt index 495fca2e651..aaed4f26360 100644 --- a/tests/baselines/reference/complexRecursiveCollections.errors.txt +++ b/tests/baselines/reference/complexRecursiveCollections.errors.txt @@ -1,18 +1,18 @@ -tests/cases/compiler/immutable.d.ts(341,22): error TS2430: Interface 'Keyed' incorrectly extends interface 'Collection'. +tests/cases/compiler/immutable.ts(341,22): error TS2430: Interface 'Keyed' incorrectly extends interface 'Collection'. Types of property 'toSeq' are incompatible. Type '() => Keyed' is not assignable to type '() => this'. Type 'Keyed' is not assignable to type 'this'. -tests/cases/compiler/immutable.d.ts(359,22): error TS2430: Interface 'Indexed' incorrectly extends interface 'Collection'. +tests/cases/compiler/immutable.ts(359,22): error TS2430: Interface 'Indexed' incorrectly extends interface 'Collection'. Types of property 'toSeq' are incompatible. Type '() => Indexed' is not assignable to type '() => this'. Type 'Indexed' is not assignable to type 'this'. -tests/cases/compiler/immutable.d.ts(391,22): error TS2430: Interface 'Set' incorrectly extends interface 'Collection'. +tests/cases/compiler/immutable.ts(391,22): error TS2430: Interface 'Set' incorrectly extends interface 'Collection'. Types of property 'toSeq' are incompatible. Type '() => Set' is not assignable to type '() => this'. Type 'Set' is not assignable to type 'this'. -==== tests/cases/compiler/complex.d.ts (0 errors) ==== +==== tests/cases/compiler/complex.ts (0 errors) ==== interface Ara { t: T } interface Collection { map(mapper: (value: V, key: K, iter: this) => M): Collection; @@ -33,7 +33,7 @@ tests/cases/compiler/immutable.d.ts(391,22): error TS2430: Interface 'Set' in flatMap(mapper: (value: T, key: void, iter: this) => Ara, context?: any): N2; toSeq(): N2; } -==== tests/cases/compiler/immutable.d.ts (3 errors) ==== +==== tests/cases/compiler/immutable.ts (3 errors) ==== // Test that complex recursive collections can pass the `extends` assignability check without // running out of memory. This bug was exposed in Typescript 2.4 when more generic signatures // started being checked. diff --git a/tests/baselines/reference/complexRecursiveCollections.js b/tests/baselines/reference/complexRecursiveCollections.js new file mode 100644 index 00000000000..21b371b7d3b --- /dev/null +++ b/tests/baselines/reference/complexRecursiveCollections.js @@ -0,0 +1,538 @@ +//// [tests/cases/compiler/complexRecursiveCollections.ts] //// + +//// [complex.ts] +interface Ara { t: T } +interface Collection { + map(mapper: (value: V, key: K, iter: this) => M): Collection; + flatMap(mapper: (value: V, key: K, iter: this) => Ara, context?: any): Collection; + // these seem necessary to push it over the top for memory usage + reduce(reducer: (reduction: R, value: V, key: K, iter: this) => R, initialReduction: R, context?: any): R; + reduce(reducer: (reduction: V | R, value: V, key: K, iter: this) => R): R; + toSeq(): Seq; +} +interface Seq extends Collection { +} +interface N1 extends Collection { + map(mapper: (value: T, key: void, iter: this) => M): N1; + flatMap(mapper: (value: T, key: void, iter: this) => Ara, context?: any): N1; +} +interface N2 extends N1 { + map(mapper: (value: T, key: void, iter: this) => M): N2; + flatMap(mapper: (value: T, key: void, iter: this) => Ara, context?: any): N2; + toSeq(): N2; +} +//// [immutable.ts] +// Test that complex recursive collections can pass the `extends` assignability check without +// running out of memory. This bug was exposed in Typescript 2.4 when more generic signatures +// started being checked. +declare module Immutable { + export function fromJS(jsValue: any, reviver?: (key: string | number, sequence: Collection.Keyed | Collection.Indexed, path?: Array) => any): any; + export function is(first: any, second: any): boolean; + export function hash(value: any): number; + export function isImmutable(maybeImmutable: any): maybeImmutable is Collection; + export function isCollection(maybeCollection: any): maybeCollection is Collection; + export function isKeyed(maybeKeyed: any): maybeKeyed is Collection.Keyed; + export function isIndexed(maybeIndexed: any): maybeIndexed is Collection.Indexed; + export function isAssociative(maybeAssociative: any): maybeAssociative is Collection.Keyed | Collection.Indexed; + export function isOrdered(maybeOrdered: any): boolean; + export function isValueObject(maybeValue: any): maybeValue is ValueObject; + export interface ValueObject { + equals(other: any): boolean; + hashCode(): number; + } + export module List { + function isList(maybeList: any): maybeList is List; + function of(...values: Array): List; + } + export function List(): List; + export function List(): List; + export function List(collection: Iterable): List; + export interface List extends Collection.Indexed { + // Persistent changes + set(index: number, value: T): List; + delete(index: number): List; + remove(index: number): List; + insert(index: number, value: T): List; + clear(): List; + push(...values: Array): List; + pop(): List; + unshift(...values: Array): List; + shift(): List; + update(index: number, notSetValue: T, updater: (value: T) => T): this; + update(index: number, updater: (value: T) => T): this; + update(updater: (value: this) => R): R; + merge(...collections: Array | Array>): this; + mergeWith(merger: (oldVal: T, newVal: T, key: number) => T, ...collections: Array | Array>): this; + mergeDeep(...collections: Array | Array>): this; + mergeDeepWith(merger: (oldVal: T, newVal: T, key: number) => T, ...collections: Array | Array>): this; + setSize(size: number): List; + // Deep persistent changes + setIn(keyPath: Iterable, value: any): this; + deleteIn(keyPath: Iterable): this; + removeIn(keyPath: Iterable): this; + updateIn(keyPath: Iterable, notSetValue: any, updater: (value: any) => any): this; + updateIn(keyPath: Iterable, updater: (value: any) => any): this; + mergeIn(keyPath: Iterable, ...collections: Array): this; + mergeDeepIn(keyPath: Iterable, ...collections: Array): this; + // Transient changes + withMutations(mutator: (mutable: this) => any): this; + asMutable(): this; + asImmutable(): this; + // Sequence algorithms + concat(...valuesOrCollections: Array | C>): List; + map(mapper: (value: T, key: number, iter: this) => M, context?: any): List; + flatMap(mapper: (value: T, key: number, iter: this) => Iterable, context?: any): List; + filter(predicate: (value: T, index: number, iter: this) => value is F, context?: any): List; + filter(predicate: (value: T, index: number, iter: this) => any, context?: any): this; + } + export module Map { + function isMap(maybeMap: any): maybeMap is Map; + function of(...keyValues: Array): Map; + } + export function Map(collection: Iterable<[K, V]>): Map; + export function Map(collection: Iterable>): Map; + export function Map(obj: {[key: string]: V}): Map; + export function Map(): Map; + export function Map(): Map; + export interface Map extends Collection.Keyed { + // Persistent changes + set(key: K, value: V): this; + delete(key: K): this; + remove(key: K): this; + deleteAll(keys: Iterable): this; + removeAll(keys: Iterable): this; + clear(): this; + update(key: K, notSetValue: V, updater: (value: V) => V): this; + update(key: K, updater: (value: V) => V): this; + update(updater: (value: this) => R): R; + merge(...collections: Array | {[key: string]: V}>): this; + mergeWith(merger: (oldVal: V, newVal: V, key: K) => V, ...collections: Array | {[key: string]: V}>): this; + mergeDeep(...collections: Array | {[key: string]: V}>): this; + mergeDeepWith(merger: (oldVal: V, newVal: V, key: K) => V, ...collections: Array | {[key: string]: V}>): this; + // Deep persistent changes + setIn(keyPath: Iterable, value: any): this; + deleteIn(keyPath: Iterable): this; + removeIn(keyPath: Iterable): this; + updateIn(keyPath: Iterable, notSetValue: any, updater: (value: any) => any): this; + updateIn(keyPath: Iterable, updater: (value: any) => any): this; + mergeIn(keyPath: Iterable, ...collections: Array): this; + mergeDeepIn(keyPath: Iterable, ...collections: Array): this; + // Transient changes + withMutations(mutator: (mutable: this) => any): this; + asMutable(): this; + asImmutable(): this; + // Sequence algorithms + concat(...collections: Array>): Map; + concat(...collections: Array<{[key: string]: C}>): Map; + map(mapper: (value: V, key: K, iter: this) => M, context?: any): Map; + mapKeys(mapper: (key: K, value: V, iter: this) => M, context?: any): Map; + mapEntries(mapper: (entry: [K, V], index: number, iter: this) => [KM, VM], context?: any): Map; + flatMap(mapper: (value: V, key: K, iter: this) => Iterable, context?: any): Map; + filter(predicate: (value: V, key: K, iter: this) => value is F, context?: any): Map; + filter(predicate: (value: V, key: K, iter: this) => any, context?: any): this; + } + export module OrderedMap { + function isOrderedMap(maybeOrderedMap: any): maybeOrderedMap is OrderedMap; + } + export function OrderedMap(collection: Iterable<[K, V]>): OrderedMap; + export function OrderedMap(collection: Iterable>): OrderedMap; + export function OrderedMap(obj: {[key: string]: V}): OrderedMap; + export function OrderedMap(): OrderedMap; + export function OrderedMap(): OrderedMap; + export interface OrderedMap extends Map { + // Sequence algorithms + concat(...collections: Array>): OrderedMap; + concat(...collections: Array<{[key: string]: C}>): OrderedMap; + map(mapper: (value: V, key: K, iter: this) => M, context?: any): OrderedMap; + mapKeys(mapper: (key: K, value: V, iter: this) => M, context?: any): OrderedMap; + mapEntries(mapper: (entry: [K, V], index: number, iter: this) => [KM, VM], context?: any): OrderedMap; + flatMap(mapper: (value: V, key: K, iter: this) => Iterable, context?: any): OrderedMap; + filter(predicate: (value: V, key: K, iter: this) => value is F, context?: any): OrderedMap; + filter(predicate: (value: V, key: K, iter: this) => any, context?: any): this; + } + export module Set { + function isSet(maybeSet: any): maybeSet is Set; + function of(...values: Array): Set; + function fromKeys(iter: Collection): Set; + function fromKeys(obj: {[key: string]: any}): Set; + function intersect(sets: Iterable>): Set; + function union(sets: Iterable>): Set; + } + export function Set(): Set; + export function Set(): Set; + export function Set(collection: Iterable): Set; + export interface Set extends Collection.Set { + // Persistent changes + add(value: T): this; + delete(value: T): this; + remove(value: T): this; + clear(): this; + union(...collections: Array | Array>): this; + merge(...collections: Array | Array>): this; + intersect(...collections: Array | Array>): this; + subtract(...collections: Array | Array>): this; + // Transient changes + withMutations(mutator: (mutable: this) => any): this; + asMutable(): this; + asImmutable(): this; + // Sequence algorithms + concat(...valuesOrCollections: Array | C>): Set; + map(mapper: (value: T, key: never, iter: this) => M, context?: any): Set; + flatMap(mapper: (value: T, key: never, iter: this) => Iterable, context?: any): Set; + filter(predicate: (value: T, key: never, iter: this) => value is F, context?: any): Set; + filter(predicate: (value: T, key: never, iter: this) => any, context?: any): this; + } + export module OrderedSet { + function isOrderedSet(maybeOrderedSet: any): boolean; + function of(...values: Array): OrderedSet; + function fromKeys(iter: Collection): OrderedSet; + function fromKeys(obj: {[key: string]: any}): OrderedSet; + } + export function OrderedSet(): OrderedSet; + export function OrderedSet(): OrderedSet; + export function OrderedSet(collection: Iterable): OrderedSet; + export interface OrderedSet extends Set { + // Sequence algorithms + concat(...valuesOrCollections: Array | C>): OrderedSet; + map(mapper: (value: T, key: never, iter: this) => M, context?: any): OrderedSet; + flatMap(mapper: (value: T, key: never, iter: this) => Iterable, context?: any): OrderedSet; + filter(predicate: (value: T, key: never, iter: this) => value is F, context?: any): OrderedSet; + filter(predicate: (value: T, key: never, iter: this) => any, context?: any): this; + zip(...collections: Array>): OrderedSet; + zipWith(zipper: (value: T, otherValue: U) => Z, otherCollection: Collection): OrderedSet; + zipWith(zipper: (value: T, otherValue: U, thirdValue: V) => Z, otherCollection: Collection, thirdCollection: Collection): OrderedSet; + zipWith(zipper: (...any: Array) => Z, ...collections: Array>): OrderedSet; + } + export module Stack { + function isStack(maybeStack: any): maybeStack is Stack; + function of(...values: Array): Stack; + } + export function Stack(): Stack; + export function Stack(): Stack; + export function Stack(collection: Iterable): Stack; + export interface Stack extends Collection.Indexed { + // Reading values + peek(): T | undefined; + // Persistent changes + clear(): Stack; + unshift(...values: Array): Stack; + unshiftAll(iter: Iterable): Stack; + shift(): Stack; + push(...values: Array): Stack; + pushAll(iter: Iterable): Stack; + pop(): Stack; + // Transient changes + withMutations(mutator: (mutable: this) => any): this; + asMutable(): this; + asImmutable(): this; + // Sequence algorithms + concat(...valuesOrCollections: Array | C>): Stack; + map(mapper: (value: T, key: number, iter: this) => M, context?: any): Stack; + flatMap(mapper: (value: T, key: number, iter: this) => Iterable, context?: any): Stack; + filter(predicate: (value: T, index: number, iter: this) => value is F, context?: any): Set; + filter(predicate: (value: T, index: number, iter: this) => any, context?: any): this; + } + export function Range(start?: number, end?: number, step?: number): Seq.Indexed; + export function Repeat(value: T, times?: number): Seq.Indexed; + export module Record { + export function isRecord(maybeRecord: any): maybeRecord is Record.Instance; + export function getDescriptiveName(record: Instance): string; + export interface Class { + (values?: Partial | Iterable<[string, any]>): Instance & Readonly; + new (values?: Partial | Iterable<[string, any]>): Instance & Readonly; + } + export interface Instance { + readonly size: number; + // Reading values + has(key: string): boolean; + get(key: K): T[K]; + // Reading deep values + hasIn(keyPath: Iterable): boolean; + getIn(keyPath: Iterable): any; + // Value equality + equals(other: any): boolean; + hashCode(): number; + // Persistent changes + set(key: K, value: T[K]): this; + update(key: K, updater: (value: T[K]) => T[K]): this; + merge(...collections: Array | Iterable<[string, any]>>): this; + mergeDeep(...collections: Array | Iterable<[string, any]>>): this; + mergeWith(merger: (oldVal: any, newVal: any, key: keyof T) => any, ...collections: Array | Iterable<[string, any]>>): this; + mergeDeepWith(merger: (oldVal: any, newVal: any, key: any) => any, ...collections: Array | Iterable<[string, any]>>): this; + delete(key: K): this; + remove(key: K): this; + clear(): this; + // Deep persistent changes + setIn(keyPath: Iterable, value: any): this; + updateIn(keyPath: Iterable, updater: (value: any) => any): this; + mergeIn(keyPath: Iterable, ...collections: Array): this; + mergeDeepIn(keyPath: Iterable, ...collections: Array): this; + deleteIn(keyPath: Iterable): this; + removeIn(keyPath: Iterable): this; + // Conversion to JavaScript types + toJS(): { [K in keyof T]: any }; + toJSON(): T; + toObject(): T; + // Transient changes + withMutations(mutator: (mutable: this) => any): this; + asMutable(): this; + asImmutable(): this; + // Sequence algorithms + toSeq(): Seq.Keyed; + [Symbol.iterator](): IterableIterator<[keyof T, T[keyof T]]>; + } + } + export function Record(defaultValues: T, name?: string): Record.Class; + export module Seq { + function isSeq(maybeSeq: any): maybeSeq is Seq.Indexed | Seq.Keyed; + function of(...values: Array): Seq.Indexed; + export module Keyed {} + export function Keyed(collection: Iterable<[K, V]>): Seq.Keyed; + export function Keyed(obj: {[key: string]: V}): Seq.Keyed; + export function Keyed(): Seq.Keyed; + export function Keyed(): Seq.Keyed; + export interface Keyed extends Seq, Collection.Keyed { + toJS(): Object; + toJSON(): { [key: string]: V }; + toSeq(): this; + concat(...collections: Array>): Seq.Keyed; + concat(...collections: Array<{[key: string]: C}>): Seq.Keyed; + map(mapper: (value: V, key: K, iter: this) => M, context?: any): Seq.Keyed; + mapKeys(mapper: (key: K, value: V, iter: this) => M, context?: any): Seq.Keyed; + mapEntries(mapper: (entry: [K, V], index: number, iter: this) => [KM, VM], context?: any): Seq.Keyed; + flatMap(mapper: (value: V, key: K, iter: this) => Iterable, context?: any): Seq.Keyed; + filter(predicate: (value: V, key: K, iter: this) => value is F, context?: any): Seq.Keyed; + filter(predicate: (value: V, key: K, iter: this) => any, context?: any): this; + } + module Indexed { + function of(...values: Array): Seq.Indexed; + } + export function Indexed(): Seq.Indexed; + export function Indexed(): Seq.Indexed; + export function Indexed(collection: Iterable): Seq.Indexed; + export interface Indexed extends Seq, Collection.Indexed { + toJS(): Array; + toJSON(): Array; + toSeq(): this; + concat(...valuesOrCollections: Array | C>): Seq.Indexed; + map(mapper: (value: T, key: number, iter: this) => M, context?: any): Seq.Indexed; + flatMap(mapper: (value: T, key: number, iter: this) => Iterable, context?: any): Seq.Indexed; + filter(predicate: (value: T, index: number, iter: this) => value is F, context?: any): Seq.Indexed; + filter(predicate: (value: T, index: number, iter: this) => any, context?: any): this; + } + export module Set { + function of(...values: Array): Seq.Set; + } + export function Set(): Seq.Set; + export function Set(): Seq.Set; + export function Set(collection: Iterable): Seq.Set; + export interface Set extends Seq, Collection.Set { + toJS(): Array; + toJSON(): Array; + toSeq(): this; + concat(...valuesOrCollections: Array | C>): Seq.Set; + map(mapper: (value: T, key: never, iter: this) => M, context?: any): Seq.Set; + flatMap(mapper: (value: T, key: never, iter: this) => Iterable, context?: any): Seq.Set; + filter(predicate: (value: T, key: never, iter: this) => value is F, context?: any): Seq.Set; + filter(predicate: (value: T, key: never, iter: this) => any, context?: any): this; + } + } + export function Seq>(seq: S): S; + export function Seq(collection: Collection.Keyed): Seq.Keyed; + export function Seq(collection: Collection.Indexed): Seq.Indexed; + export function Seq(collection: Collection.Set): Seq.Set; + export function Seq(collection: Iterable): Seq.Indexed; + export function Seq(obj: {[key: string]: V}): Seq.Keyed; + export function Seq(): Seq; + export interface Seq extends Collection { + readonly size: number | undefined; + // Force evaluation + cacheResult(): this; + // Sequence algorithms + map(mapper: (value: V, key: K, iter: this) => M, context?: any): Seq; + flatMap(mapper: (value: V, key: K, iter: this) => Iterable, context?: any): Seq; + filter(predicate: (value: V, key: K, iter: this) => value is F, context?: any): Seq; + filter(predicate: (value: V, key: K, iter: this) => any, context?: any): this; + } + export module Collection { + function isKeyed(maybeKeyed: any): maybeKeyed is Collection.Keyed; + function isIndexed(maybeIndexed: any): maybeIndexed is Collection.Indexed; + function isAssociative(maybeAssociative: any): maybeAssociative is Collection.Keyed | Collection.Indexed; + function isOrdered(maybeOrdered: any): boolean; + export module Keyed {} + export function Keyed(collection: Iterable<[K, V]>): Collection.Keyed; + export function Keyed(obj: {[key: string]: V}): Collection.Keyed; + export interface Keyed extends Collection { + toJS(): Object; + toJSON(): { [key: string]: V }; + toSeq(): Seq.Keyed; + // Sequence functions + flip(): this; + concat(...collections: Array>): Collection.Keyed; + concat(...collections: Array<{[key: string]: C}>): Collection.Keyed; + map(mapper: (value: V, key: K, iter: this) => M, context?: any): Collection.Keyed; + mapKeys(mapper: (key: K, value: V, iter: this) => M, context?: any): Collection.Keyed; + mapEntries(mapper: (entry: [K, V], index: number, iter: this) => [KM, VM], context?: any): Collection.Keyed; + flatMap(mapper: (value: V, key: K, iter: this) => Iterable, context?: any): Collection.Keyed; + filter(predicate: (value: V, key: K, iter: this) => value is F, context?: any): Collection.Keyed; + filter(predicate: (value: V, key: K, iter: this) => any, context?: any): this; + [Symbol.iterator](): IterableIterator<[K, V]>; + } + export module Indexed {} + export function Indexed(collection: Iterable): Collection.Indexed; + export interface Indexed extends Collection { + toJS(): Array; + toJSON(): Array; + // Reading values + get(index: number, notSetValue: NSV): T | NSV; + get(index: number): T | undefined; + // Conversion to Seq + toSeq(): Seq.Indexed; + fromEntrySeq(): Seq.Keyed; + // Combination + interpose(separator: T): this; + interleave(...collections: Array>): this; + splice(index: number, removeNum: number, ...values: Array): this; + zip(...collections: Array>): Collection.Indexed; + zipWith(zipper: (value: T, otherValue: U) => Z, otherCollection: Collection): Collection.Indexed; + zipWith(zipper: (value: T, otherValue: U, thirdValue: V) => Z, otherCollection: Collection, thirdCollection: Collection): Collection.Indexed; + zipWith(zipper: (...any: Array) => Z, ...collections: Array>): Collection.Indexed; + // Search for value + indexOf(searchValue: T): number; + lastIndexOf(searchValue: T): number; + findIndex(predicate: (value: T, index: number, iter: this) => boolean, context?: any): number; + findLastIndex(predicate: (value: T, index: number, iter: this) => boolean, context?: any): number; + // Sequence algorithms + concat(...valuesOrCollections: Array | C>): Collection.Indexed; + map(mapper: (value: T, key: number, iter: this) => M, context?: any): Collection.Indexed; + flatMap(mapper: (value: T, key: number, iter: this) => Iterable, context?: any): Collection.Indexed; + filter(predicate: (value: T, index: number, iter: this) => value is F, context?: any): Collection.Indexed; + filter(predicate: (value: T, index: number, iter: this) => any, context?: any): this; + [Symbol.iterator](): IterableIterator; + } + export module Set {} + export function Set(collection: Iterable): Collection.Set; + export interface Set extends Collection { + toJS(): Array; + toJSON(): Array; + toSeq(): Seq.Set; + // Sequence algorithms + concat(...valuesOrCollections: Array | C>): Collection.Set; + map(mapper: (value: T, key: never, iter: this) => M, context?: any): Collection.Set; + flatMap(mapper: (value: T, key: never, iter: this) => Iterable, context?: any): Collection.Set; + filter(predicate: (value: T, key: never, iter: this) => value is F, context?: any): Collection.Set; + filter(predicate: (value: T, key: never, iter: this) => any, context?: any): this; + [Symbol.iterator](): IterableIterator; + } + } + export function Collection>(collection: I): I; + export function Collection(collection: Iterable): Collection.Indexed; + export function Collection(obj: {[key: string]: V}): Collection.Keyed; + export interface Collection extends ValueObject { + // Value equality + equals(other: any): boolean; + hashCode(): number; + // Reading values + get(key: K, notSetValue: NSV): V | NSV; + get(key: K): V | undefined; + has(key: K): boolean; + includes(value: V): boolean; + contains(value: V): boolean; + first(): V | undefined; + last(): V | undefined; + // Reading deep values + getIn(searchKeyPath: Iterable, notSetValue?: any): any; + hasIn(searchKeyPath: Iterable): boolean; + // Persistent changes + update(updater: (value: this) => R): R; + // Conversion to JavaScript types + toJS(): Array | { [key: string]: any }; + toJSON(): Array | { [key: string]: V }; + toArray(): Array; + toObject(): { [key: string]: V }; + // Conversion to Collections + toMap(): Map; + toOrderedMap(): OrderedMap; + toSet(): Set; + toOrderedSet(): OrderedSet; + toList(): List; + toStack(): Stack; + // Conversion to Seq + toSeq(): this; + toKeyedSeq(): Seq.Keyed; + toIndexedSeq(): Seq.Indexed; + toSetSeq(): Seq.Set; + // Iterators + keys(): IterableIterator; + values(): IterableIterator; + entries(): IterableIterator<[K, V]>; + // Collections (Seq) + keySeq(): Seq.Indexed; + valueSeq(): Seq.Indexed; + entrySeq(): Seq.Indexed<[K, V]>; + // Sequence algorithms + map(mapper: (value: V, key: K, iter: this) => M, context?: any): Collection; + filter(predicate: (value: V, key: K, iter: this) => value is F, context?: any): Collection; + filter(predicate: (value: V, key: K, iter: this) => any, context?: any): this; + filterNot(predicate: (value: V, key: K, iter: this) => boolean, context?: any): this; + reverse(): this; + sort(comparator?: (valueA: V, valueB: V) => number): this; + sortBy(comparatorValueMapper: (value: V, key: K, iter: this) => C, comparator?: (valueA: C, valueB: C) => number): this; + groupBy(grouper: (value: V, key: K, iter: this) => G, context?: any): /*Map*/Seq.Keyed>; + // Side effects + forEach(sideEffect: (value: V, key: K, iter: this) => any, context?: any): number; + // Creating subsets + slice(begin?: number, end?: number): this; + rest(): this; + butLast(): this; + skip(amount: number): this; + skipLast(amount: number): this; + skipWhile(predicate: (value: V, key: K, iter: this) => boolean, context?: any): this; + skipUntil(predicate: (value: V, key: K, iter: this) => boolean, context?: any): this; + take(amount: number): this; + takeLast(amount: number): this; + takeWhile(predicate: (value: V, key: K, iter: this) => boolean, context?: any): this; + takeUntil(predicate: (value: V, key: K, iter: this) => boolean, context?: any): this; + // Combination + concat(...valuesOrCollections: Array): Collection; + flatten(depth?: number): Collection; + flatten(shallow?: boolean): Collection; + flatMap(mapper: (value: V, key: K, iter: this) => Iterable, context?: any): Collection; + // Reducing a value + reduce(reducer: (reduction: R, value: V, key: K, iter: this) => R, initialReduction: R, context?: any): R; + reduce(reducer: (reduction: V | R, value: V, key: K, iter: this) => R): R; + reduceRight(reducer: (reduction: R, value: V, key: K, iter: this) => R, initialReduction: R, context?: any): R; + reduceRight(reducer: (reduction: V | R, value: V, key: K, iter: this) => R): R; + every(predicate: (value: V, key: K, iter: this) => boolean, context?: any): boolean; + some(predicate: (value: V, key: K, iter: this) => boolean, context?: any): boolean; + join(separator?: string): string; + isEmpty(): boolean; + count(): number; + count(predicate: (value: V, key: K, iter: this) => boolean, context?: any): number; + countBy(grouper: (value: V, key: K, iter: this) => G, context?: any): Map; + // Search for value + find(predicate: (value: V, key: K, iter: this) => boolean, context?: any, notSetValue?: V): V | undefined; + findLast(predicate: (value: V, key: K, iter: this) => boolean, context?: any, notSetValue?: V): V | undefined; + findEntry(predicate: (value: V, key: K, iter: this) => boolean, context?: any, notSetValue?: V): [K, V] | undefined; + findLastEntry(predicate: (value: V, key: K, iter: this) => boolean, context?: any, notSetValue?: V): [K, V] | undefined; + findKey(predicate: (value: V, key: K, iter: this) => boolean, context?: any): K | undefined; + findLastKey(predicate: (value: V, key: K, iter: this) => boolean, context?: any): K | undefined; + keyOf(searchValue: V): K | undefined; + lastKeyOf(searchValue: V): K | undefined; + max(comparator?: (valueA: V, valueB: V) => number): V | undefined; + maxBy(comparatorValueMapper: (value: V, key: K, iter: this) => C, comparator?: (valueA: C, valueB: C) => number): V | undefined; + min(comparator?: (valueA: V, valueB: V) => number): V | undefined; + minBy(comparatorValueMapper: (value: V, key: K, iter: this) => C, comparator?: (valueA: C, valueB: C) => number): V | undefined; + // Comparison + isSubset(iter: Iterable): boolean; + isSuperset(iter: Iterable): boolean; + readonly size: number; + } +} +declare module "immutable" { + export = Immutable +} + + +//// [complex.js] +//// [immutable.js] diff --git a/tests/baselines/reference/complexRecursiveCollections.symbols b/tests/baselines/reference/complexRecursiveCollections.symbols index d5eee915d57..8533f5220a2 100644 --- a/tests/baselines/reference/complexRecursiveCollections.symbols +++ b/tests/baselines/reference/complexRecursiveCollections.symbols @@ -1,3806 +1,3806 @@ -=== tests/cases/compiler/complex.d.ts === +=== tests/cases/compiler/complex.ts === interface Ara { t: T } ->Ara : Symbol(Ara, Decl(complex.d.ts, 0, 0)) ->T : Symbol(T, Decl(complex.d.ts, 0, 14)) ->t : Symbol(Ara.t, Decl(complex.d.ts, 0, 18)) ->T : Symbol(T, Decl(complex.d.ts, 0, 14)) +>Ara : Symbol(Ara, Decl(complex.ts, 0, 0)) +>T : Symbol(T, Decl(complex.ts, 0, 14)) +>t : Symbol(Ara.t, Decl(complex.ts, 0, 18)) +>T : Symbol(T, Decl(complex.ts, 0, 14)) interface Collection { ->Collection : Symbol(Collection, Decl(complex.d.ts, 0, 25)) ->K : Symbol(K, Decl(complex.d.ts, 1, 21)) ->V : Symbol(V, Decl(complex.d.ts, 1, 23)) +>Collection : Symbol(Collection, Decl(complex.ts, 0, 25)) +>K : Symbol(K, Decl(complex.ts, 1, 21)) +>V : Symbol(V, Decl(complex.ts, 1, 23)) map(mapper: (value: V, key: K, iter: this) => M): Collection; ->map : Symbol(Collection.map, Decl(complex.d.ts, 1, 28)) ->M : Symbol(M, Decl(complex.d.ts, 2, 8)) ->mapper : Symbol(mapper, Decl(complex.d.ts, 2, 11)) ->value : Symbol(value, Decl(complex.d.ts, 2, 20)) ->V : Symbol(V, Decl(complex.d.ts, 1, 23)) ->key : Symbol(key, Decl(complex.d.ts, 2, 29)) ->K : Symbol(K, Decl(complex.d.ts, 1, 21)) ->iter : Symbol(iter, Decl(complex.d.ts, 2, 37)) ->M : Symbol(M, Decl(complex.d.ts, 2, 8)) ->Collection : Symbol(Collection, Decl(complex.d.ts, 0, 25)) ->K : Symbol(K, Decl(complex.d.ts, 1, 21)) ->M : Symbol(M, Decl(complex.d.ts, 2, 8)) +>map : Symbol(Collection.map, Decl(complex.ts, 1, 28)) +>M : Symbol(M, Decl(complex.ts, 2, 8)) +>mapper : Symbol(mapper, Decl(complex.ts, 2, 11)) +>value : Symbol(value, Decl(complex.ts, 2, 20)) +>V : Symbol(V, Decl(complex.ts, 1, 23)) +>key : Symbol(key, Decl(complex.ts, 2, 29)) +>K : Symbol(K, Decl(complex.ts, 1, 21)) +>iter : Symbol(iter, Decl(complex.ts, 2, 37)) +>M : Symbol(M, Decl(complex.ts, 2, 8)) +>Collection : Symbol(Collection, Decl(complex.ts, 0, 25)) +>K : Symbol(K, Decl(complex.ts, 1, 21)) +>M : Symbol(M, Decl(complex.ts, 2, 8)) flatMap(mapper: (value: V, key: K, iter: this) => Ara, context?: any): Collection; ->flatMap : Symbol(Collection.flatMap, Decl(complex.d.ts, 2, 74)) ->M : Symbol(M, Decl(complex.d.ts, 3, 12)) ->mapper : Symbol(mapper, Decl(complex.d.ts, 3, 15)) ->value : Symbol(value, Decl(complex.d.ts, 3, 24)) ->V : Symbol(V, Decl(complex.d.ts, 1, 23)) ->key : Symbol(key, Decl(complex.d.ts, 3, 33)) ->K : Symbol(K, Decl(complex.d.ts, 1, 21)) ->iter : Symbol(iter, Decl(complex.d.ts, 3, 41)) ->Ara : Symbol(Ara, Decl(complex.d.ts, 0, 0)) ->M : Symbol(M, Decl(complex.d.ts, 3, 12)) ->context : Symbol(context, Decl(complex.d.ts, 3, 64)) ->Collection : Symbol(Collection, Decl(complex.d.ts, 0, 25)) ->K : Symbol(K, Decl(complex.d.ts, 1, 21)) ->M : Symbol(M, Decl(complex.d.ts, 3, 12)) +>flatMap : Symbol(Collection.flatMap, Decl(complex.ts, 2, 74)) +>M : Symbol(M, Decl(complex.ts, 3, 12)) +>mapper : Symbol(mapper, Decl(complex.ts, 3, 15)) +>value : Symbol(value, Decl(complex.ts, 3, 24)) +>V : Symbol(V, Decl(complex.ts, 1, 23)) +>key : Symbol(key, Decl(complex.ts, 3, 33)) +>K : Symbol(K, Decl(complex.ts, 1, 21)) +>iter : Symbol(iter, Decl(complex.ts, 3, 41)) +>Ara : Symbol(Ara, Decl(complex.ts, 0, 0)) +>M : Symbol(M, Decl(complex.ts, 3, 12)) +>context : Symbol(context, Decl(complex.ts, 3, 64)) +>Collection : Symbol(Collection, Decl(complex.ts, 0, 25)) +>K : Symbol(K, Decl(complex.ts, 1, 21)) +>M : Symbol(M, Decl(complex.ts, 3, 12)) // these seem necessary to push it over the top for memory usage reduce(reducer: (reduction: R, value: V, key: K, iter: this) => R, initialReduction: R, context?: any): R; ->reduce : Symbol(Collection.reduce, Decl(complex.d.ts, 3, 98), Decl(complex.d.ts, 5, 113)) ->R : Symbol(R, Decl(complex.d.ts, 5, 11)) ->reducer : Symbol(reducer, Decl(complex.d.ts, 5, 14)) ->reduction : Symbol(reduction, Decl(complex.d.ts, 5, 24)) ->R : Symbol(R, Decl(complex.d.ts, 5, 11)) ->value : Symbol(value, Decl(complex.d.ts, 5, 37)) ->V : Symbol(V, Decl(complex.d.ts, 1, 23)) ->key : Symbol(key, Decl(complex.d.ts, 5, 47)) ->K : Symbol(K, Decl(complex.d.ts, 1, 21)) ->iter : Symbol(iter, Decl(complex.d.ts, 5, 55)) ->R : Symbol(R, Decl(complex.d.ts, 5, 11)) ->initialReduction : Symbol(initialReduction, Decl(complex.d.ts, 5, 73)) ->R : Symbol(R, Decl(complex.d.ts, 5, 11)) ->context : Symbol(context, Decl(complex.d.ts, 5, 94)) ->R : Symbol(R, Decl(complex.d.ts, 5, 11)) +>reduce : Symbol(Collection.reduce, Decl(complex.ts, 3, 98), Decl(complex.ts, 5, 113)) +>R : Symbol(R, Decl(complex.ts, 5, 11)) +>reducer : Symbol(reducer, Decl(complex.ts, 5, 14)) +>reduction : Symbol(reduction, Decl(complex.ts, 5, 24)) +>R : Symbol(R, Decl(complex.ts, 5, 11)) +>value : Symbol(value, Decl(complex.ts, 5, 37)) +>V : Symbol(V, Decl(complex.ts, 1, 23)) +>key : Symbol(key, Decl(complex.ts, 5, 47)) +>K : Symbol(K, Decl(complex.ts, 1, 21)) +>iter : Symbol(iter, Decl(complex.ts, 5, 55)) +>R : Symbol(R, Decl(complex.ts, 5, 11)) +>initialReduction : Symbol(initialReduction, Decl(complex.ts, 5, 73)) +>R : Symbol(R, Decl(complex.ts, 5, 11)) +>context : Symbol(context, Decl(complex.ts, 5, 94)) +>R : Symbol(R, Decl(complex.ts, 5, 11)) reduce(reducer: (reduction: V | R, value: V, key: K, iter: this) => R): R; ->reduce : Symbol(Collection.reduce, Decl(complex.d.ts, 3, 98), Decl(complex.d.ts, 5, 113)) ->R : Symbol(R, Decl(complex.d.ts, 6, 11)) ->reducer : Symbol(reducer, Decl(complex.d.ts, 6, 14)) ->reduction : Symbol(reduction, Decl(complex.d.ts, 6, 24)) ->V : Symbol(V, Decl(complex.d.ts, 1, 23)) ->R : Symbol(R, Decl(complex.d.ts, 6, 11)) ->value : Symbol(value, Decl(complex.d.ts, 6, 41)) ->V : Symbol(V, Decl(complex.d.ts, 1, 23)) ->key : Symbol(key, Decl(complex.d.ts, 6, 51)) ->K : Symbol(K, Decl(complex.d.ts, 1, 21)) ->iter : Symbol(iter, Decl(complex.d.ts, 6, 59)) ->R : Symbol(R, Decl(complex.d.ts, 6, 11)) ->R : Symbol(R, Decl(complex.d.ts, 6, 11)) +>reduce : Symbol(Collection.reduce, Decl(complex.ts, 3, 98), Decl(complex.ts, 5, 113)) +>R : Symbol(R, Decl(complex.ts, 6, 11)) +>reducer : Symbol(reducer, Decl(complex.ts, 6, 14)) +>reduction : Symbol(reduction, Decl(complex.ts, 6, 24)) +>V : Symbol(V, Decl(complex.ts, 1, 23)) +>R : Symbol(R, Decl(complex.ts, 6, 11)) +>value : Symbol(value, Decl(complex.ts, 6, 41)) +>V : Symbol(V, Decl(complex.ts, 1, 23)) +>key : Symbol(key, Decl(complex.ts, 6, 51)) +>K : Symbol(K, Decl(complex.ts, 1, 21)) +>iter : Symbol(iter, Decl(complex.ts, 6, 59)) +>R : Symbol(R, Decl(complex.ts, 6, 11)) +>R : Symbol(R, Decl(complex.ts, 6, 11)) toSeq(): Seq; ->toSeq : Symbol(Collection.toSeq, Decl(complex.d.ts, 6, 81)) ->Seq : Symbol(Seq, Decl(complex.d.ts, 8, 1)) ->K : Symbol(K, Decl(complex.d.ts, 1, 21)) ->V : Symbol(V, Decl(complex.d.ts, 1, 23)) +>toSeq : Symbol(Collection.toSeq, Decl(complex.ts, 6, 81)) +>Seq : Symbol(Seq, Decl(complex.ts, 8, 1)) +>K : Symbol(K, Decl(complex.ts, 1, 21)) +>V : Symbol(V, Decl(complex.ts, 1, 23)) } interface Seq extends Collection { ->Seq : Symbol(Seq, Decl(complex.d.ts, 8, 1)) ->K : Symbol(K, Decl(complex.d.ts, 9, 14)) ->V : Symbol(V, Decl(complex.d.ts, 9, 16)) ->Collection : Symbol(Collection, Decl(complex.d.ts, 0, 25)) ->K : Symbol(K, Decl(complex.d.ts, 9, 14)) ->V : Symbol(V, Decl(complex.d.ts, 9, 16)) +>Seq : Symbol(Seq, Decl(complex.ts, 8, 1)) +>K : Symbol(K, Decl(complex.ts, 9, 14)) +>V : Symbol(V, Decl(complex.ts, 9, 16)) +>Collection : Symbol(Collection, Decl(complex.ts, 0, 25)) +>K : Symbol(K, Decl(complex.ts, 9, 14)) +>V : Symbol(V, Decl(complex.ts, 9, 16)) } interface N1 extends Collection { ->N1 : Symbol(N1, Decl(complex.d.ts, 10, 1)) ->T : Symbol(T, Decl(complex.d.ts, 11, 13)) ->Collection : Symbol(Collection, Decl(complex.d.ts, 0, 25)) ->T : Symbol(T, Decl(complex.d.ts, 11, 13)) +>N1 : Symbol(N1, Decl(complex.ts, 10, 1)) +>T : Symbol(T, Decl(complex.ts, 11, 13)) +>Collection : Symbol(Collection, Decl(complex.ts, 0, 25)) +>T : Symbol(T, Decl(complex.ts, 11, 13)) map(mapper: (value: T, key: void, iter: this) => M): N1; ->map : Symbol(N1.map, Decl(complex.d.ts, 11, 45)) ->M : Symbol(M, Decl(complex.d.ts, 12, 8)) ->mapper : Symbol(mapper, Decl(complex.d.ts, 12, 11)) ->value : Symbol(value, Decl(complex.d.ts, 12, 20)) ->T : Symbol(T, Decl(complex.d.ts, 11, 13)) ->key : Symbol(key, Decl(complex.d.ts, 12, 29)) ->iter : Symbol(iter, Decl(complex.d.ts, 12, 40)) ->M : Symbol(M, Decl(complex.d.ts, 12, 8)) ->N1 : Symbol(N1, Decl(complex.d.ts, 10, 1)) ->M : Symbol(M, Decl(complex.d.ts, 12, 8)) +>map : Symbol(N1.map, Decl(complex.ts, 11, 45)) +>M : Symbol(M, Decl(complex.ts, 12, 8)) +>mapper : Symbol(mapper, Decl(complex.ts, 12, 11)) +>value : Symbol(value, Decl(complex.ts, 12, 20)) +>T : Symbol(T, Decl(complex.ts, 11, 13)) +>key : Symbol(key, Decl(complex.ts, 12, 29)) +>iter : Symbol(iter, Decl(complex.ts, 12, 40)) +>M : Symbol(M, Decl(complex.ts, 12, 8)) +>N1 : Symbol(N1, Decl(complex.ts, 10, 1)) +>M : Symbol(M, Decl(complex.ts, 12, 8)) flatMap(mapper: (value: T, key: void, iter: this) => Ara, context?: any): N1; ->flatMap : Symbol(N1.flatMap, Decl(complex.d.ts, 12, 66)) ->M : Symbol(M, Decl(complex.d.ts, 13, 12)) ->mapper : Symbol(mapper, Decl(complex.d.ts, 13, 15)) ->value : Symbol(value, Decl(complex.d.ts, 13, 24)) ->T : Symbol(T, Decl(complex.d.ts, 11, 13)) ->key : Symbol(key, Decl(complex.d.ts, 13, 33)) ->iter : Symbol(iter, Decl(complex.d.ts, 13, 44)) ->Ara : Symbol(Ara, Decl(complex.d.ts, 0, 0)) ->M : Symbol(M, Decl(complex.d.ts, 13, 12)) ->context : Symbol(context, Decl(complex.d.ts, 13, 67)) ->N1 : Symbol(N1, Decl(complex.d.ts, 10, 1)) ->M : Symbol(M, Decl(complex.d.ts, 13, 12)) +>flatMap : Symbol(N1.flatMap, Decl(complex.ts, 12, 66)) +>M : Symbol(M, Decl(complex.ts, 13, 12)) +>mapper : Symbol(mapper, Decl(complex.ts, 13, 15)) +>value : Symbol(value, Decl(complex.ts, 13, 24)) +>T : Symbol(T, Decl(complex.ts, 11, 13)) +>key : Symbol(key, Decl(complex.ts, 13, 33)) +>iter : Symbol(iter, Decl(complex.ts, 13, 44)) +>Ara : Symbol(Ara, Decl(complex.ts, 0, 0)) +>M : Symbol(M, Decl(complex.ts, 13, 12)) +>context : Symbol(context, Decl(complex.ts, 13, 67)) +>N1 : Symbol(N1, Decl(complex.ts, 10, 1)) +>M : Symbol(M, Decl(complex.ts, 13, 12)) } interface N2 extends N1 { ->N2 : Symbol(N2, Decl(complex.d.ts, 14, 1)) ->T : Symbol(T, Decl(complex.d.ts, 15, 13)) ->N1 : Symbol(N1, Decl(complex.d.ts, 10, 1)) ->T : Symbol(T, Decl(complex.d.ts, 15, 13)) +>N2 : Symbol(N2, Decl(complex.ts, 14, 1)) +>T : Symbol(T, Decl(complex.ts, 15, 13)) +>N1 : Symbol(N1, Decl(complex.ts, 10, 1)) +>T : Symbol(T, Decl(complex.ts, 15, 13)) map(mapper: (value: T, key: void, iter: this) => M): N2; ->map : Symbol(N2.map, Decl(complex.d.ts, 15, 31)) ->M : Symbol(M, Decl(complex.d.ts, 16, 8)) ->mapper : Symbol(mapper, Decl(complex.d.ts, 16, 11)) ->value : Symbol(value, Decl(complex.d.ts, 16, 20)) ->T : Symbol(T, Decl(complex.d.ts, 15, 13)) ->key : Symbol(key, Decl(complex.d.ts, 16, 29)) ->iter : Symbol(iter, Decl(complex.d.ts, 16, 40)) ->M : Symbol(M, Decl(complex.d.ts, 16, 8)) ->N2 : Symbol(N2, Decl(complex.d.ts, 14, 1)) ->M : Symbol(M, Decl(complex.d.ts, 16, 8)) +>map : Symbol(N2.map, Decl(complex.ts, 15, 31)) +>M : Symbol(M, Decl(complex.ts, 16, 8)) +>mapper : Symbol(mapper, Decl(complex.ts, 16, 11)) +>value : Symbol(value, Decl(complex.ts, 16, 20)) +>T : Symbol(T, Decl(complex.ts, 15, 13)) +>key : Symbol(key, Decl(complex.ts, 16, 29)) +>iter : Symbol(iter, Decl(complex.ts, 16, 40)) +>M : Symbol(M, Decl(complex.ts, 16, 8)) +>N2 : Symbol(N2, Decl(complex.ts, 14, 1)) +>M : Symbol(M, Decl(complex.ts, 16, 8)) flatMap(mapper: (value: T, key: void, iter: this) => Ara, context?: any): N2; ->flatMap : Symbol(N2.flatMap, Decl(complex.d.ts, 16, 66)) ->M : Symbol(M, Decl(complex.d.ts, 17, 12)) ->mapper : Symbol(mapper, Decl(complex.d.ts, 17, 15)) ->value : Symbol(value, Decl(complex.d.ts, 17, 24)) ->T : Symbol(T, Decl(complex.d.ts, 15, 13)) ->key : Symbol(key, Decl(complex.d.ts, 17, 33)) ->iter : Symbol(iter, Decl(complex.d.ts, 17, 44)) ->Ara : Symbol(Ara, Decl(complex.d.ts, 0, 0)) ->M : Symbol(M, Decl(complex.d.ts, 17, 12)) ->context : Symbol(context, Decl(complex.d.ts, 17, 67)) ->N2 : Symbol(N2, Decl(complex.d.ts, 14, 1)) ->M : Symbol(M, Decl(complex.d.ts, 17, 12)) +>flatMap : Symbol(N2.flatMap, Decl(complex.ts, 16, 66)) +>M : Symbol(M, Decl(complex.ts, 17, 12)) +>mapper : Symbol(mapper, Decl(complex.ts, 17, 15)) +>value : Symbol(value, Decl(complex.ts, 17, 24)) +>T : Symbol(T, Decl(complex.ts, 15, 13)) +>key : Symbol(key, Decl(complex.ts, 17, 33)) +>iter : Symbol(iter, Decl(complex.ts, 17, 44)) +>Ara : Symbol(Ara, Decl(complex.ts, 0, 0)) +>M : Symbol(M, Decl(complex.ts, 17, 12)) +>context : Symbol(context, Decl(complex.ts, 17, 67)) +>N2 : Symbol(N2, Decl(complex.ts, 14, 1)) +>M : Symbol(M, Decl(complex.ts, 17, 12)) toSeq(): N2; ->toSeq : Symbol(N2.toSeq, Decl(complex.d.ts, 17, 90)) ->N2 : Symbol(N2, Decl(complex.d.ts, 14, 1)) ->T : Symbol(T, Decl(complex.d.ts, 15, 13)) +>toSeq : Symbol(N2.toSeq, Decl(complex.ts, 17, 90)) +>N2 : Symbol(N2, Decl(complex.ts, 14, 1)) +>T : Symbol(T, Decl(complex.ts, 15, 13)) } -=== tests/cases/compiler/immutable.d.ts === +=== tests/cases/compiler/immutable.ts === // Test that complex recursive collections can pass the `extends` assignability check without // running out of memory. This bug was exposed in Typescript 2.4 when more generic signatures // started being checked. declare module Immutable { ->Immutable : Symbol(Immutable, Decl(immutable.d.ts, 0, 0)) +>Immutable : Symbol(Immutable, Decl(immutable.ts, 0, 0)) export function fromJS(jsValue: any, reviver?: (key: string | number, sequence: Collection.Keyed | Collection.Indexed, path?: Array) => any): any; ->fromJS : Symbol(fromJS, Decl(immutable.d.ts, 3, 26)) ->jsValue : Symbol(jsValue, Decl(immutable.d.ts, 4, 25)) ->reviver : Symbol(reviver, Decl(immutable.d.ts, 4, 38)) ->key : Symbol(key, Decl(immutable.d.ts, 4, 50)) ->sequence : Symbol(sequence, Decl(immutable.d.ts, 4, 71)) ->Collection : Symbol(Collection, Decl(immutable.d.ts, 331, 3), Decl(immutable.d.ts, 402, 3), Decl(immutable.d.ts, 403, 79), Decl(immutable.d.ts, 404, 80), Decl(immutable.d.ts, 405, 86)) ->Keyed : Symbol(Collection.Keyed, Decl(immutable.d.ts, 336, 51), Decl(immutable.d.ts, 337, 26), Decl(immutable.d.ts, 338, 86), Decl(immutable.d.ts, 339, 83)) ->Collection : Symbol(Collection, Decl(immutable.d.ts, 331, 3), Decl(immutable.d.ts, 402, 3), Decl(immutable.d.ts, 403, 79), Decl(immutable.d.ts, 404, 80), Decl(immutable.d.ts, 405, 86)) ->Indexed : Symbol(Collection.Indexed, Decl(immutable.d.ts, 355, 5), Decl(immutable.d.ts, 356, 28), Decl(immutable.d.ts, 357, 79)) ->path : Symbol(path, Decl(immutable.d.ts, 4, 138)) +>fromJS : Symbol(fromJS, Decl(immutable.ts, 3, 26)) +>jsValue : Symbol(jsValue, Decl(immutable.ts, 4, 25)) +>reviver : Symbol(reviver, Decl(immutable.ts, 4, 38)) +>key : Symbol(key, Decl(immutable.ts, 4, 50)) +>sequence : Symbol(sequence, Decl(immutable.ts, 4, 71)) +>Collection : Symbol(Collection, Decl(immutable.ts, 331, 3), Decl(immutable.ts, 402, 3), Decl(immutable.ts, 403, 79), Decl(immutable.ts, 404, 80), Decl(immutable.ts, 405, 86)) +>Keyed : Symbol(Collection.Keyed, Decl(immutable.ts, 336, 51), Decl(immutable.ts, 337, 26), Decl(immutable.ts, 338, 86), Decl(immutable.ts, 339, 83)) +>Collection : Symbol(Collection, Decl(immutable.ts, 331, 3), Decl(immutable.ts, 402, 3), Decl(immutable.ts, 403, 79), Decl(immutable.ts, 404, 80), Decl(immutable.ts, 405, 86)) +>Indexed : Symbol(Collection.Indexed, Decl(immutable.ts, 355, 5), Decl(immutable.ts, 356, 28), Decl(immutable.ts, 357, 79)) +>path : Symbol(path, Decl(immutable.ts, 4, 138)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) export function is(first: any, second: any): boolean; ->is : Symbol(is, Decl(immutable.d.ts, 4, 183)) ->first : Symbol(first, Decl(immutable.d.ts, 5, 21)) ->second : Symbol(second, Decl(immutable.d.ts, 5, 32)) +>is : Symbol(is, Decl(immutable.ts, 4, 183)) +>first : Symbol(first, Decl(immutable.ts, 5, 21)) +>second : Symbol(second, Decl(immutable.ts, 5, 32)) export function hash(value: any): number; ->hash : Symbol(hash, Decl(immutable.d.ts, 5, 55)) ->value : Symbol(value, Decl(immutable.d.ts, 6, 23)) +>hash : Symbol(hash, Decl(immutable.ts, 5, 55)) +>value : Symbol(value, Decl(immutable.ts, 6, 23)) export function isImmutable(maybeImmutable: any): maybeImmutable is Collection; ->isImmutable : Symbol(isImmutable, Decl(immutable.d.ts, 6, 43)) ->maybeImmutable : Symbol(maybeImmutable, Decl(immutable.d.ts, 7, 30)) ->maybeImmutable : Symbol(maybeImmutable, Decl(immutable.d.ts, 7, 30)) ->Collection : Symbol(Collection, Decl(immutable.d.ts, 331, 3), Decl(immutable.d.ts, 402, 3), Decl(immutable.d.ts, 403, 79), Decl(immutable.d.ts, 404, 80), Decl(immutable.d.ts, 405, 86)) +>isImmutable : Symbol(isImmutable, Decl(immutable.ts, 6, 43)) +>maybeImmutable : Symbol(maybeImmutable, Decl(immutable.ts, 7, 30)) +>maybeImmutable : Symbol(maybeImmutable, Decl(immutable.ts, 7, 30)) +>Collection : Symbol(Collection, Decl(immutable.ts, 331, 3), Decl(immutable.ts, 402, 3), Decl(immutable.ts, 403, 79), Decl(immutable.ts, 404, 80), Decl(immutable.ts, 405, 86)) export function isCollection(maybeCollection: any): maybeCollection is Collection; ->isCollection : Symbol(isCollection, Decl(immutable.d.ts, 7, 91)) ->maybeCollection : Symbol(maybeCollection, Decl(immutable.d.ts, 8, 31)) ->maybeCollection : Symbol(maybeCollection, Decl(immutable.d.ts, 8, 31)) ->Collection : Symbol(Collection, Decl(immutable.d.ts, 331, 3), Decl(immutable.d.ts, 402, 3), Decl(immutable.d.ts, 403, 79), Decl(immutable.d.ts, 404, 80), Decl(immutable.d.ts, 405, 86)) +>isCollection : Symbol(isCollection, Decl(immutable.ts, 7, 91)) +>maybeCollection : Symbol(maybeCollection, Decl(immutable.ts, 8, 31)) +>maybeCollection : Symbol(maybeCollection, Decl(immutable.ts, 8, 31)) +>Collection : Symbol(Collection, Decl(immutable.ts, 331, 3), Decl(immutable.ts, 402, 3), Decl(immutable.ts, 403, 79), Decl(immutable.ts, 404, 80), Decl(immutable.ts, 405, 86)) export function isKeyed(maybeKeyed: any): maybeKeyed is Collection.Keyed; ->isKeyed : Symbol(isKeyed, Decl(immutable.d.ts, 8, 94)) ->maybeKeyed : Symbol(maybeKeyed, Decl(immutable.d.ts, 9, 26)) ->maybeKeyed : Symbol(maybeKeyed, Decl(immutable.d.ts, 9, 26)) ->Collection : Symbol(Collection, Decl(immutable.d.ts, 331, 3), Decl(immutable.d.ts, 402, 3), Decl(immutable.d.ts, 403, 79), Decl(immutable.d.ts, 404, 80), Decl(immutable.d.ts, 405, 86)) ->Keyed : Symbol(Collection.Keyed, Decl(immutable.d.ts, 336, 51), Decl(immutable.d.ts, 337, 26), Decl(immutable.d.ts, 338, 86), Decl(immutable.d.ts, 339, 83)) +>isKeyed : Symbol(isKeyed, Decl(immutable.ts, 8, 94)) +>maybeKeyed : Symbol(maybeKeyed, Decl(immutable.ts, 9, 26)) +>maybeKeyed : Symbol(maybeKeyed, Decl(immutable.ts, 9, 26)) +>Collection : Symbol(Collection, Decl(immutable.ts, 331, 3), Decl(immutable.ts, 402, 3), Decl(immutable.ts, 403, 79), Decl(immutable.ts, 404, 80), Decl(immutable.ts, 405, 86)) +>Keyed : Symbol(Collection.Keyed, Decl(immutable.ts, 336, 51), Decl(immutable.ts, 337, 26), Decl(immutable.ts, 338, 86), Decl(immutable.ts, 339, 83)) export function isIndexed(maybeIndexed: any): maybeIndexed is Collection.Indexed; ->isIndexed : Symbol(isIndexed, Decl(immutable.d.ts, 9, 85)) ->maybeIndexed : Symbol(maybeIndexed, Decl(immutable.d.ts, 10, 28)) ->maybeIndexed : Symbol(maybeIndexed, Decl(immutable.d.ts, 10, 28)) ->Collection : Symbol(Collection, Decl(immutable.d.ts, 331, 3), Decl(immutable.d.ts, 402, 3), Decl(immutable.d.ts, 403, 79), Decl(immutable.d.ts, 404, 80), Decl(immutable.d.ts, 405, 86)) ->Indexed : Symbol(Collection.Indexed, Decl(immutable.d.ts, 355, 5), Decl(immutable.d.ts, 356, 28), Decl(immutable.d.ts, 357, 79)) +>isIndexed : Symbol(isIndexed, Decl(immutable.ts, 9, 85)) +>maybeIndexed : Symbol(maybeIndexed, Decl(immutable.ts, 10, 28)) +>maybeIndexed : Symbol(maybeIndexed, Decl(immutable.ts, 10, 28)) +>Collection : Symbol(Collection, Decl(immutable.ts, 331, 3), Decl(immutable.ts, 402, 3), Decl(immutable.ts, 403, 79), Decl(immutable.ts, 404, 80), Decl(immutable.ts, 405, 86)) +>Indexed : Symbol(Collection.Indexed, Decl(immutable.ts, 355, 5), Decl(immutable.ts, 356, 28), Decl(immutable.ts, 357, 79)) export function isAssociative(maybeAssociative: any): maybeAssociative is Collection.Keyed | Collection.Indexed; ->isAssociative : Symbol(isAssociative, Decl(immutable.d.ts, 10, 88)) ->maybeAssociative : Symbol(maybeAssociative, Decl(immutable.d.ts, 11, 32)) ->maybeAssociative : Symbol(maybeAssociative, Decl(immutable.d.ts, 11, 32)) ->Collection : Symbol(Collection, Decl(immutable.d.ts, 331, 3), Decl(immutable.d.ts, 402, 3), Decl(immutable.d.ts, 403, 79), Decl(immutable.d.ts, 404, 80), Decl(immutable.d.ts, 405, 86)) ->Keyed : Symbol(Collection.Keyed, Decl(immutable.d.ts, 336, 51), Decl(immutable.d.ts, 337, 26), Decl(immutable.d.ts, 338, 86), Decl(immutable.d.ts, 339, 83)) ->Collection : Symbol(Collection, Decl(immutable.d.ts, 331, 3), Decl(immutable.d.ts, 402, 3), Decl(immutable.d.ts, 403, 79), Decl(immutable.d.ts, 404, 80), Decl(immutable.d.ts, 405, 86)) ->Indexed : Symbol(Collection.Indexed, Decl(immutable.d.ts, 355, 5), Decl(immutable.d.ts, 356, 28), Decl(immutable.d.ts, 357, 79)) +>isAssociative : Symbol(isAssociative, Decl(immutable.ts, 10, 88)) +>maybeAssociative : Symbol(maybeAssociative, Decl(immutable.ts, 11, 32)) +>maybeAssociative : Symbol(maybeAssociative, Decl(immutable.ts, 11, 32)) +>Collection : Symbol(Collection, Decl(immutable.ts, 331, 3), Decl(immutable.ts, 402, 3), Decl(immutable.ts, 403, 79), Decl(immutable.ts, 404, 80), Decl(immutable.ts, 405, 86)) +>Keyed : Symbol(Collection.Keyed, Decl(immutable.ts, 336, 51), Decl(immutable.ts, 337, 26), Decl(immutable.ts, 338, 86), Decl(immutable.ts, 339, 83)) +>Collection : Symbol(Collection, Decl(immutable.ts, 331, 3), Decl(immutable.ts, 402, 3), Decl(immutable.ts, 403, 79), Decl(immutable.ts, 404, 80), Decl(immutable.ts, 405, 86)) +>Indexed : Symbol(Collection.Indexed, Decl(immutable.ts, 355, 5), Decl(immutable.ts, 356, 28), Decl(immutable.ts, 357, 79)) export function isOrdered(maybeOrdered: any): boolean; ->isOrdered : Symbol(isOrdered, Decl(immutable.d.ts, 11, 129)) ->maybeOrdered : Symbol(maybeOrdered, Decl(immutable.d.ts, 12, 28)) +>isOrdered : Symbol(isOrdered, Decl(immutable.ts, 11, 129)) +>maybeOrdered : Symbol(maybeOrdered, Decl(immutable.ts, 12, 28)) export function isValueObject(maybeValue: any): maybeValue is ValueObject; ->isValueObject : Symbol(isValueObject, Decl(immutable.d.ts, 12, 56)) ->maybeValue : Symbol(maybeValue, Decl(immutable.d.ts, 13, 32)) ->maybeValue : Symbol(maybeValue, Decl(immutable.d.ts, 13, 32)) ->ValueObject : Symbol(ValueObject, Decl(immutable.d.ts, 13, 76)) +>isValueObject : Symbol(isValueObject, Decl(immutable.ts, 12, 56)) +>maybeValue : Symbol(maybeValue, Decl(immutable.ts, 13, 32)) +>maybeValue : Symbol(maybeValue, Decl(immutable.ts, 13, 32)) +>ValueObject : Symbol(ValueObject, Decl(immutable.ts, 13, 76)) export interface ValueObject { ->ValueObject : Symbol(ValueObject, Decl(immutable.d.ts, 13, 76)) +>ValueObject : Symbol(ValueObject, Decl(immutable.ts, 13, 76)) equals(other: any): boolean; ->equals : Symbol(ValueObject.equals, Decl(immutable.d.ts, 14, 32)) ->other : Symbol(other, Decl(immutable.d.ts, 15, 11)) +>equals : Symbol(ValueObject.equals, Decl(immutable.ts, 14, 32)) +>other : Symbol(other, Decl(immutable.ts, 15, 11)) hashCode(): number; ->hashCode : Symbol(ValueObject.hashCode, Decl(immutable.d.ts, 15, 32)) +>hashCode : Symbol(ValueObject.hashCode, Decl(immutable.ts, 15, 32)) } export module List { ->List : Symbol(List, Decl(immutable.d.ts, 17, 3), Decl(immutable.d.ts, 21, 3), Decl(immutable.d.ts, 22, 36), Decl(immutable.d.ts, 23, 37), Decl(immutable.d.ts, 24, 60)) +>List : Symbol(List, Decl(immutable.ts, 17, 3), Decl(immutable.ts, 21, 3), Decl(immutable.ts, 22, 36), Decl(immutable.ts, 23, 37), Decl(immutable.ts, 24, 60)) function isList(maybeList: any): maybeList is List; ->isList : Symbol(isList, Decl(immutable.d.ts, 18, 22)) ->maybeList : Symbol(maybeList, Decl(immutable.d.ts, 19, 20)) ->maybeList : Symbol(maybeList, Decl(immutable.d.ts, 19, 20)) ->List : Symbol(List, Decl(immutable.d.ts, 17, 3), Decl(immutable.d.ts, 21, 3), Decl(immutable.d.ts, 22, 36), Decl(immutable.d.ts, 23, 37), Decl(immutable.d.ts, 24, 60)) +>isList : Symbol(isList, Decl(immutable.ts, 18, 22)) +>maybeList : Symbol(maybeList, Decl(immutable.ts, 19, 20)) +>maybeList : Symbol(maybeList, Decl(immutable.ts, 19, 20)) +>List : Symbol(List, Decl(immutable.ts, 17, 3), Decl(immutable.ts, 21, 3), Decl(immutable.ts, 22, 36), Decl(immutable.ts, 23, 37), Decl(immutable.ts, 24, 60)) function of(...values: Array): List; ->of : Symbol(of, Decl(immutable.d.ts, 19, 60)) ->T : Symbol(T, Decl(immutable.d.ts, 20, 16)) ->values : Symbol(values, Decl(immutable.d.ts, 20, 19)) +>of : Symbol(of, Decl(immutable.ts, 19, 60)) +>T : Symbol(T, Decl(immutable.ts, 20, 16)) +>values : Symbol(values, Decl(immutable.ts, 20, 19)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) ->T : Symbol(T, Decl(immutable.d.ts, 20, 16)) ->List : Symbol(List, Decl(immutable.d.ts, 17, 3), Decl(immutable.d.ts, 21, 3), Decl(immutable.d.ts, 22, 36), Decl(immutable.d.ts, 23, 37), Decl(immutable.d.ts, 24, 60)) ->T : Symbol(T, Decl(immutable.d.ts, 20, 16)) +>T : Symbol(T, Decl(immutable.ts, 20, 16)) +>List : Symbol(List, Decl(immutable.ts, 17, 3), Decl(immutable.ts, 21, 3), Decl(immutable.ts, 22, 36), Decl(immutable.ts, 23, 37), Decl(immutable.ts, 24, 60)) +>T : Symbol(T, Decl(immutable.ts, 20, 16)) } export function List(): List; ->List : Symbol(List, Decl(immutable.d.ts, 17, 3), Decl(immutable.d.ts, 21, 3), Decl(immutable.d.ts, 22, 36), Decl(immutable.d.ts, 23, 37), Decl(immutable.d.ts, 24, 60)) ->List : Symbol(List, Decl(immutable.d.ts, 17, 3), Decl(immutable.d.ts, 21, 3), Decl(immutable.d.ts, 22, 36), Decl(immutable.d.ts, 23, 37), Decl(immutable.d.ts, 24, 60)) +>List : Symbol(List, Decl(immutable.ts, 17, 3), Decl(immutable.ts, 21, 3), Decl(immutable.ts, 22, 36), Decl(immutable.ts, 23, 37), Decl(immutable.ts, 24, 60)) +>List : Symbol(List, Decl(immutable.ts, 17, 3), Decl(immutable.ts, 21, 3), Decl(immutable.ts, 22, 36), Decl(immutable.ts, 23, 37), Decl(immutable.ts, 24, 60)) export function List(): List; ->List : Symbol(List, Decl(immutable.d.ts, 17, 3), Decl(immutable.d.ts, 21, 3), Decl(immutable.d.ts, 22, 36), Decl(immutable.d.ts, 23, 37), Decl(immutable.d.ts, 24, 60)) ->T : Symbol(T, Decl(immutable.d.ts, 23, 23)) ->List : Symbol(List, Decl(immutable.d.ts, 17, 3), Decl(immutable.d.ts, 21, 3), Decl(immutable.d.ts, 22, 36), Decl(immutable.d.ts, 23, 37), Decl(immutable.d.ts, 24, 60)) ->T : Symbol(T, Decl(immutable.d.ts, 23, 23)) +>List : Symbol(List, Decl(immutable.ts, 17, 3), Decl(immutable.ts, 21, 3), Decl(immutable.ts, 22, 36), Decl(immutable.ts, 23, 37), Decl(immutable.ts, 24, 60)) +>T : Symbol(T, Decl(immutable.ts, 23, 23)) +>List : Symbol(List, Decl(immutable.ts, 17, 3), Decl(immutable.ts, 21, 3), Decl(immutable.ts, 22, 36), Decl(immutable.ts, 23, 37), Decl(immutable.ts, 24, 60)) +>T : Symbol(T, Decl(immutable.ts, 23, 23)) export function List(collection: Iterable): List; ->List : Symbol(List, Decl(immutable.d.ts, 17, 3), Decl(immutable.d.ts, 21, 3), Decl(immutable.d.ts, 22, 36), Decl(immutable.d.ts, 23, 37), Decl(immutable.d.ts, 24, 60)) ->T : Symbol(T, Decl(immutable.d.ts, 24, 23)) ->collection : Symbol(collection, Decl(immutable.d.ts, 24, 26)) +>List : Symbol(List, Decl(immutable.ts, 17, 3), Decl(immutable.ts, 21, 3), Decl(immutable.ts, 22, 36), Decl(immutable.ts, 23, 37), Decl(immutable.ts, 24, 60)) +>T : Symbol(T, Decl(immutable.ts, 24, 23)) +>collection : Symbol(collection, Decl(immutable.ts, 24, 26)) >Iterable : Symbol(Iterable, Decl(lib.es2015.iterable.d.ts, --, --)) ->T : Symbol(T, Decl(immutable.d.ts, 24, 23)) ->List : Symbol(List, Decl(immutable.d.ts, 17, 3), Decl(immutable.d.ts, 21, 3), Decl(immutable.d.ts, 22, 36), Decl(immutable.d.ts, 23, 37), Decl(immutable.d.ts, 24, 60)) ->T : Symbol(T, Decl(immutable.d.ts, 24, 23)) +>T : Symbol(T, Decl(immutable.ts, 24, 23)) +>List : Symbol(List, Decl(immutable.ts, 17, 3), Decl(immutable.ts, 21, 3), Decl(immutable.ts, 22, 36), Decl(immutable.ts, 23, 37), Decl(immutable.ts, 24, 60)) +>T : Symbol(T, Decl(immutable.ts, 24, 23)) export interface List extends Collection.Indexed { ->List : Symbol(List, Decl(immutable.d.ts, 17, 3), Decl(immutable.d.ts, 21, 3), Decl(immutable.d.ts, 22, 36), Decl(immutable.d.ts, 23, 37), Decl(immutable.d.ts, 24, 60)) ->T : Symbol(T, Decl(immutable.d.ts, 25, 24)) ->Collection.Indexed : Symbol(Collection.Indexed, Decl(immutable.d.ts, 355, 5), Decl(immutable.d.ts, 356, 28), Decl(immutable.d.ts, 357, 79)) ->Collection : Symbol(Collection, Decl(immutable.d.ts, 331, 3), Decl(immutable.d.ts, 402, 3), Decl(immutable.d.ts, 403, 79), Decl(immutable.d.ts, 404, 80), Decl(immutable.d.ts, 405, 86)) ->Indexed : Symbol(Collection.Indexed, Decl(immutable.d.ts, 355, 5), Decl(immutable.d.ts, 356, 28), Decl(immutable.d.ts, 357, 79)) ->T : Symbol(T, Decl(immutable.d.ts, 25, 24)) +>List : Symbol(List, Decl(immutable.ts, 17, 3), Decl(immutable.ts, 21, 3), Decl(immutable.ts, 22, 36), Decl(immutable.ts, 23, 37), Decl(immutable.ts, 24, 60)) +>T : Symbol(T, Decl(immutable.ts, 25, 24)) +>Collection.Indexed : Symbol(Collection.Indexed, Decl(immutable.ts, 355, 5), Decl(immutable.ts, 356, 28), Decl(immutable.ts, 357, 79)) +>Collection : Symbol(Collection, Decl(immutable.ts, 331, 3), Decl(immutable.ts, 402, 3), Decl(immutable.ts, 403, 79), Decl(immutable.ts, 404, 80), Decl(immutable.ts, 405, 86)) +>Indexed : Symbol(Collection.Indexed, Decl(immutable.ts, 355, 5), Decl(immutable.ts, 356, 28), Decl(immutable.ts, 357, 79)) +>T : Symbol(T, Decl(immutable.ts, 25, 24)) // Persistent changes set(index: number, value: T): List; ->set : Symbol(List.set, Decl(immutable.d.ts, 25, 58)) ->index : Symbol(index, Decl(immutable.d.ts, 27, 8)) ->value : Symbol(value, Decl(immutable.d.ts, 27, 22)) ->T : Symbol(T, Decl(immutable.d.ts, 25, 24)) ->List : Symbol(List, Decl(immutable.d.ts, 17, 3), Decl(immutable.d.ts, 21, 3), Decl(immutable.d.ts, 22, 36), Decl(immutable.d.ts, 23, 37), Decl(immutable.d.ts, 24, 60)) ->T : Symbol(T, Decl(immutable.d.ts, 25, 24)) +>set : Symbol(List.set, Decl(immutable.ts, 25, 58)) +>index : Symbol(index, Decl(immutable.ts, 27, 8)) +>value : Symbol(value, Decl(immutable.ts, 27, 22)) +>T : Symbol(T, Decl(immutable.ts, 25, 24)) +>List : Symbol(List, Decl(immutable.ts, 17, 3), Decl(immutable.ts, 21, 3), Decl(immutable.ts, 22, 36), Decl(immutable.ts, 23, 37), Decl(immutable.ts, 24, 60)) +>T : Symbol(T, Decl(immutable.ts, 25, 24)) delete(index: number): List; ->delete : Symbol(List.delete, Decl(immutable.d.ts, 27, 42)) ->index : Symbol(index, Decl(immutable.d.ts, 28, 11)) ->List : Symbol(List, Decl(immutable.d.ts, 17, 3), Decl(immutable.d.ts, 21, 3), Decl(immutable.d.ts, 22, 36), Decl(immutable.d.ts, 23, 37), Decl(immutable.d.ts, 24, 60)) ->T : Symbol(T, Decl(immutable.d.ts, 25, 24)) +>delete : Symbol(List.delete, Decl(immutable.ts, 27, 42)) +>index : Symbol(index, Decl(immutable.ts, 28, 11)) +>List : Symbol(List, Decl(immutable.ts, 17, 3), Decl(immutable.ts, 21, 3), Decl(immutable.ts, 22, 36), Decl(immutable.ts, 23, 37), Decl(immutable.ts, 24, 60)) +>T : Symbol(T, Decl(immutable.ts, 25, 24)) remove(index: number): List; ->remove : Symbol(List.remove, Decl(immutable.d.ts, 28, 35)) ->index : Symbol(index, Decl(immutable.d.ts, 29, 11)) ->List : Symbol(List, Decl(immutable.d.ts, 17, 3), Decl(immutable.d.ts, 21, 3), Decl(immutable.d.ts, 22, 36), Decl(immutable.d.ts, 23, 37), Decl(immutable.d.ts, 24, 60)) ->T : Symbol(T, Decl(immutable.d.ts, 25, 24)) +>remove : Symbol(List.remove, Decl(immutable.ts, 28, 35)) +>index : Symbol(index, Decl(immutable.ts, 29, 11)) +>List : Symbol(List, Decl(immutable.ts, 17, 3), Decl(immutable.ts, 21, 3), Decl(immutable.ts, 22, 36), Decl(immutable.ts, 23, 37), Decl(immutable.ts, 24, 60)) +>T : Symbol(T, Decl(immutable.ts, 25, 24)) insert(index: number, value: T): List; ->insert : Symbol(List.insert, Decl(immutable.d.ts, 29, 35)) ->index : Symbol(index, Decl(immutable.d.ts, 30, 11)) ->value : Symbol(value, Decl(immutable.d.ts, 30, 25)) ->T : Symbol(T, Decl(immutable.d.ts, 25, 24)) ->List : Symbol(List, Decl(immutable.d.ts, 17, 3), Decl(immutable.d.ts, 21, 3), Decl(immutable.d.ts, 22, 36), Decl(immutable.d.ts, 23, 37), Decl(immutable.d.ts, 24, 60)) ->T : Symbol(T, Decl(immutable.d.ts, 25, 24)) +>insert : Symbol(List.insert, Decl(immutable.ts, 29, 35)) +>index : Symbol(index, Decl(immutable.ts, 30, 11)) +>value : Symbol(value, Decl(immutable.ts, 30, 25)) +>T : Symbol(T, Decl(immutable.ts, 25, 24)) +>List : Symbol(List, Decl(immutable.ts, 17, 3), Decl(immutable.ts, 21, 3), Decl(immutable.ts, 22, 36), Decl(immutable.ts, 23, 37), Decl(immutable.ts, 24, 60)) +>T : Symbol(T, Decl(immutable.ts, 25, 24)) clear(): List; ->clear : Symbol(List.clear, Decl(immutable.d.ts, 30, 45)) ->List : Symbol(List, Decl(immutable.d.ts, 17, 3), Decl(immutable.d.ts, 21, 3), Decl(immutable.d.ts, 22, 36), Decl(immutable.d.ts, 23, 37), Decl(immutable.d.ts, 24, 60)) ->T : Symbol(T, Decl(immutable.d.ts, 25, 24)) +>clear : Symbol(List.clear, Decl(immutable.ts, 30, 45)) +>List : Symbol(List, Decl(immutable.ts, 17, 3), Decl(immutable.ts, 21, 3), Decl(immutable.ts, 22, 36), Decl(immutable.ts, 23, 37), Decl(immutable.ts, 24, 60)) +>T : Symbol(T, Decl(immutable.ts, 25, 24)) push(...values: Array): List; ->push : Symbol(List.push, Decl(immutable.d.ts, 31, 21)) ->values : Symbol(values, Decl(immutable.d.ts, 32, 9)) +>push : Symbol(List.push, Decl(immutable.ts, 31, 21)) +>values : Symbol(values, Decl(immutable.ts, 32, 9)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) ->T : Symbol(T, Decl(immutable.d.ts, 25, 24)) ->List : Symbol(List, Decl(immutable.d.ts, 17, 3), Decl(immutable.d.ts, 21, 3), Decl(immutable.d.ts, 22, 36), Decl(immutable.d.ts, 23, 37), Decl(immutable.d.ts, 24, 60)) ->T : Symbol(T, Decl(immutable.d.ts, 25, 24)) +>T : Symbol(T, Decl(immutable.ts, 25, 24)) +>List : Symbol(List, Decl(immutable.ts, 17, 3), Decl(immutable.ts, 21, 3), Decl(immutable.ts, 22, 36), Decl(immutable.ts, 23, 37), Decl(immutable.ts, 24, 60)) +>T : Symbol(T, Decl(immutable.ts, 25, 24)) pop(): List; ->pop : Symbol(List.pop, Decl(immutable.d.ts, 32, 39)) ->List : Symbol(List, Decl(immutable.d.ts, 17, 3), Decl(immutable.d.ts, 21, 3), Decl(immutable.d.ts, 22, 36), Decl(immutable.d.ts, 23, 37), Decl(immutable.d.ts, 24, 60)) ->T : Symbol(T, Decl(immutable.d.ts, 25, 24)) +>pop : Symbol(List.pop, Decl(immutable.ts, 32, 39)) +>List : Symbol(List, Decl(immutable.ts, 17, 3), Decl(immutable.ts, 21, 3), Decl(immutable.ts, 22, 36), Decl(immutable.ts, 23, 37), Decl(immutable.ts, 24, 60)) +>T : Symbol(T, Decl(immutable.ts, 25, 24)) unshift(...values: Array): List; ->unshift : Symbol(List.unshift, Decl(immutable.d.ts, 33, 19)) ->values : Symbol(values, Decl(immutable.d.ts, 34, 12)) +>unshift : Symbol(List.unshift, Decl(immutable.ts, 33, 19)) +>values : Symbol(values, Decl(immutable.ts, 34, 12)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) ->T : Symbol(T, Decl(immutable.d.ts, 25, 24)) ->List : Symbol(List, Decl(immutable.d.ts, 17, 3), Decl(immutable.d.ts, 21, 3), Decl(immutable.d.ts, 22, 36), Decl(immutable.d.ts, 23, 37), Decl(immutable.d.ts, 24, 60)) ->T : Symbol(T, Decl(immutable.d.ts, 25, 24)) +>T : Symbol(T, Decl(immutable.ts, 25, 24)) +>List : Symbol(List, Decl(immutable.ts, 17, 3), Decl(immutable.ts, 21, 3), Decl(immutable.ts, 22, 36), Decl(immutable.ts, 23, 37), Decl(immutable.ts, 24, 60)) +>T : Symbol(T, Decl(immutable.ts, 25, 24)) shift(): List; ->shift : Symbol(List.shift, Decl(immutable.d.ts, 34, 42)) ->List : Symbol(List, Decl(immutable.d.ts, 17, 3), Decl(immutable.d.ts, 21, 3), Decl(immutable.d.ts, 22, 36), Decl(immutable.d.ts, 23, 37), Decl(immutable.d.ts, 24, 60)) ->T : Symbol(T, Decl(immutable.d.ts, 25, 24)) +>shift : Symbol(List.shift, Decl(immutable.ts, 34, 42)) +>List : Symbol(List, Decl(immutable.ts, 17, 3), Decl(immutable.ts, 21, 3), Decl(immutable.ts, 22, 36), Decl(immutable.ts, 23, 37), Decl(immutable.ts, 24, 60)) +>T : Symbol(T, Decl(immutable.ts, 25, 24)) update(index: number, notSetValue: T, updater: (value: T) => T): this; ->update : Symbol(List.update, Decl(immutable.d.ts, 35, 21), Decl(immutable.d.ts, 36, 74), Decl(immutable.d.ts, 37, 58)) ->index : Symbol(index, Decl(immutable.d.ts, 36, 11)) ->notSetValue : Symbol(notSetValue, Decl(immutable.d.ts, 36, 25)) ->T : Symbol(T, Decl(immutable.d.ts, 25, 24)) ->updater : Symbol(updater, Decl(immutable.d.ts, 36, 41)) ->value : Symbol(value, Decl(immutable.d.ts, 36, 52)) ->T : Symbol(T, Decl(immutable.d.ts, 25, 24)) ->T : Symbol(T, Decl(immutable.d.ts, 25, 24)) +>update : Symbol(List.update, Decl(immutable.ts, 35, 21), Decl(immutable.ts, 36, 74), Decl(immutable.ts, 37, 58)) +>index : Symbol(index, Decl(immutable.ts, 36, 11)) +>notSetValue : Symbol(notSetValue, Decl(immutable.ts, 36, 25)) +>T : Symbol(T, Decl(immutable.ts, 25, 24)) +>updater : Symbol(updater, Decl(immutable.ts, 36, 41)) +>value : Symbol(value, Decl(immutable.ts, 36, 52)) +>T : Symbol(T, Decl(immutable.ts, 25, 24)) +>T : Symbol(T, Decl(immutable.ts, 25, 24)) update(index: number, updater: (value: T) => T): this; ->update : Symbol(List.update, Decl(immutable.d.ts, 35, 21), Decl(immutable.d.ts, 36, 74), Decl(immutable.d.ts, 37, 58)) ->index : Symbol(index, Decl(immutable.d.ts, 37, 11)) ->updater : Symbol(updater, Decl(immutable.d.ts, 37, 25)) ->value : Symbol(value, Decl(immutable.d.ts, 37, 36)) ->T : Symbol(T, Decl(immutable.d.ts, 25, 24)) ->T : Symbol(T, Decl(immutable.d.ts, 25, 24)) +>update : Symbol(List.update, Decl(immutable.ts, 35, 21), Decl(immutable.ts, 36, 74), Decl(immutable.ts, 37, 58)) +>index : Symbol(index, Decl(immutable.ts, 37, 11)) +>updater : Symbol(updater, Decl(immutable.ts, 37, 25)) +>value : Symbol(value, Decl(immutable.ts, 37, 36)) +>T : Symbol(T, Decl(immutable.ts, 25, 24)) +>T : Symbol(T, Decl(immutable.ts, 25, 24)) update(updater: (value: this) => R): R; ->update : Symbol(List.update, Decl(immutable.d.ts, 35, 21), Decl(immutable.d.ts, 36, 74), Decl(immutable.d.ts, 37, 58)) ->R : Symbol(R, Decl(immutable.d.ts, 38, 11)) ->updater : Symbol(updater, Decl(immutable.d.ts, 38, 14)) ->value : Symbol(value, Decl(immutable.d.ts, 38, 24)) ->R : Symbol(R, Decl(immutable.d.ts, 38, 11)) ->R : Symbol(R, Decl(immutable.d.ts, 38, 11)) +>update : Symbol(List.update, Decl(immutable.ts, 35, 21), Decl(immutable.ts, 36, 74), Decl(immutable.ts, 37, 58)) +>R : Symbol(R, Decl(immutable.ts, 38, 11)) +>updater : Symbol(updater, Decl(immutable.ts, 38, 14)) +>value : Symbol(value, Decl(immutable.ts, 38, 24)) +>R : Symbol(R, Decl(immutable.ts, 38, 11)) +>R : Symbol(R, Decl(immutable.ts, 38, 11)) merge(...collections: Array | Array>): this; ->merge : Symbol(List.merge, Decl(immutable.d.ts, 38, 46)) ->collections : Symbol(collections, Decl(immutable.d.ts, 39, 10)) +>merge : Symbol(List.merge, Decl(immutable.ts, 38, 46)) +>collections : Symbol(collections, Decl(immutable.ts, 39, 10)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) ->Collection : Symbol(Collection, Decl(immutable.d.ts, 331, 3), Decl(immutable.d.ts, 402, 3), Decl(immutable.d.ts, 403, 79), Decl(immutable.d.ts, 404, 80), Decl(immutable.d.ts, 405, 86)) ->Indexed : Symbol(Collection.Indexed, Decl(immutable.d.ts, 355, 5), Decl(immutable.d.ts, 356, 28), Decl(immutable.d.ts, 357, 79)) ->T : Symbol(T, Decl(immutable.d.ts, 25, 24)) +>Collection : Symbol(Collection, Decl(immutable.ts, 331, 3), Decl(immutable.ts, 402, 3), Decl(immutable.ts, 403, 79), Decl(immutable.ts, 404, 80), Decl(immutable.ts, 405, 86)) +>Indexed : Symbol(Collection.Indexed, Decl(immutable.ts, 355, 5), Decl(immutable.ts, 356, 28), Decl(immutable.ts, 357, 79)) +>T : Symbol(T, Decl(immutable.ts, 25, 24)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) ->T : Symbol(T, Decl(immutable.d.ts, 25, 24)) +>T : Symbol(T, Decl(immutable.ts, 25, 24)) mergeWith(merger: (oldVal: T, newVal: T, key: number) => T, ...collections: Array | Array>): this; ->mergeWith : Symbol(List.mergeWith, Decl(immutable.d.ts, 39, 73)) ->merger : Symbol(merger, Decl(immutable.d.ts, 40, 14)) ->oldVal : Symbol(oldVal, Decl(immutable.d.ts, 40, 23)) ->T : Symbol(T, Decl(immutable.d.ts, 25, 24)) ->newVal : Symbol(newVal, Decl(immutable.d.ts, 40, 33)) ->T : Symbol(T, Decl(immutable.d.ts, 25, 24)) ->key : Symbol(key, Decl(immutable.d.ts, 40, 44)) ->T : Symbol(T, Decl(immutable.d.ts, 25, 24)) ->collections : Symbol(collections, Decl(immutable.d.ts, 40, 63)) +>mergeWith : Symbol(List.mergeWith, Decl(immutable.ts, 39, 73)) +>merger : Symbol(merger, Decl(immutable.ts, 40, 14)) +>oldVal : Symbol(oldVal, Decl(immutable.ts, 40, 23)) +>T : Symbol(T, Decl(immutable.ts, 25, 24)) +>newVal : Symbol(newVal, Decl(immutable.ts, 40, 33)) +>T : Symbol(T, Decl(immutable.ts, 25, 24)) +>key : Symbol(key, Decl(immutable.ts, 40, 44)) +>T : Symbol(T, Decl(immutable.ts, 25, 24)) +>collections : Symbol(collections, Decl(immutable.ts, 40, 63)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) ->Collection : Symbol(Collection, Decl(immutable.d.ts, 331, 3), Decl(immutable.d.ts, 402, 3), Decl(immutable.d.ts, 403, 79), Decl(immutable.d.ts, 404, 80), Decl(immutable.d.ts, 405, 86)) ->Indexed : Symbol(Collection.Indexed, Decl(immutable.d.ts, 355, 5), Decl(immutable.d.ts, 356, 28), Decl(immutable.d.ts, 357, 79)) ->T : Symbol(T, Decl(immutable.d.ts, 25, 24)) +>Collection : Symbol(Collection, Decl(immutable.ts, 331, 3), Decl(immutable.ts, 402, 3), Decl(immutable.ts, 403, 79), Decl(immutable.ts, 404, 80), Decl(immutable.ts, 405, 86)) +>Indexed : Symbol(Collection.Indexed, Decl(immutable.ts, 355, 5), Decl(immutable.ts, 356, 28), Decl(immutable.ts, 357, 79)) +>T : Symbol(T, Decl(immutable.ts, 25, 24)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) ->T : Symbol(T, Decl(immutable.d.ts, 25, 24)) +>T : Symbol(T, Decl(immutable.ts, 25, 24)) mergeDeep(...collections: Array | Array>): this; ->mergeDeep : Symbol(List.mergeDeep, Decl(immutable.d.ts, 40, 127)) ->collections : Symbol(collections, Decl(immutable.d.ts, 41, 14)) +>mergeDeep : Symbol(List.mergeDeep, Decl(immutable.ts, 40, 127)) +>collections : Symbol(collections, Decl(immutable.ts, 41, 14)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) ->Collection : Symbol(Collection, Decl(immutable.d.ts, 331, 3), Decl(immutable.d.ts, 402, 3), Decl(immutable.d.ts, 403, 79), Decl(immutable.d.ts, 404, 80), Decl(immutable.d.ts, 405, 86)) ->Indexed : Symbol(Collection.Indexed, Decl(immutable.d.ts, 355, 5), Decl(immutable.d.ts, 356, 28), Decl(immutable.d.ts, 357, 79)) ->T : Symbol(T, Decl(immutable.d.ts, 25, 24)) +>Collection : Symbol(Collection, Decl(immutable.ts, 331, 3), Decl(immutable.ts, 402, 3), Decl(immutable.ts, 403, 79), Decl(immutable.ts, 404, 80), Decl(immutable.ts, 405, 86)) +>Indexed : Symbol(Collection.Indexed, Decl(immutable.ts, 355, 5), Decl(immutable.ts, 356, 28), Decl(immutable.ts, 357, 79)) +>T : Symbol(T, Decl(immutable.ts, 25, 24)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) ->T : Symbol(T, Decl(immutable.d.ts, 25, 24)) +>T : Symbol(T, Decl(immutable.ts, 25, 24)) mergeDeepWith(merger: (oldVal: T, newVal: T, key: number) => T, ...collections: Array | Array>): this; ->mergeDeepWith : Symbol(List.mergeDeepWith, Decl(immutable.d.ts, 41, 77)) ->merger : Symbol(merger, Decl(immutable.d.ts, 42, 18)) ->oldVal : Symbol(oldVal, Decl(immutable.d.ts, 42, 27)) ->T : Symbol(T, Decl(immutable.d.ts, 25, 24)) ->newVal : Symbol(newVal, Decl(immutable.d.ts, 42, 37)) ->T : Symbol(T, Decl(immutable.d.ts, 25, 24)) ->key : Symbol(key, Decl(immutable.d.ts, 42, 48)) ->T : Symbol(T, Decl(immutable.d.ts, 25, 24)) ->collections : Symbol(collections, Decl(immutable.d.ts, 42, 67)) +>mergeDeepWith : Symbol(List.mergeDeepWith, Decl(immutable.ts, 41, 77)) +>merger : Symbol(merger, Decl(immutable.ts, 42, 18)) +>oldVal : Symbol(oldVal, Decl(immutable.ts, 42, 27)) +>T : Symbol(T, Decl(immutable.ts, 25, 24)) +>newVal : Symbol(newVal, Decl(immutable.ts, 42, 37)) +>T : Symbol(T, Decl(immutable.ts, 25, 24)) +>key : Symbol(key, Decl(immutable.ts, 42, 48)) +>T : Symbol(T, Decl(immutable.ts, 25, 24)) +>collections : Symbol(collections, Decl(immutable.ts, 42, 67)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) ->Collection : Symbol(Collection, Decl(immutable.d.ts, 331, 3), Decl(immutable.d.ts, 402, 3), Decl(immutable.d.ts, 403, 79), Decl(immutable.d.ts, 404, 80), Decl(immutable.d.ts, 405, 86)) ->Indexed : Symbol(Collection.Indexed, Decl(immutable.d.ts, 355, 5), Decl(immutable.d.ts, 356, 28), Decl(immutable.d.ts, 357, 79)) ->T : Symbol(T, Decl(immutable.d.ts, 25, 24)) +>Collection : Symbol(Collection, Decl(immutable.ts, 331, 3), Decl(immutable.ts, 402, 3), Decl(immutable.ts, 403, 79), Decl(immutable.ts, 404, 80), Decl(immutable.ts, 405, 86)) +>Indexed : Symbol(Collection.Indexed, Decl(immutable.ts, 355, 5), Decl(immutable.ts, 356, 28), Decl(immutable.ts, 357, 79)) +>T : Symbol(T, Decl(immutable.ts, 25, 24)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) ->T : Symbol(T, Decl(immutable.d.ts, 25, 24)) +>T : Symbol(T, Decl(immutable.ts, 25, 24)) setSize(size: number): List; ->setSize : Symbol(List.setSize, Decl(immutable.d.ts, 42, 131)) ->size : Symbol(size, Decl(immutable.d.ts, 43, 12)) ->List : Symbol(List, Decl(immutable.d.ts, 17, 3), Decl(immutable.d.ts, 21, 3), Decl(immutable.d.ts, 22, 36), Decl(immutable.d.ts, 23, 37), Decl(immutable.d.ts, 24, 60)) ->T : Symbol(T, Decl(immutable.d.ts, 25, 24)) +>setSize : Symbol(List.setSize, Decl(immutable.ts, 42, 131)) +>size : Symbol(size, Decl(immutable.ts, 43, 12)) +>List : Symbol(List, Decl(immutable.ts, 17, 3), Decl(immutable.ts, 21, 3), Decl(immutable.ts, 22, 36), Decl(immutable.ts, 23, 37), Decl(immutable.ts, 24, 60)) +>T : Symbol(T, Decl(immutable.ts, 25, 24)) // Deep persistent changes setIn(keyPath: Iterable, value: any): this; ->setIn : Symbol(List.setIn, Decl(immutable.d.ts, 43, 35)) ->keyPath : Symbol(keyPath, Decl(immutable.d.ts, 45, 10)) +>setIn : Symbol(List.setIn, Decl(immutable.ts, 43, 35)) +>keyPath : Symbol(keyPath, Decl(immutable.ts, 45, 10)) >Iterable : Symbol(Iterable, Decl(lib.es2015.iterable.d.ts, --, --)) ->value : Symbol(value, Decl(immutable.d.ts, 45, 33)) +>value : Symbol(value, Decl(immutable.ts, 45, 33)) deleteIn(keyPath: Iterable): this; ->deleteIn : Symbol(List.deleteIn, Decl(immutable.d.ts, 45, 52)) ->keyPath : Symbol(keyPath, Decl(immutable.d.ts, 46, 13)) +>deleteIn : Symbol(List.deleteIn, Decl(immutable.ts, 45, 52)) +>keyPath : Symbol(keyPath, Decl(immutable.ts, 46, 13)) >Iterable : Symbol(Iterable, Decl(lib.es2015.iterable.d.ts, --, --)) removeIn(keyPath: Iterable): this; ->removeIn : Symbol(List.removeIn, Decl(immutable.d.ts, 46, 43)) ->keyPath : Symbol(keyPath, Decl(immutable.d.ts, 47, 13)) +>removeIn : Symbol(List.removeIn, Decl(immutable.ts, 46, 43)) +>keyPath : Symbol(keyPath, Decl(immutable.ts, 47, 13)) >Iterable : Symbol(Iterable, Decl(lib.es2015.iterable.d.ts, --, --)) updateIn(keyPath: Iterable, notSetValue: any, updater: (value: any) => any): this; ->updateIn : Symbol(List.updateIn, Decl(immutable.d.ts, 47, 43), Decl(immutable.d.ts, 48, 91)) ->keyPath : Symbol(keyPath, Decl(immutable.d.ts, 48, 13)) +>updateIn : Symbol(List.updateIn, Decl(immutable.ts, 47, 43), Decl(immutable.ts, 48, 91)) +>keyPath : Symbol(keyPath, Decl(immutable.ts, 48, 13)) >Iterable : Symbol(Iterable, Decl(lib.es2015.iterable.d.ts, --, --)) ->notSetValue : Symbol(notSetValue, Decl(immutable.d.ts, 48, 36)) ->updater : Symbol(updater, Decl(immutable.d.ts, 48, 54)) ->value : Symbol(value, Decl(immutable.d.ts, 48, 65)) +>notSetValue : Symbol(notSetValue, Decl(immutable.ts, 48, 36)) +>updater : Symbol(updater, Decl(immutable.ts, 48, 54)) +>value : Symbol(value, Decl(immutable.ts, 48, 65)) updateIn(keyPath: Iterable, updater: (value: any) => any): this; ->updateIn : Symbol(List.updateIn, Decl(immutable.d.ts, 47, 43), Decl(immutable.d.ts, 48, 91)) ->keyPath : Symbol(keyPath, Decl(immutable.d.ts, 49, 13)) +>updateIn : Symbol(List.updateIn, Decl(immutable.ts, 47, 43), Decl(immutable.ts, 48, 91)) +>keyPath : Symbol(keyPath, Decl(immutable.ts, 49, 13)) >Iterable : Symbol(Iterable, Decl(lib.es2015.iterable.d.ts, --, --)) ->updater : Symbol(updater, Decl(immutable.d.ts, 49, 36)) ->value : Symbol(value, Decl(immutable.d.ts, 49, 47)) +>updater : Symbol(updater, Decl(immutable.ts, 49, 36)) +>value : Symbol(value, Decl(immutable.ts, 49, 47)) mergeIn(keyPath: Iterable, ...collections: Array): this; ->mergeIn : Symbol(List.mergeIn, Decl(immutable.d.ts, 49, 73)) ->keyPath : Symbol(keyPath, Decl(immutable.d.ts, 50, 12)) +>mergeIn : Symbol(List.mergeIn, Decl(immutable.ts, 49, 73)) +>keyPath : Symbol(keyPath, Decl(immutable.ts, 50, 12)) >Iterable : Symbol(Iterable, Decl(lib.es2015.iterable.d.ts, --, --)) ->collections : Symbol(collections, Decl(immutable.d.ts, 50, 35)) +>collections : Symbol(collections, Decl(immutable.ts, 50, 35)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) mergeDeepIn(keyPath: Iterable, ...collections: Array): this; ->mergeDeepIn : Symbol(List.mergeDeepIn, Decl(immutable.d.ts, 50, 70)) ->keyPath : Symbol(keyPath, Decl(immutable.d.ts, 51, 16)) +>mergeDeepIn : Symbol(List.mergeDeepIn, Decl(immutable.ts, 50, 70)) +>keyPath : Symbol(keyPath, Decl(immutable.ts, 51, 16)) >Iterable : Symbol(Iterable, Decl(lib.es2015.iterable.d.ts, --, --)) ->collections : Symbol(collections, Decl(immutable.d.ts, 51, 39)) +>collections : Symbol(collections, Decl(immutable.ts, 51, 39)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) // Transient changes withMutations(mutator: (mutable: this) => any): this; ->withMutations : Symbol(List.withMutations, Decl(immutable.d.ts, 51, 74)) ->mutator : Symbol(mutator, Decl(immutable.d.ts, 53, 18)) ->mutable : Symbol(mutable, Decl(immutable.d.ts, 53, 28)) +>withMutations : Symbol(List.withMutations, Decl(immutable.ts, 51, 74)) +>mutator : Symbol(mutator, Decl(immutable.ts, 53, 18)) +>mutable : Symbol(mutable, Decl(immutable.ts, 53, 28)) asMutable(): this; ->asMutable : Symbol(List.asMutable, Decl(immutable.d.ts, 53, 57)) +>asMutable : Symbol(List.asMutable, Decl(immutable.ts, 53, 57)) asImmutable(): this; ->asImmutable : Symbol(List.asImmutable, Decl(immutable.d.ts, 54, 22)) +>asImmutable : Symbol(List.asImmutable, Decl(immutable.ts, 54, 22)) // Sequence algorithms concat(...valuesOrCollections: Array | C>): List; ->concat : Symbol(List.concat, Decl(immutable.d.ts, 55, 24)) ->C : Symbol(C, Decl(immutable.d.ts, 57, 11)) ->valuesOrCollections : Symbol(valuesOrCollections, Decl(immutable.d.ts, 57, 14)) +>concat : Symbol(List.concat, Decl(immutable.ts, 55, 24)) +>C : Symbol(C, Decl(immutable.ts, 57, 11)) +>valuesOrCollections : Symbol(valuesOrCollections, Decl(immutable.ts, 57, 14)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) >Iterable : Symbol(Iterable, Decl(lib.es2015.iterable.d.ts, --, --)) ->C : Symbol(C, Decl(immutable.d.ts, 57, 11)) ->C : Symbol(C, Decl(immutable.d.ts, 57, 11)) ->List : Symbol(List, Decl(immutable.d.ts, 17, 3), Decl(immutable.d.ts, 21, 3), Decl(immutable.d.ts, 22, 36), Decl(immutable.d.ts, 23, 37), Decl(immutable.d.ts, 24, 60)) ->T : Symbol(T, Decl(immutable.d.ts, 25, 24)) ->C : Symbol(C, Decl(immutable.d.ts, 57, 11)) +>C : Symbol(C, Decl(immutable.ts, 57, 11)) +>C : Symbol(C, Decl(immutable.ts, 57, 11)) +>List : Symbol(List, Decl(immutable.ts, 17, 3), Decl(immutable.ts, 21, 3), Decl(immutable.ts, 22, 36), Decl(immutable.ts, 23, 37), Decl(immutable.ts, 24, 60)) +>T : Symbol(T, Decl(immutable.ts, 25, 24)) +>C : Symbol(C, Decl(immutable.ts, 57, 11)) map(mapper: (value: T, key: number, iter: this) => M, context?: any): List; ->map : Symbol(List.map, Decl(immutable.d.ts, 57, 75)) ->M : Symbol(M, Decl(immutable.d.ts, 58, 8)) ->mapper : Symbol(mapper, Decl(immutable.d.ts, 58, 11)) ->value : Symbol(value, Decl(immutable.d.ts, 58, 20)) ->T : Symbol(T, Decl(immutable.d.ts, 25, 24)) ->key : Symbol(key, Decl(immutable.d.ts, 58, 29)) ->iter : Symbol(iter, Decl(immutable.d.ts, 58, 42)) ->M : Symbol(M, Decl(immutable.d.ts, 58, 8)) ->context : Symbol(context, Decl(immutable.d.ts, 58, 60)) ->List : Symbol(List, Decl(immutable.d.ts, 17, 3), Decl(immutable.d.ts, 21, 3), Decl(immutable.d.ts, 22, 36), Decl(immutable.d.ts, 23, 37), Decl(immutable.d.ts, 24, 60)) ->M : Symbol(M, Decl(immutable.d.ts, 58, 8)) +>map : Symbol(List.map, Decl(immutable.ts, 57, 75)) +>M : Symbol(M, Decl(immutable.ts, 58, 8)) +>mapper : Symbol(mapper, Decl(immutable.ts, 58, 11)) +>value : Symbol(value, Decl(immutable.ts, 58, 20)) +>T : Symbol(T, Decl(immutable.ts, 25, 24)) +>key : Symbol(key, Decl(immutable.ts, 58, 29)) +>iter : Symbol(iter, Decl(immutable.ts, 58, 42)) +>M : Symbol(M, Decl(immutable.ts, 58, 8)) +>context : Symbol(context, Decl(immutable.ts, 58, 60)) +>List : Symbol(List, Decl(immutable.ts, 17, 3), Decl(immutable.ts, 21, 3), Decl(immutable.ts, 22, 36), Decl(immutable.ts, 23, 37), Decl(immutable.ts, 24, 60)) +>M : Symbol(M, Decl(immutable.ts, 58, 8)) flatMap(mapper: (value: T, key: number, iter: this) => Iterable, context?: any): List; ->flatMap : Symbol(List.flatMap, Decl(immutable.d.ts, 58, 85)) ->M : Symbol(M, Decl(immutable.d.ts, 59, 12)) ->mapper : Symbol(mapper, Decl(immutable.d.ts, 59, 15)) ->value : Symbol(value, Decl(immutable.d.ts, 59, 24)) ->T : Symbol(T, Decl(immutable.d.ts, 25, 24)) ->key : Symbol(key, Decl(immutable.d.ts, 59, 33)) ->iter : Symbol(iter, Decl(immutable.d.ts, 59, 46)) +>flatMap : Symbol(List.flatMap, Decl(immutable.ts, 58, 85)) +>M : Symbol(M, Decl(immutable.ts, 59, 12)) +>mapper : Symbol(mapper, Decl(immutable.ts, 59, 15)) +>value : Symbol(value, Decl(immutable.ts, 59, 24)) +>T : Symbol(T, Decl(immutable.ts, 25, 24)) +>key : Symbol(key, Decl(immutable.ts, 59, 33)) +>iter : Symbol(iter, Decl(immutable.ts, 59, 46)) >Iterable : Symbol(Iterable, Decl(lib.es2015.iterable.d.ts, --, --)) ->M : Symbol(M, Decl(immutable.d.ts, 59, 12)) ->context : Symbol(context, Decl(immutable.d.ts, 59, 74)) ->List : Symbol(List, Decl(immutable.d.ts, 17, 3), Decl(immutable.d.ts, 21, 3), Decl(immutable.d.ts, 22, 36), Decl(immutable.d.ts, 23, 37), Decl(immutable.d.ts, 24, 60)) ->M : Symbol(M, Decl(immutable.d.ts, 59, 12)) +>M : Symbol(M, Decl(immutable.ts, 59, 12)) +>context : Symbol(context, Decl(immutable.ts, 59, 74)) +>List : Symbol(List, Decl(immutable.ts, 17, 3), Decl(immutable.ts, 21, 3), Decl(immutable.ts, 22, 36), Decl(immutable.ts, 23, 37), Decl(immutable.ts, 24, 60)) +>M : Symbol(M, Decl(immutable.ts, 59, 12)) filter(predicate: (value: T, index: number, iter: this) => value is F, context?: any): List; ->filter : Symbol(List.filter, Decl(immutable.d.ts, 59, 99), Decl(immutable.d.ts, 60, 112)) ->F : Symbol(F, Decl(immutable.d.ts, 60, 11)) ->T : Symbol(T, Decl(immutable.d.ts, 25, 24)) ->predicate : Symbol(predicate, Decl(immutable.d.ts, 60, 24)) ->value : Symbol(value, Decl(immutable.d.ts, 60, 36)) ->T : Symbol(T, Decl(immutable.d.ts, 25, 24)) ->index : Symbol(index, Decl(immutable.d.ts, 60, 45)) ->iter : Symbol(iter, Decl(immutable.d.ts, 60, 60)) ->value : Symbol(value, Decl(immutable.d.ts, 60, 36)) ->F : Symbol(F, Decl(immutable.d.ts, 60, 11)) ->context : Symbol(context, Decl(immutable.d.ts, 60, 87)) ->List : Symbol(List, Decl(immutable.d.ts, 17, 3), Decl(immutable.d.ts, 21, 3), Decl(immutable.d.ts, 22, 36), Decl(immutable.d.ts, 23, 37), Decl(immutable.d.ts, 24, 60)) ->F : Symbol(F, Decl(immutable.d.ts, 60, 11)) +>filter : Symbol(List.filter, Decl(immutable.ts, 59, 99), Decl(immutable.ts, 60, 112)) +>F : Symbol(F, Decl(immutable.ts, 60, 11)) +>T : Symbol(T, Decl(immutable.ts, 25, 24)) +>predicate : Symbol(predicate, Decl(immutable.ts, 60, 24)) +>value : Symbol(value, Decl(immutable.ts, 60, 36)) +>T : Symbol(T, Decl(immutable.ts, 25, 24)) +>index : Symbol(index, Decl(immutable.ts, 60, 45)) +>iter : Symbol(iter, Decl(immutable.ts, 60, 60)) +>value : Symbol(value, Decl(immutable.ts, 60, 36)) +>F : Symbol(F, Decl(immutable.ts, 60, 11)) +>context : Symbol(context, Decl(immutable.ts, 60, 87)) +>List : Symbol(List, Decl(immutable.ts, 17, 3), Decl(immutable.ts, 21, 3), Decl(immutable.ts, 22, 36), Decl(immutable.ts, 23, 37), Decl(immutable.ts, 24, 60)) +>F : Symbol(F, Decl(immutable.ts, 60, 11)) filter(predicate: (value: T, index: number, iter: this) => any, context?: any): this; ->filter : Symbol(List.filter, Decl(immutable.d.ts, 59, 99), Decl(immutable.d.ts, 60, 112)) ->predicate : Symbol(predicate, Decl(immutable.d.ts, 61, 11)) ->value : Symbol(value, Decl(immutable.d.ts, 61, 23)) ->T : Symbol(T, Decl(immutable.d.ts, 25, 24)) ->index : Symbol(index, Decl(immutable.d.ts, 61, 32)) ->iter : Symbol(iter, Decl(immutable.d.ts, 61, 47)) ->context : Symbol(context, Decl(immutable.d.ts, 61, 67)) +>filter : Symbol(List.filter, Decl(immutable.ts, 59, 99), Decl(immutable.ts, 60, 112)) +>predicate : Symbol(predicate, Decl(immutable.ts, 61, 11)) +>value : Symbol(value, Decl(immutable.ts, 61, 23)) +>T : Symbol(T, Decl(immutable.ts, 25, 24)) +>index : Symbol(index, Decl(immutable.ts, 61, 32)) +>iter : Symbol(iter, Decl(immutable.ts, 61, 47)) +>context : Symbol(context, Decl(immutable.ts, 61, 67)) } export module Map { ->Map : Symbol(Map, Decl(immutable.d.ts, 62, 3), Decl(immutable.d.ts, 66, 3), Decl(immutable.d.ts, 67, 69), Decl(immutable.d.ts, 68, 71), Decl(immutable.d.ts, 69, 66) ... and 2 more) +>Map : Symbol(Map, Decl(immutable.ts, 62, 3), Decl(immutable.ts, 66, 3), Decl(immutable.ts, 67, 69), Decl(immutable.ts, 68, 71), Decl(immutable.ts, 69, 66) ... and 2 more) function isMap(maybeMap: any): maybeMap is Map; ->isMap : Symbol(isMap, Decl(immutable.d.ts, 63, 21)) ->maybeMap : Symbol(maybeMap, Decl(immutable.d.ts, 64, 19)) ->maybeMap : Symbol(maybeMap, Decl(immutable.d.ts, 64, 19)) ->Map : Symbol(Map, Decl(immutable.d.ts, 62, 3), Decl(immutable.d.ts, 66, 3), Decl(immutable.d.ts, 67, 69), Decl(immutable.d.ts, 68, 71), Decl(immutable.d.ts, 69, 66) ... and 2 more) +>isMap : Symbol(isMap, Decl(immutable.ts, 63, 21)) +>maybeMap : Symbol(maybeMap, Decl(immutable.ts, 64, 19)) +>maybeMap : Symbol(maybeMap, Decl(immutable.ts, 64, 19)) +>Map : Symbol(Map, Decl(immutable.ts, 62, 3), Decl(immutable.ts, 66, 3), Decl(immutable.ts, 67, 69), Decl(immutable.ts, 68, 71), Decl(immutable.ts, 69, 66) ... and 2 more) function of(...keyValues: Array): Map; ->of : Symbol(of, Decl(immutable.d.ts, 64, 61)) ->keyValues : Symbol(keyValues, Decl(immutable.d.ts, 65, 16)) +>of : Symbol(of, Decl(immutable.ts, 64, 61)) +>keyValues : Symbol(keyValues, Decl(immutable.ts, 65, 16)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) ->Map : Symbol(Map, Decl(immutable.d.ts, 62, 3), Decl(immutable.d.ts, 66, 3), Decl(immutable.d.ts, 67, 69), Decl(immutable.d.ts, 68, 71), Decl(immutable.d.ts, 69, 66) ... and 2 more) +>Map : Symbol(Map, Decl(immutable.ts, 62, 3), Decl(immutable.ts, 66, 3), Decl(immutable.ts, 67, 69), Decl(immutable.ts, 68, 71), Decl(immutable.ts, 69, 66) ... and 2 more) } export function Map(collection: Iterable<[K, V]>): Map; ->Map : Symbol(Map, Decl(immutable.d.ts, 62, 3), Decl(immutable.d.ts, 66, 3), Decl(immutable.d.ts, 67, 69), Decl(immutable.d.ts, 68, 71), Decl(immutable.d.ts, 69, 66) ... and 2 more) ->K : Symbol(K, Decl(immutable.d.ts, 67, 22)) ->V : Symbol(V, Decl(immutable.d.ts, 67, 24)) ->collection : Symbol(collection, Decl(immutable.d.ts, 67, 28)) +>Map : Symbol(Map, Decl(immutable.ts, 62, 3), Decl(immutable.ts, 66, 3), Decl(immutable.ts, 67, 69), Decl(immutable.ts, 68, 71), Decl(immutable.ts, 69, 66) ... and 2 more) +>K : Symbol(K, Decl(immutable.ts, 67, 22)) +>V : Symbol(V, Decl(immutable.ts, 67, 24)) +>collection : Symbol(collection, Decl(immutable.ts, 67, 28)) >Iterable : Symbol(Iterable, Decl(lib.es2015.iterable.d.ts, --, --)) ->K : Symbol(K, Decl(immutable.d.ts, 67, 22)) ->V : Symbol(V, Decl(immutable.d.ts, 67, 24)) ->Map : Symbol(Map, Decl(immutable.d.ts, 62, 3), Decl(immutable.d.ts, 66, 3), Decl(immutable.d.ts, 67, 69), Decl(immutable.d.ts, 68, 71), Decl(immutable.d.ts, 69, 66) ... and 2 more) ->K : Symbol(K, Decl(immutable.d.ts, 67, 22)) ->V : Symbol(V, Decl(immutable.d.ts, 67, 24)) +>K : Symbol(K, Decl(immutable.ts, 67, 22)) +>V : Symbol(V, Decl(immutable.ts, 67, 24)) +>Map : Symbol(Map, Decl(immutable.ts, 62, 3), Decl(immutable.ts, 66, 3), Decl(immutable.ts, 67, 69), Decl(immutable.ts, 68, 71), Decl(immutable.ts, 69, 66) ... and 2 more) +>K : Symbol(K, Decl(immutable.ts, 67, 22)) +>V : Symbol(V, Decl(immutable.ts, 67, 24)) export function Map(collection: Iterable>): Map; ->Map : Symbol(Map, Decl(immutable.d.ts, 62, 3), Decl(immutable.d.ts, 66, 3), Decl(immutable.d.ts, 67, 69), Decl(immutable.d.ts, 68, 71), Decl(immutable.d.ts, 69, 66) ... and 2 more) ->T : Symbol(T, Decl(immutable.d.ts, 68, 22)) ->collection : Symbol(collection, Decl(immutable.d.ts, 68, 25)) +>Map : Symbol(Map, Decl(immutable.ts, 62, 3), Decl(immutable.ts, 66, 3), Decl(immutable.ts, 67, 69), Decl(immutable.ts, 68, 71), Decl(immutable.ts, 69, 66) ... and 2 more) +>T : Symbol(T, Decl(immutable.ts, 68, 22)) +>collection : Symbol(collection, Decl(immutable.ts, 68, 25)) >Iterable : Symbol(Iterable, Decl(lib.es2015.iterable.d.ts, --, --)) >Iterable : Symbol(Iterable, Decl(lib.es2015.iterable.d.ts, --, --)) ->T : Symbol(T, Decl(immutable.d.ts, 68, 22)) ->Map : Symbol(Map, Decl(immutable.d.ts, 62, 3), Decl(immutable.d.ts, 66, 3), Decl(immutable.d.ts, 67, 69), Decl(immutable.d.ts, 68, 71), Decl(immutable.d.ts, 69, 66) ... and 2 more) ->T : Symbol(T, Decl(immutable.d.ts, 68, 22)) ->T : Symbol(T, Decl(immutable.d.ts, 68, 22)) +>T : Symbol(T, Decl(immutable.ts, 68, 22)) +>Map : Symbol(Map, Decl(immutable.ts, 62, 3), Decl(immutable.ts, 66, 3), Decl(immutable.ts, 67, 69), Decl(immutable.ts, 68, 71), Decl(immutable.ts, 69, 66) ... and 2 more) +>T : Symbol(T, Decl(immutable.ts, 68, 22)) +>T : Symbol(T, Decl(immutable.ts, 68, 22)) export function Map(obj: {[key: string]: V}): Map; ->Map : Symbol(Map, Decl(immutable.d.ts, 62, 3), Decl(immutable.d.ts, 66, 3), Decl(immutable.d.ts, 67, 69), Decl(immutable.d.ts, 68, 71), Decl(immutable.d.ts, 69, 66) ... and 2 more) ->V : Symbol(V, Decl(immutable.d.ts, 69, 22)) ->obj : Symbol(obj, Decl(immutable.d.ts, 69, 25)) ->key : Symbol(key, Decl(immutable.d.ts, 69, 32)) ->V : Symbol(V, Decl(immutable.d.ts, 69, 22)) ->Map : Symbol(Map, Decl(immutable.d.ts, 62, 3), Decl(immutable.d.ts, 66, 3), Decl(immutable.d.ts, 67, 69), Decl(immutable.d.ts, 68, 71), Decl(immutable.d.ts, 69, 66) ... and 2 more) ->V : Symbol(V, Decl(immutable.d.ts, 69, 22)) +>Map : Symbol(Map, Decl(immutable.ts, 62, 3), Decl(immutable.ts, 66, 3), Decl(immutable.ts, 67, 69), Decl(immutable.ts, 68, 71), Decl(immutable.ts, 69, 66) ... and 2 more) +>V : Symbol(V, Decl(immutable.ts, 69, 22)) +>obj : Symbol(obj, Decl(immutable.ts, 69, 25)) +>key : Symbol(key, Decl(immutable.ts, 69, 32)) +>V : Symbol(V, Decl(immutable.ts, 69, 22)) +>Map : Symbol(Map, Decl(immutable.ts, 62, 3), Decl(immutable.ts, 66, 3), Decl(immutable.ts, 67, 69), Decl(immutable.ts, 68, 71), Decl(immutable.ts, 69, 66) ... and 2 more) +>V : Symbol(V, Decl(immutable.ts, 69, 22)) export function Map(): Map; ->Map : Symbol(Map, Decl(immutable.d.ts, 62, 3), Decl(immutable.d.ts, 66, 3), Decl(immutable.d.ts, 67, 69), Decl(immutable.d.ts, 68, 71), Decl(immutable.d.ts, 69, 66) ... and 2 more) ->K : Symbol(K, Decl(immutable.d.ts, 70, 22)) ->V : Symbol(V, Decl(immutable.d.ts, 70, 24)) ->Map : Symbol(Map, Decl(immutable.d.ts, 62, 3), Decl(immutable.d.ts, 66, 3), Decl(immutable.d.ts, 67, 69), Decl(immutable.d.ts, 68, 71), Decl(immutable.d.ts, 69, 66) ... and 2 more) ->K : Symbol(K, Decl(immutable.d.ts, 70, 22)) ->V : Symbol(V, Decl(immutable.d.ts, 70, 24)) +>Map : Symbol(Map, Decl(immutable.ts, 62, 3), Decl(immutable.ts, 66, 3), Decl(immutable.ts, 67, 69), Decl(immutable.ts, 68, 71), Decl(immutable.ts, 69, 66) ... and 2 more) +>K : Symbol(K, Decl(immutable.ts, 70, 22)) +>V : Symbol(V, Decl(immutable.ts, 70, 24)) +>Map : Symbol(Map, Decl(immutable.ts, 62, 3), Decl(immutable.ts, 66, 3), Decl(immutable.ts, 67, 69), Decl(immutable.ts, 68, 71), Decl(immutable.ts, 69, 66) ... and 2 more) +>K : Symbol(K, Decl(immutable.ts, 70, 22)) +>V : Symbol(V, Decl(immutable.ts, 70, 24)) export function Map(): Map; ->Map : Symbol(Map, Decl(immutable.d.ts, 62, 3), Decl(immutable.d.ts, 66, 3), Decl(immutable.d.ts, 67, 69), Decl(immutable.d.ts, 68, 71), Decl(immutable.d.ts, 69, 66) ... and 2 more) ->Map : Symbol(Map, Decl(immutable.d.ts, 62, 3), Decl(immutable.d.ts, 66, 3), Decl(immutable.d.ts, 67, 69), Decl(immutable.d.ts, 68, 71), Decl(immutable.d.ts, 69, 66) ... and 2 more) +>Map : Symbol(Map, Decl(immutable.ts, 62, 3), Decl(immutable.ts, 66, 3), Decl(immutable.ts, 67, 69), Decl(immutable.ts, 68, 71), Decl(immutable.ts, 69, 66) ... and 2 more) +>Map : Symbol(Map, Decl(immutable.ts, 62, 3), Decl(immutable.ts, 66, 3), Decl(immutable.ts, 67, 69), Decl(immutable.ts, 68, 71), Decl(immutable.ts, 69, 66) ... and 2 more) export interface Map extends Collection.Keyed { ->Map : Symbol(Map, Decl(immutable.d.ts, 62, 3), Decl(immutable.d.ts, 66, 3), Decl(immutable.d.ts, 67, 69), Decl(immutable.d.ts, 68, 71), Decl(immutable.d.ts, 69, 66) ... and 2 more) ->K : Symbol(K, Decl(immutable.d.ts, 72, 23)) ->V : Symbol(V, Decl(immutable.d.ts, 72, 25)) ->Collection.Keyed : Symbol(Collection.Keyed, Decl(immutable.d.ts, 336, 51), Decl(immutable.d.ts, 337, 26), Decl(immutable.d.ts, 338, 86), Decl(immutable.d.ts, 339, 83)) ->Collection : Symbol(Collection, Decl(immutable.d.ts, 331, 3), Decl(immutable.d.ts, 402, 3), Decl(immutable.d.ts, 403, 79), Decl(immutable.d.ts, 404, 80), Decl(immutable.d.ts, 405, 86)) ->Keyed : Symbol(Collection.Keyed, Decl(immutable.d.ts, 336, 51), Decl(immutable.d.ts, 337, 26), Decl(immutable.d.ts, 338, 86), Decl(immutable.d.ts, 339, 83)) ->K : Symbol(K, Decl(immutable.d.ts, 72, 23)) ->V : Symbol(V, Decl(immutable.d.ts, 72, 25)) +>Map : Symbol(Map, Decl(immutable.ts, 62, 3), Decl(immutable.ts, 66, 3), Decl(immutable.ts, 67, 69), Decl(immutable.ts, 68, 71), Decl(immutable.ts, 69, 66) ... and 2 more) +>K : Symbol(K, Decl(immutable.ts, 72, 23)) +>V : Symbol(V, Decl(immutable.ts, 72, 25)) +>Collection.Keyed : Symbol(Collection.Keyed, Decl(immutable.ts, 336, 51), Decl(immutable.ts, 337, 26), Decl(immutable.ts, 338, 86), Decl(immutable.ts, 339, 83)) +>Collection : Symbol(Collection, Decl(immutable.ts, 331, 3), Decl(immutable.ts, 402, 3), Decl(immutable.ts, 403, 79), Decl(immutable.ts, 404, 80), Decl(immutable.ts, 405, 86)) +>Keyed : Symbol(Collection.Keyed, Decl(immutable.ts, 336, 51), Decl(immutable.ts, 337, 26), Decl(immutable.ts, 338, 86), Decl(immutable.ts, 339, 83)) +>K : Symbol(K, Decl(immutable.ts, 72, 23)) +>V : Symbol(V, Decl(immutable.ts, 72, 25)) // Persistent changes set(key: K, value: V): this; ->set : Symbol(Map.set, Decl(immutable.d.ts, 72, 61)) ->key : Symbol(key, Decl(immutable.d.ts, 74, 8)) ->K : Symbol(K, Decl(immutable.d.ts, 72, 23)) ->value : Symbol(value, Decl(immutable.d.ts, 74, 15)) ->V : Symbol(V, Decl(immutable.d.ts, 72, 25)) +>set : Symbol(Map.set, Decl(immutable.ts, 72, 61)) +>key : Symbol(key, Decl(immutable.ts, 74, 8)) +>K : Symbol(K, Decl(immutable.ts, 72, 23)) +>value : Symbol(value, Decl(immutable.ts, 74, 15)) +>V : Symbol(V, Decl(immutable.ts, 72, 25)) delete(key: K): this; ->delete : Symbol(Map.delete, Decl(immutable.d.ts, 74, 32)) ->key : Symbol(key, Decl(immutable.d.ts, 75, 11)) ->K : Symbol(K, Decl(immutable.d.ts, 72, 23)) +>delete : Symbol(Map.delete, Decl(immutable.ts, 74, 32)) +>key : Symbol(key, Decl(immutable.ts, 75, 11)) +>K : Symbol(K, Decl(immutable.ts, 72, 23)) remove(key: K): this; ->remove : Symbol(Map.remove, Decl(immutable.d.ts, 75, 25)) ->key : Symbol(key, Decl(immutable.d.ts, 76, 11)) ->K : Symbol(K, Decl(immutable.d.ts, 72, 23)) +>remove : Symbol(Map.remove, Decl(immutable.ts, 75, 25)) +>key : Symbol(key, Decl(immutable.ts, 76, 11)) +>K : Symbol(K, Decl(immutable.ts, 72, 23)) deleteAll(keys: Iterable): this; ->deleteAll : Symbol(Map.deleteAll, Decl(immutable.d.ts, 76, 25)) ->keys : Symbol(keys, Decl(immutable.d.ts, 77, 14)) +>deleteAll : Symbol(Map.deleteAll, Decl(immutable.ts, 76, 25)) +>keys : Symbol(keys, Decl(immutable.ts, 77, 14)) >Iterable : Symbol(Iterable, Decl(lib.es2015.iterable.d.ts, --, --)) ->K : Symbol(K, Decl(immutable.d.ts, 72, 23)) +>K : Symbol(K, Decl(immutable.ts, 72, 23)) removeAll(keys: Iterable): this; ->removeAll : Symbol(Map.removeAll, Decl(immutable.d.ts, 77, 39)) ->keys : Symbol(keys, Decl(immutable.d.ts, 78, 14)) +>removeAll : Symbol(Map.removeAll, Decl(immutable.ts, 77, 39)) +>keys : Symbol(keys, Decl(immutable.ts, 78, 14)) >Iterable : Symbol(Iterable, Decl(lib.es2015.iterable.d.ts, --, --)) ->K : Symbol(K, Decl(immutable.d.ts, 72, 23)) +>K : Symbol(K, Decl(immutable.ts, 72, 23)) clear(): this; ->clear : Symbol(Map.clear, Decl(immutable.d.ts, 78, 39)) +>clear : Symbol(Map.clear, Decl(immutable.ts, 78, 39)) update(key: K, notSetValue: V, updater: (value: V) => V): this; ->update : Symbol(Map.update, Decl(immutable.d.ts, 79, 18), Decl(immutable.d.ts, 80, 67), Decl(immutable.d.ts, 81, 51)) ->key : Symbol(key, Decl(immutable.d.ts, 80, 11)) ->K : Symbol(K, Decl(immutable.d.ts, 72, 23)) ->notSetValue : Symbol(notSetValue, Decl(immutable.d.ts, 80, 18)) ->V : Symbol(V, Decl(immutable.d.ts, 72, 25)) ->updater : Symbol(updater, Decl(immutable.d.ts, 80, 34)) ->value : Symbol(value, Decl(immutable.d.ts, 80, 45)) ->V : Symbol(V, Decl(immutable.d.ts, 72, 25)) ->V : Symbol(V, Decl(immutable.d.ts, 72, 25)) +>update : Symbol(Map.update, Decl(immutable.ts, 79, 18), Decl(immutable.ts, 80, 67), Decl(immutable.ts, 81, 51)) +>key : Symbol(key, Decl(immutable.ts, 80, 11)) +>K : Symbol(K, Decl(immutable.ts, 72, 23)) +>notSetValue : Symbol(notSetValue, Decl(immutable.ts, 80, 18)) +>V : Symbol(V, Decl(immutable.ts, 72, 25)) +>updater : Symbol(updater, Decl(immutable.ts, 80, 34)) +>value : Symbol(value, Decl(immutable.ts, 80, 45)) +>V : Symbol(V, Decl(immutable.ts, 72, 25)) +>V : Symbol(V, Decl(immutable.ts, 72, 25)) update(key: K, updater: (value: V) => V): this; ->update : Symbol(Map.update, Decl(immutable.d.ts, 79, 18), Decl(immutable.d.ts, 80, 67), Decl(immutable.d.ts, 81, 51)) ->key : Symbol(key, Decl(immutable.d.ts, 81, 11)) ->K : Symbol(K, Decl(immutable.d.ts, 72, 23)) ->updater : Symbol(updater, Decl(immutable.d.ts, 81, 18)) ->value : Symbol(value, Decl(immutable.d.ts, 81, 29)) ->V : Symbol(V, Decl(immutable.d.ts, 72, 25)) ->V : Symbol(V, Decl(immutable.d.ts, 72, 25)) +>update : Symbol(Map.update, Decl(immutable.ts, 79, 18), Decl(immutable.ts, 80, 67), Decl(immutable.ts, 81, 51)) +>key : Symbol(key, Decl(immutable.ts, 81, 11)) +>K : Symbol(K, Decl(immutable.ts, 72, 23)) +>updater : Symbol(updater, Decl(immutable.ts, 81, 18)) +>value : Symbol(value, Decl(immutable.ts, 81, 29)) +>V : Symbol(V, Decl(immutable.ts, 72, 25)) +>V : Symbol(V, Decl(immutable.ts, 72, 25)) update(updater: (value: this) => R): R; ->update : Symbol(Map.update, Decl(immutable.d.ts, 79, 18), Decl(immutable.d.ts, 80, 67), Decl(immutable.d.ts, 81, 51)) ->R : Symbol(R, Decl(immutable.d.ts, 82, 11)) ->updater : Symbol(updater, Decl(immutable.d.ts, 82, 14)) ->value : Symbol(value, Decl(immutable.d.ts, 82, 24)) ->R : Symbol(R, Decl(immutable.d.ts, 82, 11)) ->R : Symbol(R, Decl(immutable.d.ts, 82, 11)) +>update : Symbol(Map.update, Decl(immutable.ts, 79, 18), Decl(immutable.ts, 80, 67), Decl(immutable.ts, 81, 51)) +>R : Symbol(R, Decl(immutable.ts, 82, 11)) +>updater : Symbol(updater, Decl(immutable.ts, 82, 14)) +>value : Symbol(value, Decl(immutable.ts, 82, 24)) +>R : Symbol(R, Decl(immutable.ts, 82, 11)) +>R : Symbol(R, Decl(immutable.ts, 82, 11)) merge(...collections: Array | {[key: string]: V}>): this; ->merge : Symbol(Map.merge, Decl(immutable.d.ts, 82, 46)) ->collections : Symbol(collections, Decl(immutable.d.ts, 83, 10)) +>merge : Symbol(Map.merge, Decl(immutable.ts, 82, 46)) +>collections : Symbol(collections, Decl(immutable.ts, 83, 10)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) ->Collection : Symbol(Collection, Decl(immutable.d.ts, 331, 3), Decl(immutable.d.ts, 402, 3), Decl(immutable.d.ts, 403, 79), Decl(immutable.d.ts, 404, 80), Decl(immutable.d.ts, 405, 86)) ->K : Symbol(K, Decl(immutable.d.ts, 72, 23)) ->V : Symbol(V, Decl(immutable.d.ts, 72, 25)) ->key : Symbol(key, Decl(immutable.d.ts, 83, 53)) ->V : Symbol(V, Decl(immutable.d.ts, 72, 25)) +>Collection : Symbol(Collection, Decl(immutable.ts, 331, 3), Decl(immutable.ts, 402, 3), Decl(immutable.ts, 403, 79), Decl(immutable.ts, 404, 80), Decl(immutable.ts, 405, 86)) +>K : Symbol(K, Decl(immutable.ts, 72, 23)) +>V : Symbol(V, Decl(immutable.ts, 72, 25)) +>key : Symbol(key, Decl(immutable.ts, 83, 53)) +>V : Symbol(V, Decl(immutable.ts, 72, 25)) mergeWith(merger: (oldVal: V, newVal: V, key: K) => V, ...collections: Array | {[key: string]: V}>): this; ->mergeWith : Symbol(Map.mergeWith, Decl(immutable.d.ts, 83, 78)) ->merger : Symbol(merger, Decl(immutable.d.ts, 84, 14)) ->oldVal : Symbol(oldVal, Decl(immutable.d.ts, 84, 23)) ->V : Symbol(V, Decl(immutable.d.ts, 72, 25)) ->newVal : Symbol(newVal, Decl(immutable.d.ts, 84, 33)) ->V : Symbol(V, Decl(immutable.d.ts, 72, 25)) ->key : Symbol(key, Decl(immutable.d.ts, 84, 44)) ->K : Symbol(K, Decl(immutable.d.ts, 72, 23)) ->V : Symbol(V, Decl(immutable.d.ts, 72, 25)) ->collections : Symbol(collections, Decl(immutable.d.ts, 84, 58)) +>mergeWith : Symbol(Map.mergeWith, Decl(immutable.ts, 83, 78)) +>merger : Symbol(merger, Decl(immutable.ts, 84, 14)) +>oldVal : Symbol(oldVal, Decl(immutable.ts, 84, 23)) +>V : Symbol(V, Decl(immutable.ts, 72, 25)) +>newVal : Symbol(newVal, Decl(immutable.ts, 84, 33)) +>V : Symbol(V, Decl(immutable.ts, 72, 25)) +>key : Symbol(key, Decl(immutable.ts, 84, 44)) +>K : Symbol(K, Decl(immutable.ts, 72, 23)) +>V : Symbol(V, Decl(immutable.ts, 72, 25)) +>collections : Symbol(collections, Decl(immutable.ts, 84, 58)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) ->Collection : Symbol(Collection, Decl(immutable.d.ts, 331, 3), Decl(immutable.d.ts, 402, 3), Decl(immutable.d.ts, 403, 79), Decl(immutable.d.ts, 404, 80), Decl(immutable.d.ts, 405, 86)) ->K : Symbol(K, Decl(immutable.d.ts, 72, 23)) ->V : Symbol(V, Decl(immutable.d.ts, 72, 25)) ->key : Symbol(key, Decl(immutable.d.ts, 84, 102)) ->V : Symbol(V, Decl(immutable.d.ts, 72, 25)) +>Collection : Symbol(Collection, Decl(immutable.ts, 331, 3), Decl(immutable.ts, 402, 3), Decl(immutable.ts, 403, 79), Decl(immutable.ts, 404, 80), Decl(immutable.ts, 405, 86)) +>K : Symbol(K, Decl(immutable.ts, 72, 23)) +>V : Symbol(V, Decl(immutable.ts, 72, 25)) +>key : Symbol(key, Decl(immutable.ts, 84, 102)) +>V : Symbol(V, Decl(immutable.ts, 72, 25)) mergeDeep(...collections: Array | {[key: string]: V}>): this; ->mergeDeep : Symbol(Map.mergeDeep, Decl(immutable.d.ts, 84, 127)) ->collections : Symbol(collections, Decl(immutable.d.ts, 85, 14)) +>mergeDeep : Symbol(Map.mergeDeep, Decl(immutable.ts, 84, 127)) +>collections : Symbol(collections, Decl(immutable.ts, 85, 14)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) ->Collection : Symbol(Collection, Decl(immutable.d.ts, 331, 3), Decl(immutable.d.ts, 402, 3), Decl(immutable.d.ts, 403, 79), Decl(immutable.d.ts, 404, 80), Decl(immutable.d.ts, 405, 86)) ->K : Symbol(K, Decl(immutable.d.ts, 72, 23)) ->V : Symbol(V, Decl(immutable.d.ts, 72, 25)) ->key : Symbol(key, Decl(immutable.d.ts, 85, 57)) ->V : Symbol(V, Decl(immutable.d.ts, 72, 25)) +>Collection : Symbol(Collection, Decl(immutable.ts, 331, 3), Decl(immutable.ts, 402, 3), Decl(immutable.ts, 403, 79), Decl(immutable.ts, 404, 80), Decl(immutable.ts, 405, 86)) +>K : Symbol(K, Decl(immutable.ts, 72, 23)) +>V : Symbol(V, Decl(immutable.ts, 72, 25)) +>key : Symbol(key, Decl(immutable.ts, 85, 57)) +>V : Symbol(V, Decl(immutable.ts, 72, 25)) mergeDeepWith(merger: (oldVal: V, newVal: V, key: K) => V, ...collections: Array | {[key: string]: V}>): this; ->mergeDeepWith : Symbol(Map.mergeDeepWith, Decl(immutable.d.ts, 85, 82)) ->merger : Symbol(merger, Decl(immutable.d.ts, 86, 18)) ->oldVal : Symbol(oldVal, Decl(immutable.d.ts, 86, 27)) ->V : Symbol(V, Decl(immutable.d.ts, 72, 25)) ->newVal : Symbol(newVal, Decl(immutable.d.ts, 86, 37)) ->V : Symbol(V, Decl(immutable.d.ts, 72, 25)) ->key : Symbol(key, Decl(immutable.d.ts, 86, 48)) ->K : Symbol(K, Decl(immutable.d.ts, 72, 23)) ->V : Symbol(V, Decl(immutable.d.ts, 72, 25)) ->collections : Symbol(collections, Decl(immutable.d.ts, 86, 62)) +>mergeDeepWith : Symbol(Map.mergeDeepWith, Decl(immutable.ts, 85, 82)) +>merger : Symbol(merger, Decl(immutable.ts, 86, 18)) +>oldVal : Symbol(oldVal, Decl(immutable.ts, 86, 27)) +>V : Symbol(V, Decl(immutable.ts, 72, 25)) +>newVal : Symbol(newVal, Decl(immutable.ts, 86, 37)) +>V : Symbol(V, Decl(immutable.ts, 72, 25)) +>key : Symbol(key, Decl(immutable.ts, 86, 48)) +>K : Symbol(K, Decl(immutable.ts, 72, 23)) +>V : Symbol(V, Decl(immutable.ts, 72, 25)) +>collections : Symbol(collections, Decl(immutable.ts, 86, 62)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) ->Collection : Symbol(Collection, Decl(immutable.d.ts, 331, 3), Decl(immutable.d.ts, 402, 3), Decl(immutable.d.ts, 403, 79), Decl(immutable.d.ts, 404, 80), Decl(immutable.d.ts, 405, 86)) ->K : Symbol(K, Decl(immutable.d.ts, 72, 23)) ->V : Symbol(V, Decl(immutable.d.ts, 72, 25)) ->key : Symbol(key, Decl(immutable.d.ts, 86, 106)) ->V : Symbol(V, Decl(immutable.d.ts, 72, 25)) +>Collection : Symbol(Collection, Decl(immutable.ts, 331, 3), Decl(immutable.ts, 402, 3), Decl(immutable.ts, 403, 79), Decl(immutable.ts, 404, 80), Decl(immutable.ts, 405, 86)) +>K : Symbol(K, Decl(immutable.ts, 72, 23)) +>V : Symbol(V, Decl(immutable.ts, 72, 25)) +>key : Symbol(key, Decl(immutable.ts, 86, 106)) +>V : Symbol(V, Decl(immutable.ts, 72, 25)) // Deep persistent changes setIn(keyPath: Iterable, value: any): this; ->setIn : Symbol(Map.setIn, Decl(immutable.d.ts, 86, 131)) ->keyPath : Symbol(keyPath, Decl(immutable.d.ts, 88, 10)) +>setIn : Symbol(Map.setIn, Decl(immutable.ts, 86, 131)) +>keyPath : Symbol(keyPath, Decl(immutable.ts, 88, 10)) >Iterable : Symbol(Iterable, Decl(lib.es2015.iterable.d.ts, --, --)) ->value : Symbol(value, Decl(immutable.d.ts, 88, 33)) +>value : Symbol(value, Decl(immutable.ts, 88, 33)) deleteIn(keyPath: Iterable): this; ->deleteIn : Symbol(Map.deleteIn, Decl(immutable.d.ts, 88, 52)) ->keyPath : Symbol(keyPath, Decl(immutable.d.ts, 89, 13)) +>deleteIn : Symbol(Map.deleteIn, Decl(immutable.ts, 88, 52)) +>keyPath : Symbol(keyPath, Decl(immutable.ts, 89, 13)) >Iterable : Symbol(Iterable, Decl(lib.es2015.iterable.d.ts, --, --)) removeIn(keyPath: Iterable): this; ->removeIn : Symbol(Map.removeIn, Decl(immutable.d.ts, 89, 43)) ->keyPath : Symbol(keyPath, Decl(immutable.d.ts, 90, 13)) +>removeIn : Symbol(Map.removeIn, Decl(immutable.ts, 89, 43)) +>keyPath : Symbol(keyPath, Decl(immutable.ts, 90, 13)) >Iterable : Symbol(Iterable, Decl(lib.es2015.iterable.d.ts, --, --)) updateIn(keyPath: Iterable, notSetValue: any, updater: (value: any) => any): this; ->updateIn : Symbol(Map.updateIn, Decl(immutable.d.ts, 90, 43), Decl(immutable.d.ts, 91, 91)) ->keyPath : Symbol(keyPath, Decl(immutable.d.ts, 91, 13)) +>updateIn : Symbol(Map.updateIn, Decl(immutable.ts, 90, 43), Decl(immutable.ts, 91, 91)) +>keyPath : Symbol(keyPath, Decl(immutable.ts, 91, 13)) >Iterable : Symbol(Iterable, Decl(lib.es2015.iterable.d.ts, --, --)) ->notSetValue : Symbol(notSetValue, Decl(immutable.d.ts, 91, 36)) ->updater : Symbol(updater, Decl(immutable.d.ts, 91, 54)) ->value : Symbol(value, Decl(immutable.d.ts, 91, 65)) +>notSetValue : Symbol(notSetValue, Decl(immutable.ts, 91, 36)) +>updater : Symbol(updater, Decl(immutable.ts, 91, 54)) +>value : Symbol(value, Decl(immutable.ts, 91, 65)) updateIn(keyPath: Iterable, updater: (value: any) => any): this; ->updateIn : Symbol(Map.updateIn, Decl(immutable.d.ts, 90, 43), Decl(immutable.d.ts, 91, 91)) ->keyPath : Symbol(keyPath, Decl(immutable.d.ts, 92, 13)) +>updateIn : Symbol(Map.updateIn, Decl(immutable.ts, 90, 43), Decl(immutable.ts, 91, 91)) +>keyPath : Symbol(keyPath, Decl(immutable.ts, 92, 13)) >Iterable : Symbol(Iterable, Decl(lib.es2015.iterable.d.ts, --, --)) ->updater : Symbol(updater, Decl(immutable.d.ts, 92, 36)) ->value : Symbol(value, Decl(immutable.d.ts, 92, 47)) +>updater : Symbol(updater, Decl(immutable.ts, 92, 36)) +>value : Symbol(value, Decl(immutable.ts, 92, 47)) mergeIn(keyPath: Iterable, ...collections: Array): this; ->mergeIn : Symbol(Map.mergeIn, Decl(immutable.d.ts, 92, 73)) ->keyPath : Symbol(keyPath, Decl(immutable.d.ts, 93, 12)) +>mergeIn : Symbol(Map.mergeIn, Decl(immutable.ts, 92, 73)) +>keyPath : Symbol(keyPath, Decl(immutable.ts, 93, 12)) >Iterable : Symbol(Iterable, Decl(lib.es2015.iterable.d.ts, --, --)) ->collections : Symbol(collections, Decl(immutable.d.ts, 93, 35)) +>collections : Symbol(collections, Decl(immutable.ts, 93, 35)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) mergeDeepIn(keyPath: Iterable, ...collections: Array): this; ->mergeDeepIn : Symbol(Map.mergeDeepIn, Decl(immutable.d.ts, 93, 70)) ->keyPath : Symbol(keyPath, Decl(immutable.d.ts, 94, 16)) +>mergeDeepIn : Symbol(Map.mergeDeepIn, Decl(immutable.ts, 93, 70)) +>keyPath : Symbol(keyPath, Decl(immutable.ts, 94, 16)) >Iterable : Symbol(Iterable, Decl(lib.es2015.iterable.d.ts, --, --)) ->collections : Symbol(collections, Decl(immutable.d.ts, 94, 39)) +>collections : Symbol(collections, Decl(immutable.ts, 94, 39)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) // Transient changes withMutations(mutator: (mutable: this) => any): this; ->withMutations : Symbol(Map.withMutations, Decl(immutable.d.ts, 94, 74)) ->mutator : Symbol(mutator, Decl(immutable.d.ts, 96, 18)) ->mutable : Symbol(mutable, Decl(immutable.d.ts, 96, 28)) +>withMutations : Symbol(Map.withMutations, Decl(immutable.ts, 94, 74)) +>mutator : Symbol(mutator, Decl(immutable.ts, 96, 18)) +>mutable : Symbol(mutable, Decl(immutable.ts, 96, 28)) asMutable(): this; ->asMutable : Symbol(Map.asMutable, Decl(immutable.d.ts, 96, 57)) +>asMutable : Symbol(Map.asMutable, Decl(immutable.ts, 96, 57)) asImmutable(): this; ->asImmutable : Symbol(Map.asImmutable, Decl(immutable.d.ts, 97, 22)) +>asImmutable : Symbol(Map.asImmutable, Decl(immutable.ts, 97, 22)) // Sequence algorithms concat(...collections: Array>): Map; ->concat : Symbol(Map.concat, Decl(immutable.d.ts, 98, 24), Decl(immutable.d.ts, 100, 83)) ->KC : Symbol(KC, Decl(immutable.d.ts, 100, 11)) ->VC : Symbol(VC, Decl(immutable.d.ts, 100, 14)) ->collections : Symbol(collections, Decl(immutable.d.ts, 100, 19)) +>concat : Symbol(Map.concat, Decl(immutable.ts, 98, 24), Decl(immutable.ts, 100, 83)) +>KC : Symbol(KC, Decl(immutable.ts, 100, 11)) +>VC : Symbol(VC, Decl(immutable.ts, 100, 14)) +>collections : Symbol(collections, Decl(immutable.ts, 100, 19)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) >Iterable : Symbol(Iterable, Decl(lib.es2015.iterable.d.ts, --, --)) ->KC : Symbol(KC, Decl(immutable.d.ts, 100, 11)) ->VC : Symbol(VC, Decl(immutable.d.ts, 100, 14)) ->Map : Symbol(Map, Decl(immutable.d.ts, 62, 3), Decl(immutable.d.ts, 66, 3), Decl(immutable.d.ts, 67, 69), Decl(immutable.d.ts, 68, 71), Decl(immutable.d.ts, 69, 66) ... and 2 more) ->K : Symbol(K, Decl(immutable.d.ts, 72, 23)) ->KC : Symbol(KC, Decl(immutable.d.ts, 100, 11)) ->V : Symbol(V, Decl(immutable.d.ts, 72, 25)) ->VC : Symbol(VC, Decl(immutable.d.ts, 100, 14)) +>KC : Symbol(KC, Decl(immutable.ts, 100, 11)) +>VC : Symbol(VC, Decl(immutable.ts, 100, 14)) +>Map : Symbol(Map, Decl(immutable.ts, 62, 3), Decl(immutable.ts, 66, 3), Decl(immutable.ts, 67, 69), Decl(immutable.ts, 68, 71), Decl(immutable.ts, 69, 66) ... and 2 more) +>K : Symbol(K, Decl(immutable.ts, 72, 23)) +>KC : Symbol(KC, Decl(immutable.ts, 100, 11)) +>V : Symbol(V, Decl(immutable.ts, 72, 25)) +>VC : Symbol(VC, Decl(immutable.ts, 100, 14)) concat(...collections: Array<{[key: string]: C}>): Map; ->concat : Symbol(Map.concat, Decl(immutable.d.ts, 98, 24), Decl(immutable.d.ts, 100, 83)) ->C : Symbol(C, Decl(immutable.d.ts, 101, 11)) ->collections : Symbol(collections, Decl(immutable.d.ts, 101, 14)) +>concat : Symbol(Map.concat, Decl(immutable.ts, 98, 24), Decl(immutable.ts, 100, 83)) +>C : Symbol(C, Decl(immutable.ts, 101, 11)) +>collections : Symbol(collections, Decl(immutable.ts, 101, 14)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) ->key : Symbol(key, Decl(immutable.d.ts, 101, 38)) ->C : Symbol(C, Decl(immutable.d.ts, 101, 11)) ->Map : Symbol(Map, Decl(immutable.d.ts, 62, 3), Decl(immutable.d.ts, 66, 3), Decl(immutable.d.ts, 67, 69), Decl(immutable.d.ts, 68, 71), Decl(immutable.d.ts, 69, 66) ... and 2 more) ->K : Symbol(K, Decl(immutable.d.ts, 72, 23)) ->V : Symbol(V, Decl(immutable.d.ts, 72, 25)) ->C : Symbol(C, Decl(immutable.d.ts, 101, 11)) +>key : Symbol(key, Decl(immutable.ts, 101, 38)) +>C : Symbol(C, Decl(immutable.ts, 101, 11)) +>Map : Symbol(Map, Decl(immutable.ts, 62, 3), Decl(immutable.ts, 66, 3), Decl(immutable.ts, 67, 69), Decl(immutable.ts, 68, 71), Decl(immutable.ts, 69, 66) ... and 2 more) +>K : Symbol(K, Decl(immutable.ts, 72, 23)) +>V : Symbol(V, Decl(immutable.ts, 72, 25)) +>C : Symbol(C, Decl(immutable.ts, 101, 11)) map(mapper: (value: V, key: K, iter: this) => M, context?: any): Map; ->map : Symbol(Map.map, Decl(immutable.d.ts, 101, 81)) ->M : Symbol(M, Decl(immutable.d.ts, 102, 8)) ->mapper : Symbol(mapper, Decl(immutable.d.ts, 102, 11)) ->value : Symbol(value, Decl(immutable.d.ts, 102, 20)) ->V : Symbol(V, Decl(immutable.d.ts, 72, 25)) ->key : Symbol(key, Decl(immutable.d.ts, 102, 29)) ->K : Symbol(K, Decl(immutable.d.ts, 72, 23)) ->iter : Symbol(iter, Decl(immutable.d.ts, 102, 37)) ->M : Symbol(M, Decl(immutable.d.ts, 102, 8)) ->context : Symbol(context, Decl(immutable.d.ts, 102, 55)) ->Map : Symbol(Map, Decl(immutable.d.ts, 62, 3), Decl(immutable.d.ts, 66, 3), Decl(immutable.d.ts, 67, 69), Decl(immutable.d.ts, 68, 71), Decl(immutable.d.ts, 69, 66) ... and 2 more) ->K : Symbol(K, Decl(immutable.d.ts, 72, 23)) ->M : Symbol(M, Decl(immutable.d.ts, 102, 8)) +>map : Symbol(Map.map, Decl(immutable.ts, 101, 81)) +>M : Symbol(M, Decl(immutable.ts, 102, 8)) +>mapper : Symbol(mapper, Decl(immutable.ts, 102, 11)) +>value : Symbol(value, Decl(immutable.ts, 102, 20)) +>V : Symbol(V, Decl(immutable.ts, 72, 25)) +>key : Symbol(key, Decl(immutable.ts, 102, 29)) +>K : Symbol(K, Decl(immutable.ts, 72, 23)) +>iter : Symbol(iter, Decl(immutable.ts, 102, 37)) +>M : Symbol(M, Decl(immutable.ts, 102, 8)) +>context : Symbol(context, Decl(immutable.ts, 102, 55)) +>Map : Symbol(Map, Decl(immutable.ts, 62, 3), Decl(immutable.ts, 66, 3), Decl(immutable.ts, 67, 69), Decl(immutable.ts, 68, 71), Decl(immutable.ts, 69, 66) ... and 2 more) +>K : Symbol(K, Decl(immutable.ts, 72, 23)) +>M : Symbol(M, Decl(immutable.ts, 102, 8)) mapKeys(mapper: (key: K, value: V, iter: this) => M, context?: any): Map; ->mapKeys : Symbol(Map.mapKeys, Decl(immutable.d.ts, 102, 82)) ->M : Symbol(M, Decl(immutable.d.ts, 103, 12)) ->mapper : Symbol(mapper, Decl(immutable.d.ts, 103, 15)) ->key : Symbol(key, Decl(immutable.d.ts, 103, 24)) ->K : Symbol(K, Decl(immutable.d.ts, 72, 23)) ->value : Symbol(value, Decl(immutable.d.ts, 103, 31)) ->V : Symbol(V, Decl(immutable.d.ts, 72, 25)) ->iter : Symbol(iter, Decl(immutable.d.ts, 103, 41)) ->M : Symbol(M, Decl(immutable.d.ts, 103, 12)) ->context : Symbol(context, Decl(immutable.d.ts, 103, 59)) ->Map : Symbol(Map, Decl(immutable.d.ts, 62, 3), Decl(immutable.d.ts, 66, 3), Decl(immutable.d.ts, 67, 69), Decl(immutable.d.ts, 68, 71), Decl(immutable.d.ts, 69, 66) ... and 2 more) ->M : Symbol(M, Decl(immutable.d.ts, 103, 12)) ->V : Symbol(V, Decl(immutable.d.ts, 72, 25)) +>mapKeys : Symbol(Map.mapKeys, Decl(immutable.ts, 102, 82)) +>M : Symbol(M, Decl(immutable.ts, 103, 12)) +>mapper : Symbol(mapper, Decl(immutable.ts, 103, 15)) +>key : Symbol(key, Decl(immutable.ts, 103, 24)) +>K : Symbol(K, Decl(immutable.ts, 72, 23)) +>value : Symbol(value, Decl(immutable.ts, 103, 31)) +>V : Symbol(V, Decl(immutable.ts, 72, 25)) +>iter : Symbol(iter, Decl(immutable.ts, 103, 41)) +>M : Symbol(M, Decl(immutable.ts, 103, 12)) +>context : Symbol(context, Decl(immutable.ts, 103, 59)) +>Map : Symbol(Map, Decl(immutable.ts, 62, 3), Decl(immutable.ts, 66, 3), Decl(immutable.ts, 67, 69), Decl(immutable.ts, 68, 71), Decl(immutable.ts, 69, 66) ... and 2 more) +>M : Symbol(M, Decl(immutable.ts, 103, 12)) +>V : Symbol(V, Decl(immutable.ts, 72, 25)) mapEntries(mapper: (entry: [K, V], index: number, iter: this) => [KM, VM], context?: any): Map; ->mapEntries : Symbol(Map.mapEntries, Decl(immutable.d.ts, 103, 86)) ->KM : Symbol(KM, Decl(immutable.d.ts, 104, 15)) ->VM : Symbol(VM, Decl(immutable.d.ts, 104, 18)) ->mapper : Symbol(mapper, Decl(immutable.d.ts, 104, 23)) ->entry : Symbol(entry, Decl(immutable.d.ts, 104, 32)) ->K : Symbol(K, Decl(immutable.d.ts, 72, 23)) ->V : Symbol(V, Decl(immutable.d.ts, 72, 25)) ->index : Symbol(index, Decl(immutable.d.ts, 104, 46)) ->iter : Symbol(iter, Decl(immutable.d.ts, 104, 61)) ->KM : Symbol(KM, Decl(immutable.d.ts, 104, 15)) ->VM : Symbol(VM, Decl(immutable.d.ts, 104, 18)) ->context : Symbol(context, Decl(immutable.d.ts, 104, 86)) ->Map : Symbol(Map, Decl(immutable.d.ts, 62, 3), Decl(immutable.d.ts, 66, 3), Decl(immutable.d.ts, 67, 69), Decl(immutable.d.ts, 68, 71), Decl(immutable.d.ts, 69, 66) ... and 2 more) ->KM : Symbol(KM, Decl(immutable.d.ts, 104, 15)) ->VM : Symbol(VM, Decl(immutable.d.ts, 104, 18)) +>mapEntries : Symbol(Map.mapEntries, Decl(immutable.ts, 103, 86)) +>KM : Symbol(KM, Decl(immutable.ts, 104, 15)) +>VM : Symbol(VM, Decl(immutable.ts, 104, 18)) +>mapper : Symbol(mapper, Decl(immutable.ts, 104, 23)) +>entry : Symbol(entry, Decl(immutable.ts, 104, 32)) +>K : Symbol(K, Decl(immutable.ts, 72, 23)) +>V : Symbol(V, Decl(immutable.ts, 72, 25)) +>index : Symbol(index, Decl(immutable.ts, 104, 46)) +>iter : Symbol(iter, Decl(immutable.ts, 104, 61)) +>KM : Symbol(KM, Decl(immutable.ts, 104, 15)) +>VM : Symbol(VM, Decl(immutable.ts, 104, 18)) +>context : Symbol(context, Decl(immutable.ts, 104, 86)) +>Map : Symbol(Map, Decl(immutable.ts, 62, 3), Decl(immutable.ts, 66, 3), Decl(immutable.ts, 67, 69), Decl(immutable.ts, 68, 71), Decl(immutable.ts, 69, 66) ... and 2 more) +>KM : Symbol(KM, Decl(immutable.ts, 104, 15)) +>VM : Symbol(VM, Decl(immutable.ts, 104, 18)) flatMap(mapper: (value: V, key: K, iter: this) => Iterable, context?: any): Map; ->flatMap : Symbol(Map.flatMap, Decl(immutable.d.ts, 104, 115)) ->M : Symbol(M, Decl(immutable.d.ts, 105, 12)) ->mapper : Symbol(mapper, Decl(immutable.d.ts, 105, 15)) ->value : Symbol(value, Decl(immutable.d.ts, 105, 24)) ->V : Symbol(V, Decl(immutable.d.ts, 72, 25)) ->key : Symbol(key, Decl(immutable.d.ts, 105, 33)) ->K : Symbol(K, Decl(immutable.d.ts, 72, 23)) ->iter : Symbol(iter, Decl(immutable.d.ts, 105, 41)) +>flatMap : Symbol(Map.flatMap, Decl(immutable.ts, 104, 115)) +>M : Symbol(M, Decl(immutable.ts, 105, 12)) +>mapper : Symbol(mapper, Decl(immutable.ts, 105, 15)) +>value : Symbol(value, Decl(immutable.ts, 105, 24)) +>V : Symbol(V, Decl(immutable.ts, 72, 25)) +>key : Symbol(key, Decl(immutable.ts, 105, 33)) +>K : Symbol(K, Decl(immutable.ts, 72, 23)) +>iter : Symbol(iter, Decl(immutable.ts, 105, 41)) >Iterable : Symbol(Iterable, Decl(lib.es2015.iterable.d.ts, --, --)) ->M : Symbol(M, Decl(immutable.d.ts, 105, 12)) ->context : Symbol(context, Decl(immutable.d.ts, 105, 69)) ->Map : Symbol(Map, Decl(immutable.d.ts, 62, 3), Decl(immutable.d.ts, 66, 3), Decl(immutable.d.ts, 67, 69), Decl(immutable.d.ts, 68, 71), Decl(immutable.d.ts, 69, 66) ... and 2 more) +>M : Symbol(M, Decl(immutable.ts, 105, 12)) +>context : Symbol(context, Decl(immutable.ts, 105, 69)) +>Map : Symbol(Map, Decl(immutable.ts, 62, 3), Decl(immutable.ts, 66, 3), Decl(immutable.ts, 67, 69), Decl(immutable.ts, 68, 71), Decl(immutable.ts, 69, 66) ... and 2 more) filter(predicate: (value: V, key: K, iter: this) => value is F, context?: any): Map; ->filter : Symbol(Map.filter, Decl(immutable.d.ts, 105, 100), Decl(immutable.d.ts, 106, 107)) ->F : Symbol(F, Decl(immutable.d.ts, 106, 11)) ->V : Symbol(V, Decl(immutable.d.ts, 72, 25)) ->predicate : Symbol(predicate, Decl(immutable.d.ts, 106, 24)) ->value : Symbol(value, Decl(immutable.d.ts, 106, 36)) ->V : Symbol(V, Decl(immutable.d.ts, 72, 25)) ->key : Symbol(key, Decl(immutable.d.ts, 106, 45)) ->K : Symbol(K, Decl(immutable.d.ts, 72, 23)) ->iter : Symbol(iter, Decl(immutable.d.ts, 106, 53)) ->value : Symbol(value, Decl(immutable.d.ts, 106, 36)) ->F : Symbol(F, Decl(immutable.d.ts, 106, 11)) ->context : Symbol(context, Decl(immutable.d.ts, 106, 80)) ->Map : Symbol(Map, Decl(immutable.d.ts, 62, 3), Decl(immutable.d.ts, 66, 3), Decl(immutable.d.ts, 67, 69), Decl(immutable.d.ts, 68, 71), Decl(immutable.d.ts, 69, 66) ... and 2 more) ->K : Symbol(K, Decl(immutable.d.ts, 72, 23)) ->F : Symbol(F, Decl(immutable.d.ts, 106, 11)) +>filter : Symbol(Map.filter, Decl(immutable.ts, 105, 100), Decl(immutable.ts, 106, 107)) +>F : Symbol(F, Decl(immutable.ts, 106, 11)) +>V : Symbol(V, Decl(immutable.ts, 72, 25)) +>predicate : Symbol(predicate, Decl(immutable.ts, 106, 24)) +>value : Symbol(value, Decl(immutable.ts, 106, 36)) +>V : Symbol(V, Decl(immutable.ts, 72, 25)) +>key : Symbol(key, Decl(immutable.ts, 106, 45)) +>K : Symbol(K, Decl(immutable.ts, 72, 23)) +>iter : Symbol(iter, Decl(immutable.ts, 106, 53)) +>value : Symbol(value, Decl(immutable.ts, 106, 36)) +>F : Symbol(F, Decl(immutable.ts, 106, 11)) +>context : Symbol(context, Decl(immutable.ts, 106, 80)) +>Map : Symbol(Map, Decl(immutable.ts, 62, 3), Decl(immutable.ts, 66, 3), Decl(immutable.ts, 67, 69), Decl(immutable.ts, 68, 71), Decl(immutable.ts, 69, 66) ... and 2 more) +>K : Symbol(K, Decl(immutable.ts, 72, 23)) +>F : Symbol(F, Decl(immutable.ts, 106, 11)) filter(predicate: (value: V, key: K, iter: this) => any, context?: any): this; ->filter : Symbol(Map.filter, Decl(immutable.d.ts, 105, 100), Decl(immutable.d.ts, 106, 107)) ->predicate : Symbol(predicate, Decl(immutable.d.ts, 107, 11)) ->value : Symbol(value, Decl(immutable.d.ts, 107, 23)) ->V : Symbol(V, Decl(immutable.d.ts, 72, 25)) ->key : Symbol(key, Decl(immutable.d.ts, 107, 32)) ->K : Symbol(K, Decl(immutable.d.ts, 72, 23)) ->iter : Symbol(iter, Decl(immutable.d.ts, 107, 40)) ->context : Symbol(context, Decl(immutable.d.ts, 107, 60)) +>filter : Symbol(Map.filter, Decl(immutable.ts, 105, 100), Decl(immutable.ts, 106, 107)) +>predicate : Symbol(predicate, Decl(immutable.ts, 107, 11)) +>value : Symbol(value, Decl(immutable.ts, 107, 23)) +>V : Symbol(V, Decl(immutable.ts, 72, 25)) +>key : Symbol(key, Decl(immutable.ts, 107, 32)) +>K : Symbol(K, Decl(immutable.ts, 72, 23)) +>iter : Symbol(iter, Decl(immutable.ts, 107, 40)) +>context : Symbol(context, Decl(immutable.ts, 107, 60)) } export module OrderedMap { ->OrderedMap : Symbol(OrderedMap, Decl(immutable.d.ts, 108, 3), Decl(immutable.d.ts, 111, 3), Decl(immutable.d.ts, 112, 83), Decl(immutable.d.ts, 113, 85), Decl(immutable.d.ts, 114, 80) ... and 2 more) +>OrderedMap : Symbol(OrderedMap, Decl(immutable.ts, 108, 3), Decl(immutable.ts, 111, 3), Decl(immutable.ts, 112, 83), Decl(immutable.ts, 113, 85), Decl(immutable.ts, 114, 80) ... and 2 more) function isOrderedMap(maybeOrderedMap: any): maybeOrderedMap is OrderedMap; ->isOrderedMap : Symbol(isOrderedMap, Decl(immutable.d.ts, 109, 28)) ->maybeOrderedMap : Symbol(maybeOrderedMap, Decl(immutable.d.ts, 110, 26)) ->maybeOrderedMap : Symbol(maybeOrderedMap, Decl(immutable.d.ts, 110, 26)) ->OrderedMap : Symbol(OrderedMap, Decl(immutable.d.ts, 108, 3), Decl(immutable.d.ts, 111, 3), Decl(immutable.d.ts, 112, 83), Decl(immutable.d.ts, 113, 85), Decl(immutable.d.ts, 114, 80) ... and 2 more) +>isOrderedMap : Symbol(isOrderedMap, Decl(immutable.ts, 109, 28)) +>maybeOrderedMap : Symbol(maybeOrderedMap, Decl(immutable.ts, 110, 26)) +>maybeOrderedMap : Symbol(maybeOrderedMap, Decl(immutable.ts, 110, 26)) +>OrderedMap : Symbol(OrderedMap, Decl(immutable.ts, 108, 3), Decl(immutable.ts, 111, 3), Decl(immutable.ts, 112, 83), Decl(immutable.ts, 113, 85), Decl(immutable.ts, 114, 80) ... and 2 more) } export function OrderedMap(collection: Iterable<[K, V]>): OrderedMap; ->OrderedMap : Symbol(OrderedMap, Decl(immutable.d.ts, 108, 3), Decl(immutable.d.ts, 111, 3), Decl(immutable.d.ts, 112, 83), Decl(immutable.d.ts, 113, 85), Decl(immutable.d.ts, 114, 80) ... and 2 more) ->K : Symbol(K, Decl(immutable.d.ts, 112, 29)) ->V : Symbol(V, Decl(immutable.d.ts, 112, 31)) ->collection : Symbol(collection, Decl(immutable.d.ts, 112, 35)) +>OrderedMap : Symbol(OrderedMap, Decl(immutable.ts, 108, 3), Decl(immutable.ts, 111, 3), Decl(immutable.ts, 112, 83), Decl(immutable.ts, 113, 85), Decl(immutable.ts, 114, 80) ... and 2 more) +>K : Symbol(K, Decl(immutable.ts, 112, 29)) +>V : Symbol(V, Decl(immutable.ts, 112, 31)) +>collection : Symbol(collection, Decl(immutable.ts, 112, 35)) >Iterable : Symbol(Iterable, Decl(lib.es2015.iterable.d.ts, --, --)) ->K : Symbol(K, Decl(immutable.d.ts, 112, 29)) ->V : Symbol(V, Decl(immutable.d.ts, 112, 31)) ->OrderedMap : Symbol(OrderedMap, Decl(immutable.d.ts, 108, 3), Decl(immutable.d.ts, 111, 3), Decl(immutable.d.ts, 112, 83), Decl(immutable.d.ts, 113, 85), Decl(immutable.d.ts, 114, 80) ... and 2 more) ->K : Symbol(K, Decl(immutable.d.ts, 112, 29)) ->V : Symbol(V, Decl(immutable.d.ts, 112, 31)) +>K : Symbol(K, Decl(immutable.ts, 112, 29)) +>V : Symbol(V, Decl(immutable.ts, 112, 31)) +>OrderedMap : Symbol(OrderedMap, Decl(immutable.ts, 108, 3), Decl(immutable.ts, 111, 3), Decl(immutable.ts, 112, 83), Decl(immutable.ts, 113, 85), Decl(immutable.ts, 114, 80) ... and 2 more) +>K : Symbol(K, Decl(immutable.ts, 112, 29)) +>V : Symbol(V, Decl(immutable.ts, 112, 31)) export function OrderedMap(collection: Iterable>): OrderedMap; ->OrderedMap : Symbol(OrderedMap, Decl(immutable.d.ts, 108, 3), Decl(immutable.d.ts, 111, 3), Decl(immutable.d.ts, 112, 83), Decl(immutable.d.ts, 113, 85), Decl(immutable.d.ts, 114, 80) ... and 2 more) ->T : Symbol(T, Decl(immutable.d.ts, 113, 29)) ->collection : Symbol(collection, Decl(immutable.d.ts, 113, 32)) +>OrderedMap : Symbol(OrderedMap, Decl(immutable.ts, 108, 3), Decl(immutable.ts, 111, 3), Decl(immutable.ts, 112, 83), Decl(immutable.ts, 113, 85), Decl(immutable.ts, 114, 80) ... and 2 more) +>T : Symbol(T, Decl(immutable.ts, 113, 29)) +>collection : Symbol(collection, Decl(immutable.ts, 113, 32)) >Iterable : Symbol(Iterable, Decl(lib.es2015.iterable.d.ts, --, --)) >Iterable : Symbol(Iterable, Decl(lib.es2015.iterable.d.ts, --, --)) ->T : Symbol(T, Decl(immutable.d.ts, 113, 29)) ->OrderedMap : Symbol(OrderedMap, Decl(immutable.d.ts, 108, 3), Decl(immutable.d.ts, 111, 3), Decl(immutable.d.ts, 112, 83), Decl(immutable.d.ts, 113, 85), Decl(immutable.d.ts, 114, 80) ... and 2 more) ->T : Symbol(T, Decl(immutable.d.ts, 113, 29)) ->T : Symbol(T, Decl(immutable.d.ts, 113, 29)) +>T : Symbol(T, Decl(immutable.ts, 113, 29)) +>OrderedMap : Symbol(OrderedMap, Decl(immutable.ts, 108, 3), Decl(immutable.ts, 111, 3), Decl(immutable.ts, 112, 83), Decl(immutable.ts, 113, 85), Decl(immutable.ts, 114, 80) ... and 2 more) +>T : Symbol(T, Decl(immutable.ts, 113, 29)) +>T : Symbol(T, Decl(immutable.ts, 113, 29)) export function OrderedMap(obj: {[key: string]: V}): OrderedMap; ->OrderedMap : Symbol(OrderedMap, Decl(immutable.d.ts, 108, 3), Decl(immutable.d.ts, 111, 3), Decl(immutable.d.ts, 112, 83), Decl(immutable.d.ts, 113, 85), Decl(immutable.d.ts, 114, 80) ... and 2 more) ->V : Symbol(V, Decl(immutable.d.ts, 114, 29)) ->obj : Symbol(obj, Decl(immutable.d.ts, 114, 32)) ->key : Symbol(key, Decl(immutable.d.ts, 114, 39)) ->V : Symbol(V, Decl(immutable.d.ts, 114, 29)) ->OrderedMap : Symbol(OrderedMap, Decl(immutable.d.ts, 108, 3), Decl(immutable.d.ts, 111, 3), Decl(immutable.d.ts, 112, 83), Decl(immutable.d.ts, 113, 85), Decl(immutable.d.ts, 114, 80) ... and 2 more) ->V : Symbol(V, Decl(immutable.d.ts, 114, 29)) +>OrderedMap : Symbol(OrderedMap, Decl(immutable.ts, 108, 3), Decl(immutable.ts, 111, 3), Decl(immutable.ts, 112, 83), Decl(immutable.ts, 113, 85), Decl(immutable.ts, 114, 80) ... and 2 more) +>V : Symbol(V, Decl(immutable.ts, 114, 29)) +>obj : Symbol(obj, Decl(immutable.ts, 114, 32)) +>key : Symbol(key, Decl(immutable.ts, 114, 39)) +>V : Symbol(V, Decl(immutable.ts, 114, 29)) +>OrderedMap : Symbol(OrderedMap, Decl(immutable.ts, 108, 3), Decl(immutable.ts, 111, 3), Decl(immutable.ts, 112, 83), Decl(immutable.ts, 113, 85), Decl(immutable.ts, 114, 80) ... and 2 more) +>V : Symbol(V, Decl(immutable.ts, 114, 29)) export function OrderedMap(): OrderedMap; ->OrderedMap : Symbol(OrderedMap, Decl(immutable.d.ts, 108, 3), Decl(immutable.d.ts, 111, 3), Decl(immutable.d.ts, 112, 83), Decl(immutable.d.ts, 113, 85), Decl(immutable.d.ts, 114, 80) ... and 2 more) ->K : Symbol(K, Decl(immutable.d.ts, 115, 29)) ->V : Symbol(V, Decl(immutable.d.ts, 115, 31)) ->OrderedMap : Symbol(OrderedMap, Decl(immutable.d.ts, 108, 3), Decl(immutable.d.ts, 111, 3), Decl(immutable.d.ts, 112, 83), Decl(immutable.d.ts, 113, 85), Decl(immutable.d.ts, 114, 80) ... and 2 more) ->K : Symbol(K, Decl(immutable.d.ts, 115, 29)) ->V : Symbol(V, Decl(immutable.d.ts, 115, 31)) +>OrderedMap : Symbol(OrderedMap, Decl(immutable.ts, 108, 3), Decl(immutable.ts, 111, 3), Decl(immutable.ts, 112, 83), Decl(immutable.ts, 113, 85), Decl(immutable.ts, 114, 80) ... and 2 more) +>K : Symbol(K, Decl(immutable.ts, 115, 29)) +>V : Symbol(V, Decl(immutable.ts, 115, 31)) +>OrderedMap : Symbol(OrderedMap, Decl(immutable.ts, 108, 3), Decl(immutable.ts, 111, 3), Decl(immutable.ts, 112, 83), Decl(immutable.ts, 113, 85), Decl(immutable.ts, 114, 80) ... and 2 more) +>K : Symbol(K, Decl(immutable.ts, 115, 29)) +>V : Symbol(V, Decl(immutable.ts, 115, 31)) export function OrderedMap(): OrderedMap; ->OrderedMap : Symbol(OrderedMap, Decl(immutable.d.ts, 108, 3), Decl(immutable.d.ts, 111, 3), Decl(immutable.d.ts, 112, 83), Decl(immutable.d.ts, 113, 85), Decl(immutable.d.ts, 114, 80) ... and 2 more) ->OrderedMap : Symbol(OrderedMap, Decl(immutable.d.ts, 108, 3), Decl(immutable.d.ts, 111, 3), Decl(immutable.d.ts, 112, 83), Decl(immutable.d.ts, 113, 85), Decl(immutable.d.ts, 114, 80) ... and 2 more) +>OrderedMap : Symbol(OrderedMap, Decl(immutable.ts, 108, 3), Decl(immutable.ts, 111, 3), Decl(immutable.ts, 112, 83), Decl(immutable.ts, 113, 85), Decl(immutable.ts, 114, 80) ... and 2 more) +>OrderedMap : Symbol(OrderedMap, Decl(immutable.ts, 108, 3), Decl(immutable.ts, 111, 3), Decl(immutable.ts, 112, 83), Decl(immutable.ts, 113, 85), Decl(immutable.ts, 114, 80) ... and 2 more) export interface OrderedMap extends Map { ->OrderedMap : Symbol(OrderedMap, Decl(immutable.d.ts, 108, 3), Decl(immutable.d.ts, 111, 3), Decl(immutable.d.ts, 112, 83), Decl(immutable.d.ts, 113, 85), Decl(immutable.d.ts, 114, 80) ... and 2 more) ->K : Symbol(K, Decl(immutable.d.ts, 117, 30)) ->V : Symbol(V, Decl(immutable.d.ts, 117, 32)) ->Map : Symbol(Map, Decl(immutable.d.ts, 62, 3), Decl(immutable.d.ts, 66, 3), Decl(immutable.d.ts, 67, 69), Decl(immutable.d.ts, 68, 71), Decl(immutable.d.ts, 69, 66) ... and 2 more) ->K : Symbol(K, Decl(immutable.d.ts, 117, 30)) ->V : Symbol(V, Decl(immutable.d.ts, 117, 32)) +>OrderedMap : Symbol(OrderedMap, Decl(immutable.ts, 108, 3), Decl(immutable.ts, 111, 3), Decl(immutable.ts, 112, 83), Decl(immutable.ts, 113, 85), Decl(immutable.ts, 114, 80) ... and 2 more) +>K : Symbol(K, Decl(immutable.ts, 117, 30)) +>V : Symbol(V, Decl(immutable.ts, 117, 32)) +>Map : Symbol(Map, Decl(immutable.ts, 62, 3), Decl(immutable.ts, 66, 3), Decl(immutable.ts, 67, 69), Decl(immutable.ts, 68, 71), Decl(immutable.ts, 69, 66) ... and 2 more) +>K : Symbol(K, Decl(immutable.ts, 117, 30)) +>V : Symbol(V, Decl(immutable.ts, 117, 32)) // Sequence algorithms concat(...collections: Array>): OrderedMap; ->concat : Symbol(OrderedMap.concat, Decl(immutable.d.ts, 117, 55), Decl(immutable.d.ts, 119, 90)) ->KC : Symbol(KC, Decl(immutable.d.ts, 119, 11)) ->VC : Symbol(VC, Decl(immutable.d.ts, 119, 14)) ->collections : Symbol(collections, Decl(immutable.d.ts, 119, 19)) +>concat : Symbol(OrderedMap.concat, Decl(immutable.ts, 117, 55), Decl(immutable.ts, 119, 90)) +>KC : Symbol(KC, Decl(immutable.ts, 119, 11)) +>VC : Symbol(VC, Decl(immutable.ts, 119, 14)) +>collections : Symbol(collections, Decl(immutable.ts, 119, 19)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) >Iterable : Symbol(Iterable, Decl(lib.es2015.iterable.d.ts, --, --)) ->KC : Symbol(KC, Decl(immutable.d.ts, 119, 11)) ->VC : Symbol(VC, Decl(immutable.d.ts, 119, 14)) ->OrderedMap : Symbol(OrderedMap, Decl(immutable.d.ts, 108, 3), Decl(immutable.d.ts, 111, 3), Decl(immutable.d.ts, 112, 83), Decl(immutable.d.ts, 113, 85), Decl(immutable.d.ts, 114, 80) ... and 2 more) ->K : Symbol(K, Decl(immutable.d.ts, 117, 30)) ->KC : Symbol(KC, Decl(immutable.d.ts, 119, 11)) ->V : Symbol(V, Decl(immutable.d.ts, 117, 32)) ->VC : Symbol(VC, Decl(immutable.d.ts, 119, 14)) +>KC : Symbol(KC, Decl(immutable.ts, 119, 11)) +>VC : Symbol(VC, Decl(immutable.ts, 119, 14)) +>OrderedMap : Symbol(OrderedMap, Decl(immutable.ts, 108, 3), Decl(immutable.ts, 111, 3), Decl(immutable.ts, 112, 83), Decl(immutable.ts, 113, 85), Decl(immutable.ts, 114, 80) ... and 2 more) +>K : Symbol(K, Decl(immutable.ts, 117, 30)) +>KC : Symbol(KC, Decl(immutable.ts, 119, 11)) +>V : Symbol(V, Decl(immutable.ts, 117, 32)) +>VC : Symbol(VC, Decl(immutable.ts, 119, 14)) concat(...collections: Array<{[key: string]: C}>): OrderedMap; ->concat : Symbol(OrderedMap.concat, Decl(immutable.d.ts, 117, 55), Decl(immutable.d.ts, 119, 90)) ->C : Symbol(C, Decl(immutable.d.ts, 120, 11)) ->collections : Symbol(collections, Decl(immutable.d.ts, 120, 14)) +>concat : Symbol(OrderedMap.concat, Decl(immutable.ts, 117, 55), Decl(immutable.ts, 119, 90)) +>C : Symbol(C, Decl(immutable.ts, 120, 11)) +>collections : Symbol(collections, Decl(immutable.ts, 120, 14)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) ->key : Symbol(key, Decl(immutable.d.ts, 120, 38)) ->C : Symbol(C, Decl(immutable.d.ts, 120, 11)) ->OrderedMap : Symbol(OrderedMap, Decl(immutable.d.ts, 108, 3), Decl(immutable.d.ts, 111, 3), Decl(immutable.d.ts, 112, 83), Decl(immutable.d.ts, 113, 85), Decl(immutable.d.ts, 114, 80) ... and 2 more) ->K : Symbol(K, Decl(immutable.d.ts, 117, 30)) ->V : Symbol(V, Decl(immutable.d.ts, 117, 32)) ->C : Symbol(C, Decl(immutable.d.ts, 120, 11)) +>key : Symbol(key, Decl(immutable.ts, 120, 38)) +>C : Symbol(C, Decl(immutable.ts, 120, 11)) +>OrderedMap : Symbol(OrderedMap, Decl(immutable.ts, 108, 3), Decl(immutable.ts, 111, 3), Decl(immutable.ts, 112, 83), Decl(immutable.ts, 113, 85), Decl(immutable.ts, 114, 80) ... and 2 more) +>K : Symbol(K, Decl(immutable.ts, 117, 30)) +>V : Symbol(V, Decl(immutable.ts, 117, 32)) +>C : Symbol(C, Decl(immutable.ts, 120, 11)) map(mapper: (value: V, key: K, iter: this) => M, context?: any): OrderedMap; ->map : Symbol(OrderedMap.map, Decl(immutable.d.ts, 120, 88)) ->M : Symbol(M, Decl(immutable.d.ts, 121, 8)) ->mapper : Symbol(mapper, Decl(immutable.d.ts, 121, 11)) ->value : Symbol(value, Decl(immutable.d.ts, 121, 20)) ->V : Symbol(V, Decl(immutable.d.ts, 117, 32)) ->key : Symbol(key, Decl(immutable.d.ts, 121, 29)) ->K : Symbol(K, Decl(immutable.d.ts, 117, 30)) ->iter : Symbol(iter, Decl(immutable.d.ts, 121, 37)) ->M : Symbol(M, Decl(immutable.d.ts, 121, 8)) ->context : Symbol(context, Decl(immutable.d.ts, 121, 55)) ->OrderedMap : Symbol(OrderedMap, Decl(immutable.d.ts, 108, 3), Decl(immutable.d.ts, 111, 3), Decl(immutable.d.ts, 112, 83), Decl(immutable.d.ts, 113, 85), Decl(immutable.d.ts, 114, 80) ... and 2 more) ->K : Symbol(K, Decl(immutable.d.ts, 117, 30)) ->M : Symbol(M, Decl(immutable.d.ts, 121, 8)) +>map : Symbol(OrderedMap.map, Decl(immutable.ts, 120, 88)) +>M : Symbol(M, Decl(immutable.ts, 121, 8)) +>mapper : Symbol(mapper, Decl(immutable.ts, 121, 11)) +>value : Symbol(value, Decl(immutable.ts, 121, 20)) +>V : Symbol(V, Decl(immutable.ts, 117, 32)) +>key : Symbol(key, Decl(immutable.ts, 121, 29)) +>K : Symbol(K, Decl(immutable.ts, 117, 30)) +>iter : Symbol(iter, Decl(immutable.ts, 121, 37)) +>M : Symbol(M, Decl(immutable.ts, 121, 8)) +>context : Symbol(context, Decl(immutable.ts, 121, 55)) +>OrderedMap : Symbol(OrderedMap, Decl(immutable.ts, 108, 3), Decl(immutable.ts, 111, 3), Decl(immutable.ts, 112, 83), Decl(immutable.ts, 113, 85), Decl(immutable.ts, 114, 80) ... and 2 more) +>K : Symbol(K, Decl(immutable.ts, 117, 30)) +>M : Symbol(M, Decl(immutable.ts, 121, 8)) mapKeys(mapper: (key: K, value: V, iter: this) => M, context?: any): OrderedMap; ->mapKeys : Symbol(OrderedMap.mapKeys, Decl(immutable.d.ts, 121, 89)) ->M : Symbol(M, Decl(immutable.d.ts, 122, 12)) ->mapper : Symbol(mapper, Decl(immutable.d.ts, 122, 15)) ->key : Symbol(key, Decl(immutable.d.ts, 122, 24)) ->K : Symbol(K, Decl(immutable.d.ts, 117, 30)) ->value : Symbol(value, Decl(immutable.d.ts, 122, 31)) ->V : Symbol(V, Decl(immutable.d.ts, 117, 32)) ->iter : Symbol(iter, Decl(immutable.d.ts, 122, 41)) ->M : Symbol(M, Decl(immutable.d.ts, 122, 12)) ->context : Symbol(context, Decl(immutable.d.ts, 122, 59)) ->OrderedMap : Symbol(OrderedMap, Decl(immutable.d.ts, 108, 3), Decl(immutable.d.ts, 111, 3), Decl(immutable.d.ts, 112, 83), Decl(immutable.d.ts, 113, 85), Decl(immutable.d.ts, 114, 80) ... and 2 more) ->M : Symbol(M, Decl(immutable.d.ts, 122, 12)) ->V : Symbol(V, Decl(immutable.d.ts, 117, 32)) +>mapKeys : Symbol(OrderedMap.mapKeys, Decl(immutable.ts, 121, 89)) +>M : Symbol(M, Decl(immutable.ts, 122, 12)) +>mapper : Symbol(mapper, Decl(immutable.ts, 122, 15)) +>key : Symbol(key, Decl(immutable.ts, 122, 24)) +>K : Symbol(K, Decl(immutable.ts, 117, 30)) +>value : Symbol(value, Decl(immutable.ts, 122, 31)) +>V : Symbol(V, Decl(immutable.ts, 117, 32)) +>iter : Symbol(iter, Decl(immutable.ts, 122, 41)) +>M : Symbol(M, Decl(immutable.ts, 122, 12)) +>context : Symbol(context, Decl(immutable.ts, 122, 59)) +>OrderedMap : Symbol(OrderedMap, Decl(immutable.ts, 108, 3), Decl(immutable.ts, 111, 3), Decl(immutable.ts, 112, 83), Decl(immutable.ts, 113, 85), Decl(immutable.ts, 114, 80) ... and 2 more) +>M : Symbol(M, Decl(immutable.ts, 122, 12)) +>V : Symbol(V, Decl(immutable.ts, 117, 32)) mapEntries(mapper: (entry: [K, V], index: number, iter: this) => [KM, VM], context?: any): OrderedMap; ->mapEntries : Symbol(OrderedMap.mapEntries, Decl(immutable.d.ts, 122, 93)) ->KM : Symbol(KM, Decl(immutable.d.ts, 123, 15)) ->VM : Symbol(VM, Decl(immutable.d.ts, 123, 18)) ->mapper : Symbol(mapper, Decl(immutable.d.ts, 123, 23)) ->entry : Symbol(entry, Decl(immutable.d.ts, 123, 32)) ->K : Symbol(K, Decl(immutable.d.ts, 117, 30)) ->V : Symbol(V, Decl(immutable.d.ts, 117, 32)) ->index : Symbol(index, Decl(immutable.d.ts, 123, 46)) ->iter : Symbol(iter, Decl(immutable.d.ts, 123, 61)) ->KM : Symbol(KM, Decl(immutable.d.ts, 123, 15)) ->VM : Symbol(VM, Decl(immutable.d.ts, 123, 18)) ->context : Symbol(context, Decl(immutable.d.ts, 123, 86)) ->OrderedMap : Symbol(OrderedMap, Decl(immutable.d.ts, 108, 3), Decl(immutable.d.ts, 111, 3), Decl(immutable.d.ts, 112, 83), Decl(immutable.d.ts, 113, 85), Decl(immutable.d.ts, 114, 80) ... and 2 more) ->KM : Symbol(KM, Decl(immutable.d.ts, 123, 15)) ->VM : Symbol(VM, Decl(immutable.d.ts, 123, 18)) +>mapEntries : Symbol(OrderedMap.mapEntries, Decl(immutable.ts, 122, 93)) +>KM : Symbol(KM, Decl(immutable.ts, 123, 15)) +>VM : Symbol(VM, Decl(immutable.ts, 123, 18)) +>mapper : Symbol(mapper, Decl(immutable.ts, 123, 23)) +>entry : Symbol(entry, Decl(immutable.ts, 123, 32)) +>K : Symbol(K, Decl(immutable.ts, 117, 30)) +>V : Symbol(V, Decl(immutable.ts, 117, 32)) +>index : Symbol(index, Decl(immutable.ts, 123, 46)) +>iter : Symbol(iter, Decl(immutable.ts, 123, 61)) +>KM : Symbol(KM, Decl(immutable.ts, 123, 15)) +>VM : Symbol(VM, Decl(immutable.ts, 123, 18)) +>context : Symbol(context, Decl(immutable.ts, 123, 86)) +>OrderedMap : Symbol(OrderedMap, Decl(immutable.ts, 108, 3), Decl(immutable.ts, 111, 3), Decl(immutable.ts, 112, 83), Decl(immutable.ts, 113, 85), Decl(immutable.ts, 114, 80) ... and 2 more) +>KM : Symbol(KM, Decl(immutable.ts, 123, 15)) +>VM : Symbol(VM, Decl(immutable.ts, 123, 18)) flatMap(mapper: (value: V, key: K, iter: this) => Iterable, context?: any): OrderedMap; ->flatMap : Symbol(OrderedMap.flatMap, Decl(immutable.d.ts, 123, 122)) ->M : Symbol(M, Decl(immutable.d.ts, 124, 12)) ->mapper : Symbol(mapper, Decl(immutable.d.ts, 124, 15)) ->value : Symbol(value, Decl(immutable.d.ts, 124, 24)) ->V : Symbol(V, Decl(immutable.d.ts, 117, 32)) ->key : Symbol(key, Decl(immutable.d.ts, 124, 33)) ->K : Symbol(K, Decl(immutable.d.ts, 117, 30)) ->iter : Symbol(iter, Decl(immutable.d.ts, 124, 41)) +>flatMap : Symbol(OrderedMap.flatMap, Decl(immutable.ts, 123, 122)) +>M : Symbol(M, Decl(immutable.ts, 124, 12)) +>mapper : Symbol(mapper, Decl(immutable.ts, 124, 15)) +>value : Symbol(value, Decl(immutable.ts, 124, 24)) +>V : Symbol(V, Decl(immutable.ts, 117, 32)) +>key : Symbol(key, Decl(immutable.ts, 124, 33)) +>K : Symbol(K, Decl(immutable.ts, 117, 30)) +>iter : Symbol(iter, Decl(immutable.ts, 124, 41)) >Iterable : Symbol(Iterable, Decl(lib.es2015.iterable.d.ts, --, --)) ->M : Symbol(M, Decl(immutable.d.ts, 124, 12)) ->context : Symbol(context, Decl(immutable.d.ts, 124, 69)) ->OrderedMap : Symbol(OrderedMap, Decl(immutable.d.ts, 108, 3), Decl(immutable.d.ts, 111, 3), Decl(immutable.d.ts, 112, 83), Decl(immutable.d.ts, 113, 85), Decl(immutable.d.ts, 114, 80) ... and 2 more) +>M : Symbol(M, Decl(immutable.ts, 124, 12)) +>context : Symbol(context, Decl(immutable.ts, 124, 69)) +>OrderedMap : Symbol(OrderedMap, Decl(immutable.ts, 108, 3), Decl(immutable.ts, 111, 3), Decl(immutable.ts, 112, 83), Decl(immutable.ts, 113, 85), Decl(immutable.ts, 114, 80) ... and 2 more) filter(predicate: (value: V, key: K, iter: this) => value is F, context?: any): OrderedMap; ->filter : Symbol(OrderedMap.filter, Decl(immutable.d.ts, 124, 107), Decl(immutable.d.ts, 125, 114)) ->F : Symbol(F, Decl(immutable.d.ts, 125, 11)) ->V : Symbol(V, Decl(immutable.d.ts, 117, 32)) ->predicate : Symbol(predicate, Decl(immutable.d.ts, 125, 24)) ->value : Symbol(value, Decl(immutable.d.ts, 125, 36)) ->V : Symbol(V, Decl(immutable.d.ts, 117, 32)) ->key : Symbol(key, Decl(immutable.d.ts, 125, 45)) ->K : Symbol(K, Decl(immutable.d.ts, 117, 30)) ->iter : Symbol(iter, Decl(immutable.d.ts, 125, 53)) ->value : Symbol(value, Decl(immutable.d.ts, 125, 36)) ->F : Symbol(F, Decl(immutable.d.ts, 125, 11)) ->context : Symbol(context, Decl(immutable.d.ts, 125, 80)) ->OrderedMap : Symbol(OrderedMap, Decl(immutable.d.ts, 108, 3), Decl(immutable.d.ts, 111, 3), Decl(immutable.d.ts, 112, 83), Decl(immutable.d.ts, 113, 85), Decl(immutable.d.ts, 114, 80) ... and 2 more) ->K : Symbol(K, Decl(immutable.d.ts, 117, 30)) ->F : Symbol(F, Decl(immutable.d.ts, 125, 11)) +>filter : Symbol(OrderedMap.filter, Decl(immutable.ts, 124, 107), Decl(immutable.ts, 125, 114)) +>F : Symbol(F, Decl(immutable.ts, 125, 11)) +>V : Symbol(V, Decl(immutable.ts, 117, 32)) +>predicate : Symbol(predicate, Decl(immutable.ts, 125, 24)) +>value : Symbol(value, Decl(immutable.ts, 125, 36)) +>V : Symbol(V, Decl(immutable.ts, 117, 32)) +>key : Symbol(key, Decl(immutable.ts, 125, 45)) +>K : Symbol(K, Decl(immutable.ts, 117, 30)) +>iter : Symbol(iter, Decl(immutable.ts, 125, 53)) +>value : Symbol(value, Decl(immutable.ts, 125, 36)) +>F : Symbol(F, Decl(immutable.ts, 125, 11)) +>context : Symbol(context, Decl(immutable.ts, 125, 80)) +>OrderedMap : Symbol(OrderedMap, Decl(immutable.ts, 108, 3), Decl(immutable.ts, 111, 3), Decl(immutable.ts, 112, 83), Decl(immutable.ts, 113, 85), Decl(immutable.ts, 114, 80) ... and 2 more) +>K : Symbol(K, Decl(immutable.ts, 117, 30)) +>F : Symbol(F, Decl(immutable.ts, 125, 11)) filter(predicate: (value: V, key: K, iter: this) => any, context?: any): this; ->filter : Symbol(OrderedMap.filter, Decl(immutable.d.ts, 124, 107), Decl(immutable.d.ts, 125, 114)) ->predicate : Symbol(predicate, Decl(immutable.d.ts, 126, 11)) ->value : Symbol(value, Decl(immutable.d.ts, 126, 23)) ->V : Symbol(V, Decl(immutable.d.ts, 117, 32)) ->key : Symbol(key, Decl(immutable.d.ts, 126, 32)) ->K : Symbol(K, Decl(immutable.d.ts, 117, 30)) ->iter : Symbol(iter, Decl(immutable.d.ts, 126, 40)) ->context : Symbol(context, Decl(immutable.d.ts, 126, 60)) +>filter : Symbol(OrderedMap.filter, Decl(immutable.ts, 124, 107), Decl(immutable.ts, 125, 114)) +>predicate : Symbol(predicate, Decl(immutable.ts, 126, 11)) +>value : Symbol(value, Decl(immutable.ts, 126, 23)) +>V : Symbol(V, Decl(immutable.ts, 117, 32)) +>key : Symbol(key, Decl(immutable.ts, 126, 32)) +>K : Symbol(K, Decl(immutable.ts, 117, 30)) +>iter : Symbol(iter, Decl(immutable.ts, 126, 40)) +>context : Symbol(context, Decl(immutable.ts, 126, 60)) } export module Set { ->Set : Symbol(Set, Decl(immutable.d.ts, 127, 3), Decl(immutable.d.ts, 135, 3), Decl(immutable.d.ts, 136, 34), Decl(immutable.d.ts, 137, 35), Decl(immutable.d.ts, 138, 58)) +>Set : Symbol(Set, Decl(immutable.ts, 127, 3), Decl(immutable.ts, 135, 3), Decl(immutable.ts, 136, 34), Decl(immutable.ts, 137, 35), Decl(immutable.ts, 138, 58)) function isSet(maybeSet: any): maybeSet is Set; ->isSet : Symbol(isSet, Decl(immutable.d.ts, 128, 21)) ->maybeSet : Symbol(maybeSet, Decl(immutable.d.ts, 129, 19)) ->maybeSet : Symbol(maybeSet, Decl(immutable.d.ts, 129, 19)) ->Set : Symbol(Set, Decl(immutable.d.ts, 127, 3), Decl(immutable.d.ts, 135, 3), Decl(immutable.d.ts, 136, 34), Decl(immutable.d.ts, 137, 35), Decl(immutable.d.ts, 138, 58)) +>isSet : Symbol(isSet, Decl(immutable.ts, 128, 21)) +>maybeSet : Symbol(maybeSet, Decl(immutable.ts, 129, 19)) +>maybeSet : Symbol(maybeSet, Decl(immutable.ts, 129, 19)) +>Set : Symbol(Set, Decl(immutable.ts, 127, 3), Decl(immutable.ts, 135, 3), Decl(immutable.ts, 136, 34), Decl(immutable.ts, 137, 35), Decl(immutable.ts, 138, 58)) function of(...values: Array): Set; ->of : Symbol(of, Decl(immutable.d.ts, 129, 56)) ->T : Symbol(T, Decl(immutable.d.ts, 130, 16)) ->values : Symbol(values, Decl(immutable.d.ts, 130, 19)) +>of : Symbol(of, Decl(immutable.ts, 129, 56)) +>T : Symbol(T, Decl(immutable.ts, 130, 16)) +>values : Symbol(values, Decl(immutable.ts, 130, 19)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) ->T : Symbol(T, Decl(immutable.d.ts, 130, 16)) ->Set : Symbol(Set, Decl(immutable.d.ts, 127, 3), Decl(immutable.d.ts, 135, 3), Decl(immutable.d.ts, 136, 34), Decl(immutable.d.ts, 137, 35), Decl(immutable.d.ts, 138, 58)) ->T : Symbol(T, Decl(immutable.d.ts, 130, 16)) +>T : Symbol(T, Decl(immutable.ts, 130, 16)) +>Set : Symbol(Set, Decl(immutable.ts, 127, 3), Decl(immutable.ts, 135, 3), Decl(immutable.ts, 136, 34), Decl(immutable.ts, 137, 35), Decl(immutable.ts, 138, 58)) +>T : Symbol(T, Decl(immutable.ts, 130, 16)) function fromKeys(iter: Collection): Set; ->fromKeys : Symbol(fromKeys, Decl(immutable.d.ts, 130, 48), Decl(immutable.d.ts, 131, 59)) ->T : Symbol(T, Decl(immutable.d.ts, 131, 22)) ->iter : Symbol(iter, Decl(immutable.d.ts, 131, 25)) ->Collection : Symbol(Collection, Decl(immutable.d.ts, 331, 3), Decl(immutable.d.ts, 402, 3), Decl(immutable.d.ts, 403, 79), Decl(immutable.d.ts, 404, 80), Decl(immutable.d.ts, 405, 86)) ->T : Symbol(T, Decl(immutable.d.ts, 131, 22)) ->Set : Symbol(Set, Decl(immutable.d.ts, 127, 3), Decl(immutable.d.ts, 135, 3), Decl(immutable.d.ts, 136, 34), Decl(immutable.d.ts, 137, 35), Decl(immutable.d.ts, 138, 58)) ->T : Symbol(T, Decl(immutable.d.ts, 131, 22)) +>fromKeys : Symbol(fromKeys, Decl(immutable.ts, 130, 48), Decl(immutable.ts, 131, 59)) +>T : Symbol(T, Decl(immutable.ts, 131, 22)) +>iter : Symbol(iter, Decl(immutable.ts, 131, 25)) +>Collection : Symbol(Collection, Decl(immutable.ts, 331, 3), Decl(immutable.ts, 402, 3), Decl(immutable.ts, 403, 79), Decl(immutable.ts, 404, 80), Decl(immutable.ts, 405, 86)) +>T : Symbol(T, Decl(immutable.ts, 131, 22)) +>Set : Symbol(Set, Decl(immutable.ts, 127, 3), Decl(immutable.ts, 135, 3), Decl(immutable.ts, 136, 34), Decl(immutable.ts, 137, 35), Decl(immutable.ts, 138, 58)) +>T : Symbol(T, Decl(immutable.ts, 131, 22)) function fromKeys(obj: {[key: string]: any}): Set; ->fromKeys : Symbol(fromKeys, Decl(immutable.d.ts, 130, 48), Decl(immutable.d.ts, 131, 59)) ->obj : Symbol(obj, Decl(immutable.d.ts, 132, 22)) ->key : Symbol(key, Decl(immutable.d.ts, 132, 29)) ->Set : Symbol(Set, Decl(immutable.d.ts, 127, 3), Decl(immutable.d.ts, 135, 3), Decl(immutable.d.ts, 136, 34), Decl(immutable.d.ts, 137, 35), Decl(immutable.d.ts, 138, 58)) +>fromKeys : Symbol(fromKeys, Decl(immutable.ts, 130, 48), Decl(immutable.ts, 131, 59)) +>obj : Symbol(obj, Decl(immutable.ts, 132, 22)) +>key : Symbol(key, Decl(immutable.ts, 132, 29)) +>Set : Symbol(Set, Decl(immutable.ts, 127, 3), Decl(immutable.ts, 135, 3), Decl(immutable.ts, 136, 34), Decl(immutable.ts, 137, 35), Decl(immutable.ts, 138, 58)) function intersect(sets: Iterable>): Set; ->intersect : Symbol(intersect, Decl(immutable.d.ts, 132, 62)) ->T : Symbol(T, Decl(immutable.d.ts, 133, 23)) ->sets : Symbol(sets, Decl(immutable.d.ts, 133, 26)) +>intersect : Symbol(intersect, Decl(immutable.ts, 132, 62)) +>T : Symbol(T, Decl(immutable.ts, 133, 23)) +>sets : Symbol(sets, Decl(immutable.ts, 133, 26)) >Iterable : Symbol(Iterable, Decl(lib.es2015.iterable.d.ts, --, --)) >Iterable : Symbol(Iterable, Decl(lib.es2015.iterable.d.ts, --, --)) ->T : Symbol(T, Decl(immutable.d.ts, 133, 23)) ->Set : Symbol(Set, Decl(immutable.d.ts, 127, 3), Decl(immutable.d.ts, 135, 3), Decl(immutable.d.ts, 136, 34), Decl(immutable.d.ts, 137, 35), Decl(immutable.d.ts, 138, 58)) ->T : Symbol(T, Decl(immutable.d.ts, 133, 23)) +>T : Symbol(T, Decl(immutable.ts, 133, 23)) +>Set : Symbol(Set, Decl(immutable.ts, 127, 3), Decl(immutable.ts, 135, 3), Decl(immutable.ts, 136, 34), Decl(immutable.ts, 137, 35), Decl(immutable.ts, 138, 58)) +>T : Symbol(T, Decl(immutable.ts, 133, 23)) function union(sets: Iterable>): Set; ->union : Symbol(union, Decl(immutable.d.ts, 133, 63)) ->T : Symbol(T, Decl(immutable.d.ts, 134, 19)) ->sets : Symbol(sets, Decl(immutable.d.ts, 134, 22)) +>union : Symbol(union, Decl(immutable.ts, 133, 63)) +>T : Symbol(T, Decl(immutable.ts, 134, 19)) +>sets : Symbol(sets, Decl(immutable.ts, 134, 22)) >Iterable : Symbol(Iterable, Decl(lib.es2015.iterable.d.ts, --, --)) >Iterable : Symbol(Iterable, Decl(lib.es2015.iterable.d.ts, --, --)) ->T : Symbol(T, Decl(immutable.d.ts, 134, 19)) ->Set : Symbol(Set, Decl(immutable.d.ts, 127, 3), Decl(immutable.d.ts, 135, 3), Decl(immutable.d.ts, 136, 34), Decl(immutable.d.ts, 137, 35), Decl(immutable.d.ts, 138, 58)) ->T : Symbol(T, Decl(immutable.d.ts, 134, 19)) +>T : Symbol(T, Decl(immutable.ts, 134, 19)) +>Set : Symbol(Set, Decl(immutable.ts, 127, 3), Decl(immutable.ts, 135, 3), Decl(immutable.ts, 136, 34), Decl(immutable.ts, 137, 35), Decl(immutable.ts, 138, 58)) +>T : Symbol(T, Decl(immutable.ts, 134, 19)) } export function Set(): Set; ->Set : Symbol(Set, Decl(immutable.d.ts, 127, 3), Decl(immutable.d.ts, 135, 3), Decl(immutable.d.ts, 136, 34), Decl(immutable.d.ts, 137, 35), Decl(immutable.d.ts, 138, 58)) ->Set : Symbol(Set, Decl(immutable.d.ts, 127, 3), Decl(immutable.d.ts, 135, 3), Decl(immutable.d.ts, 136, 34), Decl(immutable.d.ts, 137, 35), Decl(immutable.d.ts, 138, 58)) +>Set : Symbol(Set, Decl(immutable.ts, 127, 3), Decl(immutable.ts, 135, 3), Decl(immutable.ts, 136, 34), Decl(immutable.ts, 137, 35), Decl(immutable.ts, 138, 58)) +>Set : Symbol(Set, Decl(immutable.ts, 127, 3), Decl(immutable.ts, 135, 3), Decl(immutable.ts, 136, 34), Decl(immutable.ts, 137, 35), Decl(immutable.ts, 138, 58)) export function Set(): Set; ->Set : Symbol(Set, Decl(immutable.d.ts, 127, 3), Decl(immutable.d.ts, 135, 3), Decl(immutable.d.ts, 136, 34), Decl(immutable.d.ts, 137, 35), Decl(immutable.d.ts, 138, 58)) ->T : Symbol(T, Decl(immutable.d.ts, 137, 22)) ->Set : Symbol(Set, Decl(immutable.d.ts, 127, 3), Decl(immutable.d.ts, 135, 3), Decl(immutable.d.ts, 136, 34), Decl(immutable.d.ts, 137, 35), Decl(immutable.d.ts, 138, 58)) ->T : Symbol(T, Decl(immutable.d.ts, 137, 22)) +>Set : Symbol(Set, Decl(immutable.ts, 127, 3), Decl(immutable.ts, 135, 3), Decl(immutable.ts, 136, 34), Decl(immutable.ts, 137, 35), Decl(immutable.ts, 138, 58)) +>T : Symbol(T, Decl(immutable.ts, 137, 22)) +>Set : Symbol(Set, Decl(immutable.ts, 127, 3), Decl(immutable.ts, 135, 3), Decl(immutable.ts, 136, 34), Decl(immutable.ts, 137, 35), Decl(immutable.ts, 138, 58)) +>T : Symbol(T, Decl(immutable.ts, 137, 22)) export function Set(collection: Iterable): Set; ->Set : Symbol(Set, Decl(immutable.d.ts, 127, 3), Decl(immutable.d.ts, 135, 3), Decl(immutable.d.ts, 136, 34), Decl(immutable.d.ts, 137, 35), Decl(immutable.d.ts, 138, 58)) ->T : Symbol(T, Decl(immutable.d.ts, 138, 22)) ->collection : Symbol(collection, Decl(immutable.d.ts, 138, 25)) +>Set : Symbol(Set, Decl(immutable.ts, 127, 3), Decl(immutable.ts, 135, 3), Decl(immutable.ts, 136, 34), Decl(immutable.ts, 137, 35), Decl(immutable.ts, 138, 58)) +>T : Symbol(T, Decl(immutable.ts, 138, 22)) +>collection : Symbol(collection, Decl(immutable.ts, 138, 25)) >Iterable : Symbol(Iterable, Decl(lib.es2015.iterable.d.ts, --, --)) ->T : Symbol(T, Decl(immutable.d.ts, 138, 22)) ->Set : Symbol(Set, Decl(immutable.d.ts, 127, 3), Decl(immutable.d.ts, 135, 3), Decl(immutable.d.ts, 136, 34), Decl(immutable.d.ts, 137, 35), Decl(immutable.d.ts, 138, 58)) ->T : Symbol(T, Decl(immutable.d.ts, 138, 22)) +>T : Symbol(T, Decl(immutable.ts, 138, 22)) +>Set : Symbol(Set, Decl(immutable.ts, 127, 3), Decl(immutable.ts, 135, 3), Decl(immutable.ts, 136, 34), Decl(immutable.ts, 137, 35), Decl(immutable.ts, 138, 58)) +>T : Symbol(T, Decl(immutable.ts, 138, 22)) export interface Set extends Collection.Set { ->Set : Symbol(Set, Decl(immutable.d.ts, 127, 3), Decl(immutable.d.ts, 135, 3), Decl(immutable.d.ts, 136, 34), Decl(immutable.d.ts, 137, 35), Decl(immutable.d.ts, 138, 58)) ->T : Symbol(T, Decl(immutable.d.ts, 139, 23)) ->Collection.Set : Symbol(Collection.Set, Decl(immutable.d.ts, 387, 5), Decl(immutable.d.ts, 388, 24), Decl(immutable.d.ts, 389, 71)) ->Collection : Symbol(Collection, Decl(immutable.d.ts, 331, 3), Decl(immutable.d.ts, 402, 3), Decl(immutable.d.ts, 403, 79), Decl(immutable.d.ts, 404, 80), Decl(immutable.d.ts, 405, 86)) ->Set : Symbol(Collection.Set, Decl(immutable.d.ts, 387, 5), Decl(immutable.d.ts, 388, 24), Decl(immutable.d.ts, 389, 71)) ->T : Symbol(T, Decl(immutable.d.ts, 139, 23)) +>Set : Symbol(Set, Decl(immutable.ts, 127, 3), Decl(immutable.ts, 135, 3), Decl(immutable.ts, 136, 34), Decl(immutable.ts, 137, 35), Decl(immutable.ts, 138, 58)) +>T : Symbol(T, Decl(immutable.ts, 139, 23)) +>Collection.Set : Symbol(Collection.Set, Decl(immutable.ts, 387, 5), Decl(immutable.ts, 388, 24), Decl(immutable.ts, 389, 71)) +>Collection : Symbol(Collection, Decl(immutable.ts, 331, 3), Decl(immutable.ts, 402, 3), Decl(immutable.ts, 403, 79), Decl(immutable.ts, 404, 80), Decl(immutable.ts, 405, 86)) +>Set : Symbol(Collection.Set, Decl(immutable.ts, 387, 5), Decl(immutable.ts, 388, 24), Decl(immutable.ts, 389, 71)) +>T : Symbol(T, Decl(immutable.ts, 139, 23)) // Persistent changes add(value: T): this; ->add : Symbol(Set.add, Decl(immutable.d.ts, 139, 53)) ->value : Symbol(value, Decl(immutable.d.ts, 141, 8)) ->T : Symbol(T, Decl(immutable.d.ts, 139, 23)) +>add : Symbol(Set.add, Decl(immutable.ts, 139, 53)) +>value : Symbol(value, Decl(immutable.ts, 141, 8)) +>T : Symbol(T, Decl(immutable.ts, 139, 23)) delete(value: T): this; ->delete : Symbol(Set.delete, Decl(immutable.d.ts, 141, 24)) ->value : Symbol(value, Decl(immutable.d.ts, 142, 11)) ->T : Symbol(T, Decl(immutable.d.ts, 139, 23)) +>delete : Symbol(Set.delete, Decl(immutable.ts, 141, 24)) +>value : Symbol(value, Decl(immutable.ts, 142, 11)) +>T : Symbol(T, Decl(immutable.ts, 139, 23)) remove(value: T): this; ->remove : Symbol(Set.remove, Decl(immutable.d.ts, 142, 27)) ->value : Symbol(value, Decl(immutable.d.ts, 143, 11)) ->T : Symbol(T, Decl(immutable.d.ts, 139, 23)) +>remove : Symbol(Set.remove, Decl(immutable.ts, 142, 27)) +>value : Symbol(value, Decl(immutable.ts, 143, 11)) +>T : Symbol(T, Decl(immutable.ts, 139, 23)) clear(): this; ->clear : Symbol(Set.clear, Decl(immutable.d.ts, 143, 27)) +>clear : Symbol(Set.clear, Decl(immutable.ts, 143, 27)) union(...collections: Array | Array>): this; ->union : Symbol(Set.union, Decl(immutable.d.ts, 144, 18)) ->collections : Symbol(collections, Decl(immutable.d.ts, 145, 10)) +>union : Symbol(Set.union, Decl(immutable.ts, 144, 18)) +>collections : Symbol(collections, Decl(immutable.ts, 145, 10)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) ->Collection : Symbol(Collection, Decl(immutable.d.ts, 331, 3), Decl(immutable.d.ts, 402, 3), Decl(immutable.d.ts, 403, 79), Decl(immutable.d.ts, 404, 80), Decl(immutable.d.ts, 405, 86)) ->T : Symbol(T, Decl(immutable.d.ts, 139, 23)) +>Collection : Symbol(Collection, Decl(immutable.ts, 331, 3), Decl(immutable.ts, 402, 3), Decl(immutable.ts, 403, 79), Decl(immutable.ts, 404, 80), Decl(immutable.ts, 405, 86)) +>T : Symbol(T, Decl(immutable.ts, 139, 23)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) ->T : Symbol(T, Decl(immutable.d.ts, 139, 23)) +>T : Symbol(T, Decl(immutable.ts, 139, 23)) merge(...collections: Array | Array>): this; ->merge : Symbol(Set.merge, Decl(immutable.d.ts, 145, 70)) ->collections : Symbol(collections, Decl(immutable.d.ts, 146, 10)) +>merge : Symbol(Set.merge, Decl(immutable.ts, 145, 70)) +>collections : Symbol(collections, Decl(immutable.ts, 146, 10)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) ->Collection : Symbol(Collection, Decl(immutable.d.ts, 331, 3), Decl(immutable.d.ts, 402, 3), Decl(immutable.d.ts, 403, 79), Decl(immutable.d.ts, 404, 80), Decl(immutable.d.ts, 405, 86)) ->T : Symbol(T, Decl(immutable.d.ts, 139, 23)) +>Collection : Symbol(Collection, Decl(immutable.ts, 331, 3), Decl(immutable.ts, 402, 3), Decl(immutable.ts, 403, 79), Decl(immutable.ts, 404, 80), Decl(immutable.ts, 405, 86)) +>T : Symbol(T, Decl(immutable.ts, 139, 23)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) ->T : Symbol(T, Decl(immutable.d.ts, 139, 23)) +>T : Symbol(T, Decl(immutable.ts, 139, 23)) intersect(...collections: Array | Array>): this; ->intersect : Symbol(Set.intersect, Decl(immutable.d.ts, 146, 70)) ->collections : Symbol(collections, Decl(immutable.d.ts, 147, 14)) +>intersect : Symbol(Set.intersect, Decl(immutable.ts, 146, 70)) +>collections : Symbol(collections, Decl(immutable.ts, 147, 14)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) ->Collection : Symbol(Collection, Decl(immutable.d.ts, 331, 3), Decl(immutable.d.ts, 402, 3), Decl(immutable.d.ts, 403, 79), Decl(immutable.d.ts, 404, 80), Decl(immutable.d.ts, 405, 86)) ->T : Symbol(T, Decl(immutable.d.ts, 139, 23)) +>Collection : Symbol(Collection, Decl(immutable.ts, 331, 3), Decl(immutable.ts, 402, 3), Decl(immutable.ts, 403, 79), Decl(immutable.ts, 404, 80), Decl(immutable.ts, 405, 86)) +>T : Symbol(T, Decl(immutable.ts, 139, 23)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) ->T : Symbol(T, Decl(immutable.d.ts, 139, 23)) +>T : Symbol(T, Decl(immutable.ts, 139, 23)) subtract(...collections: Array | Array>): this; ->subtract : Symbol(Set.subtract, Decl(immutable.d.ts, 147, 74)) ->collections : Symbol(collections, Decl(immutable.d.ts, 148, 13)) +>subtract : Symbol(Set.subtract, Decl(immutable.ts, 147, 74)) +>collections : Symbol(collections, Decl(immutable.ts, 148, 13)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) ->Collection : Symbol(Collection, Decl(immutable.d.ts, 331, 3), Decl(immutable.d.ts, 402, 3), Decl(immutable.d.ts, 403, 79), Decl(immutable.d.ts, 404, 80), Decl(immutable.d.ts, 405, 86)) ->T : Symbol(T, Decl(immutable.d.ts, 139, 23)) +>Collection : Symbol(Collection, Decl(immutable.ts, 331, 3), Decl(immutable.ts, 402, 3), Decl(immutable.ts, 403, 79), Decl(immutable.ts, 404, 80), Decl(immutable.ts, 405, 86)) +>T : Symbol(T, Decl(immutable.ts, 139, 23)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) ->T : Symbol(T, Decl(immutable.d.ts, 139, 23)) +>T : Symbol(T, Decl(immutable.ts, 139, 23)) // Transient changes withMutations(mutator: (mutable: this) => any): this; ->withMutations : Symbol(Set.withMutations, Decl(immutable.d.ts, 148, 73)) ->mutator : Symbol(mutator, Decl(immutable.d.ts, 150, 18)) ->mutable : Symbol(mutable, Decl(immutable.d.ts, 150, 28)) +>withMutations : Symbol(Set.withMutations, Decl(immutable.ts, 148, 73)) +>mutator : Symbol(mutator, Decl(immutable.ts, 150, 18)) +>mutable : Symbol(mutable, Decl(immutable.ts, 150, 28)) asMutable(): this; ->asMutable : Symbol(Set.asMutable, Decl(immutable.d.ts, 150, 57)) +>asMutable : Symbol(Set.asMutable, Decl(immutable.ts, 150, 57)) asImmutable(): this; ->asImmutable : Symbol(Set.asImmutable, Decl(immutable.d.ts, 151, 22)) +>asImmutable : Symbol(Set.asImmutable, Decl(immutable.ts, 151, 22)) // Sequence algorithms concat(...valuesOrCollections: Array | C>): Set; ->concat : Symbol(Set.concat, Decl(immutable.d.ts, 152, 24)) ->C : Symbol(C, Decl(immutable.d.ts, 154, 11)) ->valuesOrCollections : Symbol(valuesOrCollections, Decl(immutable.d.ts, 154, 14)) +>concat : Symbol(Set.concat, Decl(immutable.ts, 152, 24)) +>C : Symbol(C, Decl(immutable.ts, 154, 11)) +>valuesOrCollections : Symbol(valuesOrCollections, Decl(immutable.ts, 154, 14)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) >Iterable : Symbol(Iterable, Decl(lib.es2015.iterable.d.ts, --, --)) ->C : Symbol(C, Decl(immutable.d.ts, 154, 11)) ->C : Symbol(C, Decl(immutable.d.ts, 154, 11)) ->Set : Symbol(Set, Decl(immutable.d.ts, 127, 3), Decl(immutable.d.ts, 135, 3), Decl(immutable.d.ts, 136, 34), Decl(immutable.d.ts, 137, 35), Decl(immutable.d.ts, 138, 58)) ->T : Symbol(T, Decl(immutable.d.ts, 139, 23)) ->C : Symbol(C, Decl(immutable.d.ts, 154, 11)) +>C : Symbol(C, Decl(immutable.ts, 154, 11)) +>C : Symbol(C, Decl(immutable.ts, 154, 11)) +>Set : Symbol(Set, Decl(immutable.ts, 127, 3), Decl(immutable.ts, 135, 3), Decl(immutable.ts, 136, 34), Decl(immutable.ts, 137, 35), Decl(immutable.ts, 138, 58)) +>T : Symbol(T, Decl(immutable.ts, 139, 23)) +>C : Symbol(C, Decl(immutable.ts, 154, 11)) map(mapper: (value: T, key: never, iter: this) => M, context?: any): Set; ->map : Symbol(Set.map, Decl(immutable.d.ts, 154, 74)) ->M : Symbol(M, Decl(immutable.d.ts, 155, 8)) ->mapper : Symbol(mapper, Decl(immutable.d.ts, 155, 11)) ->value : Symbol(value, Decl(immutable.d.ts, 155, 20)) ->T : Symbol(T, Decl(immutable.d.ts, 139, 23)) ->key : Symbol(key, Decl(immutable.d.ts, 155, 29)) ->iter : Symbol(iter, Decl(immutable.d.ts, 155, 41)) ->M : Symbol(M, Decl(immutable.d.ts, 155, 8)) ->context : Symbol(context, Decl(immutable.d.ts, 155, 59)) ->Set : Symbol(Set, Decl(immutable.d.ts, 127, 3), Decl(immutable.d.ts, 135, 3), Decl(immutable.d.ts, 136, 34), Decl(immutable.d.ts, 137, 35), Decl(immutable.d.ts, 138, 58)) ->M : Symbol(M, Decl(immutable.d.ts, 155, 8)) +>map : Symbol(Set.map, Decl(immutable.ts, 154, 74)) +>M : Symbol(M, Decl(immutable.ts, 155, 8)) +>mapper : Symbol(mapper, Decl(immutable.ts, 155, 11)) +>value : Symbol(value, Decl(immutable.ts, 155, 20)) +>T : Symbol(T, Decl(immutable.ts, 139, 23)) +>key : Symbol(key, Decl(immutable.ts, 155, 29)) +>iter : Symbol(iter, Decl(immutable.ts, 155, 41)) +>M : Symbol(M, Decl(immutable.ts, 155, 8)) +>context : Symbol(context, Decl(immutable.ts, 155, 59)) +>Set : Symbol(Set, Decl(immutable.ts, 127, 3), Decl(immutable.ts, 135, 3), Decl(immutable.ts, 136, 34), Decl(immutable.ts, 137, 35), Decl(immutable.ts, 138, 58)) +>M : Symbol(M, Decl(immutable.ts, 155, 8)) flatMap(mapper: (value: T, key: never, iter: this) => Iterable, context?: any): Set; ->flatMap : Symbol(Set.flatMap, Decl(immutable.d.ts, 155, 83)) ->M : Symbol(M, Decl(immutable.d.ts, 156, 12)) ->mapper : Symbol(mapper, Decl(immutable.d.ts, 156, 15)) ->value : Symbol(value, Decl(immutable.d.ts, 156, 24)) ->T : Symbol(T, Decl(immutable.d.ts, 139, 23)) ->key : Symbol(key, Decl(immutable.d.ts, 156, 33)) ->iter : Symbol(iter, Decl(immutable.d.ts, 156, 45)) +>flatMap : Symbol(Set.flatMap, Decl(immutable.ts, 155, 83)) +>M : Symbol(M, Decl(immutable.ts, 156, 12)) +>mapper : Symbol(mapper, Decl(immutable.ts, 156, 15)) +>value : Symbol(value, Decl(immutable.ts, 156, 24)) +>T : Symbol(T, Decl(immutable.ts, 139, 23)) +>key : Symbol(key, Decl(immutable.ts, 156, 33)) +>iter : Symbol(iter, Decl(immutable.ts, 156, 45)) >Iterable : Symbol(Iterable, Decl(lib.es2015.iterable.d.ts, --, --)) ->M : Symbol(M, Decl(immutable.d.ts, 156, 12)) ->context : Symbol(context, Decl(immutable.d.ts, 156, 73)) ->Set : Symbol(Set, Decl(immutable.d.ts, 127, 3), Decl(immutable.d.ts, 135, 3), Decl(immutable.d.ts, 136, 34), Decl(immutable.d.ts, 137, 35), Decl(immutable.d.ts, 138, 58)) ->M : Symbol(M, Decl(immutable.d.ts, 156, 12)) +>M : Symbol(M, Decl(immutable.ts, 156, 12)) +>context : Symbol(context, Decl(immutable.ts, 156, 73)) +>Set : Symbol(Set, Decl(immutable.ts, 127, 3), Decl(immutable.ts, 135, 3), Decl(immutable.ts, 136, 34), Decl(immutable.ts, 137, 35), Decl(immutable.ts, 138, 58)) +>M : Symbol(M, Decl(immutable.ts, 156, 12)) filter(predicate: (value: T, key: never, iter: this) => value is F, context?: any): Set; ->filter : Symbol(Set.filter, Decl(immutable.d.ts, 156, 97), Decl(immutable.d.ts, 157, 108)) ->F : Symbol(F, Decl(immutable.d.ts, 157, 11)) ->T : Symbol(T, Decl(immutable.d.ts, 139, 23)) ->predicate : Symbol(predicate, Decl(immutable.d.ts, 157, 24)) ->value : Symbol(value, Decl(immutable.d.ts, 157, 36)) ->T : Symbol(T, Decl(immutable.d.ts, 139, 23)) ->key : Symbol(key, Decl(immutable.d.ts, 157, 45)) ->iter : Symbol(iter, Decl(immutable.d.ts, 157, 57)) ->value : Symbol(value, Decl(immutable.d.ts, 157, 36)) ->F : Symbol(F, Decl(immutable.d.ts, 157, 11)) ->context : Symbol(context, Decl(immutable.d.ts, 157, 84)) ->Set : Symbol(Set, Decl(immutable.d.ts, 127, 3), Decl(immutable.d.ts, 135, 3), Decl(immutable.d.ts, 136, 34), Decl(immutable.d.ts, 137, 35), Decl(immutable.d.ts, 138, 58)) ->F : Symbol(F, Decl(immutable.d.ts, 157, 11)) +>filter : Symbol(Set.filter, Decl(immutable.ts, 156, 97), Decl(immutable.ts, 157, 108)) +>F : Symbol(F, Decl(immutable.ts, 157, 11)) +>T : Symbol(T, Decl(immutable.ts, 139, 23)) +>predicate : Symbol(predicate, Decl(immutable.ts, 157, 24)) +>value : Symbol(value, Decl(immutable.ts, 157, 36)) +>T : Symbol(T, Decl(immutable.ts, 139, 23)) +>key : Symbol(key, Decl(immutable.ts, 157, 45)) +>iter : Symbol(iter, Decl(immutable.ts, 157, 57)) +>value : Symbol(value, Decl(immutable.ts, 157, 36)) +>F : Symbol(F, Decl(immutable.ts, 157, 11)) +>context : Symbol(context, Decl(immutable.ts, 157, 84)) +>Set : Symbol(Set, Decl(immutable.ts, 127, 3), Decl(immutable.ts, 135, 3), Decl(immutable.ts, 136, 34), Decl(immutable.ts, 137, 35), Decl(immutable.ts, 138, 58)) +>F : Symbol(F, Decl(immutable.ts, 157, 11)) filter(predicate: (value: T, key: never, iter: this) => any, context?: any): this; ->filter : Symbol(Set.filter, Decl(immutable.d.ts, 156, 97), Decl(immutable.d.ts, 157, 108)) ->predicate : Symbol(predicate, Decl(immutable.d.ts, 158, 11)) ->value : Symbol(value, Decl(immutable.d.ts, 158, 23)) ->T : Symbol(T, Decl(immutable.d.ts, 139, 23)) ->key : Symbol(key, Decl(immutable.d.ts, 158, 32)) ->iter : Symbol(iter, Decl(immutable.d.ts, 158, 44)) ->context : Symbol(context, Decl(immutable.d.ts, 158, 64)) +>filter : Symbol(Set.filter, Decl(immutable.ts, 156, 97), Decl(immutable.ts, 157, 108)) +>predicate : Symbol(predicate, Decl(immutable.ts, 158, 11)) +>value : Symbol(value, Decl(immutable.ts, 158, 23)) +>T : Symbol(T, Decl(immutable.ts, 139, 23)) +>key : Symbol(key, Decl(immutable.ts, 158, 32)) +>iter : Symbol(iter, Decl(immutable.ts, 158, 44)) +>context : Symbol(context, Decl(immutable.ts, 158, 64)) } export module OrderedSet { ->OrderedSet : Symbol(OrderedSet, Decl(immutable.d.ts, 159, 3), Decl(immutable.d.ts, 165, 3), Decl(immutable.d.ts, 166, 48), Decl(immutable.d.ts, 167, 49), Decl(immutable.d.ts, 168, 72)) +>OrderedSet : Symbol(OrderedSet, Decl(immutable.ts, 159, 3), Decl(immutable.ts, 165, 3), Decl(immutable.ts, 166, 48), Decl(immutable.ts, 167, 49), Decl(immutable.ts, 168, 72)) function isOrderedSet(maybeOrderedSet: any): boolean; ->isOrderedSet : Symbol(isOrderedSet, Decl(immutable.d.ts, 160, 28)) ->maybeOrderedSet : Symbol(maybeOrderedSet, Decl(immutable.d.ts, 161, 26)) +>isOrderedSet : Symbol(isOrderedSet, Decl(immutable.ts, 160, 28)) +>maybeOrderedSet : Symbol(maybeOrderedSet, Decl(immutable.ts, 161, 26)) function of(...values: Array): OrderedSet; ->of : Symbol(of, Decl(immutable.d.ts, 161, 57)) ->T : Symbol(T, Decl(immutable.d.ts, 162, 16)) ->values : Symbol(values, Decl(immutable.d.ts, 162, 19)) +>of : Symbol(of, Decl(immutable.ts, 161, 57)) +>T : Symbol(T, Decl(immutable.ts, 162, 16)) +>values : Symbol(values, Decl(immutable.ts, 162, 19)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) ->T : Symbol(T, Decl(immutable.d.ts, 162, 16)) ->OrderedSet : Symbol(OrderedSet, Decl(immutable.d.ts, 159, 3), Decl(immutable.d.ts, 165, 3), Decl(immutable.d.ts, 166, 48), Decl(immutable.d.ts, 167, 49), Decl(immutable.d.ts, 168, 72)) ->T : Symbol(T, Decl(immutable.d.ts, 162, 16)) +>T : Symbol(T, Decl(immutable.ts, 162, 16)) +>OrderedSet : Symbol(OrderedSet, Decl(immutable.ts, 159, 3), Decl(immutable.ts, 165, 3), Decl(immutable.ts, 166, 48), Decl(immutable.ts, 167, 49), Decl(immutable.ts, 168, 72)) +>T : Symbol(T, Decl(immutable.ts, 162, 16)) function fromKeys(iter: Collection): OrderedSet; ->fromKeys : Symbol(fromKeys, Decl(immutable.d.ts, 162, 55), Decl(immutable.d.ts, 163, 66)) ->T : Symbol(T, Decl(immutable.d.ts, 163, 22)) ->iter : Symbol(iter, Decl(immutable.d.ts, 163, 25)) ->Collection : Symbol(Collection, Decl(immutable.d.ts, 331, 3), Decl(immutable.d.ts, 402, 3), Decl(immutable.d.ts, 403, 79), Decl(immutable.d.ts, 404, 80), Decl(immutable.d.ts, 405, 86)) ->T : Symbol(T, Decl(immutable.d.ts, 163, 22)) ->OrderedSet : Symbol(OrderedSet, Decl(immutable.d.ts, 159, 3), Decl(immutable.d.ts, 165, 3), Decl(immutable.d.ts, 166, 48), Decl(immutable.d.ts, 167, 49), Decl(immutable.d.ts, 168, 72)) ->T : Symbol(T, Decl(immutable.d.ts, 163, 22)) +>fromKeys : Symbol(fromKeys, Decl(immutable.ts, 162, 55), Decl(immutable.ts, 163, 66)) +>T : Symbol(T, Decl(immutable.ts, 163, 22)) +>iter : Symbol(iter, Decl(immutable.ts, 163, 25)) +>Collection : Symbol(Collection, Decl(immutable.ts, 331, 3), Decl(immutable.ts, 402, 3), Decl(immutable.ts, 403, 79), Decl(immutable.ts, 404, 80), Decl(immutable.ts, 405, 86)) +>T : Symbol(T, Decl(immutable.ts, 163, 22)) +>OrderedSet : Symbol(OrderedSet, Decl(immutable.ts, 159, 3), Decl(immutable.ts, 165, 3), Decl(immutable.ts, 166, 48), Decl(immutable.ts, 167, 49), Decl(immutable.ts, 168, 72)) +>T : Symbol(T, Decl(immutable.ts, 163, 22)) function fromKeys(obj: {[key: string]: any}): OrderedSet; ->fromKeys : Symbol(fromKeys, Decl(immutable.d.ts, 162, 55), Decl(immutable.d.ts, 163, 66)) ->obj : Symbol(obj, Decl(immutable.d.ts, 164, 22)) ->key : Symbol(key, Decl(immutable.d.ts, 164, 29)) ->OrderedSet : Symbol(OrderedSet, Decl(immutable.d.ts, 159, 3), Decl(immutable.d.ts, 165, 3), Decl(immutable.d.ts, 166, 48), Decl(immutable.d.ts, 167, 49), Decl(immutable.d.ts, 168, 72)) +>fromKeys : Symbol(fromKeys, Decl(immutable.ts, 162, 55), Decl(immutable.ts, 163, 66)) +>obj : Symbol(obj, Decl(immutable.ts, 164, 22)) +>key : Symbol(key, Decl(immutable.ts, 164, 29)) +>OrderedSet : Symbol(OrderedSet, Decl(immutable.ts, 159, 3), Decl(immutable.ts, 165, 3), Decl(immutable.ts, 166, 48), Decl(immutable.ts, 167, 49), Decl(immutable.ts, 168, 72)) } export function OrderedSet(): OrderedSet; ->OrderedSet : Symbol(OrderedSet, Decl(immutable.d.ts, 159, 3), Decl(immutable.d.ts, 165, 3), Decl(immutable.d.ts, 166, 48), Decl(immutable.d.ts, 167, 49), Decl(immutable.d.ts, 168, 72)) ->OrderedSet : Symbol(OrderedSet, Decl(immutable.d.ts, 159, 3), Decl(immutable.d.ts, 165, 3), Decl(immutable.d.ts, 166, 48), Decl(immutable.d.ts, 167, 49), Decl(immutable.d.ts, 168, 72)) +>OrderedSet : Symbol(OrderedSet, Decl(immutable.ts, 159, 3), Decl(immutable.ts, 165, 3), Decl(immutable.ts, 166, 48), Decl(immutable.ts, 167, 49), Decl(immutable.ts, 168, 72)) +>OrderedSet : Symbol(OrderedSet, Decl(immutable.ts, 159, 3), Decl(immutable.ts, 165, 3), Decl(immutable.ts, 166, 48), Decl(immutable.ts, 167, 49), Decl(immutable.ts, 168, 72)) export function OrderedSet(): OrderedSet; ->OrderedSet : Symbol(OrderedSet, Decl(immutable.d.ts, 159, 3), Decl(immutable.d.ts, 165, 3), Decl(immutable.d.ts, 166, 48), Decl(immutable.d.ts, 167, 49), Decl(immutable.d.ts, 168, 72)) ->T : Symbol(T, Decl(immutable.d.ts, 167, 29)) ->OrderedSet : Symbol(OrderedSet, Decl(immutable.d.ts, 159, 3), Decl(immutable.d.ts, 165, 3), Decl(immutable.d.ts, 166, 48), Decl(immutable.d.ts, 167, 49), Decl(immutable.d.ts, 168, 72)) ->T : Symbol(T, Decl(immutable.d.ts, 167, 29)) +>OrderedSet : Symbol(OrderedSet, Decl(immutable.ts, 159, 3), Decl(immutable.ts, 165, 3), Decl(immutable.ts, 166, 48), Decl(immutable.ts, 167, 49), Decl(immutable.ts, 168, 72)) +>T : Symbol(T, Decl(immutable.ts, 167, 29)) +>OrderedSet : Symbol(OrderedSet, Decl(immutable.ts, 159, 3), Decl(immutable.ts, 165, 3), Decl(immutable.ts, 166, 48), Decl(immutable.ts, 167, 49), Decl(immutable.ts, 168, 72)) +>T : Symbol(T, Decl(immutable.ts, 167, 29)) export function OrderedSet(collection: Iterable): OrderedSet; ->OrderedSet : Symbol(OrderedSet, Decl(immutable.d.ts, 159, 3), Decl(immutable.d.ts, 165, 3), Decl(immutable.d.ts, 166, 48), Decl(immutable.d.ts, 167, 49), Decl(immutable.d.ts, 168, 72)) ->T : Symbol(T, Decl(immutable.d.ts, 168, 29)) ->collection : Symbol(collection, Decl(immutable.d.ts, 168, 32)) +>OrderedSet : Symbol(OrderedSet, Decl(immutable.ts, 159, 3), Decl(immutable.ts, 165, 3), Decl(immutable.ts, 166, 48), Decl(immutable.ts, 167, 49), Decl(immutable.ts, 168, 72)) +>T : Symbol(T, Decl(immutable.ts, 168, 29)) +>collection : Symbol(collection, Decl(immutable.ts, 168, 32)) >Iterable : Symbol(Iterable, Decl(lib.es2015.iterable.d.ts, --, --)) ->T : Symbol(T, Decl(immutable.d.ts, 168, 29)) ->OrderedSet : Symbol(OrderedSet, Decl(immutable.d.ts, 159, 3), Decl(immutable.d.ts, 165, 3), Decl(immutable.d.ts, 166, 48), Decl(immutable.d.ts, 167, 49), Decl(immutable.d.ts, 168, 72)) ->T : Symbol(T, Decl(immutable.d.ts, 168, 29)) +>T : Symbol(T, Decl(immutable.ts, 168, 29)) +>OrderedSet : Symbol(OrderedSet, Decl(immutable.ts, 159, 3), Decl(immutable.ts, 165, 3), Decl(immutable.ts, 166, 48), Decl(immutable.ts, 167, 49), Decl(immutable.ts, 168, 72)) +>T : Symbol(T, Decl(immutable.ts, 168, 29)) export interface OrderedSet extends Set { ->OrderedSet : Symbol(OrderedSet, Decl(immutable.d.ts, 159, 3), Decl(immutable.d.ts, 165, 3), Decl(immutable.d.ts, 166, 48), Decl(immutable.d.ts, 167, 49), Decl(immutable.d.ts, 168, 72)) ->T : Symbol(T, Decl(immutable.d.ts, 169, 30)) ->Set : Symbol(Set, Decl(immutable.d.ts, 127, 3), Decl(immutable.d.ts, 135, 3), Decl(immutable.d.ts, 136, 34), Decl(immutable.d.ts, 137, 35), Decl(immutable.d.ts, 138, 58)) ->T : Symbol(T, Decl(immutable.d.ts, 169, 30)) +>OrderedSet : Symbol(OrderedSet, Decl(immutable.ts, 159, 3), Decl(immutable.ts, 165, 3), Decl(immutable.ts, 166, 48), Decl(immutable.ts, 167, 49), Decl(immutable.ts, 168, 72)) +>T : Symbol(T, Decl(immutable.ts, 169, 30)) +>Set : Symbol(Set, Decl(immutable.ts, 127, 3), Decl(immutable.ts, 135, 3), Decl(immutable.ts, 136, 34), Decl(immutable.ts, 137, 35), Decl(immutable.ts, 138, 58)) +>T : Symbol(T, Decl(immutable.ts, 169, 30)) // Sequence algorithms concat(...valuesOrCollections: Array | C>): OrderedSet; ->concat : Symbol(OrderedSet.concat, Decl(immutable.d.ts, 169, 49)) ->C : Symbol(C, Decl(immutable.d.ts, 171, 11)) ->valuesOrCollections : Symbol(valuesOrCollections, Decl(immutable.d.ts, 171, 14)) +>concat : Symbol(OrderedSet.concat, Decl(immutable.ts, 169, 49)) +>C : Symbol(C, Decl(immutable.ts, 171, 11)) +>valuesOrCollections : Symbol(valuesOrCollections, Decl(immutable.ts, 171, 14)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) >Iterable : Symbol(Iterable, Decl(lib.es2015.iterable.d.ts, --, --)) ->C : Symbol(C, Decl(immutable.d.ts, 171, 11)) ->C : Symbol(C, Decl(immutable.d.ts, 171, 11)) ->OrderedSet : Symbol(OrderedSet, Decl(immutable.d.ts, 159, 3), Decl(immutable.d.ts, 165, 3), Decl(immutable.d.ts, 166, 48), Decl(immutable.d.ts, 167, 49), Decl(immutable.d.ts, 168, 72)) ->T : Symbol(T, Decl(immutable.d.ts, 169, 30)) ->C : Symbol(C, Decl(immutable.d.ts, 171, 11)) +>C : Symbol(C, Decl(immutable.ts, 171, 11)) +>C : Symbol(C, Decl(immutable.ts, 171, 11)) +>OrderedSet : Symbol(OrderedSet, Decl(immutable.ts, 159, 3), Decl(immutable.ts, 165, 3), Decl(immutable.ts, 166, 48), Decl(immutable.ts, 167, 49), Decl(immutable.ts, 168, 72)) +>T : Symbol(T, Decl(immutable.ts, 169, 30)) +>C : Symbol(C, Decl(immutable.ts, 171, 11)) map(mapper: (value: T, key: never, iter: this) => M, context?: any): OrderedSet; ->map : Symbol(OrderedSet.map, Decl(immutable.d.ts, 171, 81)) ->M : Symbol(M, Decl(immutable.d.ts, 172, 8)) ->mapper : Symbol(mapper, Decl(immutable.d.ts, 172, 11)) ->value : Symbol(value, Decl(immutable.d.ts, 172, 20)) ->T : Symbol(T, Decl(immutable.d.ts, 169, 30)) ->key : Symbol(key, Decl(immutable.d.ts, 172, 29)) ->iter : Symbol(iter, Decl(immutable.d.ts, 172, 41)) ->M : Symbol(M, Decl(immutable.d.ts, 172, 8)) ->context : Symbol(context, Decl(immutable.d.ts, 172, 59)) ->OrderedSet : Symbol(OrderedSet, Decl(immutable.d.ts, 159, 3), Decl(immutable.d.ts, 165, 3), Decl(immutable.d.ts, 166, 48), Decl(immutable.d.ts, 167, 49), Decl(immutable.d.ts, 168, 72)) ->M : Symbol(M, Decl(immutable.d.ts, 172, 8)) +>map : Symbol(OrderedSet.map, Decl(immutable.ts, 171, 81)) +>M : Symbol(M, Decl(immutable.ts, 172, 8)) +>mapper : Symbol(mapper, Decl(immutable.ts, 172, 11)) +>value : Symbol(value, Decl(immutable.ts, 172, 20)) +>T : Symbol(T, Decl(immutable.ts, 169, 30)) +>key : Symbol(key, Decl(immutable.ts, 172, 29)) +>iter : Symbol(iter, Decl(immutable.ts, 172, 41)) +>M : Symbol(M, Decl(immutable.ts, 172, 8)) +>context : Symbol(context, Decl(immutable.ts, 172, 59)) +>OrderedSet : Symbol(OrderedSet, Decl(immutable.ts, 159, 3), Decl(immutable.ts, 165, 3), Decl(immutable.ts, 166, 48), Decl(immutable.ts, 167, 49), Decl(immutable.ts, 168, 72)) +>M : Symbol(M, Decl(immutable.ts, 172, 8)) flatMap(mapper: (value: T, key: never, iter: this) => Iterable, context?: any): OrderedSet; ->flatMap : Symbol(OrderedSet.flatMap, Decl(immutable.d.ts, 172, 90)) ->M : Symbol(M, Decl(immutable.d.ts, 173, 12)) ->mapper : Symbol(mapper, Decl(immutable.d.ts, 173, 15)) ->value : Symbol(value, Decl(immutable.d.ts, 173, 24)) ->T : Symbol(T, Decl(immutable.d.ts, 169, 30)) ->key : Symbol(key, Decl(immutable.d.ts, 173, 33)) ->iter : Symbol(iter, Decl(immutable.d.ts, 173, 45)) +>flatMap : Symbol(OrderedSet.flatMap, Decl(immutable.ts, 172, 90)) +>M : Symbol(M, Decl(immutable.ts, 173, 12)) +>mapper : Symbol(mapper, Decl(immutable.ts, 173, 15)) +>value : Symbol(value, Decl(immutable.ts, 173, 24)) +>T : Symbol(T, Decl(immutable.ts, 169, 30)) +>key : Symbol(key, Decl(immutable.ts, 173, 33)) +>iter : Symbol(iter, Decl(immutable.ts, 173, 45)) >Iterable : Symbol(Iterable, Decl(lib.es2015.iterable.d.ts, --, --)) ->M : Symbol(M, Decl(immutable.d.ts, 173, 12)) ->context : Symbol(context, Decl(immutable.d.ts, 173, 73)) ->OrderedSet : Symbol(OrderedSet, Decl(immutable.d.ts, 159, 3), Decl(immutable.d.ts, 165, 3), Decl(immutable.d.ts, 166, 48), Decl(immutable.d.ts, 167, 49), Decl(immutable.d.ts, 168, 72)) ->M : Symbol(M, Decl(immutable.d.ts, 173, 12)) +>M : Symbol(M, Decl(immutable.ts, 173, 12)) +>context : Symbol(context, Decl(immutable.ts, 173, 73)) +>OrderedSet : Symbol(OrderedSet, Decl(immutable.ts, 159, 3), Decl(immutable.ts, 165, 3), Decl(immutable.ts, 166, 48), Decl(immutable.ts, 167, 49), Decl(immutable.ts, 168, 72)) +>M : Symbol(M, Decl(immutable.ts, 173, 12)) filter(predicate: (value: T, key: never, iter: this) => value is F, context?: any): OrderedSet; ->filter : Symbol(OrderedSet.filter, Decl(immutable.d.ts, 173, 104), Decl(immutable.d.ts, 174, 115)) ->F : Symbol(F, Decl(immutable.d.ts, 174, 11)) ->T : Symbol(T, Decl(immutable.d.ts, 169, 30)) ->predicate : Symbol(predicate, Decl(immutable.d.ts, 174, 24)) ->value : Symbol(value, Decl(immutable.d.ts, 174, 36)) ->T : Symbol(T, Decl(immutable.d.ts, 169, 30)) ->key : Symbol(key, Decl(immutable.d.ts, 174, 45)) ->iter : Symbol(iter, Decl(immutable.d.ts, 174, 57)) ->value : Symbol(value, Decl(immutable.d.ts, 174, 36)) ->F : Symbol(F, Decl(immutable.d.ts, 174, 11)) ->context : Symbol(context, Decl(immutable.d.ts, 174, 84)) ->OrderedSet : Symbol(OrderedSet, Decl(immutable.d.ts, 159, 3), Decl(immutable.d.ts, 165, 3), Decl(immutable.d.ts, 166, 48), Decl(immutable.d.ts, 167, 49), Decl(immutable.d.ts, 168, 72)) ->F : Symbol(F, Decl(immutable.d.ts, 174, 11)) +>filter : Symbol(OrderedSet.filter, Decl(immutable.ts, 173, 104), Decl(immutable.ts, 174, 115)) +>F : Symbol(F, Decl(immutable.ts, 174, 11)) +>T : Symbol(T, Decl(immutable.ts, 169, 30)) +>predicate : Symbol(predicate, Decl(immutable.ts, 174, 24)) +>value : Symbol(value, Decl(immutable.ts, 174, 36)) +>T : Symbol(T, Decl(immutable.ts, 169, 30)) +>key : Symbol(key, Decl(immutable.ts, 174, 45)) +>iter : Symbol(iter, Decl(immutable.ts, 174, 57)) +>value : Symbol(value, Decl(immutable.ts, 174, 36)) +>F : Symbol(F, Decl(immutable.ts, 174, 11)) +>context : Symbol(context, Decl(immutable.ts, 174, 84)) +>OrderedSet : Symbol(OrderedSet, Decl(immutable.ts, 159, 3), Decl(immutable.ts, 165, 3), Decl(immutable.ts, 166, 48), Decl(immutable.ts, 167, 49), Decl(immutable.ts, 168, 72)) +>F : Symbol(F, Decl(immutable.ts, 174, 11)) filter(predicate: (value: T, key: never, iter: this) => any, context?: any): this; ->filter : Symbol(OrderedSet.filter, Decl(immutable.d.ts, 173, 104), Decl(immutable.d.ts, 174, 115)) ->predicate : Symbol(predicate, Decl(immutable.d.ts, 175, 11)) ->value : Symbol(value, Decl(immutable.d.ts, 175, 23)) ->T : Symbol(T, Decl(immutable.d.ts, 169, 30)) ->key : Symbol(key, Decl(immutable.d.ts, 175, 32)) ->iter : Symbol(iter, Decl(immutable.d.ts, 175, 44)) ->context : Symbol(context, Decl(immutable.d.ts, 175, 64)) +>filter : Symbol(OrderedSet.filter, Decl(immutable.ts, 173, 104), Decl(immutable.ts, 174, 115)) +>predicate : Symbol(predicate, Decl(immutable.ts, 175, 11)) +>value : Symbol(value, Decl(immutable.ts, 175, 23)) +>T : Symbol(T, Decl(immutable.ts, 169, 30)) +>key : Symbol(key, Decl(immutable.ts, 175, 32)) +>iter : Symbol(iter, Decl(immutable.ts, 175, 44)) +>context : Symbol(context, Decl(immutable.ts, 175, 64)) zip(...collections: Array>): OrderedSet; ->zip : Symbol(OrderedSet.zip, Decl(immutable.d.ts, 175, 86)) ->collections : Symbol(collections, Decl(immutable.d.ts, 176, 8)) +>zip : Symbol(OrderedSet.zip, Decl(immutable.ts, 175, 86)) +>collections : Symbol(collections, Decl(immutable.ts, 176, 8)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) ->Collection : Symbol(Collection, Decl(immutable.d.ts, 331, 3), Decl(immutable.d.ts, 402, 3), Decl(immutable.d.ts, 403, 79), Decl(immutable.d.ts, 404, 80), Decl(immutable.d.ts, 405, 86)) ->OrderedSet : Symbol(OrderedSet, Decl(immutable.d.ts, 159, 3), Decl(immutable.d.ts, 165, 3), Decl(immutable.d.ts, 166, 48), Decl(immutable.d.ts, 167, 49), Decl(immutable.d.ts, 168, 72)) +>Collection : Symbol(Collection, Decl(immutable.ts, 331, 3), Decl(immutable.ts, 402, 3), Decl(immutable.ts, 403, 79), Decl(immutable.ts, 404, 80), Decl(immutable.ts, 405, 86)) +>OrderedSet : Symbol(OrderedSet, Decl(immutable.ts, 159, 3), Decl(immutable.ts, 165, 3), Decl(immutable.ts, 166, 48), Decl(immutable.ts, 167, 49), Decl(immutable.ts, 168, 72)) zipWith(zipper: (value: T, otherValue: U) => Z, otherCollection: Collection): OrderedSet; ->zipWith : Symbol(OrderedSet.zipWith, Decl(immutable.d.ts, 176, 70), Decl(immutable.d.ts, 177, 110), Decl(immutable.d.ts, 178, 165)) ->U : Symbol(U, Decl(immutable.d.ts, 177, 12)) ->Z : Symbol(Z, Decl(immutable.d.ts, 177, 14)) ->zipper : Symbol(zipper, Decl(immutable.d.ts, 177, 18)) ->value : Symbol(value, Decl(immutable.d.ts, 177, 27)) ->T : Symbol(T, Decl(immutable.d.ts, 169, 30)) ->otherValue : Symbol(otherValue, Decl(immutable.d.ts, 177, 36)) ->U : Symbol(U, Decl(immutable.d.ts, 177, 12)) ->Z : Symbol(Z, Decl(immutable.d.ts, 177, 14)) ->otherCollection : Symbol(otherCollection, Decl(immutable.d.ts, 177, 57)) ->Collection : Symbol(Collection, Decl(immutable.d.ts, 331, 3), Decl(immutable.d.ts, 402, 3), Decl(immutable.d.ts, 403, 79), Decl(immutable.d.ts, 404, 80), Decl(immutable.d.ts, 405, 86)) ->U : Symbol(U, Decl(immutable.d.ts, 177, 12)) ->OrderedSet : Symbol(OrderedSet, Decl(immutable.d.ts, 159, 3), Decl(immutable.d.ts, 165, 3), Decl(immutable.d.ts, 166, 48), Decl(immutable.d.ts, 167, 49), Decl(immutable.d.ts, 168, 72)) ->Z : Symbol(Z, Decl(immutable.d.ts, 177, 14)) +>zipWith : Symbol(OrderedSet.zipWith, Decl(immutable.ts, 176, 70), Decl(immutable.ts, 177, 110), Decl(immutable.ts, 178, 165)) +>U : Symbol(U, Decl(immutable.ts, 177, 12)) +>Z : Symbol(Z, Decl(immutable.ts, 177, 14)) +>zipper : Symbol(zipper, Decl(immutable.ts, 177, 18)) +>value : Symbol(value, Decl(immutable.ts, 177, 27)) +>T : Symbol(T, Decl(immutable.ts, 169, 30)) +>otherValue : Symbol(otherValue, Decl(immutable.ts, 177, 36)) +>U : Symbol(U, Decl(immutable.ts, 177, 12)) +>Z : Symbol(Z, Decl(immutable.ts, 177, 14)) +>otherCollection : Symbol(otherCollection, Decl(immutable.ts, 177, 57)) +>Collection : Symbol(Collection, Decl(immutable.ts, 331, 3), Decl(immutable.ts, 402, 3), Decl(immutable.ts, 403, 79), Decl(immutable.ts, 404, 80), Decl(immutable.ts, 405, 86)) +>U : Symbol(U, Decl(immutable.ts, 177, 12)) +>OrderedSet : Symbol(OrderedSet, Decl(immutable.ts, 159, 3), Decl(immutable.ts, 165, 3), Decl(immutable.ts, 166, 48), Decl(immutable.ts, 167, 49), Decl(immutable.ts, 168, 72)) +>Z : Symbol(Z, Decl(immutable.ts, 177, 14)) zipWith(zipper: (value: T, otherValue: U, thirdValue: V) => Z, otherCollection: Collection, thirdCollection: Collection): OrderedSet; ->zipWith : Symbol(OrderedSet.zipWith, Decl(immutable.d.ts, 176, 70), Decl(immutable.d.ts, 177, 110), Decl(immutable.d.ts, 178, 165)) ->U : Symbol(U, Decl(immutable.d.ts, 178, 12)) ->V : Symbol(V, Decl(immutable.d.ts, 178, 14)) ->Z : Symbol(Z, Decl(immutable.d.ts, 178, 17)) ->zipper : Symbol(zipper, Decl(immutable.d.ts, 178, 21)) ->value : Symbol(value, Decl(immutable.d.ts, 178, 30)) ->T : Symbol(T, Decl(immutable.d.ts, 169, 30)) ->otherValue : Symbol(otherValue, Decl(immutable.d.ts, 178, 39)) ->U : Symbol(U, Decl(immutable.d.ts, 178, 12)) ->thirdValue : Symbol(thirdValue, Decl(immutable.d.ts, 178, 54)) ->V : Symbol(V, Decl(immutable.d.ts, 178, 14)) ->Z : Symbol(Z, Decl(immutable.d.ts, 178, 17)) ->otherCollection : Symbol(otherCollection, Decl(immutable.d.ts, 178, 75)) ->Collection : Symbol(Collection, Decl(immutable.d.ts, 331, 3), Decl(immutable.d.ts, 402, 3), Decl(immutable.d.ts, 403, 79), Decl(immutable.d.ts, 404, 80), Decl(immutable.d.ts, 405, 86)) ->U : Symbol(U, Decl(immutable.d.ts, 178, 12)) ->thirdCollection : Symbol(thirdCollection, Decl(immutable.d.ts, 178, 112)) ->Collection : Symbol(Collection, Decl(immutable.d.ts, 331, 3), Decl(immutable.d.ts, 402, 3), Decl(immutable.d.ts, 403, 79), Decl(immutable.d.ts, 404, 80), Decl(immutable.d.ts, 405, 86)) ->V : Symbol(V, Decl(immutable.d.ts, 178, 14)) ->OrderedSet : Symbol(OrderedSet, Decl(immutable.d.ts, 159, 3), Decl(immutable.d.ts, 165, 3), Decl(immutable.d.ts, 166, 48), Decl(immutable.d.ts, 167, 49), Decl(immutable.d.ts, 168, 72)) ->Z : Symbol(Z, Decl(immutable.d.ts, 178, 17)) +>zipWith : Symbol(OrderedSet.zipWith, Decl(immutable.ts, 176, 70), Decl(immutable.ts, 177, 110), Decl(immutable.ts, 178, 165)) +>U : Symbol(U, Decl(immutable.ts, 178, 12)) +>V : Symbol(V, Decl(immutable.ts, 178, 14)) +>Z : Symbol(Z, Decl(immutable.ts, 178, 17)) +>zipper : Symbol(zipper, Decl(immutable.ts, 178, 21)) +>value : Symbol(value, Decl(immutable.ts, 178, 30)) +>T : Symbol(T, Decl(immutable.ts, 169, 30)) +>otherValue : Symbol(otherValue, Decl(immutable.ts, 178, 39)) +>U : Symbol(U, Decl(immutable.ts, 178, 12)) +>thirdValue : Symbol(thirdValue, Decl(immutable.ts, 178, 54)) +>V : Symbol(V, Decl(immutable.ts, 178, 14)) +>Z : Symbol(Z, Decl(immutable.ts, 178, 17)) +>otherCollection : Symbol(otherCollection, Decl(immutable.ts, 178, 75)) +>Collection : Symbol(Collection, Decl(immutable.ts, 331, 3), Decl(immutable.ts, 402, 3), Decl(immutable.ts, 403, 79), Decl(immutable.ts, 404, 80), Decl(immutable.ts, 405, 86)) +>U : Symbol(U, Decl(immutable.ts, 178, 12)) +>thirdCollection : Symbol(thirdCollection, Decl(immutable.ts, 178, 112)) +>Collection : Symbol(Collection, Decl(immutable.ts, 331, 3), Decl(immutable.ts, 402, 3), Decl(immutable.ts, 403, 79), Decl(immutable.ts, 404, 80), Decl(immutable.ts, 405, 86)) +>V : Symbol(V, Decl(immutable.ts, 178, 14)) +>OrderedSet : Symbol(OrderedSet, Decl(immutable.ts, 159, 3), Decl(immutable.ts, 165, 3), Decl(immutable.ts, 166, 48), Decl(immutable.ts, 167, 49), Decl(immutable.ts, 168, 72)) +>Z : Symbol(Z, Decl(immutable.ts, 178, 17)) zipWith(zipper: (...any: Array) => Z, ...collections: Array>): OrderedSet; ->zipWith : Symbol(OrderedSet.zipWith, Decl(immutable.d.ts, 176, 70), Decl(immutable.d.ts, 177, 110), Decl(immutable.d.ts, 178, 165)) ->Z : Symbol(Z, Decl(immutable.d.ts, 179, 12)) ->zipper : Symbol(zipper, Decl(immutable.d.ts, 179, 15)) ->any : Symbol(any, Decl(immutable.d.ts, 179, 24)) +>zipWith : Symbol(OrderedSet.zipWith, Decl(immutable.ts, 176, 70), Decl(immutable.ts, 177, 110), Decl(immutable.ts, 178, 165)) +>Z : Symbol(Z, Decl(immutable.ts, 179, 12)) +>zipper : Symbol(zipper, Decl(immutable.ts, 179, 15)) +>any : Symbol(any, Decl(immutable.ts, 179, 24)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) ->Z : Symbol(Z, Decl(immutable.d.ts, 179, 12)) ->collections : Symbol(collections, Decl(immutable.d.ts, 179, 49)) +>Z : Symbol(Z, Decl(immutable.ts, 179, 12)) +>collections : Symbol(collections, Decl(immutable.ts, 179, 49)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) ->Collection : Symbol(Collection, Decl(immutable.d.ts, 331, 3), Decl(immutable.d.ts, 402, 3), Decl(immutable.d.ts, 403, 79), Decl(immutable.d.ts, 404, 80), Decl(immutable.d.ts, 405, 86)) ->OrderedSet : Symbol(OrderedSet, Decl(immutable.d.ts, 159, 3), Decl(immutable.d.ts, 165, 3), Decl(immutable.d.ts, 166, 48), Decl(immutable.d.ts, 167, 49), Decl(immutable.d.ts, 168, 72)) ->Z : Symbol(Z, Decl(immutable.d.ts, 179, 12)) +>Collection : Symbol(Collection, Decl(immutable.ts, 331, 3), Decl(immutable.ts, 402, 3), Decl(immutable.ts, 403, 79), Decl(immutable.ts, 404, 80), Decl(immutable.ts, 405, 86)) +>OrderedSet : Symbol(OrderedSet, Decl(immutable.ts, 159, 3), Decl(immutable.ts, 165, 3), Decl(immutable.ts, 166, 48), Decl(immutable.ts, 167, 49), Decl(immutable.ts, 168, 72)) +>Z : Symbol(Z, Decl(immutable.ts, 179, 12)) } export module Stack { ->Stack : Symbol(Stack, Decl(immutable.d.ts, 180, 3), Decl(immutable.d.ts, 184, 3), Decl(immutable.d.ts, 185, 38), Decl(immutable.d.ts, 186, 39), Decl(immutable.d.ts, 187, 62)) +>Stack : Symbol(Stack, Decl(immutable.ts, 180, 3), Decl(immutable.ts, 184, 3), Decl(immutable.ts, 185, 38), Decl(immutable.ts, 186, 39), Decl(immutable.ts, 187, 62)) function isStack(maybeStack: any): maybeStack is Stack; ->isStack : Symbol(isStack, Decl(immutable.d.ts, 181, 23)) ->maybeStack : Symbol(maybeStack, Decl(immutable.d.ts, 182, 21)) ->maybeStack : Symbol(maybeStack, Decl(immutable.d.ts, 182, 21)) ->Stack : Symbol(Stack, Decl(immutable.d.ts, 180, 3), Decl(immutable.d.ts, 184, 3), Decl(immutable.d.ts, 185, 38), Decl(immutable.d.ts, 186, 39), Decl(immutable.d.ts, 187, 62)) +>isStack : Symbol(isStack, Decl(immutable.ts, 181, 23)) +>maybeStack : Symbol(maybeStack, Decl(immutable.ts, 182, 21)) +>maybeStack : Symbol(maybeStack, Decl(immutable.ts, 182, 21)) +>Stack : Symbol(Stack, Decl(immutable.ts, 180, 3), Decl(immutable.ts, 184, 3), Decl(immutable.ts, 185, 38), Decl(immutable.ts, 186, 39), Decl(immutable.ts, 187, 62)) function of(...values: Array): Stack; ->of : Symbol(of, Decl(immutable.d.ts, 182, 64)) ->T : Symbol(T, Decl(immutable.d.ts, 183, 16)) ->values : Symbol(values, Decl(immutable.d.ts, 183, 19)) +>of : Symbol(of, Decl(immutable.ts, 182, 64)) +>T : Symbol(T, Decl(immutable.ts, 183, 16)) +>values : Symbol(values, Decl(immutable.ts, 183, 19)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) ->T : Symbol(T, Decl(immutable.d.ts, 183, 16)) ->Stack : Symbol(Stack, Decl(immutable.d.ts, 180, 3), Decl(immutable.d.ts, 184, 3), Decl(immutable.d.ts, 185, 38), Decl(immutable.d.ts, 186, 39), Decl(immutable.d.ts, 187, 62)) ->T : Symbol(T, Decl(immutable.d.ts, 183, 16)) +>T : Symbol(T, Decl(immutable.ts, 183, 16)) +>Stack : Symbol(Stack, Decl(immutable.ts, 180, 3), Decl(immutable.ts, 184, 3), Decl(immutable.ts, 185, 38), Decl(immutable.ts, 186, 39), Decl(immutable.ts, 187, 62)) +>T : Symbol(T, Decl(immutable.ts, 183, 16)) } export function Stack(): Stack; ->Stack : Symbol(Stack, Decl(immutable.d.ts, 180, 3), Decl(immutable.d.ts, 184, 3), Decl(immutable.d.ts, 185, 38), Decl(immutable.d.ts, 186, 39), Decl(immutable.d.ts, 187, 62)) ->Stack : Symbol(Stack, Decl(immutable.d.ts, 180, 3), Decl(immutable.d.ts, 184, 3), Decl(immutable.d.ts, 185, 38), Decl(immutable.d.ts, 186, 39), Decl(immutable.d.ts, 187, 62)) +>Stack : Symbol(Stack, Decl(immutable.ts, 180, 3), Decl(immutable.ts, 184, 3), Decl(immutable.ts, 185, 38), Decl(immutable.ts, 186, 39), Decl(immutable.ts, 187, 62)) +>Stack : Symbol(Stack, Decl(immutable.ts, 180, 3), Decl(immutable.ts, 184, 3), Decl(immutable.ts, 185, 38), Decl(immutable.ts, 186, 39), Decl(immutable.ts, 187, 62)) export function Stack(): Stack; ->Stack : Symbol(Stack, Decl(immutable.d.ts, 180, 3), Decl(immutable.d.ts, 184, 3), Decl(immutable.d.ts, 185, 38), Decl(immutable.d.ts, 186, 39), Decl(immutable.d.ts, 187, 62)) ->T : Symbol(T, Decl(immutable.d.ts, 186, 24)) ->Stack : Symbol(Stack, Decl(immutable.d.ts, 180, 3), Decl(immutable.d.ts, 184, 3), Decl(immutable.d.ts, 185, 38), Decl(immutable.d.ts, 186, 39), Decl(immutable.d.ts, 187, 62)) ->T : Symbol(T, Decl(immutable.d.ts, 186, 24)) +>Stack : Symbol(Stack, Decl(immutable.ts, 180, 3), Decl(immutable.ts, 184, 3), Decl(immutable.ts, 185, 38), Decl(immutable.ts, 186, 39), Decl(immutable.ts, 187, 62)) +>T : Symbol(T, Decl(immutable.ts, 186, 24)) +>Stack : Symbol(Stack, Decl(immutable.ts, 180, 3), Decl(immutable.ts, 184, 3), Decl(immutable.ts, 185, 38), Decl(immutable.ts, 186, 39), Decl(immutable.ts, 187, 62)) +>T : Symbol(T, Decl(immutable.ts, 186, 24)) export function Stack(collection: Iterable): Stack; ->Stack : Symbol(Stack, Decl(immutable.d.ts, 180, 3), Decl(immutable.d.ts, 184, 3), Decl(immutable.d.ts, 185, 38), Decl(immutable.d.ts, 186, 39), Decl(immutable.d.ts, 187, 62)) ->T : Symbol(T, Decl(immutable.d.ts, 187, 24)) ->collection : Symbol(collection, Decl(immutable.d.ts, 187, 27)) +>Stack : Symbol(Stack, Decl(immutable.ts, 180, 3), Decl(immutable.ts, 184, 3), Decl(immutable.ts, 185, 38), Decl(immutable.ts, 186, 39), Decl(immutable.ts, 187, 62)) +>T : Symbol(T, Decl(immutable.ts, 187, 24)) +>collection : Symbol(collection, Decl(immutable.ts, 187, 27)) >Iterable : Symbol(Iterable, Decl(lib.es2015.iterable.d.ts, --, --)) ->T : Symbol(T, Decl(immutable.d.ts, 187, 24)) ->Stack : Symbol(Stack, Decl(immutable.d.ts, 180, 3), Decl(immutable.d.ts, 184, 3), Decl(immutable.d.ts, 185, 38), Decl(immutable.d.ts, 186, 39), Decl(immutable.d.ts, 187, 62)) ->T : Symbol(T, Decl(immutable.d.ts, 187, 24)) +>T : Symbol(T, Decl(immutable.ts, 187, 24)) +>Stack : Symbol(Stack, Decl(immutable.ts, 180, 3), Decl(immutable.ts, 184, 3), Decl(immutable.ts, 185, 38), Decl(immutable.ts, 186, 39), Decl(immutable.ts, 187, 62)) +>T : Symbol(T, Decl(immutable.ts, 187, 24)) export interface Stack extends Collection.Indexed { ->Stack : Symbol(Stack, Decl(immutable.d.ts, 180, 3), Decl(immutable.d.ts, 184, 3), Decl(immutable.d.ts, 185, 38), Decl(immutable.d.ts, 186, 39), Decl(immutable.d.ts, 187, 62)) ->T : Symbol(T, Decl(immutable.d.ts, 188, 25)) ->Collection.Indexed : Symbol(Collection.Indexed, Decl(immutable.d.ts, 355, 5), Decl(immutable.d.ts, 356, 28), Decl(immutable.d.ts, 357, 79)) ->Collection : Symbol(Collection, Decl(immutable.d.ts, 331, 3), Decl(immutable.d.ts, 402, 3), Decl(immutable.d.ts, 403, 79), Decl(immutable.d.ts, 404, 80), Decl(immutable.d.ts, 405, 86)) ->Indexed : Symbol(Collection.Indexed, Decl(immutable.d.ts, 355, 5), Decl(immutable.d.ts, 356, 28), Decl(immutable.d.ts, 357, 79)) ->T : Symbol(T, Decl(immutable.d.ts, 188, 25)) +>Stack : Symbol(Stack, Decl(immutable.ts, 180, 3), Decl(immutable.ts, 184, 3), Decl(immutable.ts, 185, 38), Decl(immutable.ts, 186, 39), Decl(immutable.ts, 187, 62)) +>T : Symbol(T, Decl(immutable.ts, 188, 25)) +>Collection.Indexed : Symbol(Collection.Indexed, Decl(immutable.ts, 355, 5), Decl(immutable.ts, 356, 28), Decl(immutable.ts, 357, 79)) +>Collection : Symbol(Collection, Decl(immutable.ts, 331, 3), Decl(immutable.ts, 402, 3), Decl(immutable.ts, 403, 79), Decl(immutable.ts, 404, 80), Decl(immutable.ts, 405, 86)) +>Indexed : Symbol(Collection.Indexed, Decl(immutable.ts, 355, 5), Decl(immutable.ts, 356, 28), Decl(immutable.ts, 357, 79)) +>T : Symbol(T, Decl(immutable.ts, 188, 25)) // Reading values peek(): T | undefined; ->peek : Symbol(Stack.peek, Decl(immutable.d.ts, 188, 59)) ->T : Symbol(T, Decl(immutable.d.ts, 188, 25)) +>peek : Symbol(Stack.peek, Decl(immutable.ts, 188, 59)) +>T : Symbol(T, Decl(immutable.ts, 188, 25)) // Persistent changes clear(): Stack; ->clear : Symbol(Stack.clear, Decl(immutable.d.ts, 190, 26)) ->Stack : Symbol(Stack, Decl(immutable.d.ts, 180, 3), Decl(immutable.d.ts, 184, 3), Decl(immutable.d.ts, 185, 38), Decl(immutable.d.ts, 186, 39), Decl(immutable.d.ts, 187, 62)) ->T : Symbol(T, Decl(immutable.d.ts, 188, 25)) +>clear : Symbol(Stack.clear, Decl(immutable.ts, 190, 26)) +>Stack : Symbol(Stack, Decl(immutable.ts, 180, 3), Decl(immutable.ts, 184, 3), Decl(immutable.ts, 185, 38), Decl(immutable.ts, 186, 39), Decl(immutable.ts, 187, 62)) +>T : Symbol(T, Decl(immutable.ts, 188, 25)) unshift(...values: Array): Stack; ->unshift : Symbol(Stack.unshift, Decl(immutable.d.ts, 192, 22)) ->values : Symbol(values, Decl(immutable.d.ts, 193, 12)) +>unshift : Symbol(Stack.unshift, Decl(immutable.ts, 192, 22)) +>values : Symbol(values, Decl(immutable.ts, 193, 12)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) ->T : Symbol(T, Decl(immutable.d.ts, 188, 25)) ->Stack : Symbol(Stack, Decl(immutable.d.ts, 180, 3), Decl(immutable.d.ts, 184, 3), Decl(immutable.d.ts, 185, 38), Decl(immutable.d.ts, 186, 39), Decl(immutable.d.ts, 187, 62)) ->T : Symbol(T, Decl(immutable.d.ts, 188, 25)) +>T : Symbol(T, Decl(immutable.ts, 188, 25)) +>Stack : Symbol(Stack, Decl(immutable.ts, 180, 3), Decl(immutable.ts, 184, 3), Decl(immutable.ts, 185, 38), Decl(immutable.ts, 186, 39), Decl(immutable.ts, 187, 62)) +>T : Symbol(T, Decl(immutable.ts, 188, 25)) unshiftAll(iter: Iterable): Stack; ->unshiftAll : Symbol(Stack.unshiftAll, Decl(immutable.d.ts, 193, 43)) ->iter : Symbol(iter, Decl(immutable.d.ts, 194, 15)) +>unshiftAll : Symbol(Stack.unshiftAll, Decl(immutable.ts, 193, 43)) +>iter : Symbol(iter, Decl(immutable.ts, 194, 15)) >Iterable : Symbol(Iterable, Decl(lib.es2015.iterable.d.ts, --, --)) ->T : Symbol(T, Decl(immutable.d.ts, 188, 25)) ->Stack : Symbol(Stack, Decl(immutable.d.ts, 180, 3), Decl(immutable.d.ts, 184, 3), Decl(immutable.d.ts, 185, 38), Decl(immutable.d.ts, 186, 39), Decl(immutable.d.ts, 187, 62)) ->T : Symbol(T, Decl(immutable.d.ts, 188, 25)) +>T : Symbol(T, Decl(immutable.ts, 188, 25)) +>Stack : Symbol(Stack, Decl(immutable.ts, 180, 3), Decl(immutable.ts, 184, 3), Decl(immutable.ts, 185, 38), Decl(immutable.ts, 186, 39), Decl(immutable.ts, 187, 62)) +>T : Symbol(T, Decl(immutable.ts, 188, 25)) shift(): Stack; ->shift : Symbol(Stack.shift, Decl(immutable.d.ts, 194, 44)) ->Stack : Symbol(Stack, Decl(immutable.d.ts, 180, 3), Decl(immutable.d.ts, 184, 3), Decl(immutable.d.ts, 185, 38), Decl(immutable.d.ts, 186, 39), Decl(immutable.d.ts, 187, 62)) ->T : Symbol(T, Decl(immutable.d.ts, 188, 25)) +>shift : Symbol(Stack.shift, Decl(immutable.ts, 194, 44)) +>Stack : Symbol(Stack, Decl(immutable.ts, 180, 3), Decl(immutable.ts, 184, 3), Decl(immutable.ts, 185, 38), Decl(immutable.ts, 186, 39), Decl(immutable.ts, 187, 62)) +>T : Symbol(T, Decl(immutable.ts, 188, 25)) push(...values: Array): Stack; ->push : Symbol(Stack.push, Decl(immutable.d.ts, 195, 22)) ->values : Symbol(values, Decl(immutable.d.ts, 196, 9)) +>push : Symbol(Stack.push, Decl(immutable.ts, 195, 22)) +>values : Symbol(values, Decl(immutable.ts, 196, 9)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) ->T : Symbol(T, Decl(immutable.d.ts, 188, 25)) ->Stack : Symbol(Stack, Decl(immutable.d.ts, 180, 3), Decl(immutable.d.ts, 184, 3), Decl(immutable.d.ts, 185, 38), Decl(immutable.d.ts, 186, 39), Decl(immutable.d.ts, 187, 62)) ->T : Symbol(T, Decl(immutable.d.ts, 188, 25)) +>T : Symbol(T, Decl(immutable.ts, 188, 25)) +>Stack : Symbol(Stack, Decl(immutable.ts, 180, 3), Decl(immutable.ts, 184, 3), Decl(immutable.ts, 185, 38), Decl(immutable.ts, 186, 39), Decl(immutable.ts, 187, 62)) +>T : Symbol(T, Decl(immutable.ts, 188, 25)) pushAll(iter: Iterable): Stack; ->pushAll : Symbol(Stack.pushAll, Decl(immutable.d.ts, 196, 40)) ->iter : Symbol(iter, Decl(immutable.d.ts, 197, 12)) +>pushAll : Symbol(Stack.pushAll, Decl(immutable.ts, 196, 40)) +>iter : Symbol(iter, Decl(immutable.ts, 197, 12)) >Iterable : Symbol(Iterable, Decl(lib.es2015.iterable.d.ts, --, --)) ->T : Symbol(T, Decl(immutable.d.ts, 188, 25)) ->Stack : Symbol(Stack, Decl(immutable.d.ts, 180, 3), Decl(immutable.d.ts, 184, 3), Decl(immutable.d.ts, 185, 38), Decl(immutable.d.ts, 186, 39), Decl(immutable.d.ts, 187, 62)) ->T : Symbol(T, Decl(immutable.d.ts, 188, 25)) +>T : Symbol(T, Decl(immutable.ts, 188, 25)) +>Stack : Symbol(Stack, Decl(immutable.ts, 180, 3), Decl(immutable.ts, 184, 3), Decl(immutable.ts, 185, 38), Decl(immutable.ts, 186, 39), Decl(immutable.ts, 187, 62)) +>T : Symbol(T, Decl(immutable.ts, 188, 25)) pop(): Stack; ->pop : Symbol(Stack.pop, Decl(immutable.d.ts, 197, 41)) ->Stack : Symbol(Stack, Decl(immutable.d.ts, 180, 3), Decl(immutable.d.ts, 184, 3), Decl(immutable.d.ts, 185, 38), Decl(immutable.d.ts, 186, 39), Decl(immutable.d.ts, 187, 62)) ->T : Symbol(T, Decl(immutable.d.ts, 188, 25)) +>pop : Symbol(Stack.pop, Decl(immutable.ts, 197, 41)) +>Stack : Symbol(Stack, Decl(immutable.ts, 180, 3), Decl(immutable.ts, 184, 3), Decl(immutable.ts, 185, 38), Decl(immutable.ts, 186, 39), Decl(immutable.ts, 187, 62)) +>T : Symbol(T, Decl(immutable.ts, 188, 25)) // Transient changes withMutations(mutator: (mutable: this) => any): this; ->withMutations : Symbol(Stack.withMutations, Decl(immutable.d.ts, 198, 20)) ->mutator : Symbol(mutator, Decl(immutable.d.ts, 200, 18)) ->mutable : Symbol(mutable, Decl(immutable.d.ts, 200, 28)) +>withMutations : Symbol(Stack.withMutations, Decl(immutable.ts, 198, 20)) +>mutator : Symbol(mutator, Decl(immutable.ts, 200, 18)) +>mutable : Symbol(mutable, Decl(immutable.ts, 200, 28)) asMutable(): this; ->asMutable : Symbol(Stack.asMutable, Decl(immutable.d.ts, 200, 57)) +>asMutable : Symbol(Stack.asMutable, Decl(immutable.ts, 200, 57)) asImmutable(): this; ->asImmutable : Symbol(Stack.asImmutable, Decl(immutable.d.ts, 201, 22)) +>asImmutable : Symbol(Stack.asImmutable, Decl(immutable.ts, 201, 22)) // Sequence algorithms concat(...valuesOrCollections: Array | C>): Stack; ->concat : Symbol(Stack.concat, Decl(immutable.d.ts, 202, 24)) ->C : Symbol(C, Decl(immutable.d.ts, 204, 11)) ->valuesOrCollections : Symbol(valuesOrCollections, Decl(immutable.d.ts, 204, 14)) +>concat : Symbol(Stack.concat, Decl(immutable.ts, 202, 24)) +>C : Symbol(C, Decl(immutable.ts, 204, 11)) +>valuesOrCollections : Symbol(valuesOrCollections, Decl(immutable.ts, 204, 14)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) >Iterable : Symbol(Iterable, Decl(lib.es2015.iterable.d.ts, --, --)) ->C : Symbol(C, Decl(immutable.d.ts, 204, 11)) ->C : Symbol(C, Decl(immutable.d.ts, 204, 11)) ->Stack : Symbol(Stack, Decl(immutable.d.ts, 180, 3), Decl(immutable.d.ts, 184, 3), Decl(immutable.d.ts, 185, 38), Decl(immutable.d.ts, 186, 39), Decl(immutable.d.ts, 187, 62)) ->T : Symbol(T, Decl(immutable.d.ts, 188, 25)) ->C : Symbol(C, Decl(immutable.d.ts, 204, 11)) +>C : Symbol(C, Decl(immutable.ts, 204, 11)) +>C : Symbol(C, Decl(immutable.ts, 204, 11)) +>Stack : Symbol(Stack, Decl(immutable.ts, 180, 3), Decl(immutable.ts, 184, 3), Decl(immutable.ts, 185, 38), Decl(immutable.ts, 186, 39), Decl(immutable.ts, 187, 62)) +>T : Symbol(T, Decl(immutable.ts, 188, 25)) +>C : Symbol(C, Decl(immutable.ts, 204, 11)) map(mapper: (value: T, key: number, iter: this) => M, context?: any): Stack; ->map : Symbol(Stack.map, Decl(immutable.d.ts, 204, 76)) ->M : Symbol(M, Decl(immutable.d.ts, 205, 8)) ->mapper : Symbol(mapper, Decl(immutable.d.ts, 205, 11)) ->value : Symbol(value, Decl(immutable.d.ts, 205, 20)) ->T : Symbol(T, Decl(immutable.d.ts, 188, 25)) ->key : Symbol(key, Decl(immutable.d.ts, 205, 29)) ->iter : Symbol(iter, Decl(immutable.d.ts, 205, 42)) ->M : Symbol(M, Decl(immutable.d.ts, 205, 8)) ->context : Symbol(context, Decl(immutable.d.ts, 205, 60)) ->Stack : Symbol(Stack, Decl(immutable.d.ts, 180, 3), Decl(immutable.d.ts, 184, 3), Decl(immutable.d.ts, 185, 38), Decl(immutable.d.ts, 186, 39), Decl(immutable.d.ts, 187, 62)) ->M : Symbol(M, Decl(immutable.d.ts, 205, 8)) +>map : Symbol(Stack.map, Decl(immutable.ts, 204, 76)) +>M : Symbol(M, Decl(immutable.ts, 205, 8)) +>mapper : Symbol(mapper, Decl(immutable.ts, 205, 11)) +>value : Symbol(value, Decl(immutable.ts, 205, 20)) +>T : Symbol(T, Decl(immutable.ts, 188, 25)) +>key : Symbol(key, Decl(immutable.ts, 205, 29)) +>iter : Symbol(iter, Decl(immutable.ts, 205, 42)) +>M : Symbol(M, Decl(immutable.ts, 205, 8)) +>context : Symbol(context, Decl(immutable.ts, 205, 60)) +>Stack : Symbol(Stack, Decl(immutable.ts, 180, 3), Decl(immutable.ts, 184, 3), Decl(immutable.ts, 185, 38), Decl(immutable.ts, 186, 39), Decl(immutable.ts, 187, 62)) +>M : Symbol(M, Decl(immutable.ts, 205, 8)) flatMap(mapper: (value: T, key: number, iter: this) => Iterable, context?: any): Stack; ->flatMap : Symbol(Stack.flatMap, Decl(immutable.d.ts, 205, 86)) ->M : Symbol(M, Decl(immutable.d.ts, 206, 12)) ->mapper : Symbol(mapper, Decl(immutable.d.ts, 206, 15)) ->value : Symbol(value, Decl(immutable.d.ts, 206, 24)) ->T : Symbol(T, Decl(immutable.d.ts, 188, 25)) ->key : Symbol(key, Decl(immutable.d.ts, 206, 33)) ->iter : Symbol(iter, Decl(immutable.d.ts, 206, 46)) +>flatMap : Symbol(Stack.flatMap, Decl(immutable.ts, 205, 86)) +>M : Symbol(M, Decl(immutable.ts, 206, 12)) +>mapper : Symbol(mapper, Decl(immutable.ts, 206, 15)) +>value : Symbol(value, Decl(immutable.ts, 206, 24)) +>T : Symbol(T, Decl(immutable.ts, 188, 25)) +>key : Symbol(key, Decl(immutable.ts, 206, 33)) +>iter : Symbol(iter, Decl(immutable.ts, 206, 46)) >Iterable : Symbol(Iterable, Decl(lib.es2015.iterable.d.ts, --, --)) ->M : Symbol(M, Decl(immutable.d.ts, 206, 12)) ->context : Symbol(context, Decl(immutable.d.ts, 206, 74)) ->Stack : Symbol(Stack, Decl(immutable.d.ts, 180, 3), Decl(immutable.d.ts, 184, 3), Decl(immutable.d.ts, 185, 38), Decl(immutable.d.ts, 186, 39), Decl(immutable.d.ts, 187, 62)) ->M : Symbol(M, Decl(immutable.d.ts, 206, 12)) +>M : Symbol(M, Decl(immutable.ts, 206, 12)) +>context : Symbol(context, Decl(immutable.ts, 206, 74)) +>Stack : Symbol(Stack, Decl(immutable.ts, 180, 3), Decl(immutable.ts, 184, 3), Decl(immutable.ts, 185, 38), Decl(immutable.ts, 186, 39), Decl(immutable.ts, 187, 62)) +>M : Symbol(M, Decl(immutable.ts, 206, 12)) filter(predicate: (value: T, index: number, iter: this) => value is F, context?: any): Set; ->filter : Symbol(Stack.filter, Decl(immutable.d.ts, 206, 100), Decl(immutable.d.ts, 207, 111)) ->F : Symbol(F, Decl(immutable.d.ts, 207, 11)) ->T : Symbol(T, Decl(immutable.d.ts, 188, 25)) ->predicate : Symbol(predicate, Decl(immutable.d.ts, 207, 24)) ->value : Symbol(value, Decl(immutable.d.ts, 207, 36)) ->T : Symbol(T, Decl(immutable.d.ts, 188, 25)) ->index : Symbol(index, Decl(immutable.d.ts, 207, 45)) ->iter : Symbol(iter, Decl(immutable.d.ts, 207, 60)) ->value : Symbol(value, Decl(immutable.d.ts, 207, 36)) ->F : Symbol(F, Decl(immutable.d.ts, 207, 11)) ->context : Symbol(context, Decl(immutable.d.ts, 207, 87)) ->Set : Symbol(Set, Decl(immutable.d.ts, 127, 3), Decl(immutable.d.ts, 135, 3), Decl(immutable.d.ts, 136, 34), Decl(immutable.d.ts, 137, 35), Decl(immutable.d.ts, 138, 58)) ->F : Symbol(F, Decl(immutable.d.ts, 207, 11)) +>filter : Symbol(Stack.filter, Decl(immutable.ts, 206, 100), Decl(immutable.ts, 207, 111)) +>F : Symbol(F, Decl(immutable.ts, 207, 11)) +>T : Symbol(T, Decl(immutable.ts, 188, 25)) +>predicate : Symbol(predicate, Decl(immutable.ts, 207, 24)) +>value : Symbol(value, Decl(immutable.ts, 207, 36)) +>T : Symbol(T, Decl(immutable.ts, 188, 25)) +>index : Symbol(index, Decl(immutable.ts, 207, 45)) +>iter : Symbol(iter, Decl(immutable.ts, 207, 60)) +>value : Symbol(value, Decl(immutable.ts, 207, 36)) +>F : Symbol(F, Decl(immutable.ts, 207, 11)) +>context : Symbol(context, Decl(immutable.ts, 207, 87)) +>Set : Symbol(Set, Decl(immutable.ts, 127, 3), Decl(immutable.ts, 135, 3), Decl(immutable.ts, 136, 34), Decl(immutable.ts, 137, 35), Decl(immutable.ts, 138, 58)) +>F : Symbol(F, Decl(immutable.ts, 207, 11)) filter(predicate: (value: T, index: number, iter: this) => any, context?: any): this; ->filter : Symbol(Stack.filter, Decl(immutable.d.ts, 206, 100), Decl(immutable.d.ts, 207, 111)) ->predicate : Symbol(predicate, Decl(immutable.d.ts, 208, 11)) ->value : Symbol(value, Decl(immutable.d.ts, 208, 23)) ->T : Symbol(T, Decl(immutable.d.ts, 188, 25)) ->index : Symbol(index, Decl(immutable.d.ts, 208, 32)) ->iter : Symbol(iter, Decl(immutable.d.ts, 208, 47)) ->context : Symbol(context, Decl(immutable.d.ts, 208, 67)) +>filter : Symbol(Stack.filter, Decl(immutable.ts, 206, 100), Decl(immutable.ts, 207, 111)) +>predicate : Symbol(predicate, Decl(immutable.ts, 208, 11)) +>value : Symbol(value, Decl(immutable.ts, 208, 23)) +>T : Symbol(T, Decl(immutable.ts, 188, 25)) +>index : Symbol(index, Decl(immutable.ts, 208, 32)) +>iter : Symbol(iter, Decl(immutable.ts, 208, 47)) +>context : Symbol(context, Decl(immutable.ts, 208, 67)) } export function Range(start?: number, end?: number, step?: number): Seq.Indexed; ->Range : Symbol(Range, Decl(immutable.d.ts, 209, 3)) ->start : Symbol(start, Decl(immutable.d.ts, 210, 24)) ->end : Symbol(end, Decl(immutable.d.ts, 210, 39)) ->step : Symbol(step, Decl(immutable.d.ts, 210, 53)) ->Seq : Symbol(Seq, Decl(immutable.d.ts, 260, 78), Decl(immutable.d.ts, 314, 3), Decl(immutable.d.ts, 315, 58), Decl(immutable.d.ts, 316, 81), Decl(immutable.d.ts, 317, 76) ... and 4 more) ->Indexed : Symbol(Seq.Indexed, Decl(immutable.d.ts, 281, 5), Decl(immutable.d.ts, 284, 5), Decl(immutable.d.ts, 285, 48), Decl(immutable.d.ts, 286, 49), Decl(immutable.d.ts, 287, 72)) +>Range : Symbol(Range, Decl(immutable.ts, 209, 3)) +>start : Symbol(start, Decl(immutable.ts, 210, 24)) +>end : Symbol(end, Decl(immutable.ts, 210, 39)) +>step : Symbol(step, Decl(immutable.ts, 210, 53)) +>Seq : Symbol(Seq, Decl(immutable.ts, 260, 78), Decl(immutable.ts, 314, 3), Decl(immutable.ts, 315, 58), Decl(immutable.ts, 316, 81), Decl(immutable.ts, 317, 76) ... and 4 more) +>Indexed : Symbol(Seq.Indexed, Decl(immutable.ts, 281, 5), Decl(immutable.ts, 284, 5), Decl(immutable.ts, 285, 48), Decl(immutable.ts, 286, 49), Decl(immutable.ts, 287, 72)) export function Repeat(value: T, times?: number): Seq.Indexed; ->Repeat : Symbol(Repeat, Decl(immutable.d.ts, 210, 90)) ->T : Symbol(T, Decl(immutable.d.ts, 211, 25)) ->value : Symbol(value, Decl(immutable.d.ts, 211, 28)) ->T : Symbol(T, Decl(immutable.d.ts, 211, 25)) ->times : Symbol(times, Decl(immutable.d.ts, 211, 37)) ->Seq : Symbol(Seq, Decl(immutable.d.ts, 260, 78), Decl(immutable.d.ts, 314, 3), Decl(immutable.d.ts, 315, 58), Decl(immutable.d.ts, 316, 81), Decl(immutable.d.ts, 317, 76) ... and 4 more) ->Indexed : Symbol(Seq.Indexed, Decl(immutable.d.ts, 281, 5), Decl(immutable.d.ts, 284, 5), Decl(immutable.d.ts, 285, 48), Decl(immutable.d.ts, 286, 49), Decl(immutable.d.ts, 287, 72)) ->T : Symbol(T, Decl(immutable.d.ts, 211, 25)) +>Repeat : Symbol(Repeat, Decl(immutable.ts, 210, 90)) +>T : Symbol(T, Decl(immutable.ts, 211, 25)) +>value : Symbol(value, Decl(immutable.ts, 211, 28)) +>T : Symbol(T, Decl(immutable.ts, 211, 25)) +>times : Symbol(times, Decl(immutable.ts, 211, 37)) +>Seq : Symbol(Seq, Decl(immutable.ts, 260, 78), Decl(immutable.ts, 314, 3), Decl(immutable.ts, 315, 58), Decl(immutable.ts, 316, 81), Decl(immutable.ts, 317, 76) ... and 4 more) +>Indexed : Symbol(Seq.Indexed, Decl(immutable.ts, 281, 5), Decl(immutable.ts, 284, 5), Decl(immutable.ts, 285, 48), Decl(immutable.ts, 286, 49), Decl(immutable.ts, 287, 72)) +>T : Symbol(T, Decl(immutable.ts, 211, 25)) export module Record { ->Record : Symbol(Record, Decl(immutable.d.ts, 211, 70), Decl(immutable.d.ts, 259, 3)) +>Record : Symbol(Record, Decl(immutable.ts, 211, 70), Decl(immutable.ts, 259, 3)) export function isRecord(maybeRecord: any): maybeRecord is Record.Instance; ->isRecord : Symbol(isRecord, Decl(immutable.d.ts, 212, 24)) ->maybeRecord : Symbol(maybeRecord, Decl(immutable.d.ts, 213, 29)) ->maybeRecord : Symbol(maybeRecord, Decl(immutable.d.ts, 213, 29)) ->Record : Symbol(Record, Decl(immutable.d.ts, 211, 70), Decl(immutable.d.ts, 259, 3)) ->Instance : Symbol(Instance, Decl(immutable.d.ts, 218, 5)) +>isRecord : Symbol(isRecord, Decl(immutable.ts, 212, 24)) +>maybeRecord : Symbol(maybeRecord, Decl(immutable.ts, 213, 29)) +>maybeRecord : Symbol(maybeRecord, Decl(immutable.ts, 213, 29)) +>Record : Symbol(Record, Decl(immutable.ts, 211, 70), Decl(immutable.ts, 259, 3)) +>Instance : Symbol(Instance, Decl(immutable.ts, 218, 5)) export function getDescriptiveName(record: Instance): string; ->getDescriptiveName : Symbol(getDescriptiveName, Decl(immutable.d.ts, 213, 84)) ->record : Symbol(record, Decl(immutable.d.ts, 214, 39)) ->Instance : Symbol(Instance, Decl(immutable.d.ts, 218, 5)) +>getDescriptiveName : Symbol(getDescriptiveName, Decl(immutable.ts, 213, 84)) +>record : Symbol(record, Decl(immutable.ts, 214, 39)) +>Instance : Symbol(Instance, Decl(immutable.ts, 218, 5)) export interface Class { ->Class : Symbol(Class, Decl(immutable.d.ts, 214, 70)) ->T : Symbol(T, Decl(immutable.d.ts, 215, 27)) +>Class : Symbol(Class, Decl(immutable.ts, 214, 70)) +>T : Symbol(T, Decl(immutable.ts, 215, 27)) >Object : Symbol(Object, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) (values?: Partial | Iterable<[string, any]>): Instance & Readonly; ->values : Symbol(values, Decl(immutable.d.ts, 216, 7)) +>values : Symbol(values, Decl(immutable.ts, 216, 7)) >Partial : Symbol(Partial, Decl(lib.es5.d.ts, --, --)) ->T : Symbol(T, Decl(immutable.d.ts, 215, 27)) +>T : Symbol(T, Decl(immutable.ts, 215, 27)) >Iterable : Symbol(Iterable, Decl(lib.es2015.iterable.d.ts, --, --)) ->Instance : Symbol(Instance, Decl(immutable.d.ts, 218, 5)) ->T : Symbol(T, Decl(immutable.d.ts, 215, 27)) +>Instance : Symbol(Instance, Decl(immutable.ts, 218, 5)) +>T : Symbol(T, Decl(immutable.ts, 215, 27)) >Readonly : Symbol(Readonly, Decl(lib.es5.d.ts, --, --)) ->T : Symbol(T, Decl(immutable.d.ts, 215, 27)) +>T : Symbol(T, Decl(immutable.ts, 215, 27)) new (values?: Partial | Iterable<[string, any]>): Instance & Readonly; ->values : Symbol(values, Decl(immutable.d.ts, 217, 11)) +>values : Symbol(values, Decl(immutable.ts, 217, 11)) >Partial : Symbol(Partial, Decl(lib.es5.d.ts, --, --)) ->T : Symbol(T, Decl(immutable.d.ts, 215, 27)) +>T : Symbol(T, Decl(immutable.ts, 215, 27)) >Iterable : Symbol(Iterable, Decl(lib.es2015.iterable.d.ts, --, --)) ->Instance : Symbol(Instance, Decl(immutable.d.ts, 218, 5)) ->T : Symbol(T, Decl(immutable.d.ts, 215, 27)) +>Instance : Symbol(Instance, Decl(immutable.ts, 218, 5)) +>T : Symbol(T, Decl(immutable.ts, 215, 27)) >Readonly : Symbol(Readonly, Decl(lib.es5.d.ts, --, --)) ->T : Symbol(T, Decl(immutable.d.ts, 215, 27)) +>T : Symbol(T, Decl(immutable.ts, 215, 27)) } export interface Instance { ->Instance : Symbol(Instance, Decl(immutable.d.ts, 218, 5)) ->T : Symbol(T, Decl(immutable.d.ts, 219, 30)) +>Instance : Symbol(Instance, Decl(immutable.ts, 218, 5)) +>T : Symbol(T, Decl(immutable.ts, 219, 30)) >Object : Symbol(Object, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) readonly size: number; ->size : Symbol(Instance.size, Decl(immutable.d.ts, 219, 49)) +>size : Symbol(Instance.size, Decl(immutable.ts, 219, 49)) // Reading values has(key: string): boolean; ->has : Symbol(Instance.has, Decl(immutable.d.ts, 220, 28)) ->key : Symbol(key, Decl(immutable.d.ts, 222, 10)) +>has : Symbol(Instance.has, Decl(immutable.ts, 220, 28)) +>key : Symbol(key, Decl(immutable.ts, 222, 10)) get(key: K): T[K]; ->get : Symbol(Instance.get, Decl(immutable.d.ts, 222, 32)) ->K : Symbol(K, Decl(immutable.d.ts, 223, 10)) ->T : Symbol(T, Decl(immutable.d.ts, 219, 30)) ->key : Symbol(key, Decl(immutable.d.ts, 223, 29)) ->K : Symbol(K, Decl(immutable.d.ts, 223, 10)) ->T : Symbol(T, Decl(immutable.d.ts, 219, 30)) ->K : Symbol(K, Decl(immutable.d.ts, 223, 10)) +>get : Symbol(Instance.get, Decl(immutable.ts, 222, 32)) +>K : Symbol(K, Decl(immutable.ts, 223, 10)) +>T : Symbol(T, Decl(immutable.ts, 219, 30)) +>key : Symbol(key, Decl(immutable.ts, 223, 29)) +>K : Symbol(K, Decl(immutable.ts, 223, 10)) +>T : Symbol(T, Decl(immutable.ts, 219, 30)) +>K : Symbol(K, Decl(immutable.ts, 223, 10)) // Reading deep values hasIn(keyPath: Iterable): boolean; ->hasIn : Symbol(Instance.hasIn, Decl(immutable.d.ts, 223, 43)) ->keyPath : Symbol(keyPath, Decl(immutable.d.ts, 225, 12)) +>hasIn : Symbol(Instance.hasIn, Decl(immutable.ts, 223, 43)) +>keyPath : Symbol(keyPath, Decl(immutable.ts, 225, 12)) >Iterable : Symbol(Iterable, Decl(lib.es2015.iterable.d.ts, --, --)) getIn(keyPath: Iterable): any; ->getIn : Symbol(Instance.getIn, Decl(immutable.d.ts, 225, 45)) ->keyPath : Symbol(keyPath, Decl(immutable.d.ts, 226, 12)) +>getIn : Symbol(Instance.getIn, Decl(immutable.ts, 225, 45)) +>keyPath : Symbol(keyPath, Decl(immutable.ts, 226, 12)) >Iterable : Symbol(Iterable, Decl(lib.es2015.iterable.d.ts, --, --)) // Value equality equals(other: any): boolean; ->equals : Symbol(Instance.equals, Decl(immutable.d.ts, 226, 41)) ->other : Symbol(other, Decl(immutable.d.ts, 228, 13)) +>equals : Symbol(Instance.equals, Decl(immutable.ts, 226, 41)) +>other : Symbol(other, Decl(immutable.ts, 228, 13)) hashCode(): number; ->hashCode : Symbol(Instance.hashCode, Decl(immutable.d.ts, 228, 34)) +>hashCode : Symbol(Instance.hashCode, Decl(immutable.ts, 228, 34)) // Persistent changes set(key: K, value: T[K]): this; ->set : Symbol(Instance.set, Decl(immutable.d.ts, 229, 25)) ->K : Symbol(K, Decl(immutable.d.ts, 231, 10)) ->T : Symbol(T, Decl(immutable.d.ts, 219, 30)) ->key : Symbol(key, Decl(immutable.d.ts, 231, 29)) ->K : Symbol(K, Decl(immutable.d.ts, 231, 10)) ->value : Symbol(value, Decl(immutable.d.ts, 231, 36)) ->T : Symbol(T, Decl(immutable.d.ts, 219, 30)) ->K : Symbol(K, Decl(immutable.d.ts, 231, 10)) +>set : Symbol(Instance.set, Decl(immutable.ts, 229, 25)) +>K : Symbol(K, Decl(immutable.ts, 231, 10)) +>T : Symbol(T, Decl(immutable.ts, 219, 30)) +>key : Symbol(key, Decl(immutable.ts, 231, 29)) +>K : Symbol(K, Decl(immutable.ts, 231, 10)) +>value : Symbol(value, Decl(immutable.ts, 231, 36)) +>T : Symbol(T, Decl(immutable.ts, 219, 30)) +>K : Symbol(K, Decl(immutable.ts, 231, 10)) update(key: K, updater: (value: T[K]) => T[K]): this; ->update : Symbol(Instance.update, Decl(immutable.d.ts, 231, 56)) ->K : Symbol(K, Decl(immutable.d.ts, 232, 13)) ->T : Symbol(T, Decl(immutable.d.ts, 219, 30)) ->key : Symbol(key, Decl(immutable.d.ts, 232, 32)) ->K : Symbol(K, Decl(immutable.d.ts, 232, 13)) ->updater : Symbol(updater, Decl(immutable.d.ts, 232, 39)) ->value : Symbol(value, Decl(immutable.d.ts, 232, 50)) ->T : Symbol(T, Decl(immutable.d.ts, 219, 30)) ->K : Symbol(K, Decl(immutable.d.ts, 232, 13)) ->T : Symbol(T, Decl(immutable.d.ts, 219, 30)) ->K : Symbol(K, Decl(immutable.d.ts, 232, 13)) +>update : Symbol(Instance.update, Decl(immutable.ts, 231, 56)) +>K : Symbol(K, Decl(immutable.ts, 232, 13)) +>T : Symbol(T, Decl(immutable.ts, 219, 30)) +>key : Symbol(key, Decl(immutable.ts, 232, 32)) +>K : Symbol(K, Decl(immutable.ts, 232, 13)) +>updater : Symbol(updater, Decl(immutable.ts, 232, 39)) +>value : Symbol(value, Decl(immutable.ts, 232, 50)) +>T : Symbol(T, Decl(immutable.ts, 219, 30)) +>K : Symbol(K, Decl(immutable.ts, 232, 13)) +>T : Symbol(T, Decl(immutable.ts, 219, 30)) +>K : Symbol(K, Decl(immutable.ts, 232, 13)) merge(...collections: Array | Iterable<[string, any]>>): this; ->merge : Symbol(Instance.merge, Decl(immutable.d.ts, 232, 78)) ->collections : Symbol(collections, Decl(immutable.d.ts, 233, 12)) +>merge : Symbol(Instance.merge, Decl(immutable.ts, 232, 78)) +>collections : Symbol(collections, Decl(immutable.ts, 233, 12)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) >Partial : Symbol(Partial, Decl(lib.es5.d.ts, --, --)) ->T : Symbol(T, Decl(immutable.d.ts, 219, 30)) +>T : Symbol(T, Decl(immutable.ts, 219, 30)) >Iterable : Symbol(Iterable, Decl(lib.es2015.iterable.d.ts, --, --)) mergeDeep(...collections: Array | Iterable<[string, any]>>): this; ->mergeDeep : Symbol(Instance.mergeDeep, Decl(immutable.d.ts, 233, 79)) ->collections : Symbol(collections, Decl(immutable.d.ts, 234, 16)) +>mergeDeep : Symbol(Instance.mergeDeep, Decl(immutable.ts, 233, 79)) +>collections : Symbol(collections, Decl(immutable.ts, 234, 16)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) >Partial : Symbol(Partial, Decl(lib.es5.d.ts, --, --)) ->T : Symbol(T, Decl(immutable.d.ts, 219, 30)) +>T : Symbol(T, Decl(immutable.ts, 219, 30)) >Iterable : Symbol(Iterable, Decl(lib.es2015.iterable.d.ts, --, --)) mergeWith(merger: (oldVal: any, newVal: any, key: keyof T) => any, ...collections: Array | Iterable<[string, any]>>): this; ->mergeWith : Symbol(Instance.mergeWith, Decl(immutable.d.ts, 234, 83)) ->merger : Symbol(merger, Decl(immutable.d.ts, 235, 16)) ->oldVal : Symbol(oldVal, Decl(immutable.d.ts, 235, 25)) ->newVal : Symbol(newVal, Decl(immutable.d.ts, 235, 37)) ->key : Symbol(key, Decl(immutable.d.ts, 235, 50)) ->T : Symbol(T, Decl(immutable.d.ts, 219, 30)) ->collections : Symbol(collections, Decl(immutable.d.ts, 235, 72)) +>mergeWith : Symbol(Instance.mergeWith, Decl(immutable.ts, 234, 83)) +>merger : Symbol(merger, Decl(immutable.ts, 235, 16)) +>oldVal : Symbol(oldVal, Decl(immutable.ts, 235, 25)) +>newVal : Symbol(newVal, Decl(immutable.ts, 235, 37)) +>key : Symbol(key, Decl(immutable.ts, 235, 50)) +>T : Symbol(T, Decl(immutable.ts, 219, 30)) +>collections : Symbol(collections, Decl(immutable.ts, 235, 72)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) >Partial : Symbol(Partial, Decl(lib.es5.d.ts, --, --)) ->T : Symbol(T, Decl(immutable.d.ts, 219, 30)) +>T : Symbol(T, Decl(immutable.ts, 219, 30)) >Iterable : Symbol(Iterable, Decl(lib.es2015.iterable.d.ts, --, --)) mergeDeepWith(merger: (oldVal: any, newVal: any, key: any) => any, ...collections: Array | Iterable<[string, any]>>): this; ->mergeDeepWith : Symbol(Instance.mergeDeepWith, Decl(immutable.d.ts, 235, 140)) ->merger : Symbol(merger, Decl(immutable.d.ts, 236, 20)) ->oldVal : Symbol(oldVal, Decl(immutable.d.ts, 236, 29)) ->newVal : Symbol(newVal, Decl(immutable.d.ts, 236, 41)) ->key : Symbol(key, Decl(immutable.d.ts, 236, 54)) ->collections : Symbol(collections, Decl(immutable.d.ts, 236, 72)) +>mergeDeepWith : Symbol(Instance.mergeDeepWith, Decl(immutable.ts, 235, 140)) +>merger : Symbol(merger, Decl(immutable.ts, 236, 20)) +>oldVal : Symbol(oldVal, Decl(immutable.ts, 236, 29)) +>newVal : Symbol(newVal, Decl(immutable.ts, 236, 41)) +>key : Symbol(key, Decl(immutable.ts, 236, 54)) +>collections : Symbol(collections, Decl(immutable.ts, 236, 72)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) >Partial : Symbol(Partial, Decl(lib.es5.d.ts, --, --)) ->T : Symbol(T, Decl(immutable.d.ts, 219, 30)) +>T : Symbol(T, Decl(immutable.ts, 219, 30)) >Iterable : Symbol(Iterable, Decl(lib.es2015.iterable.d.ts, --, --)) delete(key: K): this; ->delete : Symbol(Instance.delete, Decl(immutable.d.ts, 236, 140)) ->K : Symbol(K, Decl(immutable.d.ts, 237, 13)) ->T : Symbol(T, Decl(immutable.d.ts, 219, 30)) ->key : Symbol(key, Decl(immutable.d.ts, 237, 32)) ->K : Symbol(K, Decl(immutable.d.ts, 237, 13)) +>delete : Symbol(Instance.delete, Decl(immutable.ts, 236, 140)) +>K : Symbol(K, Decl(immutable.ts, 237, 13)) +>T : Symbol(T, Decl(immutable.ts, 219, 30)) +>key : Symbol(key, Decl(immutable.ts, 237, 32)) +>K : Symbol(K, Decl(immutable.ts, 237, 13)) remove(key: K): this; ->remove : Symbol(Instance.remove, Decl(immutable.d.ts, 237, 46)) ->K : Symbol(K, Decl(immutable.d.ts, 238, 13)) ->T : Symbol(T, Decl(immutable.d.ts, 219, 30)) ->key : Symbol(key, Decl(immutable.d.ts, 238, 32)) ->K : Symbol(K, Decl(immutable.d.ts, 238, 13)) +>remove : Symbol(Instance.remove, Decl(immutable.ts, 237, 46)) +>K : Symbol(K, Decl(immutable.ts, 238, 13)) +>T : Symbol(T, Decl(immutable.ts, 219, 30)) +>key : Symbol(key, Decl(immutable.ts, 238, 32)) +>K : Symbol(K, Decl(immutable.ts, 238, 13)) clear(): this; ->clear : Symbol(Instance.clear, Decl(immutable.d.ts, 238, 46)) +>clear : Symbol(Instance.clear, Decl(immutable.ts, 238, 46)) // Deep persistent changes setIn(keyPath: Iterable, value: any): this; ->setIn : Symbol(Instance.setIn, Decl(immutable.d.ts, 239, 20)) ->keyPath : Symbol(keyPath, Decl(immutable.d.ts, 241, 12)) +>setIn : Symbol(Instance.setIn, Decl(immutable.ts, 239, 20)) +>keyPath : Symbol(keyPath, Decl(immutable.ts, 241, 12)) >Iterable : Symbol(Iterable, Decl(lib.es2015.iterable.d.ts, --, --)) ->value : Symbol(value, Decl(immutable.d.ts, 241, 35)) +>value : Symbol(value, Decl(immutable.ts, 241, 35)) updateIn(keyPath: Iterable, updater: (value: any) => any): this; ->updateIn : Symbol(Instance.updateIn, Decl(immutable.d.ts, 241, 54)) ->keyPath : Symbol(keyPath, Decl(immutable.d.ts, 242, 15)) +>updateIn : Symbol(Instance.updateIn, Decl(immutable.ts, 241, 54)) +>keyPath : Symbol(keyPath, Decl(immutable.ts, 242, 15)) >Iterable : Symbol(Iterable, Decl(lib.es2015.iterable.d.ts, --, --)) ->updater : Symbol(updater, Decl(immutable.d.ts, 242, 38)) ->value : Symbol(value, Decl(immutable.d.ts, 242, 49)) +>updater : Symbol(updater, Decl(immutable.ts, 242, 38)) +>value : Symbol(value, Decl(immutable.ts, 242, 49)) mergeIn(keyPath: Iterable, ...collections: Array): this; ->mergeIn : Symbol(Instance.mergeIn, Decl(immutable.d.ts, 242, 75)) ->keyPath : Symbol(keyPath, Decl(immutable.d.ts, 243, 14)) +>mergeIn : Symbol(Instance.mergeIn, Decl(immutable.ts, 242, 75)) +>keyPath : Symbol(keyPath, Decl(immutable.ts, 243, 14)) >Iterable : Symbol(Iterable, Decl(lib.es2015.iterable.d.ts, --, --)) ->collections : Symbol(collections, Decl(immutable.d.ts, 243, 37)) +>collections : Symbol(collections, Decl(immutable.ts, 243, 37)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) mergeDeepIn(keyPath: Iterable, ...collections: Array): this; ->mergeDeepIn : Symbol(Instance.mergeDeepIn, Decl(immutable.d.ts, 243, 72)) ->keyPath : Symbol(keyPath, Decl(immutable.d.ts, 244, 18)) +>mergeDeepIn : Symbol(Instance.mergeDeepIn, Decl(immutable.ts, 243, 72)) +>keyPath : Symbol(keyPath, Decl(immutable.ts, 244, 18)) >Iterable : Symbol(Iterable, Decl(lib.es2015.iterable.d.ts, --, --)) ->collections : Symbol(collections, Decl(immutable.d.ts, 244, 41)) +>collections : Symbol(collections, Decl(immutable.ts, 244, 41)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) deleteIn(keyPath: Iterable): this; ->deleteIn : Symbol(Instance.deleteIn, Decl(immutable.d.ts, 244, 76)) ->keyPath : Symbol(keyPath, Decl(immutable.d.ts, 245, 15)) +>deleteIn : Symbol(Instance.deleteIn, Decl(immutable.ts, 244, 76)) +>keyPath : Symbol(keyPath, Decl(immutable.ts, 245, 15)) >Iterable : Symbol(Iterable, Decl(lib.es2015.iterable.d.ts, --, --)) removeIn(keyPath: Iterable): this; ->removeIn : Symbol(Instance.removeIn, Decl(immutable.d.ts, 245, 45)) ->keyPath : Symbol(keyPath, Decl(immutable.d.ts, 246, 15)) +>removeIn : Symbol(Instance.removeIn, Decl(immutable.ts, 245, 45)) +>keyPath : Symbol(keyPath, Decl(immutable.ts, 246, 15)) >Iterable : Symbol(Iterable, Decl(lib.es2015.iterable.d.ts, --, --)) // Conversion to JavaScript types toJS(): { [K in keyof T]: any }; ->toJS : Symbol(Instance.toJS, Decl(immutable.d.ts, 246, 45)) ->K : Symbol(K, Decl(immutable.d.ts, 248, 17)) ->T : Symbol(T, Decl(immutable.d.ts, 219, 30)) +>toJS : Symbol(Instance.toJS, Decl(immutable.ts, 246, 45)) +>K : Symbol(K, Decl(immutable.ts, 248, 17)) +>T : Symbol(T, Decl(immutable.ts, 219, 30)) toJSON(): T; ->toJSON : Symbol(Instance.toJSON, Decl(immutable.d.ts, 248, 38)) ->T : Symbol(T, Decl(immutable.d.ts, 219, 30)) +>toJSON : Symbol(Instance.toJSON, Decl(immutable.ts, 248, 38)) +>T : Symbol(T, Decl(immutable.ts, 219, 30)) toObject(): T; ->toObject : Symbol(Instance.toObject, Decl(immutable.d.ts, 249, 18)) ->T : Symbol(T, Decl(immutable.d.ts, 219, 30)) +>toObject : Symbol(Instance.toObject, Decl(immutable.ts, 249, 18)) +>T : Symbol(T, Decl(immutable.ts, 219, 30)) // Transient changes withMutations(mutator: (mutable: this) => any): this; ->withMutations : Symbol(Instance.withMutations, Decl(immutable.d.ts, 250, 20)) ->mutator : Symbol(mutator, Decl(immutable.d.ts, 252, 20)) ->mutable : Symbol(mutable, Decl(immutable.d.ts, 252, 30)) +>withMutations : Symbol(Instance.withMutations, Decl(immutable.ts, 250, 20)) +>mutator : Symbol(mutator, Decl(immutable.ts, 252, 20)) +>mutable : Symbol(mutable, Decl(immutable.ts, 252, 30)) asMutable(): this; ->asMutable : Symbol(Instance.asMutable, Decl(immutable.d.ts, 252, 59)) +>asMutable : Symbol(Instance.asMutable, Decl(immutable.ts, 252, 59)) asImmutable(): this; ->asImmutable : Symbol(Instance.asImmutable, Decl(immutable.d.ts, 253, 24)) +>asImmutable : Symbol(Instance.asImmutable, Decl(immutable.ts, 253, 24)) // Sequence algorithms toSeq(): Seq.Keyed; ->toSeq : Symbol(Instance.toSeq, Decl(immutable.d.ts, 254, 26)) ->Seq : Symbol(Seq, Decl(immutable.d.ts, 260, 78), Decl(immutable.d.ts, 314, 3), Decl(immutable.d.ts, 315, 58), Decl(immutable.d.ts, 316, 81), Decl(immutable.d.ts, 317, 76) ... and 4 more) ->Keyed : Symbol(Seq.Keyed, Decl(immutable.d.ts, 263, 56), Decl(immutable.d.ts, 264, 26), Decl(immutable.d.ts, 265, 79), Decl(immutable.d.ts, 266, 76), Decl(immutable.d.ts, 267, 51) ... and 1 more) ->T : Symbol(T, Decl(immutable.d.ts, 219, 30)) ->T : Symbol(T, Decl(immutable.d.ts, 219, 30)) ->T : Symbol(T, Decl(immutable.d.ts, 219, 30)) +>toSeq : Symbol(Instance.toSeq, Decl(immutable.ts, 254, 26)) +>Seq : Symbol(Seq, Decl(immutable.ts, 260, 78), Decl(immutable.ts, 314, 3), Decl(immutable.ts, 315, 58), Decl(immutable.ts, 316, 81), Decl(immutable.ts, 317, 76) ... and 4 more) +>Keyed : Symbol(Seq.Keyed, Decl(immutable.ts, 263, 56), Decl(immutable.ts, 264, 26), Decl(immutable.ts, 265, 79), Decl(immutable.ts, 266, 76), Decl(immutable.ts, 267, 51) ... and 1 more) +>T : Symbol(T, Decl(immutable.ts, 219, 30)) +>T : Symbol(T, Decl(immutable.ts, 219, 30)) +>T : Symbol(T, Decl(immutable.ts, 219, 30)) [Symbol.iterator](): IterableIterator<[keyof T, T[keyof T]]>; >Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.es2015.iterable.d.ts, --, --)) >Symbol : Symbol(Symbol, Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.symbol.d.ts, --, --), Decl(lib.es2015.symbol.d.ts, --, --)) >iterator : Symbol(SymbolConstructor.iterator, Decl(lib.es2015.iterable.d.ts, --, --)) >IterableIterator : Symbol(IterableIterator, Decl(lib.es2015.iterable.d.ts, --, --)) ->T : Symbol(T, Decl(immutable.d.ts, 219, 30)) ->T : Symbol(T, Decl(immutable.d.ts, 219, 30)) ->T : Symbol(T, Decl(immutable.d.ts, 219, 30)) +>T : Symbol(T, Decl(immutable.ts, 219, 30)) +>T : Symbol(T, Decl(immutable.ts, 219, 30)) +>T : Symbol(T, Decl(immutable.ts, 219, 30)) } } export function Record(defaultValues: T, name?: string): Record.Class; ->Record : Symbol(Record, Decl(immutable.d.ts, 211, 70), Decl(immutable.d.ts, 259, 3)) ->T : Symbol(T, Decl(immutable.d.ts, 260, 25)) ->defaultValues : Symbol(defaultValues, Decl(immutable.d.ts, 260, 28)) ->T : Symbol(T, Decl(immutable.d.ts, 260, 25)) ->name : Symbol(name, Decl(immutable.d.ts, 260, 45)) ->Record : Symbol(Record, Decl(immutable.d.ts, 211, 70), Decl(immutable.d.ts, 259, 3)) ->Class : Symbol(Record.Class, Decl(immutable.d.ts, 214, 70)) ->T : Symbol(T, Decl(immutable.d.ts, 260, 25)) +>Record : Symbol(Record, Decl(immutable.ts, 211, 70), Decl(immutable.ts, 259, 3)) +>T : Symbol(T, Decl(immutable.ts, 260, 25)) +>defaultValues : Symbol(defaultValues, Decl(immutable.ts, 260, 28)) +>T : Symbol(T, Decl(immutable.ts, 260, 25)) +>name : Symbol(name, Decl(immutable.ts, 260, 45)) +>Record : Symbol(Record, Decl(immutable.ts, 211, 70), Decl(immutable.ts, 259, 3)) +>Class : Symbol(Record.Class, Decl(immutable.ts, 214, 70)) +>T : Symbol(T, Decl(immutable.ts, 260, 25)) export module Seq { ->Seq : Symbol(Seq, Decl(immutable.d.ts, 260, 78), Decl(immutable.d.ts, 314, 3), Decl(immutable.d.ts, 315, 58), Decl(immutable.d.ts, 316, 81), Decl(immutable.d.ts, 317, 76) ... and 4 more) +>Seq : Symbol(Seq, Decl(immutable.ts, 260, 78), Decl(immutable.ts, 314, 3), Decl(immutable.ts, 315, 58), Decl(immutable.ts, 316, 81), Decl(immutable.ts, 317, 76) ... and 4 more) function isSeq(maybeSeq: any): maybeSeq is Seq.Indexed | Seq.Keyed; ->isSeq : Symbol(isSeq, Decl(immutable.d.ts, 261, 21)) ->maybeSeq : Symbol(maybeSeq, Decl(immutable.d.ts, 262, 19)) ->maybeSeq : Symbol(maybeSeq, Decl(immutable.d.ts, 262, 19)) ->Seq : Symbol(Seq, Decl(immutable.d.ts, 260, 78), Decl(immutable.d.ts, 314, 3), Decl(immutable.d.ts, 315, 58), Decl(immutable.d.ts, 316, 81), Decl(immutable.d.ts, 317, 76) ... and 4 more) ->Indexed : Symbol(Indexed, Decl(immutable.d.ts, 281, 5), Decl(immutable.d.ts, 284, 5), Decl(immutable.d.ts, 285, 48), Decl(immutable.d.ts, 286, 49), Decl(immutable.d.ts, 287, 72)) ->Seq : Symbol(Seq, Decl(immutable.d.ts, 260, 78), Decl(immutable.d.ts, 314, 3), Decl(immutable.d.ts, 315, 58), Decl(immutable.d.ts, 316, 81), Decl(immutable.d.ts, 317, 76) ... and 4 more) ->Keyed : Symbol(Keyed, Decl(immutable.d.ts, 263, 56), Decl(immutable.d.ts, 264, 26), Decl(immutable.d.ts, 265, 79), Decl(immutable.d.ts, 266, 76), Decl(immutable.d.ts, 267, 51) ... and 1 more) +>isSeq : Symbol(isSeq, Decl(immutable.ts, 261, 21)) +>maybeSeq : Symbol(maybeSeq, Decl(immutable.ts, 262, 19)) +>maybeSeq : Symbol(maybeSeq, Decl(immutable.ts, 262, 19)) +>Seq : Symbol(Seq, Decl(immutable.ts, 260, 78), Decl(immutable.ts, 314, 3), Decl(immutable.ts, 315, 58), Decl(immutable.ts, 316, 81), Decl(immutable.ts, 317, 76) ... and 4 more) +>Indexed : Symbol(Indexed, Decl(immutable.ts, 281, 5), Decl(immutable.ts, 284, 5), Decl(immutable.ts, 285, 48), Decl(immutable.ts, 286, 49), Decl(immutable.ts, 287, 72)) +>Seq : Symbol(Seq, Decl(immutable.ts, 260, 78), Decl(immutable.ts, 314, 3), Decl(immutable.ts, 315, 58), Decl(immutable.ts, 316, 81), Decl(immutable.ts, 317, 76) ... and 4 more) +>Keyed : Symbol(Keyed, Decl(immutable.ts, 263, 56), Decl(immutable.ts, 264, 26), Decl(immutable.ts, 265, 79), Decl(immutable.ts, 266, 76), Decl(immutable.ts, 267, 51) ... and 1 more) function of(...values: Array): Seq.Indexed; ->of : Symbol(of, Decl(immutable.d.ts, 262, 86)) ->T : Symbol(T, Decl(immutable.d.ts, 263, 16)) ->values : Symbol(values, Decl(immutable.d.ts, 263, 19)) +>of : Symbol(of, Decl(immutable.ts, 262, 86)) +>T : Symbol(T, Decl(immutable.ts, 263, 16)) +>values : Symbol(values, Decl(immutable.ts, 263, 19)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) ->T : Symbol(T, Decl(immutable.d.ts, 263, 16)) ->Seq : Symbol(Seq, Decl(immutable.d.ts, 260, 78), Decl(immutable.d.ts, 314, 3), Decl(immutable.d.ts, 315, 58), Decl(immutable.d.ts, 316, 81), Decl(immutable.d.ts, 317, 76) ... and 4 more) ->Indexed : Symbol(Indexed, Decl(immutable.d.ts, 281, 5), Decl(immutable.d.ts, 284, 5), Decl(immutable.d.ts, 285, 48), Decl(immutable.d.ts, 286, 49), Decl(immutable.d.ts, 287, 72)) ->T : Symbol(T, Decl(immutable.d.ts, 263, 16)) +>T : Symbol(T, Decl(immutable.ts, 263, 16)) +>Seq : Symbol(Seq, Decl(immutable.ts, 260, 78), Decl(immutable.ts, 314, 3), Decl(immutable.ts, 315, 58), Decl(immutable.ts, 316, 81), Decl(immutable.ts, 317, 76) ... and 4 more) +>Indexed : Symbol(Indexed, Decl(immutable.ts, 281, 5), Decl(immutable.ts, 284, 5), Decl(immutable.ts, 285, 48), Decl(immutable.ts, 286, 49), Decl(immutable.ts, 287, 72)) +>T : Symbol(T, Decl(immutable.ts, 263, 16)) export module Keyed {} ->Keyed : Symbol(Keyed, Decl(immutable.d.ts, 263, 56), Decl(immutable.d.ts, 264, 26), Decl(immutable.d.ts, 265, 79), Decl(immutable.d.ts, 266, 76), Decl(immutable.d.ts, 267, 51) ... and 1 more) +>Keyed : Symbol(Keyed, Decl(immutable.ts, 263, 56), Decl(immutable.ts, 264, 26), Decl(immutable.ts, 265, 79), Decl(immutable.ts, 266, 76), Decl(immutable.ts, 267, 51) ... and 1 more) export function Keyed(collection: Iterable<[K, V]>): Seq.Keyed; ->Keyed : Symbol(Keyed, Decl(immutable.d.ts, 263, 56), Decl(immutable.d.ts, 264, 26), Decl(immutable.d.ts, 265, 79), Decl(immutable.d.ts, 266, 76), Decl(immutable.d.ts, 267, 51) ... and 1 more) ->K : Symbol(K, Decl(immutable.d.ts, 265, 26)) ->V : Symbol(V, Decl(immutable.d.ts, 265, 28)) ->collection : Symbol(collection, Decl(immutable.d.ts, 265, 32)) +>Keyed : Symbol(Keyed, Decl(immutable.ts, 263, 56), Decl(immutable.ts, 264, 26), Decl(immutable.ts, 265, 79), Decl(immutable.ts, 266, 76), Decl(immutable.ts, 267, 51) ... and 1 more) +>K : Symbol(K, Decl(immutable.ts, 265, 26)) +>V : Symbol(V, Decl(immutable.ts, 265, 28)) +>collection : Symbol(collection, Decl(immutable.ts, 265, 32)) >Iterable : Symbol(Iterable, Decl(lib.es2015.iterable.d.ts, --, --)) ->K : Symbol(K, Decl(immutable.d.ts, 265, 26)) ->V : Symbol(V, Decl(immutable.d.ts, 265, 28)) ->Seq : Symbol(Seq, Decl(immutable.d.ts, 260, 78), Decl(immutable.d.ts, 314, 3), Decl(immutable.d.ts, 315, 58), Decl(immutable.d.ts, 316, 81), Decl(immutable.d.ts, 317, 76) ... and 4 more) ->Keyed : Symbol(Keyed, Decl(immutable.d.ts, 263, 56), Decl(immutable.d.ts, 264, 26), Decl(immutable.d.ts, 265, 79), Decl(immutable.d.ts, 266, 76), Decl(immutable.d.ts, 267, 51) ... and 1 more) ->K : Symbol(K, Decl(immutable.d.ts, 265, 26)) ->V : Symbol(V, Decl(immutable.d.ts, 265, 28)) +>K : Symbol(K, Decl(immutable.ts, 265, 26)) +>V : Symbol(V, Decl(immutable.ts, 265, 28)) +>Seq : Symbol(Seq, Decl(immutable.ts, 260, 78), Decl(immutable.ts, 314, 3), Decl(immutable.ts, 315, 58), Decl(immutable.ts, 316, 81), Decl(immutable.ts, 317, 76) ... and 4 more) +>Keyed : Symbol(Keyed, Decl(immutable.ts, 263, 56), Decl(immutable.ts, 264, 26), Decl(immutable.ts, 265, 79), Decl(immutable.ts, 266, 76), Decl(immutable.ts, 267, 51) ... and 1 more) +>K : Symbol(K, Decl(immutable.ts, 265, 26)) +>V : Symbol(V, Decl(immutable.ts, 265, 28)) export function Keyed(obj: {[key: string]: V}): Seq.Keyed; ->Keyed : Symbol(Keyed, Decl(immutable.d.ts, 263, 56), Decl(immutable.d.ts, 264, 26), Decl(immutable.d.ts, 265, 79), Decl(immutable.d.ts, 266, 76), Decl(immutable.d.ts, 267, 51) ... and 1 more) ->V : Symbol(V, Decl(immutable.d.ts, 266, 26)) ->obj : Symbol(obj, Decl(immutable.d.ts, 266, 29)) ->key : Symbol(key, Decl(immutable.d.ts, 266, 36)) ->V : Symbol(V, Decl(immutable.d.ts, 266, 26)) ->Seq : Symbol(Seq, Decl(immutable.d.ts, 260, 78), Decl(immutable.d.ts, 314, 3), Decl(immutable.d.ts, 315, 58), Decl(immutable.d.ts, 316, 81), Decl(immutable.d.ts, 317, 76) ... and 4 more) ->Keyed : Symbol(Keyed, Decl(immutable.d.ts, 263, 56), Decl(immutable.d.ts, 264, 26), Decl(immutable.d.ts, 265, 79), Decl(immutable.d.ts, 266, 76), Decl(immutable.d.ts, 267, 51) ... and 1 more) ->V : Symbol(V, Decl(immutable.d.ts, 266, 26)) +>Keyed : Symbol(Keyed, Decl(immutable.ts, 263, 56), Decl(immutable.ts, 264, 26), Decl(immutable.ts, 265, 79), Decl(immutable.ts, 266, 76), Decl(immutable.ts, 267, 51) ... and 1 more) +>V : Symbol(V, Decl(immutable.ts, 266, 26)) +>obj : Symbol(obj, Decl(immutable.ts, 266, 29)) +>key : Symbol(key, Decl(immutable.ts, 266, 36)) +>V : Symbol(V, Decl(immutable.ts, 266, 26)) +>Seq : Symbol(Seq, Decl(immutable.ts, 260, 78), Decl(immutable.ts, 314, 3), Decl(immutable.ts, 315, 58), Decl(immutable.ts, 316, 81), Decl(immutable.ts, 317, 76) ... and 4 more) +>Keyed : Symbol(Keyed, Decl(immutable.ts, 263, 56), Decl(immutable.ts, 264, 26), Decl(immutable.ts, 265, 79), Decl(immutable.ts, 266, 76), Decl(immutable.ts, 267, 51) ... and 1 more) +>V : Symbol(V, Decl(immutable.ts, 266, 26)) export function Keyed(): Seq.Keyed; ->Keyed : Symbol(Keyed, Decl(immutable.d.ts, 263, 56), Decl(immutable.d.ts, 264, 26), Decl(immutable.d.ts, 265, 79), Decl(immutable.d.ts, 266, 76), Decl(immutable.d.ts, 267, 51) ... and 1 more) ->K : Symbol(K, Decl(immutable.d.ts, 267, 26)) ->V : Symbol(V, Decl(immutable.d.ts, 267, 28)) ->Seq : Symbol(Seq, Decl(immutable.d.ts, 260, 78), Decl(immutable.d.ts, 314, 3), Decl(immutable.d.ts, 315, 58), Decl(immutable.d.ts, 316, 81), Decl(immutable.d.ts, 317, 76) ... and 4 more) ->Keyed : Symbol(Keyed, Decl(immutable.d.ts, 263, 56), Decl(immutable.d.ts, 264, 26), Decl(immutable.d.ts, 265, 79), Decl(immutable.d.ts, 266, 76), Decl(immutable.d.ts, 267, 51) ... and 1 more) ->K : Symbol(K, Decl(immutable.d.ts, 267, 26)) ->V : Symbol(V, Decl(immutable.d.ts, 267, 28)) +>Keyed : Symbol(Keyed, Decl(immutable.ts, 263, 56), Decl(immutable.ts, 264, 26), Decl(immutable.ts, 265, 79), Decl(immutable.ts, 266, 76), Decl(immutable.ts, 267, 51) ... and 1 more) +>K : Symbol(K, Decl(immutable.ts, 267, 26)) +>V : Symbol(V, Decl(immutable.ts, 267, 28)) +>Seq : Symbol(Seq, Decl(immutable.ts, 260, 78), Decl(immutable.ts, 314, 3), Decl(immutable.ts, 315, 58), Decl(immutable.ts, 316, 81), Decl(immutable.ts, 317, 76) ... and 4 more) +>Keyed : Symbol(Keyed, Decl(immutable.ts, 263, 56), Decl(immutable.ts, 264, 26), Decl(immutable.ts, 265, 79), Decl(immutable.ts, 266, 76), Decl(immutable.ts, 267, 51) ... and 1 more) +>K : Symbol(K, Decl(immutable.ts, 267, 26)) +>V : Symbol(V, Decl(immutable.ts, 267, 28)) export function Keyed(): Seq.Keyed; ->Keyed : Symbol(Keyed, Decl(immutable.d.ts, 263, 56), Decl(immutable.d.ts, 264, 26), Decl(immutable.d.ts, 265, 79), Decl(immutable.d.ts, 266, 76), Decl(immutable.d.ts, 267, 51) ... and 1 more) ->Seq : Symbol(Seq, Decl(immutable.d.ts, 260, 78), Decl(immutable.d.ts, 314, 3), Decl(immutable.d.ts, 315, 58), Decl(immutable.d.ts, 316, 81), Decl(immutable.d.ts, 317, 76) ... and 4 more) ->Keyed : Symbol(Keyed, Decl(immutable.d.ts, 263, 56), Decl(immutable.d.ts, 264, 26), Decl(immutable.d.ts, 265, 79), Decl(immutable.d.ts, 266, 76), Decl(immutable.d.ts, 267, 51) ... and 1 more) +>Keyed : Symbol(Keyed, Decl(immutable.ts, 263, 56), Decl(immutable.ts, 264, 26), Decl(immutable.ts, 265, 79), Decl(immutable.ts, 266, 76), Decl(immutable.ts, 267, 51) ... and 1 more) +>Seq : Symbol(Seq, Decl(immutable.ts, 260, 78), Decl(immutable.ts, 314, 3), Decl(immutable.ts, 315, 58), Decl(immutable.ts, 316, 81), Decl(immutable.ts, 317, 76) ... and 4 more) +>Keyed : Symbol(Keyed, Decl(immutable.ts, 263, 56), Decl(immutable.ts, 264, 26), Decl(immutable.ts, 265, 79), Decl(immutable.ts, 266, 76), Decl(immutable.ts, 267, 51) ... and 1 more) export interface Keyed extends Seq, Collection.Keyed { ->Keyed : Symbol(Keyed, Decl(immutable.d.ts, 263, 56), Decl(immutable.d.ts, 264, 26), Decl(immutable.d.ts, 265, 79), Decl(immutable.d.ts, 266, 76), Decl(immutable.d.ts, 267, 51) ... and 1 more) ->K : Symbol(K, Decl(immutable.d.ts, 269, 27)) ->V : Symbol(V, Decl(immutable.d.ts, 269, 29)) ->Seq : Symbol(Seq, Decl(immutable.d.ts, 260, 78), Decl(immutable.d.ts, 314, 3), Decl(immutable.d.ts, 315, 58), Decl(immutable.d.ts, 316, 81), Decl(immutable.d.ts, 317, 76) ... and 4 more) ->K : Symbol(K, Decl(immutable.d.ts, 269, 27)) ->V : Symbol(V, Decl(immutable.d.ts, 269, 29)) ->Collection.Keyed : Symbol(Collection.Keyed, Decl(immutable.d.ts, 336, 51), Decl(immutable.d.ts, 337, 26), Decl(immutable.d.ts, 338, 86), Decl(immutable.d.ts, 339, 83)) ->Collection : Symbol(Collection, Decl(immutable.d.ts, 331, 3), Decl(immutable.d.ts, 402, 3), Decl(immutable.d.ts, 403, 79), Decl(immutable.d.ts, 404, 80), Decl(immutable.d.ts, 405, 86)) ->Keyed : Symbol(Collection.Keyed, Decl(immutable.d.ts, 336, 51), Decl(immutable.d.ts, 337, 26), Decl(immutable.d.ts, 338, 86), Decl(immutable.d.ts, 339, 83)) ->K : Symbol(K, Decl(immutable.d.ts, 269, 27)) ->V : Symbol(V, Decl(immutable.d.ts, 269, 29)) +>Keyed : Symbol(Keyed, Decl(immutable.ts, 263, 56), Decl(immutable.ts, 264, 26), Decl(immutable.ts, 265, 79), Decl(immutable.ts, 266, 76), Decl(immutable.ts, 267, 51) ... and 1 more) +>K : Symbol(K, Decl(immutable.ts, 269, 27)) +>V : Symbol(V, Decl(immutable.ts, 269, 29)) +>Seq : Symbol(Seq, Decl(immutable.ts, 260, 78), Decl(immutable.ts, 314, 3), Decl(immutable.ts, 315, 58), Decl(immutable.ts, 316, 81), Decl(immutable.ts, 317, 76) ... and 4 more) +>K : Symbol(K, Decl(immutable.ts, 269, 27)) +>V : Symbol(V, Decl(immutable.ts, 269, 29)) +>Collection.Keyed : Symbol(Collection.Keyed, Decl(immutable.ts, 336, 51), Decl(immutable.ts, 337, 26), Decl(immutable.ts, 338, 86), Decl(immutable.ts, 339, 83)) +>Collection : Symbol(Collection, Decl(immutable.ts, 331, 3), Decl(immutable.ts, 402, 3), Decl(immutable.ts, 403, 79), Decl(immutable.ts, 404, 80), Decl(immutable.ts, 405, 86)) +>Keyed : Symbol(Collection.Keyed, Decl(immutable.ts, 336, 51), Decl(immutable.ts, 337, 26), Decl(immutable.ts, 338, 86), Decl(immutable.ts, 339, 83)) +>K : Symbol(K, Decl(immutable.ts, 269, 27)) +>V : Symbol(V, Decl(immutable.ts, 269, 29)) toJS(): Object; ->toJS : Symbol(Keyed.toJS, Decl(immutable.d.ts, 269, 76)) +>toJS : Symbol(Keyed.toJS, Decl(immutable.ts, 269, 76)) >Object : Symbol(Object, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) toJSON(): { [key: string]: V }; ->toJSON : Symbol(Keyed.toJSON, Decl(immutable.d.ts, 270, 21)) ->key : Symbol(key, Decl(immutable.d.ts, 271, 19)) ->V : Symbol(V, Decl(immutable.d.ts, 269, 29)) +>toJSON : Symbol(Keyed.toJSON, Decl(immutable.ts, 270, 21)) +>key : Symbol(key, Decl(immutable.ts, 271, 19)) +>V : Symbol(V, Decl(immutable.ts, 269, 29)) toSeq(): this; ->toSeq : Symbol(Keyed.toSeq, Decl(immutable.d.ts, 271, 37)) +>toSeq : Symbol(Keyed.toSeq, Decl(immutable.ts, 271, 37)) concat(...collections: Array>): Seq.Keyed; ->concat : Symbol(Keyed.concat, Decl(immutable.d.ts, 272, 20), Decl(immutable.d.ts, 273, 91)) ->KC : Symbol(KC, Decl(immutable.d.ts, 273, 13)) ->VC : Symbol(VC, Decl(immutable.d.ts, 273, 16)) ->collections : Symbol(collections, Decl(immutable.d.ts, 273, 21)) +>concat : Symbol(Keyed.concat, Decl(immutable.ts, 272, 20), Decl(immutable.ts, 273, 91)) +>KC : Symbol(KC, Decl(immutable.ts, 273, 13)) +>VC : Symbol(VC, Decl(immutable.ts, 273, 16)) +>collections : Symbol(collections, Decl(immutable.ts, 273, 21)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) >Iterable : Symbol(Iterable, Decl(lib.es2015.iterable.d.ts, --, --)) ->KC : Symbol(KC, Decl(immutable.d.ts, 273, 13)) ->VC : Symbol(VC, Decl(immutable.d.ts, 273, 16)) ->Seq : Symbol(Seq, Decl(immutable.d.ts, 260, 78), Decl(immutable.d.ts, 314, 3), Decl(immutable.d.ts, 315, 58), Decl(immutable.d.ts, 316, 81), Decl(immutable.d.ts, 317, 76) ... and 4 more) ->Keyed : Symbol(Keyed, Decl(immutable.d.ts, 263, 56), Decl(immutable.d.ts, 264, 26), Decl(immutable.d.ts, 265, 79), Decl(immutable.d.ts, 266, 76), Decl(immutable.d.ts, 267, 51) ... and 1 more) ->K : Symbol(K, Decl(immutable.d.ts, 269, 27)) ->KC : Symbol(KC, Decl(immutable.d.ts, 273, 13)) ->V : Symbol(V, Decl(immutable.d.ts, 269, 29)) ->VC : Symbol(VC, Decl(immutable.d.ts, 273, 16)) +>KC : Symbol(KC, Decl(immutable.ts, 273, 13)) +>VC : Symbol(VC, Decl(immutable.ts, 273, 16)) +>Seq : Symbol(Seq, Decl(immutable.ts, 260, 78), Decl(immutable.ts, 314, 3), Decl(immutable.ts, 315, 58), Decl(immutable.ts, 316, 81), Decl(immutable.ts, 317, 76) ... and 4 more) +>Keyed : Symbol(Keyed, Decl(immutable.ts, 263, 56), Decl(immutable.ts, 264, 26), Decl(immutable.ts, 265, 79), Decl(immutable.ts, 266, 76), Decl(immutable.ts, 267, 51) ... and 1 more) +>K : Symbol(K, Decl(immutable.ts, 269, 27)) +>KC : Symbol(KC, Decl(immutable.ts, 273, 13)) +>V : Symbol(V, Decl(immutable.ts, 269, 29)) +>VC : Symbol(VC, Decl(immutable.ts, 273, 16)) concat(...collections: Array<{[key: string]: C}>): Seq.Keyed; ->concat : Symbol(Keyed.concat, Decl(immutable.d.ts, 272, 20), Decl(immutable.d.ts, 273, 91)) ->C : Symbol(C, Decl(immutable.d.ts, 274, 13)) ->collections : Symbol(collections, Decl(immutable.d.ts, 274, 16)) +>concat : Symbol(Keyed.concat, Decl(immutable.ts, 272, 20), Decl(immutable.ts, 273, 91)) +>C : Symbol(C, Decl(immutable.ts, 274, 13)) +>collections : Symbol(collections, Decl(immutable.ts, 274, 16)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) ->key : Symbol(key, Decl(immutable.d.ts, 274, 40)) ->C : Symbol(C, Decl(immutable.d.ts, 274, 13)) ->Seq : Symbol(Seq, Decl(immutable.d.ts, 260, 78), Decl(immutable.d.ts, 314, 3), Decl(immutable.d.ts, 315, 58), Decl(immutable.d.ts, 316, 81), Decl(immutable.d.ts, 317, 76) ... and 4 more) ->Keyed : Symbol(Keyed, Decl(immutable.d.ts, 263, 56), Decl(immutable.d.ts, 264, 26), Decl(immutable.d.ts, 265, 79), Decl(immutable.d.ts, 266, 76), Decl(immutable.d.ts, 267, 51) ... and 1 more) ->K : Symbol(K, Decl(immutable.d.ts, 269, 27)) ->V : Symbol(V, Decl(immutable.d.ts, 269, 29)) ->C : Symbol(C, Decl(immutable.d.ts, 274, 13)) +>key : Symbol(key, Decl(immutable.ts, 274, 40)) +>C : Symbol(C, Decl(immutable.ts, 274, 13)) +>Seq : Symbol(Seq, Decl(immutable.ts, 260, 78), Decl(immutable.ts, 314, 3), Decl(immutable.ts, 315, 58), Decl(immutable.ts, 316, 81), Decl(immutable.ts, 317, 76) ... and 4 more) +>Keyed : Symbol(Keyed, Decl(immutable.ts, 263, 56), Decl(immutable.ts, 264, 26), Decl(immutable.ts, 265, 79), Decl(immutable.ts, 266, 76), Decl(immutable.ts, 267, 51) ... and 1 more) +>K : Symbol(K, Decl(immutable.ts, 269, 27)) +>V : Symbol(V, Decl(immutable.ts, 269, 29)) +>C : Symbol(C, Decl(immutable.ts, 274, 13)) map(mapper: (value: V, key: K, iter: this) => M, context?: any): Seq.Keyed; ->map : Symbol(Keyed.map, Decl(immutable.d.ts, 274, 89)) ->M : Symbol(M, Decl(immutable.d.ts, 275, 10)) ->mapper : Symbol(mapper, Decl(immutable.d.ts, 275, 13)) ->value : Symbol(value, Decl(immutable.d.ts, 275, 22)) ->V : Symbol(V, Decl(immutable.d.ts, 269, 29)) ->key : Symbol(key, Decl(immutable.d.ts, 275, 31)) ->K : Symbol(K, Decl(immutable.d.ts, 269, 27)) ->iter : Symbol(iter, Decl(immutable.d.ts, 275, 39)) ->M : Symbol(M, Decl(immutable.d.ts, 275, 10)) ->context : Symbol(context, Decl(immutable.d.ts, 275, 57)) ->Seq : Symbol(Seq, Decl(immutable.d.ts, 260, 78), Decl(immutable.d.ts, 314, 3), Decl(immutable.d.ts, 315, 58), Decl(immutable.d.ts, 316, 81), Decl(immutable.d.ts, 317, 76) ... and 4 more) ->Keyed : Symbol(Keyed, Decl(immutable.d.ts, 263, 56), Decl(immutable.d.ts, 264, 26), Decl(immutable.d.ts, 265, 79), Decl(immutable.d.ts, 266, 76), Decl(immutable.d.ts, 267, 51) ... and 1 more) ->K : Symbol(K, Decl(immutable.d.ts, 269, 27)) ->M : Symbol(M, Decl(immutable.d.ts, 275, 10)) +>map : Symbol(Keyed.map, Decl(immutable.ts, 274, 89)) +>M : Symbol(M, Decl(immutable.ts, 275, 10)) +>mapper : Symbol(mapper, Decl(immutable.ts, 275, 13)) +>value : Symbol(value, Decl(immutable.ts, 275, 22)) +>V : Symbol(V, Decl(immutable.ts, 269, 29)) +>key : Symbol(key, Decl(immutable.ts, 275, 31)) +>K : Symbol(K, Decl(immutable.ts, 269, 27)) +>iter : Symbol(iter, Decl(immutable.ts, 275, 39)) +>M : Symbol(M, Decl(immutable.ts, 275, 10)) +>context : Symbol(context, Decl(immutable.ts, 275, 57)) +>Seq : Symbol(Seq, Decl(immutable.ts, 260, 78), Decl(immutable.ts, 314, 3), Decl(immutable.ts, 315, 58), Decl(immutable.ts, 316, 81), Decl(immutable.ts, 317, 76) ... and 4 more) +>Keyed : Symbol(Keyed, Decl(immutable.ts, 263, 56), Decl(immutable.ts, 264, 26), Decl(immutable.ts, 265, 79), Decl(immutable.ts, 266, 76), Decl(immutable.ts, 267, 51) ... and 1 more) +>K : Symbol(K, Decl(immutable.ts, 269, 27)) +>M : Symbol(M, Decl(immutable.ts, 275, 10)) mapKeys(mapper: (key: K, value: V, iter: this) => M, context?: any): Seq.Keyed; ->mapKeys : Symbol(Keyed.mapKeys, Decl(immutable.d.ts, 275, 90)) ->M : Symbol(M, Decl(immutable.d.ts, 276, 14)) ->mapper : Symbol(mapper, Decl(immutable.d.ts, 276, 17)) ->key : Symbol(key, Decl(immutable.d.ts, 276, 26)) ->K : Symbol(K, Decl(immutable.d.ts, 269, 27)) ->value : Symbol(value, Decl(immutable.d.ts, 276, 33)) ->V : Symbol(V, Decl(immutable.d.ts, 269, 29)) ->iter : Symbol(iter, Decl(immutable.d.ts, 276, 43)) ->M : Symbol(M, Decl(immutable.d.ts, 276, 14)) ->context : Symbol(context, Decl(immutable.d.ts, 276, 61)) ->Seq : Symbol(Seq, Decl(immutable.d.ts, 260, 78), Decl(immutable.d.ts, 314, 3), Decl(immutable.d.ts, 315, 58), Decl(immutable.d.ts, 316, 81), Decl(immutable.d.ts, 317, 76) ... and 4 more) ->Keyed : Symbol(Keyed, Decl(immutable.d.ts, 263, 56), Decl(immutable.d.ts, 264, 26), Decl(immutable.d.ts, 265, 79), Decl(immutable.d.ts, 266, 76), Decl(immutable.d.ts, 267, 51) ... and 1 more) ->M : Symbol(M, Decl(immutable.d.ts, 276, 14)) ->V : Symbol(V, Decl(immutable.d.ts, 269, 29)) +>mapKeys : Symbol(Keyed.mapKeys, Decl(immutable.ts, 275, 90)) +>M : Symbol(M, Decl(immutable.ts, 276, 14)) +>mapper : Symbol(mapper, Decl(immutable.ts, 276, 17)) +>key : Symbol(key, Decl(immutable.ts, 276, 26)) +>K : Symbol(K, Decl(immutable.ts, 269, 27)) +>value : Symbol(value, Decl(immutable.ts, 276, 33)) +>V : Symbol(V, Decl(immutable.ts, 269, 29)) +>iter : Symbol(iter, Decl(immutable.ts, 276, 43)) +>M : Symbol(M, Decl(immutable.ts, 276, 14)) +>context : Symbol(context, Decl(immutable.ts, 276, 61)) +>Seq : Symbol(Seq, Decl(immutable.ts, 260, 78), Decl(immutable.ts, 314, 3), Decl(immutable.ts, 315, 58), Decl(immutable.ts, 316, 81), Decl(immutable.ts, 317, 76) ... and 4 more) +>Keyed : Symbol(Keyed, Decl(immutable.ts, 263, 56), Decl(immutable.ts, 264, 26), Decl(immutable.ts, 265, 79), Decl(immutable.ts, 266, 76), Decl(immutable.ts, 267, 51) ... and 1 more) +>M : Symbol(M, Decl(immutable.ts, 276, 14)) +>V : Symbol(V, Decl(immutable.ts, 269, 29)) mapEntries(mapper: (entry: [K, V], index: number, iter: this) => [KM, VM], context?: any): Seq.Keyed; ->mapEntries : Symbol(Keyed.mapEntries, Decl(immutable.d.ts, 276, 94)) ->KM : Symbol(KM, Decl(immutable.d.ts, 277, 17)) ->VM : Symbol(VM, Decl(immutable.d.ts, 277, 20)) ->mapper : Symbol(mapper, Decl(immutable.d.ts, 277, 25)) ->entry : Symbol(entry, Decl(immutable.d.ts, 277, 34)) ->K : Symbol(K, Decl(immutable.d.ts, 269, 27)) ->V : Symbol(V, Decl(immutable.d.ts, 269, 29)) ->index : Symbol(index, Decl(immutable.d.ts, 277, 48)) ->iter : Symbol(iter, Decl(immutable.d.ts, 277, 63)) ->KM : Symbol(KM, Decl(immutable.d.ts, 277, 17)) ->VM : Symbol(VM, Decl(immutable.d.ts, 277, 20)) ->context : Symbol(context, Decl(immutable.d.ts, 277, 88)) ->Seq : Symbol(Seq, Decl(immutable.d.ts, 260, 78), Decl(immutable.d.ts, 314, 3), Decl(immutable.d.ts, 315, 58), Decl(immutable.d.ts, 316, 81), Decl(immutable.d.ts, 317, 76) ... and 4 more) ->Keyed : Symbol(Keyed, Decl(immutable.d.ts, 263, 56), Decl(immutable.d.ts, 264, 26), Decl(immutable.d.ts, 265, 79), Decl(immutable.d.ts, 266, 76), Decl(immutable.d.ts, 267, 51) ... and 1 more) ->KM : Symbol(KM, Decl(immutable.d.ts, 277, 17)) ->VM : Symbol(VM, Decl(immutable.d.ts, 277, 20)) +>mapEntries : Symbol(Keyed.mapEntries, Decl(immutable.ts, 276, 94)) +>KM : Symbol(KM, Decl(immutable.ts, 277, 17)) +>VM : Symbol(VM, Decl(immutable.ts, 277, 20)) +>mapper : Symbol(mapper, Decl(immutable.ts, 277, 25)) +>entry : Symbol(entry, Decl(immutable.ts, 277, 34)) +>K : Symbol(K, Decl(immutable.ts, 269, 27)) +>V : Symbol(V, Decl(immutable.ts, 269, 29)) +>index : Symbol(index, Decl(immutable.ts, 277, 48)) +>iter : Symbol(iter, Decl(immutable.ts, 277, 63)) +>KM : Symbol(KM, Decl(immutable.ts, 277, 17)) +>VM : Symbol(VM, Decl(immutable.ts, 277, 20)) +>context : Symbol(context, Decl(immutable.ts, 277, 88)) +>Seq : Symbol(Seq, Decl(immutable.ts, 260, 78), Decl(immutable.ts, 314, 3), Decl(immutable.ts, 315, 58), Decl(immutable.ts, 316, 81), Decl(immutable.ts, 317, 76) ... and 4 more) +>Keyed : Symbol(Keyed, Decl(immutable.ts, 263, 56), Decl(immutable.ts, 264, 26), Decl(immutable.ts, 265, 79), Decl(immutable.ts, 266, 76), Decl(immutable.ts, 267, 51) ... and 1 more) +>KM : Symbol(KM, Decl(immutable.ts, 277, 17)) +>VM : Symbol(VM, Decl(immutable.ts, 277, 20)) flatMap(mapper: (value: V, key: K, iter: this) => Iterable, context?: any): Seq.Keyed; ->flatMap : Symbol(Keyed.flatMap, Decl(immutable.d.ts, 277, 123)) ->M : Symbol(M, Decl(immutable.d.ts, 278, 14)) ->mapper : Symbol(mapper, Decl(immutable.d.ts, 278, 17)) ->value : Symbol(value, Decl(immutable.d.ts, 278, 26)) ->V : Symbol(V, Decl(immutable.d.ts, 269, 29)) ->key : Symbol(key, Decl(immutable.d.ts, 278, 35)) ->K : Symbol(K, Decl(immutable.d.ts, 269, 27)) ->iter : Symbol(iter, Decl(immutable.d.ts, 278, 43)) +>flatMap : Symbol(Keyed.flatMap, Decl(immutable.ts, 277, 123)) +>M : Symbol(M, Decl(immutable.ts, 278, 14)) +>mapper : Symbol(mapper, Decl(immutable.ts, 278, 17)) +>value : Symbol(value, Decl(immutable.ts, 278, 26)) +>V : Symbol(V, Decl(immutable.ts, 269, 29)) +>key : Symbol(key, Decl(immutable.ts, 278, 35)) +>K : Symbol(K, Decl(immutable.ts, 269, 27)) +>iter : Symbol(iter, Decl(immutable.ts, 278, 43)) >Iterable : Symbol(Iterable, Decl(lib.es2015.iterable.d.ts, --, --)) ->M : Symbol(M, Decl(immutable.d.ts, 278, 14)) ->context : Symbol(context, Decl(immutable.d.ts, 278, 71)) ->Seq : Symbol(Seq, Decl(immutable.d.ts, 260, 78), Decl(immutable.d.ts, 314, 3), Decl(immutable.d.ts, 315, 58), Decl(immutable.d.ts, 316, 81), Decl(immutable.d.ts, 317, 76) ... and 4 more) ->Keyed : Symbol(Keyed, Decl(immutable.d.ts, 263, 56), Decl(immutable.d.ts, 264, 26), Decl(immutable.d.ts, 265, 79), Decl(immutable.d.ts, 266, 76), Decl(immutable.d.ts, 267, 51) ... and 1 more) +>M : Symbol(M, Decl(immutable.ts, 278, 14)) +>context : Symbol(context, Decl(immutable.ts, 278, 71)) +>Seq : Symbol(Seq, Decl(immutable.ts, 260, 78), Decl(immutable.ts, 314, 3), Decl(immutable.ts, 315, 58), Decl(immutable.ts, 316, 81), Decl(immutable.ts, 317, 76) ... and 4 more) +>Keyed : Symbol(Keyed, Decl(immutable.ts, 263, 56), Decl(immutable.ts, 264, 26), Decl(immutable.ts, 265, 79), Decl(immutable.ts, 266, 76), Decl(immutable.ts, 267, 51) ... and 1 more) filter(predicate: (value: V, key: K, iter: this) => value is F, context?: any): Seq.Keyed; ->filter : Symbol(Keyed.filter, Decl(immutable.d.ts, 278, 108), Decl(immutable.d.ts, 279, 115)) ->F : Symbol(F, Decl(immutable.d.ts, 279, 13)) ->V : Symbol(V, Decl(immutable.d.ts, 269, 29)) ->predicate : Symbol(predicate, Decl(immutable.d.ts, 279, 26)) ->value : Symbol(value, Decl(immutable.d.ts, 279, 38)) ->V : Symbol(V, Decl(immutable.d.ts, 269, 29)) ->key : Symbol(key, Decl(immutable.d.ts, 279, 47)) ->K : Symbol(K, Decl(immutable.d.ts, 269, 27)) ->iter : Symbol(iter, Decl(immutable.d.ts, 279, 55)) ->value : Symbol(value, Decl(immutable.d.ts, 279, 38)) ->F : Symbol(F, Decl(immutable.d.ts, 279, 13)) ->context : Symbol(context, Decl(immutable.d.ts, 279, 82)) ->Seq : Symbol(Seq, Decl(immutable.d.ts, 260, 78), Decl(immutable.d.ts, 314, 3), Decl(immutable.d.ts, 315, 58), Decl(immutable.d.ts, 316, 81), Decl(immutable.d.ts, 317, 76) ... and 4 more) ->Keyed : Symbol(Keyed, Decl(immutable.d.ts, 263, 56), Decl(immutable.d.ts, 264, 26), Decl(immutable.d.ts, 265, 79), Decl(immutable.d.ts, 266, 76), Decl(immutable.d.ts, 267, 51) ... and 1 more) ->K : Symbol(K, Decl(immutable.d.ts, 269, 27)) ->F : Symbol(F, Decl(immutable.d.ts, 279, 13)) +>filter : Symbol(Keyed.filter, Decl(immutable.ts, 278, 108), Decl(immutable.ts, 279, 115)) +>F : Symbol(F, Decl(immutable.ts, 279, 13)) +>V : Symbol(V, Decl(immutable.ts, 269, 29)) +>predicate : Symbol(predicate, Decl(immutable.ts, 279, 26)) +>value : Symbol(value, Decl(immutable.ts, 279, 38)) +>V : Symbol(V, Decl(immutable.ts, 269, 29)) +>key : Symbol(key, Decl(immutable.ts, 279, 47)) +>K : Symbol(K, Decl(immutable.ts, 269, 27)) +>iter : Symbol(iter, Decl(immutable.ts, 279, 55)) +>value : Symbol(value, Decl(immutable.ts, 279, 38)) +>F : Symbol(F, Decl(immutable.ts, 279, 13)) +>context : Symbol(context, Decl(immutable.ts, 279, 82)) +>Seq : Symbol(Seq, Decl(immutable.ts, 260, 78), Decl(immutable.ts, 314, 3), Decl(immutable.ts, 315, 58), Decl(immutable.ts, 316, 81), Decl(immutable.ts, 317, 76) ... and 4 more) +>Keyed : Symbol(Keyed, Decl(immutable.ts, 263, 56), Decl(immutable.ts, 264, 26), Decl(immutable.ts, 265, 79), Decl(immutable.ts, 266, 76), Decl(immutable.ts, 267, 51) ... and 1 more) +>K : Symbol(K, Decl(immutable.ts, 269, 27)) +>F : Symbol(F, Decl(immutable.ts, 279, 13)) filter(predicate: (value: V, key: K, iter: this) => any, context?: any): this; ->filter : Symbol(Keyed.filter, Decl(immutable.d.ts, 278, 108), Decl(immutable.d.ts, 279, 115)) ->predicate : Symbol(predicate, Decl(immutable.d.ts, 280, 13)) ->value : Symbol(value, Decl(immutable.d.ts, 280, 25)) ->V : Symbol(V, Decl(immutable.d.ts, 269, 29)) ->key : Symbol(key, Decl(immutable.d.ts, 280, 34)) ->K : Symbol(K, Decl(immutable.d.ts, 269, 27)) ->iter : Symbol(iter, Decl(immutable.d.ts, 280, 42)) ->context : Symbol(context, Decl(immutable.d.ts, 280, 62)) +>filter : Symbol(Keyed.filter, Decl(immutable.ts, 278, 108), Decl(immutable.ts, 279, 115)) +>predicate : Symbol(predicate, Decl(immutable.ts, 280, 13)) +>value : Symbol(value, Decl(immutable.ts, 280, 25)) +>V : Symbol(V, Decl(immutable.ts, 269, 29)) +>key : Symbol(key, Decl(immutable.ts, 280, 34)) +>K : Symbol(K, Decl(immutable.ts, 269, 27)) +>iter : Symbol(iter, Decl(immutable.ts, 280, 42)) +>context : Symbol(context, Decl(immutable.ts, 280, 62)) } module Indexed { ->Indexed : Symbol(Indexed, Decl(immutable.d.ts, 281, 5), Decl(immutable.d.ts, 284, 5), Decl(immutable.d.ts, 285, 48), Decl(immutable.d.ts, 286, 49), Decl(immutable.d.ts, 287, 72)) +>Indexed : Symbol(Indexed, Decl(immutable.ts, 281, 5), Decl(immutable.ts, 284, 5), Decl(immutable.ts, 285, 48), Decl(immutable.ts, 286, 49), Decl(immutable.ts, 287, 72)) function of(...values: Array): Seq.Indexed; ->of : Symbol(of, Decl(immutable.d.ts, 282, 20)) ->T : Symbol(T, Decl(immutable.d.ts, 283, 18)) ->values : Symbol(values, Decl(immutable.d.ts, 283, 21)) +>of : Symbol(of, Decl(immutable.ts, 282, 20)) +>T : Symbol(T, Decl(immutable.ts, 283, 18)) +>values : Symbol(values, Decl(immutable.ts, 283, 21)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) ->T : Symbol(T, Decl(immutable.d.ts, 283, 18)) ->Seq : Symbol(Seq, Decl(immutable.d.ts, 260, 78), Decl(immutable.d.ts, 314, 3), Decl(immutable.d.ts, 315, 58), Decl(immutable.d.ts, 316, 81), Decl(immutable.d.ts, 317, 76) ... and 4 more) ->Indexed : Symbol(Indexed, Decl(immutable.d.ts, 281, 5), Decl(immutable.d.ts, 284, 5), Decl(immutable.d.ts, 285, 48), Decl(immutable.d.ts, 286, 49), Decl(immutable.d.ts, 287, 72)) ->T : Symbol(T, Decl(immutable.d.ts, 283, 18)) +>T : Symbol(T, Decl(immutable.ts, 283, 18)) +>Seq : Symbol(Seq, Decl(immutable.ts, 260, 78), Decl(immutable.ts, 314, 3), Decl(immutable.ts, 315, 58), Decl(immutable.ts, 316, 81), Decl(immutable.ts, 317, 76) ... and 4 more) +>Indexed : Symbol(Indexed, Decl(immutable.ts, 281, 5), Decl(immutable.ts, 284, 5), Decl(immutable.ts, 285, 48), Decl(immutable.ts, 286, 49), Decl(immutable.ts, 287, 72)) +>T : Symbol(T, Decl(immutable.ts, 283, 18)) } export function Indexed(): Seq.Indexed; ->Indexed : Symbol(Indexed, Decl(immutable.d.ts, 281, 5), Decl(immutable.d.ts, 284, 5), Decl(immutable.d.ts, 285, 48), Decl(immutable.d.ts, 286, 49), Decl(immutable.d.ts, 287, 72)) ->Seq : Symbol(Seq, Decl(immutable.d.ts, 260, 78), Decl(immutable.d.ts, 314, 3), Decl(immutable.d.ts, 315, 58), Decl(immutable.d.ts, 316, 81), Decl(immutable.d.ts, 317, 76) ... and 4 more) ->Indexed : Symbol(Indexed, Decl(immutable.d.ts, 281, 5), Decl(immutable.d.ts, 284, 5), Decl(immutable.d.ts, 285, 48), Decl(immutable.d.ts, 286, 49), Decl(immutable.d.ts, 287, 72)) +>Indexed : Symbol(Indexed, Decl(immutable.ts, 281, 5), Decl(immutable.ts, 284, 5), Decl(immutable.ts, 285, 48), Decl(immutable.ts, 286, 49), Decl(immutable.ts, 287, 72)) +>Seq : Symbol(Seq, Decl(immutable.ts, 260, 78), Decl(immutable.ts, 314, 3), Decl(immutable.ts, 315, 58), Decl(immutable.ts, 316, 81), Decl(immutable.ts, 317, 76) ... and 4 more) +>Indexed : Symbol(Indexed, Decl(immutable.ts, 281, 5), Decl(immutable.ts, 284, 5), Decl(immutable.ts, 285, 48), Decl(immutable.ts, 286, 49), Decl(immutable.ts, 287, 72)) export function Indexed(): Seq.Indexed; ->Indexed : Symbol(Indexed, Decl(immutable.d.ts, 281, 5), Decl(immutable.d.ts, 284, 5), Decl(immutable.d.ts, 285, 48), Decl(immutable.d.ts, 286, 49), Decl(immutable.d.ts, 287, 72)) ->T : Symbol(T, Decl(immutable.d.ts, 286, 28)) ->Seq : Symbol(Seq, Decl(immutable.d.ts, 260, 78), Decl(immutable.d.ts, 314, 3), Decl(immutable.d.ts, 315, 58), Decl(immutable.d.ts, 316, 81), Decl(immutable.d.ts, 317, 76) ... and 4 more) ->Indexed : Symbol(Indexed, Decl(immutable.d.ts, 281, 5), Decl(immutable.d.ts, 284, 5), Decl(immutable.d.ts, 285, 48), Decl(immutable.d.ts, 286, 49), Decl(immutable.d.ts, 287, 72)) ->T : Symbol(T, Decl(immutable.d.ts, 286, 28)) +>Indexed : Symbol(Indexed, Decl(immutable.ts, 281, 5), Decl(immutable.ts, 284, 5), Decl(immutable.ts, 285, 48), Decl(immutable.ts, 286, 49), Decl(immutable.ts, 287, 72)) +>T : Symbol(T, Decl(immutable.ts, 286, 28)) +>Seq : Symbol(Seq, Decl(immutable.ts, 260, 78), Decl(immutable.ts, 314, 3), Decl(immutable.ts, 315, 58), Decl(immutable.ts, 316, 81), Decl(immutable.ts, 317, 76) ... and 4 more) +>Indexed : Symbol(Indexed, Decl(immutable.ts, 281, 5), Decl(immutable.ts, 284, 5), Decl(immutable.ts, 285, 48), Decl(immutable.ts, 286, 49), Decl(immutable.ts, 287, 72)) +>T : Symbol(T, Decl(immutable.ts, 286, 28)) export function Indexed(collection: Iterable): Seq.Indexed; ->Indexed : Symbol(Indexed, Decl(immutable.d.ts, 281, 5), Decl(immutable.d.ts, 284, 5), Decl(immutable.d.ts, 285, 48), Decl(immutable.d.ts, 286, 49), Decl(immutable.d.ts, 287, 72)) ->T : Symbol(T, Decl(immutable.d.ts, 287, 28)) ->collection : Symbol(collection, Decl(immutable.d.ts, 287, 31)) +>Indexed : Symbol(Indexed, Decl(immutable.ts, 281, 5), Decl(immutable.ts, 284, 5), Decl(immutable.ts, 285, 48), Decl(immutable.ts, 286, 49), Decl(immutable.ts, 287, 72)) +>T : Symbol(T, Decl(immutable.ts, 287, 28)) +>collection : Symbol(collection, Decl(immutable.ts, 287, 31)) >Iterable : Symbol(Iterable, Decl(lib.es2015.iterable.d.ts, --, --)) ->T : Symbol(T, Decl(immutable.d.ts, 287, 28)) ->Seq : Symbol(Seq, Decl(immutable.d.ts, 260, 78), Decl(immutable.d.ts, 314, 3), Decl(immutable.d.ts, 315, 58), Decl(immutable.d.ts, 316, 81), Decl(immutable.d.ts, 317, 76) ... and 4 more) ->Indexed : Symbol(Indexed, Decl(immutable.d.ts, 281, 5), Decl(immutable.d.ts, 284, 5), Decl(immutable.d.ts, 285, 48), Decl(immutable.d.ts, 286, 49), Decl(immutable.d.ts, 287, 72)) ->T : Symbol(T, Decl(immutable.d.ts, 287, 28)) +>T : Symbol(T, Decl(immutable.ts, 287, 28)) +>Seq : Symbol(Seq, Decl(immutable.ts, 260, 78), Decl(immutable.ts, 314, 3), Decl(immutable.ts, 315, 58), Decl(immutable.ts, 316, 81), Decl(immutable.ts, 317, 76) ... and 4 more) +>Indexed : Symbol(Indexed, Decl(immutable.ts, 281, 5), Decl(immutable.ts, 284, 5), Decl(immutable.ts, 285, 48), Decl(immutable.ts, 286, 49), Decl(immutable.ts, 287, 72)) +>T : Symbol(T, Decl(immutable.ts, 287, 28)) export interface Indexed extends Seq, Collection.Indexed { ->Indexed : Symbol(Indexed, Decl(immutable.d.ts, 281, 5), Decl(immutable.d.ts, 284, 5), Decl(immutable.d.ts, 285, 48), Decl(immutable.d.ts, 286, 49), Decl(immutable.d.ts, 287, 72)) ->T : Symbol(T, Decl(immutable.d.ts, 288, 29)) ->Seq : Symbol(Seq, Decl(immutable.d.ts, 260, 78), Decl(immutable.d.ts, 314, 3), Decl(immutable.d.ts, 315, 58), Decl(immutable.d.ts, 316, 81), Decl(immutable.d.ts, 317, 76) ... and 4 more) ->T : Symbol(T, Decl(immutable.d.ts, 288, 29)) ->Collection.Indexed : Symbol(Collection.Indexed, Decl(immutable.d.ts, 355, 5), Decl(immutable.d.ts, 356, 28), Decl(immutable.d.ts, 357, 79)) ->Collection : Symbol(Collection, Decl(immutable.d.ts, 331, 3), Decl(immutable.d.ts, 402, 3), Decl(immutable.d.ts, 403, 79), Decl(immutable.d.ts, 404, 80), Decl(immutable.d.ts, 405, 86)) ->Indexed : Symbol(Collection.Indexed, Decl(immutable.d.ts, 355, 5), Decl(immutable.d.ts, 356, 28), Decl(immutable.d.ts, 357, 79)) ->T : Symbol(T, Decl(immutable.d.ts, 288, 29)) +>Indexed : Symbol(Indexed, Decl(immutable.ts, 281, 5), Decl(immutable.ts, 284, 5), Decl(immutable.ts, 285, 48), Decl(immutable.ts, 286, 49), Decl(immutable.ts, 287, 72)) +>T : Symbol(T, Decl(immutable.ts, 288, 29)) +>Seq : Symbol(Seq, Decl(immutable.ts, 260, 78), Decl(immutable.ts, 314, 3), Decl(immutable.ts, 315, 58), Decl(immutable.ts, 316, 81), Decl(immutable.ts, 317, 76) ... and 4 more) +>T : Symbol(T, Decl(immutable.ts, 288, 29)) +>Collection.Indexed : Symbol(Collection.Indexed, Decl(immutable.ts, 355, 5), Decl(immutable.ts, 356, 28), Decl(immutable.ts, 357, 79)) +>Collection : Symbol(Collection, Decl(immutable.ts, 331, 3), Decl(immutable.ts, 402, 3), Decl(immutable.ts, 403, 79), Decl(immutable.ts, 404, 80), Decl(immutable.ts, 405, 86)) +>Indexed : Symbol(Collection.Indexed, Decl(immutable.ts, 355, 5), Decl(immutable.ts, 356, 28), Decl(immutable.ts, 357, 79)) +>T : Symbol(T, Decl(immutable.ts, 288, 29)) toJS(): Array; ->toJS : Symbol(Indexed.toJS, Decl(immutable.d.ts, 288, 79)) +>toJS : Symbol(Indexed.toJS, Decl(immutable.ts, 288, 79)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) toJSON(): Array; ->toJSON : Symbol(Indexed.toJSON, Decl(immutable.d.ts, 289, 25)) +>toJSON : Symbol(Indexed.toJSON, Decl(immutable.ts, 289, 25)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) ->T : Symbol(T, Decl(immutable.d.ts, 288, 29)) +>T : Symbol(T, Decl(immutable.ts, 288, 29)) toSeq(): this; ->toSeq : Symbol(Indexed.toSeq, Decl(immutable.d.ts, 290, 25)) +>toSeq : Symbol(Indexed.toSeq, Decl(immutable.ts, 290, 25)) concat(...valuesOrCollections: Array | C>): Seq.Indexed; ->concat : Symbol(Indexed.concat, Decl(immutable.d.ts, 291, 20)) ->C : Symbol(C, Decl(immutable.d.ts, 292, 13)) ->valuesOrCollections : Symbol(valuesOrCollections, Decl(immutable.d.ts, 292, 16)) +>concat : Symbol(Indexed.concat, Decl(immutable.ts, 291, 20)) +>C : Symbol(C, Decl(immutable.ts, 292, 13)) +>valuesOrCollections : Symbol(valuesOrCollections, Decl(immutable.ts, 292, 16)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) >Iterable : Symbol(Iterable, Decl(lib.es2015.iterable.d.ts, --, --)) ->C : Symbol(C, Decl(immutable.d.ts, 292, 13)) ->C : Symbol(C, Decl(immutable.d.ts, 292, 13)) ->Seq : Symbol(Seq, Decl(immutable.d.ts, 260, 78), Decl(immutable.d.ts, 314, 3), Decl(immutable.d.ts, 315, 58), Decl(immutable.d.ts, 316, 81), Decl(immutable.d.ts, 317, 76) ... and 4 more) ->Indexed : Symbol(Indexed, Decl(immutable.d.ts, 281, 5), Decl(immutable.d.ts, 284, 5), Decl(immutable.d.ts, 285, 48), Decl(immutable.d.ts, 286, 49), Decl(immutable.d.ts, 287, 72)) ->T : Symbol(T, Decl(immutable.d.ts, 288, 29)) ->C : Symbol(C, Decl(immutable.d.ts, 292, 13)) +>C : Symbol(C, Decl(immutable.ts, 292, 13)) +>C : Symbol(C, Decl(immutable.ts, 292, 13)) +>Seq : Symbol(Seq, Decl(immutable.ts, 260, 78), Decl(immutable.ts, 314, 3), Decl(immutable.ts, 315, 58), Decl(immutable.ts, 316, 81), Decl(immutable.ts, 317, 76) ... and 4 more) +>Indexed : Symbol(Indexed, Decl(immutable.ts, 281, 5), Decl(immutable.ts, 284, 5), Decl(immutable.ts, 285, 48), Decl(immutable.ts, 286, 49), Decl(immutable.ts, 287, 72)) +>T : Symbol(T, Decl(immutable.ts, 288, 29)) +>C : Symbol(C, Decl(immutable.ts, 292, 13)) map(mapper: (value: T, key: number, iter: this) => M, context?: any): Seq.Indexed; ->map : Symbol(Indexed.map, Decl(immutable.d.ts, 292, 84)) ->M : Symbol(M, Decl(immutable.d.ts, 293, 10)) ->mapper : Symbol(mapper, Decl(immutable.d.ts, 293, 13)) ->value : Symbol(value, Decl(immutable.d.ts, 293, 22)) ->T : Symbol(T, Decl(immutable.d.ts, 288, 29)) ->key : Symbol(key, Decl(immutable.d.ts, 293, 31)) ->iter : Symbol(iter, Decl(immutable.d.ts, 293, 44)) ->M : Symbol(M, Decl(immutable.d.ts, 293, 10)) ->context : Symbol(context, Decl(immutable.d.ts, 293, 62)) ->Seq : Symbol(Seq, Decl(immutable.d.ts, 260, 78), Decl(immutable.d.ts, 314, 3), Decl(immutable.d.ts, 315, 58), Decl(immutable.d.ts, 316, 81), Decl(immutable.d.ts, 317, 76) ... and 4 more) ->Indexed : Symbol(Indexed, Decl(immutable.d.ts, 281, 5), Decl(immutable.d.ts, 284, 5), Decl(immutable.d.ts, 285, 48), Decl(immutable.d.ts, 286, 49), Decl(immutable.d.ts, 287, 72)) ->M : Symbol(M, Decl(immutable.d.ts, 293, 10)) +>map : Symbol(Indexed.map, Decl(immutable.ts, 292, 84)) +>M : Symbol(M, Decl(immutable.ts, 293, 10)) +>mapper : Symbol(mapper, Decl(immutable.ts, 293, 13)) +>value : Symbol(value, Decl(immutable.ts, 293, 22)) +>T : Symbol(T, Decl(immutable.ts, 288, 29)) +>key : Symbol(key, Decl(immutable.ts, 293, 31)) +>iter : Symbol(iter, Decl(immutable.ts, 293, 44)) +>M : Symbol(M, Decl(immutable.ts, 293, 10)) +>context : Symbol(context, Decl(immutable.ts, 293, 62)) +>Seq : Symbol(Seq, Decl(immutable.ts, 260, 78), Decl(immutable.ts, 314, 3), Decl(immutable.ts, 315, 58), Decl(immutable.ts, 316, 81), Decl(immutable.ts, 317, 76) ... and 4 more) +>Indexed : Symbol(Indexed, Decl(immutable.ts, 281, 5), Decl(immutable.ts, 284, 5), Decl(immutable.ts, 285, 48), Decl(immutable.ts, 286, 49), Decl(immutable.ts, 287, 72)) +>M : Symbol(M, Decl(immutable.ts, 293, 10)) flatMap(mapper: (value: T, key: number, iter: this) => Iterable, context?: any): Seq.Indexed; ->flatMap : Symbol(Indexed.flatMap, Decl(immutable.d.ts, 293, 94)) ->M : Symbol(M, Decl(immutable.d.ts, 294, 14)) ->mapper : Symbol(mapper, Decl(immutable.d.ts, 294, 17)) ->value : Symbol(value, Decl(immutable.d.ts, 294, 26)) ->T : Symbol(T, Decl(immutable.d.ts, 288, 29)) ->key : Symbol(key, Decl(immutable.d.ts, 294, 35)) ->iter : Symbol(iter, Decl(immutable.d.ts, 294, 48)) +>flatMap : Symbol(Indexed.flatMap, Decl(immutable.ts, 293, 94)) +>M : Symbol(M, Decl(immutable.ts, 294, 14)) +>mapper : Symbol(mapper, Decl(immutable.ts, 294, 17)) +>value : Symbol(value, Decl(immutable.ts, 294, 26)) +>T : Symbol(T, Decl(immutable.ts, 288, 29)) +>key : Symbol(key, Decl(immutable.ts, 294, 35)) +>iter : Symbol(iter, Decl(immutable.ts, 294, 48)) >Iterable : Symbol(Iterable, Decl(lib.es2015.iterable.d.ts, --, --)) ->M : Symbol(M, Decl(immutable.d.ts, 294, 14)) ->context : Symbol(context, Decl(immutable.d.ts, 294, 76)) ->Seq : Symbol(Seq, Decl(immutable.d.ts, 260, 78), Decl(immutable.d.ts, 314, 3), Decl(immutable.d.ts, 315, 58), Decl(immutable.d.ts, 316, 81), Decl(immutable.d.ts, 317, 76) ... and 4 more) ->Indexed : Symbol(Indexed, Decl(immutable.d.ts, 281, 5), Decl(immutable.d.ts, 284, 5), Decl(immutable.d.ts, 285, 48), Decl(immutable.d.ts, 286, 49), Decl(immutable.d.ts, 287, 72)) ->M : Symbol(M, Decl(immutable.d.ts, 294, 14)) +>M : Symbol(M, Decl(immutable.ts, 294, 14)) +>context : Symbol(context, Decl(immutable.ts, 294, 76)) +>Seq : Symbol(Seq, Decl(immutable.ts, 260, 78), Decl(immutable.ts, 314, 3), Decl(immutable.ts, 315, 58), Decl(immutable.ts, 316, 81), Decl(immutable.ts, 317, 76) ... and 4 more) +>Indexed : Symbol(Indexed, Decl(immutable.ts, 281, 5), Decl(immutable.ts, 284, 5), Decl(immutable.ts, 285, 48), Decl(immutable.ts, 286, 49), Decl(immutable.ts, 287, 72)) +>M : Symbol(M, Decl(immutable.ts, 294, 14)) filter(predicate: (value: T, index: number, iter: this) => value is F, context?: any): Seq.Indexed; ->filter : Symbol(Indexed.filter, Decl(immutable.d.ts, 294, 108), Decl(immutable.d.ts, 295, 121)) ->F : Symbol(F, Decl(immutable.d.ts, 295, 13)) ->T : Symbol(T, Decl(immutable.d.ts, 288, 29)) ->predicate : Symbol(predicate, Decl(immutable.d.ts, 295, 26)) ->value : Symbol(value, Decl(immutable.d.ts, 295, 38)) ->T : Symbol(T, Decl(immutable.d.ts, 288, 29)) ->index : Symbol(index, Decl(immutable.d.ts, 295, 47)) ->iter : Symbol(iter, Decl(immutable.d.ts, 295, 62)) ->value : Symbol(value, Decl(immutable.d.ts, 295, 38)) ->F : Symbol(F, Decl(immutable.d.ts, 295, 13)) ->context : Symbol(context, Decl(immutable.d.ts, 295, 89)) ->Seq : Symbol(Seq, Decl(immutable.d.ts, 260, 78), Decl(immutable.d.ts, 314, 3), Decl(immutable.d.ts, 315, 58), Decl(immutable.d.ts, 316, 81), Decl(immutable.d.ts, 317, 76) ... and 4 more) ->Indexed : Symbol(Indexed, Decl(immutable.d.ts, 281, 5), Decl(immutable.d.ts, 284, 5), Decl(immutable.d.ts, 285, 48), Decl(immutable.d.ts, 286, 49), Decl(immutable.d.ts, 287, 72)) ->F : Symbol(F, Decl(immutable.d.ts, 295, 13)) +>filter : Symbol(Indexed.filter, Decl(immutable.ts, 294, 108), Decl(immutable.ts, 295, 121)) +>F : Symbol(F, Decl(immutable.ts, 295, 13)) +>T : Symbol(T, Decl(immutable.ts, 288, 29)) +>predicate : Symbol(predicate, Decl(immutable.ts, 295, 26)) +>value : Symbol(value, Decl(immutable.ts, 295, 38)) +>T : Symbol(T, Decl(immutable.ts, 288, 29)) +>index : Symbol(index, Decl(immutable.ts, 295, 47)) +>iter : Symbol(iter, Decl(immutable.ts, 295, 62)) +>value : Symbol(value, Decl(immutable.ts, 295, 38)) +>F : Symbol(F, Decl(immutable.ts, 295, 13)) +>context : Symbol(context, Decl(immutable.ts, 295, 89)) +>Seq : Symbol(Seq, Decl(immutable.ts, 260, 78), Decl(immutable.ts, 314, 3), Decl(immutable.ts, 315, 58), Decl(immutable.ts, 316, 81), Decl(immutable.ts, 317, 76) ... and 4 more) +>Indexed : Symbol(Indexed, Decl(immutable.ts, 281, 5), Decl(immutable.ts, 284, 5), Decl(immutable.ts, 285, 48), Decl(immutable.ts, 286, 49), Decl(immutable.ts, 287, 72)) +>F : Symbol(F, Decl(immutable.ts, 295, 13)) filter(predicate: (value: T, index: number, iter: this) => any, context?: any): this; ->filter : Symbol(Indexed.filter, Decl(immutable.d.ts, 294, 108), Decl(immutable.d.ts, 295, 121)) ->predicate : Symbol(predicate, Decl(immutable.d.ts, 296, 13)) ->value : Symbol(value, Decl(immutable.d.ts, 296, 25)) ->T : Symbol(T, Decl(immutable.d.ts, 288, 29)) ->index : Symbol(index, Decl(immutable.d.ts, 296, 34)) ->iter : Symbol(iter, Decl(immutable.d.ts, 296, 49)) ->context : Symbol(context, Decl(immutable.d.ts, 296, 69)) +>filter : Symbol(Indexed.filter, Decl(immutable.ts, 294, 108), Decl(immutable.ts, 295, 121)) +>predicate : Symbol(predicate, Decl(immutable.ts, 296, 13)) +>value : Symbol(value, Decl(immutable.ts, 296, 25)) +>T : Symbol(T, Decl(immutable.ts, 288, 29)) +>index : Symbol(index, Decl(immutable.ts, 296, 34)) +>iter : Symbol(iter, Decl(immutable.ts, 296, 49)) +>context : Symbol(context, Decl(immutable.ts, 296, 69)) } export module Set { ->Set : Symbol(Set, Decl(immutable.d.ts, 297, 5), Decl(immutable.d.ts, 300, 5), Decl(immutable.d.ts, 301, 40), Decl(immutable.d.ts, 302, 41), Decl(immutable.d.ts, 303, 64)) +>Set : Symbol(Set, Decl(immutable.ts, 297, 5), Decl(immutable.ts, 300, 5), Decl(immutable.ts, 301, 40), Decl(immutable.ts, 302, 41), Decl(immutable.ts, 303, 64)) function of(...values: Array): Seq.Set; ->of : Symbol(of, Decl(immutable.d.ts, 298, 23)) ->T : Symbol(T, Decl(immutable.d.ts, 299, 18)) ->values : Symbol(values, Decl(immutable.d.ts, 299, 21)) +>of : Symbol(of, Decl(immutable.ts, 298, 23)) +>T : Symbol(T, Decl(immutable.ts, 299, 18)) +>values : Symbol(values, Decl(immutable.ts, 299, 21)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) ->T : Symbol(T, Decl(immutable.d.ts, 299, 18)) ->Seq : Symbol(Seq, Decl(immutable.d.ts, 260, 78), Decl(immutable.d.ts, 314, 3), Decl(immutable.d.ts, 315, 58), Decl(immutable.d.ts, 316, 81), Decl(immutable.d.ts, 317, 76) ... and 4 more) ->Set : Symbol(Set, Decl(immutable.d.ts, 297, 5), Decl(immutable.d.ts, 300, 5), Decl(immutable.d.ts, 301, 40), Decl(immutable.d.ts, 302, 41), Decl(immutable.d.ts, 303, 64)) ->T : Symbol(T, Decl(immutable.d.ts, 299, 18)) +>T : Symbol(T, Decl(immutable.ts, 299, 18)) +>Seq : Symbol(Seq, Decl(immutable.ts, 260, 78), Decl(immutable.ts, 314, 3), Decl(immutable.ts, 315, 58), Decl(immutable.ts, 316, 81), Decl(immutable.ts, 317, 76) ... and 4 more) +>Set : Symbol(Set, Decl(immutable.ts, 297, 5), Decl(immutable.ts, 300, 5), Decl(immutable.ts, 301, 40), Decl(immutable.ts, 302, 41), Decl(immutable.ts, 303, 64)) +>T : Symbol(T, Decl(immutable.ts, 299, 18)) } export function Set(): Seq.Set; ->Set : Symbol(Set, Decl(immutable.d.ts, 297, 5), Decl(immutable.d.ts, 300, 5), Decl(immutable.d.ts, 301, 40), Decl(immutable.d.ts, 302, 41), Decl(immutable.d.ts, 303, 64)) ->Seq : Symbol(Seq, Decl(immutable.d.ts, 260, 78), Decl(immutable.d.ts, 314, 3), Decl(immutable.d.ts, 315, 58), Decl(immutable.d.ts, 316, 81), Decl(immutable.d.ts, 317, 76) ... and 4 more) ->Set : Symbol(Set, Decl(immutable.d.ts, 297, 5), Decl(immutable.d.ts, 300, 5), Decl(immutable.d.ts, 301, 40), Decl(immutable.d.ts, 302, 41), Decl(immutable.d.ts, 303, 64)) +>Set : Symbol(Set, Decl(immutable.ts, 297, 5), Decl(immutable.ts, 300, 5), Decl(immutable.ts, 301, 40), Decl(immutable.ts, 302, 41), Decl(immutable.ts, 303, 64)) +>Seq : Symbol(Seq, Decl(immutable.ts, 260, 78), Decl(immutable.ts, 314, 3), Decl(immutable.ts, 315, 58), Decl(immutable.ts, 316, 81), Decl(immutable.ts, 317, 76) ... and 4 more) +>Set : Symbol(Set, Decl(immutable.ts, 297, 5), Decl(immutable.ts, 300, 5), Decl(immutable.ts, 301, 40), Decl(immutable.ts, 302, 41), Decl(immutable.ts, 303, 64)) export function Set(): Seq.Set; ->Set : Symbol(Set, Decl(immutable.d.ts, 297, 5), Decl(immutable.d.ts, 300, 5), Decl(immutable.d.ts, 301, 40), Decl(immutable.d.ts, 302, 41), Decl(immutable.d.ts, 303, 64)) ->T : Symbol(T, Decl(immutable.d.ts, 302, 24)) ->Seq : Symbol(Seq, Decl(immutable.d.ts, 260, 78), Decl(immutable.d.ts, 314, 3), Decl(immutable.d.ts, 315, 58), Decl(immutable.d.ts, 316, 81), Decl(immutable.d.ts, 317, 76) ... and 4 more) ->Set : Symbol(Set, Decl(immutable.d.ts, 297, 5), Decl(immutable.d.ts, 300, 5), Decl(immutable.d.ts, 301, 40), Decl(immutable.d.ts, 302, 41), Decl(immutable.d.ts, 303, 64)) ->T : Symbol(T, Decl(immutable.d.ts, 302, 24)) +>Set : Symbol(Set, Decl(immutable.ts, 297, 5), Decl(immutable.ts, 300, 5), Decl(immutable.ts, 301, 40), Decl(immutable.ts, 302, 41), Decl(immutable.ts, 303, 64)) +>T : Symbol(T, Decl(immutable.ts, 302, 24)) +>Seq : Symbol(Seq, Decl(immutable.ts, 260, 78), Decl(immutable.ts, 314, 3), Decl(immutable.ts, 315, 58), Decl(immutable.ts, 316, 81), Decl(immutable.ts, 317, 76) ... and 4 more) +>Set : Symbol(Set, Decl(immutable.ts, 297, 5), Decl(immutable.ts, 300, 5), Decl(immutable.ts, 301, 40), Decl(immutable.ts, 302, 41), Decl(immutable.ts, 303, 64)) +>T : Symbol(T, Decl(immutable.ts, 302, 24)) export function Set(collection: Iterable): Seq.Set; ->Set : Symbol(Set, Decl(immutable.d.ts, 297, 5), Decl(immutable.d.ts, 300, 5), Decl(immutable.d.ts, 301, 40), Decl(immutable.d.ts, 302, 41), Decl(immutable.d.ts, 303, 64)) ->T : Symbol(T, Decl(immutable.d.ts, 303, 24)) ->collection : Symbol(collection, Decl(immutable.d.ts, 303, 27)) +>Set : Symbol(Set, Decl(immutable.ts, 297, 5), Decl(immutable.ts, 300, 5), Decl(immutable.ts, 301, 40), Decl(immutable.ts, 302, 41), Decl(immutable.ts, 303, 64)) +>T : Symbol(T, Decl(immutable.ts, 303, 24)) +>collection : Symbol(collection, Decl(immutable.ts, 303, 27)) >Iterable : Symbol(Iterable, Decl(lib.es2015.iterable.d.ts, --, --)) ->T : Symbol(T, Decl(immutable.d.ts, 303, 24)) ->Seq : Symbol(Seq, Decl(immutable.d.ts, 260, 78), Decl(immutable.d.ts, 314, 3), Decl(immutable.d.ts, 315, 58), Decl(immutable.d.ts, 316, 81), Decl(immutable.d.ts, 317, 76) ... and 4 more) ->Set : Symbol(Set, Decl(immutable.d.ts, 297, 5), Decl(immutable.d.ts, 300, 5), Decl(immutable.d.ts, 301, 40), Decl(immutable.d.ts, 302, 41), Decl(immutable.d.ts, 303, 64)) ->T : Symbol(T, Decl(immutable.d.ts, 303, 24)) +>T : Symbol(T, Decl(immutable.ts, 303, 24)) +>Seq : Symbol(Seq, Decl(immutable.ts, 260, 78), Decl(immutable.ts, 314, 3), Decl(immutable.ts, 315, 58), Decl(immutable.ts, 316, 81), Decl(immutable.ts, 317, 76) ... and 4 more) +>Set : Symbol(Set, Decl(immutable.ts, 297, 5), Decl(immutable.ts, 300, 5), Decl(immutable.ts, 301, 40), Decl(immutable.ts, 302, 41), Decl(immutable.ts, 303, 64)) +>T : Symbol(T, Decl(immutable.ts, 303, 24)) export interface Set extends Seq, Collection.Set { ->Set : Symbol(Set, Decl(immutable.d.ts, 297, 5), Decl(immutable.d.ts, 300, 5), Decl(immutable.d.ts, 301, 40), Decl(immutable.d.ts, 302, 41), Decl(immutable.d.ts, 303, 64)) ->T : Symbol(T, Decl(immutable.d.ts, 304, 25)) ->Seq : Symbol(Seq, Decl(immutable.d.ts, 260, 78), Decl(immutable.d.ts, 314, 3), Decl(immutable.d.ts, 315, 58), Decl(immutable.d.ts, 316, 81), Decl(immutable.d.ts, 317, 76) ... and 4 more) ->T : Symbol(T, Decl(immutable.d.ts, 304, 25)) ->Collection.Set : Symbol(Collection.Set, Decl(immutable.d.ts, 387, 5), Decl(immutable.d.ts, 388, 24), Decl(immutable.d.ts, 389, 71)) ->Collection : Symbol(Collection, Decl(immutable.d.ts, 331, 3), Decl(immutable.d.ts, 402, 3), Decl(immutable.d.ts, 403, 79), Decl(immutable.d.ts, 404, 80), Decl(immutable.d.ts, 405, 86)) ->Set : Symbol(Collection.Set, Decl(immutable.d.ts, 387, 5), Decl(immutable.d.ts, 388, 24), Decl(immutable.d.ts, 389, 71)) ->T : Symbol(T, Decl(immutable.d.ts, 304, 25)) +>Set : Symbol(Set, Decl(immutable.ts, 297, 5), Decl(immutable.ts, 300, 5), Decl(immutable.ts, 301, 40), Decl(immutable.ts, 302, 41), Decl(immutable.ts, 303, 64)) +>T : Symbol(T, Decl(immutable.ts, 304, 25)) +>Seq : Symbol(Seq, Decl(immutable.ts, 260, 78), Decl(immutable.ts, 314, 3), Decl(immutable.ts, 315, 58), Decl(immutable.ts, 316, 81), Decl(immutable.ts, 317, 76) ... and 4 more) +>T : Symbol(T, Decl(immutable.ts, 304, 25)) +>Collection.Set : Symbol(Collection.Set, Decl(immutable.ts, 387, 5), Decl(immutable.ts, 388, 24), Decl(immutable.ts, 389, 71)) +>Collection : Symbol(Collection, Decl(immutable.ts, 331, 3), Decl(immutable.ts, 402, 3), Decl(immutable.ts, 403, 79), Decl(immutable.ts, 404, 80), Decl(immutable.ts, 405, 86)) +>Set : Symbol(Collection.Set, Decl(immutable.ts, 387, 5), Decl(immutable.ts, 388, 24), Decl(immutable.ts, 389, 71)) +>T : Symbol(T, Decl(immutable.ts, 304, 25)) toJS(): Array; ->toJS : Symbol(Set.toJS, Decl(immutable.d.ts, 304, 70)) +>toJS : Symbol(Set.toJS, Decl(immutable.ts, 304, 70)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) toJSON(): Array; ->toJSON : Symbol(Set.toJSON, Decl(immutable.d.ts, 305, 25)) +>toJSON : Symbol(Set.toJSON, Decl(immutable.ts, 305, 25)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) ->T : Symbol(T, Decl(immutable.d.ts, 304, 25)) +>T : Symbol(T, Decl(immutable.ts, 304, 25)) toSeq(): this; ->toSeq : Symbol(Set.toSeq, Decl(immutable.d.ts, 306, 25)) +>toSeq : Symbol(Set.toSeq, Decl(immutable.ts, 306, 25)) concat(...valuesOrCollections: Array | C>): Seq.Set; ->concat : Symbol(Set.concat, Decl(immutable.d.ts, 307, 20)) ->C : Symbol(C, Decl(immutable.d.ts, 308, 13)) ->valuesOrCollections : Symbol(valuesOrCollections, Decl(immutable.d.ts, 308, 16)) +>concat : Symbol(Set.concat, Decl(immutable.ts, 307, 20)) +>C : Symbol(C, Decl(immutable.ts, 308, 13)) +>valuesOrCollections : Symbol(valuesOrCollections, Decl(immutable.ts, 308, 16)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) >Iterable : Symbol(Iterable, Decl(lib.es2015.iterable.d.ts, --, --)) ->C : Symbol(C, Decl(immutable.d.ts, 308, 13)) ->C : Symbol(C, Decl(immutable.d.ts, 308, 13)) ->Seq : Symbol(Seq, Decl(immutable.d.ts, 260, 78), Decl(immutable.d.ts, 314, 3), Decl(immutable.d.ts, 315, 58), Decl(immutable.d.ts, 316, 81), Decl(immutable.d.ts, 317, 76) ... and 4 more) ->Set : Symbol(Set, Decl(immutable.d.ts, 297, 5), Decl(immutable.d.ts, 300, 5), Decl(immutable.d.ts, 301, 40), Decl(immutable.d.ts, 302, 41), Decl(immutable.d.ts, 303, 64)) ->T : Symbol(T, Decl(immutable.d.ts, 304, 25)) ->C : Symbol(C, Decl(immutable.d.ts, 308, 13)) +>C : Symbol(C, Decl(immutable.ts, 308, 13)) +>C : Symbol(C, Decl(immutable.ts, 308, 13)) +>Seq : Symbol(Seq, Decl(immutable.ts, 260, 78), Decl(immutable.ts, 314, 3), Decl(immutable.ts, 315, 58), Decl(immutable.ts, 316, 81), Decl(immutable.ts, 317, 76) ... and 4 more) +>Set : Symbol(Set, Decl(immutable.ts, 297, 5), Decl(immutable.ts, 300, 5), Decl(immutable.ts, 301, 40), Decl(immutable.ts, 302, 41), Decl(immutable.ts, 303, 64)) +>T : Symbol(T, Decl(immutable.ts, 304, 25)) +>C : Symbol(C, Decl(immutable.ts, 308, 13)) map(mapper: (value: T, key: never, iter: this) => M, context?: any): Seq.Set; ->map : Symbol(Set.map, Decl(immutable.d.ts, 308, 80)) ->M : Symbol(M, Decl(immutable.d.ts, 309, 10)) ->mapper : Symbol(mapper, Decl(immutable.d.ts, 309, 13)) ->value : Symbol(value, Decl(immutable.d.ts, 309, 22)) ->T : Symbol(T, Decl(immutable.d.ts, 304, 25)) ->key : Symbol(key, Decl(immutable.d.ts, 309, 31)) ->iter : Symbol(iter, Decl(immutable.d.ts, 309, 43)) ->M : Symbol(M, Decl(immutable.d.ts, 309, 10)) ->context : Symbol(context, Decl(immutable.d.ts, 309, 61)) ->Seq : Symbol(Seq, Decl(immutable.d.ts, 260, 78), Decl(immutable.d.ts, 314, 3), Decl(immutable.d.ts, 315, 58), Decl(immutable.d.ts, 316, 81), Decl(immutable.d.ts, 317, 76) ... and 4 more) ->Set : Symbol(Set, Decl(immutable.d.ts, 297, 5), Decl(immutable.d.ts, 300, 5), Decl(immutable.d.ts, 301, 40), Decl(immutable.d.ts, 302, 41), Decl(immutable.d.ts, 303, 64)) ->M : Symbol(M, Decl(immutable.d.ts, 309, 10)) +>map : Symbol(Set.map, Decl(immutable.ts, 308, 80)) +>M : Symbol(M, Decl(immutable.ts, 309, 10)) +>mapper : Symbol(mapper, Decl(immutable.ts, 309, 13)) +>value : Symbol(value, Decl(immutable.ts, 309, 22)) +>T : Symbol(T, Decl(immutable.ts, 304, 25)) +>key : Symbol(key, Decl(immutable.ts, 309, 31)) +>iter : Symbol(iter, Decl(immutable.ts, 309, 43)) +>M : Symbol(M, Decl(immutable.ts, 309, 10)) +>context : Symbol(context, Decl(immutable.ts, 309, 61)) +>Seq : Symbol(Seq, Decl(immutable.ts, 260, 78), Decl(immutable.ts, 314, 3), Decl(immutable.ts, 315, 58), Decl(immutable.ts, 316, 81), Decl(immutable.ts, 317, 76) ... and 4 more) +>Set : Symbol(Set, Decl(immutable.ts, 297, 5), Decl(immutable.ts, 300, 5), Decl(immutable.ts, 301, 40), Decl(immutable.ts, 302, 41), Decl(immutable.ts, 303, 64)) +>M : Symbol(M, Decl(immutable.ts, 309, 10)) flatMap(mapper: (value: T, key: never, iter: this) => Iterable, context?: any): Seq.Set; ->flatMap : Symbol(Set.flatMap, Decl(immutable.d.ts, 309, 89)) ->M : Symbol(M, Decl(immutable.d.ts, 310, 14)) ->mapper : Symbol(mapper, Decl(immutable.d.ts, 310, 17)) ->value : Symbol(value, Decl(immutable.d.ts, 310, 26)) ->T : Symbol(T, Decl(immutable.d.ts, 304, 25)) ->key : Symbol(key, Decl(immutable.d.ts, 310, 35)) ->iter : Symbol(iter, Decl(immutable.d.ts, 310, 47)) +>flatMap : Symbol(Set.flatMap, Decl(immutable.ts, 309, 89)) +>M : Symbol(M, Decl(immutable.ts, 310, 14)) +>mapper : Symbol(mapper, Decl(immutable.ts, 310, 17)) +>value : Symbol(value, Decl(immutable.ts, 310, 26)) +>T : Symbol(T, Decl(immutable.ts, 304, 25)) +>key : Symbol(key, Decl(immutable.ts, 310, 35)) +>iter : Symbol(iter, Decl(immutable.ts, 310, 47)) >Iterable : Symbol(Iterable, Decl(lib.es2015.iterable.d.ts, --, --)) ->M : Symbol(M, Decl(immutable.d.ts, 310, 14)) ->context : Symbol(context, Decl(immutable.d.ts, 310, 75)) ->Seq : Symbol(Seq, Decl(immutable.d.ts, 260, 78), Decl(immutable.d.ts, 314, 3), Decl(immutable.d.ts, 315, 58), Decl(immutable.d.ts, 316, 81), Decl(immutable.d.ts, 317, 76) ... and 4 more) ->Set : Symbol(Set, Decl(immutable.d.ts, 297, 5), Decl(immutable.d.ts, 300, 5), Decl(immutable.d.ts, 301, 40), Decl(immutable.d.ts, 302, 41), Decl(immutable.d.ts, 303, 64)) ->M : Symbol(M, Decl(immutable.d.ts, 310, 14)) +>M : Symbol(M, Decl(immutable.ts, 310, 14)) +>context : Symbol(context, Decl(immutable.ts, 310, 75)) +>Seq : Symbol(Seq, Decl(immutable.ts, 260, 78), Decl(immutable.ts, 314, 3), Decl(immutable.ts, 315, 58), Decl(immutable.ts, 316, 81), Decl(immutable.ts, 317, 76) ... and 4 more) +>Set : Symbol(Set, Decl(immutable.ts, 297, 5), Decl(immutable.ts, 300, 5), Decl(immutable.ts, 301, 40), Decl(immutable.ts, 302, 41), Decl(immutable.ts, 303, 64)) +>M : Symbol(M, Decl(immutable.ts, 310, 14)) filter(predicate: (value: T, key: never, iter: this) => value is F, context?: any): Seq.Set; ->filter : Symbol(Set.filter, Decl(immutable.d.ts, 310, 103), Decl(immutable.d.ts, 311, 114)) ->F : Symbol(F, Decl(immutable.d.ts, 311, 13)) ->T : Symbol(T, Decl(immutable.d.ts, 304, 25)) ->predicate : Symbol(predicate, Decl(immutable.d.ts, 311, 26)) ->value : Symbol(value, Decl(immutable.d.ts, 311, 38)) ->T : Symbol(T, Decl(immutable.d.ts, 304, 25)) ->key : Symbol(key, Decl(immutable.d.ts, 311, 47)) ->iter : Symbol(iter, Decl(immutable.d.ts, 311, 59)) ->value : Symbol(value, Decl(immutable.d.ts, 311, 38)) ->F : Symbol(F, Decl(immutable.d.ts, 311, 13)) ->context : Symbol(context, Decl(immutable.d.ts, 311, 86)) ->Seq : Symbol(Seq, Decl(immutable.d.ts, 260, 78), Decl(immutable.d.ts, 314, 3), Decl(immutable.d.ts, 315, 58), Decl(immutable.d.ts, 316, 81), Decl(immutable.d.ts, 317, 76) ... and 4 more) ->Set : Symbol(Set, Decl(immutable.d.ts, 297, 5), Decl(immutable.d.ts, 300, 5), Decl(immutable.d.ts, 301, 40), Decl(immutable.d.ts, 302, 41), Decl(immutable.d.ts, 303, 64)) ->F : Symbol(F, Decl(immutable.d.ts, 311, 13)) +>filter : Symbol(Set.filter, Decl(immutable.ts, 310, 103), Decl(immutable.ts, 311, 114)) +>F : Symbol(F, Decl(immutable.ts, 311, 13)) +>T : Symbol(T, Decl(immutable.ts, 304, 25)) +>predicate : Symbol(predicate, Decl(immutable.ts, 311, 26)) +>value : Symbol(value, Decl(immutable.ts, 311, 38)) +>T : Symbol(T, Decl(immutable.ts, 304, 25)) +>key : Symbol(key, Decl(immutable.ts, 311, 47)) +>iter : Symbol(iter, Decl(immutable.ts, 311, 59)) +>value : Symbol(value, Decl(immutable.ts, 311, 38)) +>F : Symbol(F, Decl(immutable.ts, 311, 13)) +>context : Symbol(context, Decl(immutable.ts, 311, 86)) +>Seq : Symbol(Seq, Decl(immutable.ts, 260, 78), Decl(immutable.ts, 314, 3), Decl(immutable.ts, 315, 58), Decl(immutable.ts, 316, 81), Decl(immutable.ts, 317, 76) ... and 4 more) +>Set : Symbol(Set, Decl(immutable.ts, 297, 5), Decl(immutable.ts, 300, 5), Decl(immutable.ts, 301, 40), Decl(immutable.ts, 302, 41), Decl(immutable.ts, 303, 64)) +>F : Symbol(F, Decl(immutable.ts, 311, 13)) filter(predicate: (value: T, key: never, iter: this) => any, context?: any): this; ->filter : Symbol(Set.filter, Decl(immutable.d.ts, 310, 103), Decl(immutable.d.ts, 311, 114)) ->predicate : Symbol(predicate, Decl(immutable.d.ts, 312, 13)) ->value : Symbol(value, Decl(immutable.d.ts, 312, 25)) ->T : Symbol(T, Decl(immutable.d.ts, 304, 25)) ->key : Symbol(key, Decl(immutable.d.ts, 312, 34)) ->iter : Symbol(iter, Decl(immutable.d.ts, 312, 46)) ->context : Symbol(context, Decl(immutable.d.ts, 312, 66)) +>filter : Symbol(Set.filter, Decl(immutable.ts, 310, 103), Decl(immutable.ts, 311, 114)) +>predicate : Symbol(predicate, Decl(immutable.ts, 312, 13)) +>value : Symbol(value, Decl(immutable.ts, 312, 25)) +>T : Symbol(T, Decl(immutable.ts, 304, 25)) +>key : Symbol(key, Decl(immutable.ts, 312, 34)) +>iter : Symbol(iter, Decl(immutable.ts, 312, 46)) +>context : Symbol(context, Decl(immutable.ts, 312, 66)) } } export function Seq>(seq: S): S; ->Seq : Symbol(Seq, Decl(immutable.d.ts, 260, 78), Decl(immutable.d.ts, 314, 3), Decl(immutable.d.ts, 315, 58), Decl(immutable.d.ts, 316, 81), Decl(immutable.d.ts, 317, 76) ... and 4 more) ->S : Symbol(S, Decl(immutable.d.ts, 315, 22)) ->Seq : Symbol(Seq, Decl(immutable.d.ts, 260, 78), Decl(immutable.d.ts, 314, 3), Decl(immutable.d.ts, 315, 58), Decl(immutable.d.ts, 316, 81), Decl(immutable.d.ts, 317, 76) ... and 4 more) ->seq : Symbol(seq, Decl(immutable.d.ts, 315, 47)) ->S : Symbol(S, Decl(immutable.d.ts, 315, 22)) ->S : Symbol(S, Decl(immutable.d.ts, 315, 22)) +>Seq : Symbol(Seq, Decl(immutable.ts, 260, 78), Decl(immutable.ts, 314, 3), Decl(immutable.ts, 315, 58), Decl(immutable.ts, 316, 81), Decl(immutable.ts, 317, 76) ... and 4 more) +>S : Symbol(S, Decl(immutable.ts, 315, 22)) +>Seq : Symbol(Seq, Decl(immutable.ts, 260, 78), Decl(immutable.ts, 314, 3), Decl(immutable.ts, 315, 58), Decl(immutable.ts, 316, 81), Decl(immutable.ts, 317, 76) ... and 4 more) +>seq : Symbol(seq, Decl(immutable.ts, 315, 47)) +>S : Symbol(S, Decl(immutable.ts, 315, 22)) +>S : Symbol(S, Decl(immutable.ts, 315, 22)) export function Seq(collection: Collection.Keyed): Seq.Keyed; ->Seq : Symbol(Seq, Decl(immutable.d.ts, 260, 78), Decl(immutable.d.ts, 314, 3), Decl(immutable.d.ts, 315, 58), Decl(immutable.d.ts, 316, 81), Decl(immutable.d.ts, 317, 76) ... and 4 more) ->K : Symbol(K, Decl(immutable.d.ts, 316, 22)) ->V : Symbol(V, Decl(immutable.d.ts, 316, 24)) ->collection : Symbol(collection, Decl(immutable.d.ts, 316, 28)) ->Collection : Symbol(Collection, Decl(immutable.d.ts, 331, 3), Decl(immutable.d.ts, 402, 3), Decl(immutable.d.ts, 403, 79), Decl(immutable.d.ts, 404, 80), Decl(immutable.d.ts, 405, 86)) ->Keyed : Symbol(Collection.Keyed, Decl(immutable.d.ts, 336, 51), Decl(immutable.d.ts, 337, 26), Decl(immutable.d.ts, 338, 86), Decl(immutable.d.ts, 339, 83)) ->K : Symbol(K, Decl(immutable.d.ts, 316, 22)) ->V : Symbol(V, Decl(immutable.d.ts, 316, 24)) ->Seq : Symbol(Seq, Decl(immutable.d.ts, 260, 78), Decl(immutable.d.ts, 314, 3), Decl(immutable.d.ts, 315, 58), Decl(immutable.d.ts, 316, 81), Decl(immutable.d.ts, 317, 76) ... and 4 more) ->Keyed : Symbol(Seq.Keyed, Decl(immutable.d.ts, 263, 56), Decl(immutable.d.ts, 264, 26), Decl(immutable.d.ts, 265, 79), Decl(immutable.d.ts, 266, 76), Decl(immutable.d.ts, 267, 51) ... and 1 more) ->K : Symbol(K, Decl(immutable.d.ts, 316, 22)) ->V : Symbol(V, Decl(immutable.d.ts, 316, 24)) +>Seq : Symbol(Seq, Decl(immutable.ts, 260, 78), Decl(immutable.ts, 314, 3), Decl(immutable.ts, 315, 58), Decl(immutable.ts, 316, 81), Decl(immutable.ts, 317, 76) ... and 4 more) +>K : Symbol(K, Decl(immutable.ts, 316, 22)) +>V : Symbol(V, Decl(immutable.ts, 316, 24)) +>collection : Symbol(collection, Decl(immutable.ts, 316, 28)) +>Collection : Symbol(Collection, Decl(immutable.ts, 331, 3), Decl(immutable.ts, 402, 3), Decl(immutable.ts, 403, 79), Decl(immutable.ts, 404, 80), Decl(immutable.ts, 405, 86)) +>Keyed : Symbol(Collection.Keyed, Decl(immutable.ts, 336, 51), Decl(immutable.ts, 337, 26), Decl(immutable.ts, 338, 86), Decl(immutable.ts, 339, 83)) +>K : Symbol(K, Decl(immutable.ts, 316, 22)) +>V : Symbol(V, Decl(immutable.ts, 316, 24)) +>Seq : Symbol(Seq, Decl(immutable.ts, 260, 78), Decl(immutable.ts, 314, 3), Decl(immutable.ts, 315, 58), Decl(immutable.ts, 316, 81), Decl(immutable.ts, 317, 76) ... and 4 more) +>Keyed : Symbol(Seq.Keyed, Decl(immutable.ts, 263, 56), Decl(immutable.ts, 264, 26), Decl(immutable.ts, 265, 79), Decl(immutable.ts, 266, 76), Decl(immutable.ts, 267, 51) ... and 1 more) +>K : Symbol(K, Decl(immutable.ts, 316, 22)) +>V : Symbol(V, Decl(immutable.ts, 316, 24)) export function Seq(collection: Collection.Indexed): Seq.Indexed; ->Seq : Symbol(Seq, Decl(immutable.d.ts, 260, 78), Decl(immutable.d.ts, 314, 3), Decl(immutable.d.ts, 315, 58), Decl(immutable.d.ts, 316, 81), Decl(immutable.d.ts, 317, 76) ... and 4 more) ->T : Symbol(T, Decl(immutable.d.ts, 317, 22)) ->collection : Symbol(collection, Decl(immutable.d.ts, 317, 25)) ->Collection : Symbol(Collection, Decl(immutable.d.ts, 331, 3), Decl(immutable.d.ts, 402, 3), Decl(immutable.d.ts, 403, 79), Decl(immutable.d.ts, 404, 80), Decl(immutable.d.ts, 405, 86)) ->Indexed : Symbol(Collection.Indexed, Decl(immutable.d.ts, 355, 5), Decl(immutable.d.ts, 356, 28), Decl(immutable.d.ts, 357, 79)) ->T : Symbol(T, Decl(immutable.d.ts, 317, 22)) ->Seq : Symbol(Seq, Decl(immutable.d.ts, 260, 78), Decl(immutable.d.ts, 314, 3), Decl(immutable.d.ts, 315, 58), Decl(immutable.d.ts, 316, 81), Decl(immutable.d.ts, 317, 76) ... and 4 more) ->Indexed : Symbol(Seq.Indexed, Decl(immutable.d.ts, 281, 5), Decl(immutable.d.ts, 284, 5), Decl(immutable.d.ts, 285, 48), Decl(immutable.d.ts, 286, 49), Decl(immutable.d.ts, 287, 72)) ->T : Symbol(T, Decl(immutable.d.ts, 317, 22)) +>Seq : Symbol(Seq, Decl(immutable.ts, 260, 78), Decl(immutable.ts, 314, 3), Decl(immutable.ts, 315, 58), Decl(immutable.ts, 316, 81), Decl(immutable.ts, 317, 76) ... and 4 more) +>T : Symbol(T, Decl(immutable.ts, 317, 22)) +>collection : Symbol(collection, Decl(immutable.ts, 317, 25)) +>Collection : Symbol(Collection, Decl(immutable.ts, 331, 3), Decl(immutable.ts, 402, 3), Decl(immutable.ts, 403, 79), Decl(immutable.ts, 404, 80), Decl(immutable.ts, 405, 86)) +>Indexed : Symbol(Collection.Indexed, Decl(immutable.ts, 355, 5), Decl(immutable.ts, 356, 28), Decl(immutable.ts, 357, 79)) +>T : Symbol(T, Decl(immutable.ts, 317, 22)) +>Seq : Symbol(Seq, Decl(immutable.ts, 260, 78), Decl(immutable.ts, 314, 3), Decl(immutable.ts, 315, 58), Decl(immutable.ts, 316, 81), Decl(immutable.ts, 317, 76) ... and 4 more) +>Indexed : Symbol(Seq.Indexed, Decl(immutable.ts, 281, 5), Decl(immutable.ts, 284, 5), Decl(immutable.ts, 285, 48), Decl(immutable.ts, 286, 49), Decl(immutable.ts, 287, 72)) +>T : Symbol(T, Decl(immutable.ts, 317, 22)) export function Seq(collection: Collection.Set): Seq.Set; ->Seq : Symbol(Seq, Decl(immutable.d.ts, 260, 78), Decl(immutable.d.ts, 314, 3), Decl(immutable.d.ts, 315, 58), Decl(immutable.d.ts, 316, 81), Decl(immutable.d.ts, 317, 76) ... and 4 more) ->T : Symbol(T, Decl(immutable.d.ts, 318, 22)) ->collection : Symbol(collection, Decl(immutable.d.ts, 318, 25)) ->Collection : Symbol(Collection, Decl(immutable.d.ts, 331, 3), Decl(immutable.d.ts, 402, 3), Decl(immutable.d.ts, 403, 79), Decl(immutable.d.ts, 404, 80), Decl(immutable.d.ts, 405, 86)) ->Set : Symbol(Collection.Set, Decl(immutable.d.ts, 387, 5), Decl(immutable.d.ts, 388, 24), Decl(immutable.d.ts, 389, 71)) ->T : Symbol(T, Decl(immutable.d.ts, 318, 22)) ->Seq : Symbol(Seq, Decl(immutable.d.ts, 260, 78), Decl(immutable.d.ts, 314, 3), Decl(immutable.d.ts, 315, 58), Decl(immutable.d.ts, 316, 81), Decl(immutable.d.ts, 317, 76) ... and 4 more) ->Set : Symbol(Seq.Set, Decl(immutable.d.ts, 297, 5), Decl(immutable.d.ts, 300, 5), Decl(immutable.d.ts, 301, 40), Decl(immutable.d.ts, 302, 41), Decl(immutable.d.ts, 303, 64)) ->T : Symbol(T, Decl(immutable.d.ts, 318, 22)) +>Seq : Symbol(Seq, Decl(immutable.ts, 260, 78), Decl(immutable.ts, 314, 3), Decl(immutable.ts, 315, 58), Decl(immutable.ts, 316, 81), Decl(immutable.ts, 317, 76) ... and 4 more) +>T : Symbol(T, Decl(immutable.ts, 318, 22)) +>collection : Symbol(collection, Decl(immutable.ts, 318, 25)) +>Collection : Symbol(Collection, Decl(immutable.ts, 331, 3), Decl(immutable.ts, 402, 3), Decl(immutable.ts, 403, 79), Decl(immutable.ts, 404, 80), Decl(immutable.ts, 405, 86)) +>Set : Symbol(Collection.Set, Decl(immutable.ts, 387, 5), Decl(immutable.ts, 388, 24), Decl(immutable.ts, 389, 71)) +>T : Symbol(T, Decl(immutable.ts, 318, 22)) +>Seq : Symbol(Seq, Decl(immutable.ts, 260, 78), Decl(immutable.ts, 314, 3), Decl(immutable.ts, 315, 58), Decl(immutable.ts, 316, 81), Decl(immutable.ts, 317, 76) ... and 4 more) +>Set : Symbol(Seq.Set, Decl(immutable.ts, 297, 5), Decl(immutable.ts, 300, 5), Decl(immutable.ts, 301, 40), Decl(immutable.ts, 302, 41), Decl(immutable.ts, 303, 64)) +>T : Symbol(T, Decl(immutable.ts, 318, 22)) export function Seq(collection: Iterable): Seq.Indexed; ->Seq : Symbol(Seq, Decl(immutable.d.ts, 260, 78), Decl(immutable.d.ts, 314, 3), Decl(immutable.d.ts, 315, 58), Decl(immutable.d.ts, 316, 81), Decl(immutable.d.ts, 317, 76) ... and 4 more) ->T : Symbol(T, Decl(immutable.d.ts, 319, 22)) ->collection : Symbol(collection, Decl(immutable.d.ts, 319, 25)) +>Seq : Symbol(Seq, Decl(immutable.ts, 260, 78), Decl(immutable.ts, 314, 3), Decl(immutable.ts, 315, 58), Decl(immutable.ts, 316, 81), Decl(immutable.ts, 317, 76) ... and 4 more) +>T : Symbol(T, Decl(immutable.ts, 319, 22)) +>collection : Symbol(collection, Decl(immutable.ts, 319, 25)) >Iterable : Symbol(Iterable, Decl(lib.es2015.iterable.d.ts, --, --)) ->T : Symbol(T, Decl(immutable.d.ts, 319, 22)) ->Seq : Symbol(Seq, Decl(immutable.d.ts, 260, 78), Decl(immutable.d.ts, 314, 3), Decl(immutable.d.ts, 315, 58), Decl(immutable.d.ts, 316, 81), Decl(immutable.d.ts, 317, 76) ... and 4 more) ->Indexed : Symbol(Seq.Indexed, Decl(immutable.d.ts, 281, 5), Decl(immutable.d.ts, 284, 5), Decl(immutable.d.ts, 285, 48), Decl(immutable.d.ts, 286, 49), Decl(immutable.d.ts, 287, 72)) ->T : Symbol(T, Decl(immutable.d.ts, 319, 22)) +>T : Symbol(T, Decl(immutable.ts, 319, 22)) +>Seq : Symbol(Seq, Decl(immutable.ts, 260, 78), Decl(immutable.ts, 314, 3), Decl(immutable.ts, 315, 58), Decl(immutable.ts, 316, 81), Decl(immutable.ts, 317, 76) ... and 4 more) +>Indexed : Symbol(Seq.Indexed, Decl(immutable.ts, 281, 5), Decl(immutable.ts, 284, 5), Decl(immutable.ts, 285, 48), Decl(immutable.ts, 286, 49), Decl(immutable.ts, 287, 72)) +>T : Symbol(T, Decl(immutable.ts, 319, 22)) export function Seq(obj: {[key: string]: V}): Seq.Keyed; ->Seq : Symbol(Seq, Decl(immutable.d.ts, 260, 78), Decl(immutable.d.ts, 314, 3), Decl(immutable.d.ts, 315, 58), Decl(immutable.d.ts, 316, 81), Decl(immutable.d.ts, 317, 76) ... and 4 more) ->V : Symbol(V, Decl(immutable.d.ts, 320, 22)) ->obj : Symbol(obj, Decl(immutable.d.ts, 320, 25)) ->key : Symbol(key, Decl(immutable.d.ts, 320, 32)) ->V : Symbol(V, Decl(immutable.d.ts, 320, 22)) ->Seq : Symbol(Seq, Decl(immutable.d.ts, 260, 78), Decl(immutable.d.ts, 314, 3), Decl(immutable.d.ts, 315, 58), Decl(immutable.d.ts, 316, 81), Decl(immutable.d.ts, 317, 76) ... and 4 more) ->Keyed : Symbol(Seq.Keyed, Decl(immutable.d.ts, 263, 56), Decl(immutable.d.ts, 264, 26), Decl(immutable.d.ts, 265, 79), Decl(immutable.d.ts, 266, 76), Decl(immutable.d.ts, 267, 51) ... and 1 more) ->V : Symbol(V, Decl(immutable.d.ts, 320, 22)) +>Seq : Symbol(Seq, Decl(immutable.ts, 260, 78), Decl(immutable.ts, 314, 3), Decl(immutable.ts, 315, 58), Decl(immutable.ts, 316, 81), Decl(immutable.ts, 317, 76) ... and 4 more) +>V : Symbol(V, Decl(immutable.ts, 320, 22)) +>obj : Symbol(obj, Decl(immutable.ts, 320, 25)) +>key : Symbol(key, Decl(immutable.ts, 320, 32)) +>V : Symbol(V, Decl(immutable.ts, 320, 22)) +>Seq : Symbol(Seq, Decl(immutable.ts, 260, 78), Decl(immutable.ts, 314, 3), Decl(immutable.ts, 315, 58), Decl(immutable.ts, 316, 81), Decl(immutable.ts, 317, 76) ... and 4 more) +>Keyed : Symbol(Seq.Keyed, Decl(immutable.ts, 263, 56), Decl(immutable.ts, 264, 26), Decl(immutable.ts, 265, 79), Decl(immutable.ts, 266, 76), Decl(immutable.ts, 267, 51) ... and 1 more) +>V : Symbol(V, Decl(immutable.ts, 320, 22)) export function Seq(): Seq; ->Seq : Symbol(Seq, Decl(immutable.d.ts, 260, 78), Decl(immutable.d.ts, 314, 3), Decl(immutable.d.ts, 315, 58), Decl(immutable.d.ts, 316, 81), Decl(immutable.d.ts, 317, 76) ... and 4 more) ->Seq : Symbol(Seq, Decl(immutable.d.ts, 260, 78), Decl(immutable.d.ts, 314, 3), Decl(immutable.d.ts, 315, 58), Decl(immutable.d.ts, 316, 81), Decl(immutable.d.ts, 317, 76) ... and 4 more) +>Seq : Symbol(Seq, Decl(immutable.ts, 260, 78), Decl(immutable.ts, 314, 3), Decl(immutable.ts, 315, 58), Decl(immutable.ts, 316, 81), Decl(immutable.ts, 317, 76) ... and 4 more) +>Seq : Symbol(Seq, Decl(immutable.ts, 260, 78), Decl(immutable.ts, 314, 3), Decl(immutable.ts, 315, 58), Decl(immutable.ts, 316, 81), Decl(immutable.ts, 317, 76) ... and 4 more) export interface Seq extends Collection { ->Seq : Symbol(Seq, Decl(immutable.d.ts, 260, 78), Decl(immutable.d.ts, 314, 3), Decl(immutable.d.ts, 315, 58), Decl(immutable.d.ts, 316, 81), Decl(immutable.d.ts, 317, 76) ... and 4 more) ->K : Symbol(K, Decl(immutable.d.ts, 322, 23)) ->V : Symbol(V, Decl(immutable.d.ts, 322, 25)) ->Collection : Symbol(Collection, Decl(immutable.d.ts, 331, 3), Decl(immutable.d.ts, 402, 3), Decl(immutable.d.ts, 403, 79), Decl(immutable.d.ts, 404, 80), Decl(immutable.d.ts, 405, 86)) ->K : Symbol(K, Decl(immutable.d.ts, 322, 23)) ->V : Symbol(V, Decl(immutable.d.ts, 322, 25)) +>Seq : Symbol(Seq, Decl(immutable.ts, 260, 78), Decl(immutable.ts, 314, 3), Decl(immutable.ts, 315, 58), Decl(immutable.ts, 316, 81), Decl(immutable.ts, 317, 76) ... and 4 more) +>K : Symbol(K, Decl(immutable.ts, 322, 23)) +>V : Symbol(V, Decl(immutable.ts, 322, 25)) +>Collection : Symbol(Collection, Decl(immutable.ts, 331, 3), Decl(immutable.ts, 402, 3), Decl(immutable.ts, 403, 79), Decl(immutable.ts, 404, 80), Decl(immutable.ts, 405, 86)) +>K : Symbol(K, Decl(immutable.ts, 322, 23)) +>V : Symbol(V, Decl(immutable.ts, 322, 25)) readonly size: number | undefined; ->size : Symbol(Seq.size, Decl(immutable.d.ts, 322, 55)) +>size : Symbol(Seq.size, Decl(immutable.ts, 322, 55)) // Force evaluation cacheResult(): this; ->cacheResult : Symbol(Seq.cacheResult, Decl(immutable.d.ts, 323, 38)) +>cacheResult : Symbol(Seq.cacheResult, Decl(immutable.ts, 323, 38)) // Sequence algorithms map(mapper: (value: V, key: K, iter: this) => M, context?: any): Seq; ->map : Symbol(Seq.map, Decl(immutable.d.ts, 325, 24)) ->M : Symbol(M, Decl(immutable.d.ts, 327, 8)) ->mapper : Symbol(mapper, Decl(immutable.d.ts, 327, 11)) ->value : Symbol(value, Decl(immutable.d.ts, 327, 20)) ->V : Symbol(V, Decl(immutable.d.ts, 322, 25)) ->key : Symbol(key, Decl(immutable.d.ts, 327, 29)) ->K : Symbol(K, Decl(immutable.d.ts, 322, 23)) ->iter : Symbol(iter, Decl(immutable.d.ts, 327, 37)) ->M : Symbol(M, Decl(immutable.d.ts, 327, 8)) ->context : Symbol(context, Decl(immutable.d.ts, 327, 55)) ->Seq : Symbol(Seq, Decl(immutable.d.ts, 260, 78), Decl(immutable.d.ts, 314, 3), Decl(immutable.d.ts, 315, 58), Decl(immutable.d.ts, 316, 81), Decl(immutable.d.ts, 317, 76) ... and 4 more) ->K : Symbol(K, Decl(immutable.d.ts, 322, 23)) ->M : Symbol(M, Decl(immutable.d.ts, 327, 8)) +>map : Symbol(Seq.map, Decl(immutable.ts, 325, 24)) +>M : Symbol(M, Decl(immutable.ts, 327, 8)) +>mapper : Symbol(mapper, Decl(immutable.ts, 327, 11)) +>value : Symbol(value, Decl(immutable.ts, 327, 20)) +>V : Symbol(V, Decl(immutable.ts, 322, 25)) +>key : Symbol(key, Decl(immutable.ts, 327, 29)) +>K : Symbol(K, Decl(immutable.ts, 322, 23)) +>iter : Symbol(iter, Decl(immutable.ts, 327, 37)) +>M : Symbol(M, Decl(immutable.ts, 327, 8)) +>context : Symbol(context, Decl(immutable.ts, 327, 55)) +>Seq : Symbol(Seq, Decl(immutable.ts, 260, 78), Decl(immutable.ts, 314, 3), Decl(immutable.ts, 315, 58), Decl(immutable.ts, 316, 81), Decl(immutable.ts, 317, 76) ... and 4 more) +>K : Symbol(K, Decl(immutable.ts, 322, 23)) +>M : Symbol(M, Decl(immutable.ts, 327, 8)) flatMap(mapper: (value: V, key: K, iter: this) => Iterable, context?: any): Seq; ->flatMap : Symbol(Seq.flatMap, Decl(immutable.d.ts, 327, 82)) ->M : Symbol(M, Decl(immutable.d.ts, 328, 12)) ->mapper : Symbol(mapper, Decl(immutable.d.ts, 328, 15)) ->value : Symbol(value, Decl(immutable.d.ts, 328, 24)) ->V : Symbol(V, Decl(immutable.d.ts, 322, 25)) ->key : Symbol(key, Decl(immutable.d.ts, 328, 33)) ->K : Symbol(K, Decl(immutable.d.ts, 322, 23)) ->iter : Symbol(iter, Decl(immutable.d.ts, 328, 41)) +>flatMap : Symbol(Seq.flatMap, Decl(immutable.ts, 327, 82)) +>M : Symbol(M, Decl(immutable.ts, 328, 12)) +>mapper : Symbol(mapper, Decl(immutable.ts, 328, 15)) +>value : Symbol(value, Decl(immutable.ts, 328, 24)) +>V : Symbol(V, Decl(immutable.ts, 322, 25)) +>key : Symbol(key, Decl(immutable.ts, 328, 33)) +>K : Symbol(K, Decl(immutable.ts, 322, 23)) +>iter : Symbol(iter, Decl(immutable.ts, 328, 41)) >Iterable : Symbol(Iterable, Decl(lib.es2015.iterable.d.ts, --, --)) ->M : Symbol(M, Decl(immutable.d.ts, 328, 12)) ->context : Symbol(context, Decl(immutable.d.ts, 328, 69)) ->Seq : Symbol(Seq, Decl(immutable.d.ts, 260, 78), Decl(immutable.d.ts, 314, 3), Decl(immutable.d.ts, 315, 58), Decl(immutable.d.ts, 316, 81), Decl(immutable.d.ts, 317, 76) ... and 4 more) ->K : Symbol(K, Decl(immutable.d.ts, 322, 23)) ->M : Symbol(M, Decl(immutable.d.ts, 328, 12)) +>M : Symbol(M, Decl(immutable.ts, 328, 12)) +>context : Symbol(context, Decl(immutable.ts, 328, 69)) +>Seq : Symbol(Seq, Decl(immutable.ts, 260, 78), Decl(immutable.ts, 314, 3), Decl(immutable.ts, 315, 58), Decl(immutable.ts, 316, 81), Decl(immutable.ts, 317, 76) ... and 4 more) +>K : Symbol(K, Decl(immutable.ts, 322, 23)) +>M : Symbol(M, Decl(immutable.ts, 328, 12)) filter(predicate: (value: V, key: K, iter: this) => value is F, context?: any): Seq; ->filter : Symbol(Seq.filter, Decl(immutable.d.ts, 328, 96), Decl(immutable.d.ts, 329, 107)) ->F : Symbol(F, Decl(immutable.d.ts, 329, 11)) ->V : Symbol(V, Decl(immutable.d.ts, 322, 25)) ->predicate : Symbol(predicate, Decl(immutable.d.ts, 329, 24)) ->value : Symbol(value, Decl(immutable.d.ts, 329, 36)) ->V : Symbol(V, Decl(immutable.d.ts, 322, 25)) ->key : Symbol(key, Decl(immutable.d.ts, 329, 45)) ->K : Symbol(K, Decl(immutable.d.ts, 322, 23)) ->iter : Symbol(iter, Decl(immutable.d.ts, 329, 53)) ->value : Symbol(value, Decl(immutable.d.ts, 329, 36)) ->F : Symbol(F, Decl(immutable.d.ts, 329, 11)) ->context : Symbol(context, Decl(immutable.d.ts, 329, 80)) ->Seq : Symbol(Seq, Decl(immutable.d.ts, 260, 78), Decl(immutable.d.ts, 314, 3), Decl(immutable.d.ts, 315, 58), Decl(immutable.d.ts, 316, 81), Decl(immutable.d.ts, 317, 76) ... and 4 more) ->K : Symbol(K, Decl(immutable.d.ts, 322, 23)) ->F : Symbol(F, Decl(immutable.d.ts, 329, 11)) +>filter : Symbol(Seq.filter, Decl(immutable.ts, 328, 96), Decl(immutable.ts, 329, 107)) +>F : Symbol(F, Decl(immutable.ts, 329, 11)) +>V : Symbol(V, Decl(immutable.ts, 322, 25)) +>predicate : Symbol(predicate, Decl(immutable.ts, 329, 24)) +>value : Symbol(value, Decl(immutable.ts, 329, 36)) +>V : Symbol(V, Decl(immutable.ts, 322, 25)) +>key : Symbol(key, Decl(immutable.ts, 329, 45)) +>K : Symbol(K, Decl(immutable.ts, 322, 23)) +>iter : Symbol(iter, Decl(immutable.ts, 329, 53)) +>value : Symbol(value, Decl(immutable.ts, 329, 36)) +>F : Symbol(F, Decl(immutable.ts, 329, 11)) +>context : Symbol(context, Decl(immutable.ts, 329, 80)) +>Seq : Symbol(Seq, Decl(immutable.ts, 260, 78), Decl(immutable.ts, 314, 3), Decl(immutable.ts, 315, 58), Decl(immutable.ts, 316, 81), Decl(immutable.ts, 317, 76) ... and 4 more) +>K : Symbol(K, Decl(immutable.ts, 322, 23)) +>F : Symbol(F, Decl(immutable.ts, 329, 11)) filter(predicate: (value: V, key: K, iter: this) => any, context?: any): this; ->filter : Symbol(Seq.filter, Decl(immutable.d.ts, 328, 96), Decl(immutable.d.ts, 329, 107)) ->predicate : Symbol(predicate, Decl(immutable.d.ts, 330, 11)) ->value : Symbol(value, Decl(immutable.d.ts, 330, 23)) ->V : Symbol(V, Decl(immutable.d.ts, 322, 25)) ->key : Symbol(key, Decl(immutable.d.ts, 330, 32)) ->K : Symbol(K, Decl(immutable.d.ts, 322, 23)) ->iter : Symbol(iter, Decl(immutable.d.ts, 330, 40)) ->context : Symbol(context, Decl(immutable.d.ts, 330, 60)) +>filter : Symbol(Seq.filter, Decl(immutable.ts, 328, 96), Decl(immutable.ts, 329, 107)) +>predicate : Symbol(predicate, Decl(immutable.ts, 330, 11)) +>value : Symbol(value, Decl(immutable.ts, 330, 23)) +>V : Symbol(V, Decl(immutable.ts, 322, 25)) +>key : Symbol(key, Decl(immutable.ts, 330, 32)) +>K : Symbol(K, Decl(immutable.ts, 322, 23)) +>iter : Symbol(iter, Decl(immutable.ts, 330, 40)) +>context : Symbol(context, Decl(immutable.ts, 330, 60)) } export module Collection { ->Collection : Symbol(Collection, Decl(immutable.d.ts, 331, 3), Decl(immutable.d.ts, 402, 3), Decl(immutable.d.ts, 403, 79), Decl(immutable.d.ts, 404, 80), Decl(immutable.d.ts, 405, 86)) +>Collection : Symbol(Collection, Decl(immutable.ts, 331, 3), Decl(immutable.ts, 402, 3), Decl(immutable.ts, 403, 79), Decl(immutable.ts, 404, 80), Decl(immutable.ts, 405, 86)) function isKeyed(maybeKeyed: any): maybeKeyed is Collection.Keyed; ->isKeyed : Symbol(isKeyed, Decl(immutable.d.ts, 332, 28)) ->maybeKeyed : Symbol(maybeKeyed, Decl(immutable.d.ts, 333, 21)) ->maybeKeyed : Symbol(maybeKeyed, Decl(immutable.d.ts, 333, 21)) ->Collection : Symbol(Collection, Decl(immutable.d.ts, 331, 3), Decl(immutable.d.ts, 402, 3), Decl(immutable.d.ts, 403, 79), Decl(immutable.d.ts, 404, 80), Decl(immutable.d.ts, 405, 86)) ->Keyed : Symbol(Keyed, Decl(immutable.d.ts, 336, 51), Decl(immutable.d.ts, 337, 26), Decl(immutable.d.ts, 338, 86), Decl(immutable.d.ts, 339, 83)) +>isKeyed : Symbol(isKeyed, Decl(immutable.ts, 332, 28)) +>maybeKeyed : Symbol(maybeKeyed, Decl(immutable.ts, 333, 21)) +>maybeKeyed : Symbol(maybeKeyed, Decl(immutable.ts, 333, 21)) +>Collection : Symbol(Collection, Decl(immutable.ts, 331, 3), Decl(immutable.ts, 402, 3), Decl(immutable.ts, 403, 79), Decl(immutable.ts, 404, 80), Decl(immutable.ts, 405, 86)) +>Keyed : Symbol(Keyed, Decl(immutable.ts, 336, 51), Decl(immutable.ts, 337, 26), Decl(immutable.ts, 338, 86), Decl(immutable.ts, 339, 83)) function isIndexed(maybeIndexed: any): maybeIndexed is Collection.Indexed; ->isIndexed : Symbol(isIndexed, Decl(immutable.d.ts, 333, 80)) ->maybeIndexed : Symbol(maybeIndexed, Decl(immutable.d.ts, 334, 23)) ->maybeIndexed : Symbol(maybeIndexed, Decl(immutable.d.ts, 334, 23)) ->Collection : Symbol(Collection, Decl(immutable.d.ts, 331, 3), Decl(immutable.d.ts, 402, 3), Decl(immutable.d.ts, 403, 79), Decl(immutable.d.ts, 404, 80), Decl(immutable.d.ts, 405, 86)) ->Indexed : Symbol(Indexed, Decl(immutable.d.ts, 355, 5), Decl(immutable.d.ts, 356, 28), Decl(immutable.d.ts, 357, 79)) +>isIndexed : Symbol(isIndexed, Decl(immutable.ts, 333, 80)) +>maybeIndexed : Symbol(maybeIndexed, Decl(immutable.ts, 334, 23)) +>maybeIndexed : Symbol(maybeIndexed, Decl(immutable.ts, 334, 23)) +>Collection : Symbol(Collection, Decl(immutable.ts, 331, 3), Decl(immutable.ts, 402, 3), Decl(immutable.ts, 403, 79), Decl(immutable.ts, 404, 80), Decl(immutable.ts, 405, 86)) +>Indexed : Symbol(Indexed, Decl(immutable.ts, 355, 5), Decl(immutable.ts, 356, 28), Decl(immutable.ts, 357, 79)) function isAssociative(maybeAssociative: any): maybeAssociative is Collection.Keyed | Collection.Indexed; ->isAssociative : Symbol(isAssociative, Decl(immutable.d.ts, 334, 83)) ->maybeAssociative : Symbol(maybeAssociative, Decl(immutable.d.ts, 335, 27)) ->maybeAssociative : Symbol(maybeAssociative, Decl(immutable.d.ts, 335, 27)) ->Collection : Symbol(Collection, Decl(immutable.d.ts, 331, 3), Decl(immutable.d.ts, 402, 3), Decl(immutable.d.ts, 403, 79), Decl(immutable.d.ts, 404, 80), Decl(immutable.d.ts, 405, 86)) ->Keyed : Symbol(Keyed, Decl(immutable.d.ts, 336, 51), Decl(immutable.d.ts, 337, 26), Decl(immutable.d.ts, 338, 86), Decl(immutable.d.ts, 339, 83)) ->Collection : Symbol(Collection, Decl(immutable.d.ts, 331, 3), Decl(immutable.d.ts, 402, 3), Decl(immutable.d.ts, 403, 79), Decl(immutable.d.ts, 404, 80), Decl(immutable.d.ts, 405, 86)) ->Indexed : Symbol(Indexed, Decl(immutable.d.ts, 355, 5), Decl(immutable.d.ts, 356, 28), Decl(immutable.d.ts, 357, 79)) +>isAssociative : Symbol(isAssociative, Decl(immutable.ts, 334, 83)) +>maybeAssociative : Symbol(maybeAssociative, Decl(immutable.ts, 335, 27)) +>maybeAssociative : Symbol(maybeAssociative, Decl(immutable.ts, 335, 27)) +>Collection : Symbol(Collection, Decl(immutable.ts, 331, 3), Decl(immutable.ts, 402, 3), Decl(immutable.ts, 403, 79), Decl(immutable.ts, 404, 80), Decl(immutable.ts, 405, 86)) +>Keyed : Symbol(Keyed, Decl(immutable.ts, 336, 51), Decl(immutable.ts, 337, 26), Decl(immutable.ts, 338, 86), Decl(immutable.ts, 339, 83)) +>Collection : Symbol(Collection, Decl(immutable.ts, 331, 3), Decl(immutable.ts, 402, 3), Decl(immutable.ts, 403, 79), Decl(immutable.ts, 404, 80), Decl(immutable.ts, 405, 86)) +>Indexed : Symbol(Indexed, Decl(immutable.ts, 355, 5), Decl(immutable.ts, 356, 28), Decl(immutable.ts, 357, 79)) function isOrdered(maybeOrdered: any): boolean; ->isOrdered : Symbol(isOrdered, Decl(immutable.d.ts, 335, 124)) ->maybeOrdered : Symbol(maybeOrdered, Decl(immutable.d.ts, 336, 23)) +>isOrdered : Symbol(isOrdered, Decl(immutable.ts, 335, 124)) +>maybeOrdered : Symbol(maybeOrdered, Decl(immutable.ts, 336, 23)) export module Keyed {} ->Keyed : Symbol(Keyed, Decl(immutable.d.ts, 336, 51), Decl(immutable.d.ts, 337, 26), Decl(immutable.d.ts, 338, 86), Decl(immutable.d.ts, 339, 83)) +>Keyed : Symbol(Keyed, Decl(immutable.ts, 336, 51), Decl(immutable.ts, 337, 26), Decl(immutable.ts, 338, 86), Decl(immutable.ts, 339, 83)) export function Keyed(collection: Iterable<[K, V]>): Collection.Keyed; ->Keyed : Symbol(Keyed, Decl(immutable.d.ts, 336, 51), Decl(immutable.d.ts, 337, 26), Decl(immutable.d.ts, 338, 86), Decl(immutable.d.ts, 339, 83)) ->K : Symbol(K, Decl(immutable.d.ts, 338, 26)) ->V : Symbol(V, Decl(immutable.d.ts, 338, 28)) ->collection : Symbol(collection, Decl(immutable.d.ts, 338, 32)) +>Keyed : Symbol(Keyed, Decl(immutable.ts, 336, 51), Decl(immutable.ts, 337, 26), Decl(immutable.ts, 338, 86), Decl(immutable.ts, 339, 83)) +>K : Symbol(K, Decl(immutable.ts, 338, 26)) +>V : Symbol(V, Decl(immutable.ts, 338, 28)) +>collection : Symbol(collection, Decl(immutable.ts, 338, 32)) >Iterable : Symbol(Iterable, Decl(lib.es2015.iterable.d.ts, --, --)) ->K : Symbol(K, Decl(immutable.d.ts, 338, 26)) ->V : Symbol(V, Decl(immutable.d.ts, 338, 28)) ->Collection : Symbol(Collection, Decl(immutable.d.ts, 331, 3), Decl(immutable.d.ts, 402, 3), Decl(immutable.d.ts, 403, 79), Decl(immutable.d.ts, 404, 80), Decl(immutable.d.ts, 405, 86)) ->Keyed : Symbol(Keyed, Decl(immutable.d.ts, 336, 51), Decl(immutable.d.ts, 337, 26), Decl(immutable.d.ts, 338, 86), Decl(immutable.d.ts, 339, 83)) ->K : Symbol(K, Decl(immutable.d.ts, 338, 26)) ->V : Symbol(V, Decl(immutable.d.ts, 338, 28)) +>K : Symbol(K, Decl(immutable.ts, 338, 26)) +>V : Symbol(V, Decl(immutable.ts, 338, 28)) +>Collection : Symbol(Collection, Decl(immutable.ts, 331, 3), Decl(immutable.ts, 402, 3), Decl(immutable.ts, 403, 79), Decl(immutable.ts, 404, 80), Decl(immutable.ts, 405, 86)) +>Keyed : Symbol(Keyed, Decl(immutable.ts, 336, 51), Decl(immutable.ts, 337, 26), Decl(immutable.ts, 338, 86), Decl(immutable.ts, 339, 83)) +>K : Symbol(K, Decl(immutable.ts, 338, 26)) +>V : Symbol(V, Decl(immutable.ts, 338, 28)) export function Keyed(obj: {[key: string]: V}): Collection.Keyed; ->Keyed : Symbol(Keyed, Decl(immutable.d.ts, 336, 51), Decl(immutable.d.ts, 337, 26), Decl(immutable.d.ts, 338, 86), Decl(immutable.d.ts, 339, 83)) ->V : Symbol(V, Decl(immutable.d.ts, 339, 26)) ->obj : Symbol(obj, Decl(immutable.d.ts, 339, 29)) ->key : Symbol(key, Decl(immutable.d.ts, 339, 36)) ->V : Symbol(V, Decl(immutable.d.ts, 339, 26)) ->Collection : Symbol(Collection, Decl(immutable.d.ts, 331, 3), Decl(immutable.d.ts, 402, 3), Decl(immutable.d.ts, 403, 79), Decl(immutable.d.ts, 404, 80), Decl(immutable.d.ts, 405, 86)) ->Keyed : Symbol(Keyed, Decl(immutable.d.ts, 336, 51), Decl(immutable.d.ts, 337, 26), Decl(immutable.d.ts, 338, 86), Decl(immutable.d.ts, 339, 83)) ->V : Symbol(V, Decl(immutable.d.ts, 339, 26)) +>Keyed : Symbol(Keyed, Decl(immutable.ts, 336, 51), Decl(immutable.ts, 337, 26), Decl(immutable.ts, 338, 86), Decl(immutable.ts, 339, 83)) +>V : Symbol(V, Decl(immutable.ts, 339, 26)) +>obj : Symbol(obj, Decl(immutable.ts, 339, 29)) +>key : Symbol(key, Decl(immutable.ts, 339, 36)) +>V : Symbol(V, Decl(immutable.ts, 339, 26)) +>Collection : Symbol(Collection, Decl(immutable.ts, 331, 3), Decl(immutable.ts, 402, 3), Decl(immutable.ts, 403, 79), Decl(immutable.ts, 404, 80), Decl(immutable.ts, 405, 86)) +>Keyed : Symbol(Keyed, Decl(immutable.ts, 336, 51), Decl(immutable.ts, 337, 26), Decl(immutable.ts, 338, 86), Decl(immutable.ts, 339, 83)) +>V : Symbol(V, Decl(immutable.ts, 339, 26)) export interface Keyed extends Collection { ->Keyed : Symbol(Keyed, Decl(immutable.d.ts, 336, 51), Decl(immutable.d.ts, 337, 26), Decl(immutable.d.ts, 338, 86), Decl(immutable.d.ts, 339, 83)) ->K : Symbol(K, Decl(immutable.d.ts, 340, 27)) ->V : Symbol(V, Decl(immutable.d.ts, 340, 29)) ->Collection : Symbol(Collection, Decl(immutable.d.ts, 331, 3), Decl(immutable.d.ts, 402, 3), Decl(immutable.d.ts, 403, 79), Decl(immutable.d.ts, 404, 80), Decl(immutable.d.ts, 405, 86)) ->K : Symbol(K, Decl(immutable.d.ts, 340, 27)) ->V : Symbol(V, Decl(immutable.d.ts, 340, 29)) +>Keyed : Symbol(Keyed, Decl(immutable.ts, 336, 51), Decl(immutable.ts, 337, 26), Decl(immutable.ts, 338, 86), Decl(immutable.ts, 339, 83)) +>K : Symbol(K, Decl(immutable.ts, 340, 27)) +>V : Symbol(V, Decl(immutable.ts, 340, 29)) +>Collection : Symbol(Collection, Decl(immutable.ts, 331, 3), Decl(immutable.ts, 402, 3), Decl(immutable.ts, 403, 79), Decl(immutable.ts, 404, 80), Decl(immutable.ts, 405, 86)) +>K : Symbol(K, Decl(immutable.ts, 340, 27)) +>V : Symbol(V, Decl(immutable.ts, 340, 29)) toJS(): Object; ->toJS : Symbol(Keyed.toJS, Decl(immutable.d.ts, 340, 59)) +>toJS : Symbol(Keyed.toJS, Decl(immutable.ts, 340, 59)) >Object : Symbol(Object, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) toJSON(): { [key: string]: V }; ->toJSON : Symbol(Keyed.toJSON, Decl(immutable.d.ts, 341, 21)) ->key : Symbol(key, Decl(immutable.d.ts, 342, 19)) ->V : Symbol(V, Decl(immutable.d.ts, 340, 29)) +>toJSON : Symbol(Keyed.toJSON, Decl(immutable.ts, 341, 21)) +>key : Symbol(key, Decl(immutable.ts, 342, 19)) +>V : Symbol(V, Decl(immutable.ts, 340, 29)) toSeq(): Seq.Keyed; ->toSeq : Symbol(Keyed.toSeq, Decl(immutable.d.ts, 342, 37)) ->Seq : Symbol(Seq, Decl(immutable.d.ts, 260, 78), Decl(immutable.d.ts, 314, 3), Decl(immutable.d.ts, 315, 58), Decl(immutable.d.ts, 316, 81), Decl(immutable.d.ts, 317, 76) ... and 4 more) ->Keyed : Symbol(Seq.Keyed, Decl(immutable.d.ts, 263, 56), Decl(immutable.d.ts, 264, 26), Decl(immutable.d.ts, 265, 79), Decl(immutable.d.ts, 266, 76), Decl(immutable.d.ts, 267, 51) ... and 1 more) ->K : Symbol(K, Decl(immutable.d.ts, 340, 27)) ->V : Symbol(V, Decl(immutable.d.ts, 340, 29)) +>toSeq : Symbol(Keyed.toSeq, Decl(immutable.ts, 342, 37)) +>Seq : Symbol(Seq, Decl(immutable.ts, 260, 78), Decl(immutable.ts, 314, 3), Decl(immutable.ts, 315, 58), Decl(immutable.ts, 316, 81), Decl(immutable.ts, 317, 76) ... and 4 more) +>Keyed : Symbol(Seq.Keyed, Decl(immutable.ts, 263, 56), Decl(immutable.ts, 264, 26), Decl(immutable.ts, 265, 79), Decl(immutable.ts, 266, 76), Decl(immutable.ts, 267, 51) ... and 1 more) +>K : Symbol(K, Decl(immutable.ts, 340, 27)) +>V : Symbol(V, Decl(immutable.ts, 340, 29)) // Sequence functions flip(): this; ->flip : Symbol(Keyed.flip, Decl(immutable.d.ts, 343, 31)) +>flip : Symbol(Keyed.flip, Decl(immutable.ts, 343, 31)) concat(...collections: Array>): Collection.Keyed; ->concat : Symbol(Keyed.concat, Decl(immutable.d.ts, 345, 19), Decl(immutable.d.ts, 346, 98)) ->KC : Symbol(KC, Decl(immutable.d.ts, 346, 13)) ->VC : Symbol(VC, Decl(immutable.d.ts, 346, 16)) ->collections : Symbol(collections, Decl(immutable.d.ts, 346, 21)) +>concat : Symbol(Keyed.concat, Decl(immutable.ts, 345, 19), Decl(immutable.ts, 346, 98)) +>KC : Symbol(KC, Decl(immutable.ts, 346, 13)) +>VC : Symbol(VC, Decl(immutable.ts, 346, 16)) +>collections : Symbol(collections, Decl(immutable.ts, 346, 21)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) >Iterable : Symbol(Iterable, Decl(lib.es2015.iterable.d.ts, --, --)) ->KC : Symbol(KC, Decl(immutable.d.ts, 346, 13)) ->VC : Symbol(VC, Decl(immutable.d.ts, 346, 16)) ->Collection : Symbol(Collection, Decl(immutable.d.ts, 331, 3), Decl(immutable.d.ts, 402, 3), Decl(immutable.d.ts, 403, 79), Decl(immutable.d.ts, 404, 80), Decl(immutable.d.ts, 405, 86)) ->Keyed : Symbol(Keyed, Decl(immutable.d.ts, 336, 51), Decl(immutable.d.ts, 337, 26), Decl(immutable.d.ts, 338, 86), Decl(immutable.d.ts, 339, 83)) ->K : Symbol(K, Decl(immutable.d.ts, 340, 27)) ->KC : Symbol(KC, Decl(immutable.d.ts, 346, 13)) ->V : Symbol(V, Decl(immutable.d.ts, 340, 29)) ->VC : Symbol(VC, Decl(immutable.d.ts, 346, 16)) +>KC : Symbol(KC, Decl(immutable.ts, 346, 13)) +>VC : Symbol(VC, Decl(immutable.ts, 346, 16)) +>Collection : Symbol(Collection, Decl(immutable.ts, 331, 3), Decl(immutable.ts, 402, 3), Decl(immutable.ts, 403, 79), Decl(immutable.ts, 404, 80), Decl(immutable.ts, 405, 86)) +>Keyed : Symbol(Keyed, Decl(immutable.ts, 336, 51), Decl(immutable.ts, 337, 26), Decl(immutable.ts, 338, 86), Decl(immutable.ts, 339, 83)) +>K : Symbol(K, Decl(immutable.ts, 340, 27)) +>KC : Symbol(KC, Decl(immutable.ts, 346, 13)) +>V : Symbol(V, Decl(immutable.ts, 340, 29)) +>VC : Symbol(VC, Decl(immutable.ts, 346, 16)) concat(...collections: Array<{[key: string]: C}>): Collection.Keyed; ->concat : Symbol(Keyed.concat, Decl(immutable.d.ts, 345, 19), Decl(immutable.d.ts, 346, 98)) ->C : Symbol(C, Decl(immutable.d.ts, 347, 13)) ->collections : Symbol(collections, Decl(immutable.d.ts, 347, 16)) +>concat : Symbol(Keyed.concat, Decl(immutable.ts, 345, 19), Decl(immutable.ts, 346, 98)) +>C : Symbol(C, Decl(immutable.ts, 347, 13)) +>collections : Symbol(collections, Decl(immutable.ts, 347, 16)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) ->key : Symbol(key, Decl(immutable.d.ts, 347, 40)) ->C : Symbol(C, Decl(immutable.d.ts, 347, 13)) ->Collection : Symbol(Collection, Decl(immutable.d.ts, 331, 3), Decl(immutable.d.ts, 402, 3), Decl(immutable.d.ts, 403, 79), Decl(immutable.d.ts, 404, 80), Decl(immutable.d.ts, 405, 86)) ->Keyed : Symbol(Keyed, Decl(immutable.d.ts, 336, 51), Decl(immutable.d.ts, 337, 26), Decl(immutable.d.ts, 338, 86), Decl(immutable.d.ts, 339, 83)) ->K : Symbol(K, Decl(immutable.d.ts, 340, 27)) ->V : Symbol(V, Decl(immutable.d.ts, 340, 29)) ->C : Symbol(C, Decl(immutable.d.ts, 347, 13)) +>key : Symbol(key, Decl(immutable.ts, 347, 40)) +>C : Symbol(C, Decl(immutable.ts, 347, 13)) +>Collection : Symbol(Collection, Decl(immutable.ts, 331, 3), Decl(immutable.ts, 402, 3), Decl(immutable.ts, 403, 79), Decl(immutable.ts, 404, 80), Decl(immutable.ts, 405, 86)) +>Keyed : Symbol(Keyed, Decl(immutable.ts, 336, 51), Decl(immutable.ts, 337, 26), Decl(immutable.ts, 338, 86), Decl(immutable.ts, 339, 83)) +>K : Symbol(K, Decl(immutable.ts, 340, 27)) +>V : Symbol(V, Decl(immutable.ts, 340, 29)) +>C : Symbol(C, Decl(immutable.ts, 347, 13)) map(mapper: (value: V, key: K, iter: this) => M, context?: any): Collection.Keyed; ->map : Symbol(Keyed.map, Decl(immutable.d.ts, 347, 96)) ->M : Symbol(M, Decl(immutable.d.ts, 348, 10)) ->mapper : Symbol(mapper, Decl(immutable.d.ts, 348, 13)) ->value : Symbol(value, Decl(immutable.d.ts, 348, 22)) ->V : Symbol(V, Decl(immutable.d.ts, 340, 29)) ->key : Symbol(key, Decl(immutable.d.ts, 348, 31)) ->K : Symbol(K, Decl(immutable.d.ts, 340, 27)) ->iter : Symbol(iter, Decl(immutable.d.ts, 348, 39)) ->M : Symbol(M, Decl(immutable.d.ts, 348, 10)) ->context : Symbol(context, Decl(immutable.d.ts, 348, 57)) ->Collection : Symbol(Collection, Decl(immutable.d.ts, 331, 3), Decl(immutable.d.ts, 402, 3), Decl(immutable.d.ts, 403, 79), Decl(immutable.d.ts, 404, 80), Decl(immutable.d.ts, 405, 86)) ->Keyed : Symbol(Keyed, Decl(immutable.d.ts, 336, 51), Decl(immutable.d.ts, 337, 26), Decl(immutable.d.ts, 338, 86), Decl(immutable.d.ts, 339, 83)) ->K : Symbol(K, Decl(immutable.d.ts, 340, 27)) ->M : Symbol(M, Decl(immutable.d.ts, 348, 10)) +>map : Symbol(Keyed.map, Decl(immutable.ts, 347, 96)) +>M : Symbol(M, Decl(immutable.ts, 348, 10)) +>mapper : Symbol(mapper, Decl(immutable.ts, 348, 13)) +>value : Symbol(value, Decl(immutable.ts, 348, 22)) +>V : Symbol(V, Decl(immutable.ts, 340, 29)) +>key : Symbol(key, Decl(immutable.ts, 348, 31)) +>K : Symbol(K, Decl(immutable.ts, 340, 27)) +>iter : Symbol(iter, Decl(immutable.ts, 348, 39)) +>M : Symbol(M, Decl(immutable.ts, 348, 10)) +>context : Symbol(context, Decl(immutable.ts, 348, 57)) +>Collection : Symbol(Collection, Decl(immutable.ts, 331, 3), Decl(immutable.ts, 402, 3), Decl(immutable.ts, 403, 79), Decl(immutable.ts, 404, 80), Decl(immutable.ts, 405, 86)) +>Keyed : Symbol(Keyed, Decl(immutable.ts, 336, 51), Decl(immutable.ts, 337, 26), Decl(immutable.ts, 338, 86), Decl(immutable.ts, 339, 83)) +>K : Symbol(K, Decl(immutable.ts, 340, 27)) +>M : Symbol(M, Decl(immutable.ts, 348, 10)) mapKeys(mapper: (key: K, value: V, iter: this) => M, context?: any): Collection.Keyed; ->mapKeys : Symbol(Keyed.mapKeys, Decl(immutable.d.ts, 348, 97)) ->M : Symbol(M, Decl(immutable.d.ts, 349, 14)) ->mapper : Symbol(mapper, Decl(immutable.d.ts, 349, 17)) ->key : Symbol(key, Decl(immutable.d.ts, 349, 26)) ->K : Symbol(K, Decl(immutable.d.ts, 340, 27)) ->value : Symbol(value, Decl(immutable.d.ts, 349, 33)) ->V : Symbol(V, Decl(immutable.d.ts, 340, 29)) ->iter : Symbol(iter, Decl(immutable.d.ts, 349, 43)) ->M : Symbol(M, Decl(immutable.d.ts, 349, 14)) ->context : Symbol(context, Decl(immutable.d.ts, 349, 61)) ->Collection : Symbol(Collection, Decl(immutable.d.ts, 331, 3), Decl(immutable.d.ts, 402, 3), Decl(immutable.d.ts, 403, 79), Decl(immutable.d.ts, 404, 80), Decl(immutable.d.ts, 405, 86)) ->Keyed : Symbol(Keyed, Decl(immutable.d.ts, 336, 51), Decl(immutable.d.ts, 337, 26), Decl(immutable.d.ts, 338, 86), Decl(immutable.d.ts, 339, 83)) ->M : Symbol(M, Decl(immutable.d.ts, 349, 14)) ->V : Symbol(V, Decl(immutable.d.ts, 340, 29)) +>mapKeys : Symbol(Keyed.mapKeys, Decl(immutable.ts, 348, 97)) +>M : Symbol(M, Decl(immutable.ts, 349, 14)) +>mapper : Symbol(mapper, Decl(immutable.ts, 349, 17)) +>key : Symbol(key, Decl(immutable.ts, 349, 26)) +>K : Symbol(K, Decl(immutable.ts, 340, 27)) +>value : Symbol(value, Decl(immutable.ts, 349, 33)) +>V : Symbol(V, Decl(immutable.ts, 340, 29)) +>iter : Symbol(iter, Decl(immutable.ts, 349, 43)) +>M : Symbol(M, Decl(immutable.ts, 349, 14)) +>context : Symbol(context, Decl(immutable.ts, 349, 61)) +>Collection : Symbol(Collection, Decl(immutable.ts, 331, 3), Decl(immutable.ts, 402, 3), Decl(immutable.ts, 403, 79), Decl(immutable.ts, 404, 80), Decl(immutable.ts, 405, 86)) +>Keyed : Symbol(Keyed, Decl(immutable.ts, 336, 51), Decl(immutable.ts, 337, 26), Decl(immutable.ts, 338, 86), Decl(immutable.ts, 339, 83)) +>M : Symbol(M, Decl(immutable.ts, 349, 14)) +>V : Symbol(V, Decl(immutable.ts, 340, 29)) mapEntries(mapper: (entry: [K, V], index: number, iter: this) => [KM, VM], context?: any): Collection.Keyed; ->mapEntries : Symbol(Keyed.mapEntries, Decl(immutable.d.ts, 349, 101)) ->KM : Symbol(KM, Decl(immutable.d.ts, 350, 17)) ->VM : Symbol(VM, Decl(immutable.d.ts, 350, 20)) ->mapper : Symbol(mapper, Decl(immutable.d.ts, 350, 25)) ->entry : Symbol(entry, Decl(immutable.d.ts, 350, 34)) ->K : Symbol(K, Decl(immutable.d.ts, 340, 27)) ->V : Symbol(V, Decl(immutable.d.ts, 340, 29)) ->index : Symbol(index, Decl(immutable.d.ts, 350, 48)) ->iter : Symbol(iter, Decl(immutable.d.ts, 350, 63)) ->KM : Symbol(KM, Decl(immutable.d.ts, 350, 17)) ->VM : Symbol(VM, Decl(immutable.d.ts, 350, 20)) ->context : Symbol(context, Decl(immutable.d.ts, 350, 88)) ->Collection : Symbol(Collection, Decl(immutable.d.ts, 331, 3), Decl(immutable.d.ts, 402, 3), Decl(immutable.d.ts, 403, 79), Decl(immutable.d.ts, 404, 80), Decl(immutable.d.ts, 405, 86)) ->Keyed : Symbol(Keyed, Decl(immutable.d.ts, 336, 51), Decl(immutable.d.ts, 337, 26), Decl(immutable.d.ts, 338, 86), Decl(immutable.d.ts, 339, 83)) ->KM : Symbol(KM, Decl(immutable.d.ts, 350, 17)) ->VM : Symbol(VM, Decl(immutable.d.ts, 350, 20)) +>mapEntries : Symbol(Keyed.mapEntries, Decl(immutable.ts, 349, 101)) +>KM : Symbol(KM, Decl(immutable.ts, 350, 17)) +>VM : Symbol(VM, Decl(immutable.ts, 350, 20)) +>mapper : Symbol(mapper, Decl(immutable.ts, 350, 25)) +>entry : Symbol(entry, Decl(immutable.ts, 350, 34)) +>K : Symbol(K, Decl(immutable.ts, 340, 27)) +>V : Symbol(V, Decl(immutable.ts, 340, 29)) +>index : Symbol(index, Decl(immutable.ts, 350, 48)) +>iter : Symbol(iter, Decl(immutable.ts, 350, 63)) +>KM : Symbol(KM, Decl(immutable.ts, 350, 17)) +>VM : Symbol(VM, Decl(immutable.ts, 350, 20)) +>context : Symbol(context, Decl(immutable.ts, 350, 88)) +>Collection : Symbol(Collection, Decl(immutable.ts, 331, 3), Decl(immutable.ts, 402, 3), Decl(immutable.ts, 403, 79), Decl(immutable.ts, 404, 80), Decl(immutable.ts, 405, 86)) +>Keyed : Symbol(Keyed, Decl(immutable.ts, 336, 51), Decl(immutable.ts, 337, 26), Decl(immutable.ts, 338, 86), Decl(immutable.ts, 339, 83)) +>KM : Symbol(KM, Decl(immutable.ts, 350, 17)) +>VM : Symbol(VM, Decl(immutable.ts, 350, 20)) flatMap(mapper: (value: V, key: K, iter: this) => Iterable, context?: any): Collection.Keyed; ->flatMap : Symbol(Keyed.flatMap, Decl(immutable.d.ts, 350, 130)) ->M : Symbol(M, Decl(immutable.d.ts, 351, 14)) ->mapper : Symbol(mapper, Decl(immutable.d.ts, 351, 17)) ->value : Symbol(value, Decl(immutable.d.ts, 351, 26)) ->V : Symbol(V, Decl(immutable.d.ts, 340, 29)) ->key : Symbol(key, Decl(immutable.d.ts, 351, 35)) ->K : Symbol(K, Decl(immutable.d.ts, 340, 27)) ->iter : Symbol(iter, Decl(immutable.d.ts, 351, 43)) +>flatMap : Symbol(Keyed.flatMap, Decl(immutable.ts, 350, 130)) +>M : Symbol(M, Decl(immutable.ts, 351, 14)) +>mapper : Symbol(mapper, Decl(immutable.ts, 351, 17)) +>value : Symbol(value, Decl(immutable.ts, 351, 26)) +>V : Symbol(V, Decl(immutable.ts, 340, 29)) +>key : Symbol(key, Decl(immutable.ts, 351, 35)) +>K : Symbol(K, Decl(immutable.ts, 340, 27)) +>iter : Symbol(iter, Decl(immutable.ts, 351, 43)) >Iterable : Symbol(Iterable, Decl(lib.es2015.iterable.d.ts, --, --)) ->M : Symbol(M, Decl(immutable.d.ts, 351, 14)) ->context : Symbol(context, Decl(immutable.d.ts, 351, 71)) ->Collection : Symbol(Collection, Decl(immutable.d.ts, 331, 3), Decl(immutable.d.ts, 402, 3), Decl(immutable.d.ts, 403, 79), Decl(immutable.d.ts, 404, 80), Decl(immutable.d.ts, 405, 86)) ->Keyed : Symbol(Keyed, Decl(immutable.d.ts, 336, 51), Decl(immutable.d.ts, 337, 26), Decl(immutable.d.ts, 338, 86), Decl(immutable.d.ts, 339, 83)) +>M : Symbol(M, Decl(immutable.ts, 351, 14)) +>context : Symbol(context, Decl(immutable.ts, 351, 71)) +>Collection : Symbol(Collection, Decl(immutable.ts, 331, 3), Decl(immutable.ts, 402, 3), Decl(immutable.ts, 403, 79), Decl(immutable.ts, 404, 80), Decl(immutable.ts, 405, 86)) +>Keyed : Symbol(Keyed, Decl(immutable.ts, 336, 51), Decl(immutable.ts, 337, 26), Decl(immutable.ts, 338, 86), Decl(immutable.ts, 339, 83)) filter(predicate: (value: V, key: K, iter: this) => value is F, context?: any): Collection.Keyed; ->filter : Symbol(Keyed.filter, Decl(immutable.d.ts, 351, 115), Decl(immutable.d.ts, 352, 122)) ->F : Symbol(F, Decl(immutable.d.ts, 352, 13)) ->V : Symbol(V, Decl(immutable.d.ts, 340, 29)) ->predicate : Symbol(predicate, Decl(immutable.d.ts, 352, 26)) ->value : Symbol(value, Decl(immutable.d.ts, 352, 38)) ->V : Symbol(V, Decl(immutable.d.ts, 340, 29)) ->key : Symbol(key, Decl(immutable.d.ts, 352, 47)) ->K : Symbol(K, Decl(immutable.d.ts, 340, 27)) ->iter : Symbol(iter, Decl(immutable.d.ts, 352, 55)) ->value : Symbol(value, Decl(immutable.d.ts, 352, 38)) ->F : Symbol(F, Decl(immutable.d.ts, 352, 13)) ->context : Symbol(context, Decl(immutable.d.ts, 352, 82)) ->Collection : Symbol(Collection, Decl(immutable.d.ts, 331, 3), Decl(immutable.d.ts, 402, 3), Decl(immutable.d.ts, 403, 79), Decl(immutable.d.ts, 404, 80), Decl(immutable.d.ts, 405, 86)) ->Keyed : Symbol(Keyed, Decl(immutable.d.ts, 336, 51), Decl(immutable.d.ts, 337, 26), Decl(immutable.d.ts, 338, 86), Decl(immutable.d.ts, 339, 83)) ->K : Symbol(K, Decl(immutable.d.ts, 340, 27)) ->F : Symbol(F, Decl(immutable.d.ts, 352, 13)) +>filter : Symbol(Keyed.filter, Decl(immutable.ts, 351, 115), Decl(immutable.ts, 352, 122)) +>F : Symbol(F, Decl(immutable.ts, 352, 13)) +>V : Symbol(V, Decl(immutable.ts, 340, 29)) +>predicate : Symbol(predicate, Decl(immutable.ts, 352, 26)) +>value : Symbol(value, Decl(immutable.ts, 352, 38)) +>V : Symbol(V, Decl(immutable.ts, 340, 29)) +>key : Symbol(key, Decl(immutable.ts, 352, 47)) +>K : Symbol(K, Decl(immutable.ts, 340, 27)) +>iter : Symbol(iter, Decl(immutable.ts, 352, 55)) +>value : Symbol(value, Decl(immutable.ts, 352, 38)) +>F : Symbol(F, Decl(immutable.ts, 352, 13)) +>context : Symbol(context, Decl(immutable.ts, 352, 82)) +>Collection : Symbol(Collection, Decl(immutable.ts, 331, 3), Decl(immutable.ts, 402, 3), Decl(immutable.ts, 403, 79), Decl(immutable.ts, 404, 80), Decl(immutable.ts, 405, 86)) +>Keyed : Symbol(Keyed, Decl(immutable.ts, 336, 51), Decl(immutable.ts, 337, 26), Decl(immutable.ts, 338, 86), Decl(immutable.ts, 339, 83)) +>K : Symbol(K, Decl(immutable.ts, 340, 27)) +>F : Symbol(F, Decl(immutable.ts, 352, 13)) filter(predicate: (value: V, key: K, iter: this) => any, context?: any): this; ->filter : Symbol(Keyed.filter, Decl(immutable.d.ts, 351, 115), Decl(immutable.d.ts, 352, 122)) ->predicate : Symbol(predicate, Decl(immutable.d.ts, 353, 13)) ->value : Symbol(value, Decl(immutable.d.ts, 353, 25)) ->V : Symbol(V, Decl(immutable.d.ts, 340, 29)) ->key : Symbol(key, Decl(immutable.d.ts, 353, 34)) ->K : Symbol(K, Decl(immutable.d.ts, 340, 27)) ->iter : Symbol(iter, Decl(immutable.d.ts, 353, 42)) ->context : Symbol(context, Decl(immutable.d.ts, 353, 62)) +>filter : Symbol(Keyed.filter, Decl(immutable.ts, 351, 115), Decl(immutable.ts, 352, 122)) +>predicate : Symbol(predicate, Decl(immutable.ts, 353, 13)) +>value : Symbol(value, Decl(immutable.ts, 353, 25)) +>V : Symbol(V, Decl(immutable.ts, 340, 29)) +>key : Symbol(key, Decl(immutable.ts, 353, 34)) +>K : Symbol(K, Decl(immutable.ts, 340, 27)) +>iter : Symbol(iter, Decl(immutable.ts, 353, 42)) +>context : Symbol(context, Decl(immutable.ts, 353, 62)) [Symbol.iterator](): IterableIterator<[K, V]>; >Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.es2015.iterable.d.ts, --, --)) >Symbol : Symbol(Symbol, Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.symbol.d.ts, --, --), Decl(lib.es2015.symbol.d.ts, --, --)) >iterator : Symbol(SymbolConstructor.iterator, Decl(lib.es2015.iterable.d.ts, --, --)) >IterableIterator : Symbol(IterableIterator, Decl(lib.es2015.iterable.d.ts, --, --)) ->K : Symbol(K, Decl(immutable.d.ts, 340, 27)) ->V : Symbol(V, Decl(immutable.d.ts, 340, 29)) +>K : Symbol(K, Decl(immutable.ts, 340, 27)) +>V : Symbol(V, Decl(immutable.ts, 340, 29)) } export module Indexed {} ->Indexed : Symbol(Indexed, Decl(immutable.d.ts, 355, 5), Decl(immutable.d.ts, 356, 28), Decl(immutable.d.ts, 357, 79)) +>Indexed : Symbol(Indexed, Decl(immutable.ts, 355, 5), Decl(immutable.ts, 356, 28), Decl(immutable.ts, 357, 79)) export function Indexed(collection: Iterable): Collection.Indexed; ->Indexed : Symbol(Indexed, Decl(immutable.d.ts, 355, 5), Decl(immutable.d.ts, 356, 28), Decl(immutable.d.ts, 357, 79)) ->T : Symbol(T, Decl(immutable.d.ts, 357, 28)) ->collection : Symbol(collection, Decl(immutable.d.ts, 357, 31)) +>Indexed : Symbol(Indexed, Decl(immutable.ts, 355, 5), Decl(immutable.ts, 356, 28), Decl(immutable.ts, 357, 79)) +>T : Symbol(T, Decl(immutable.ts, 357, 28)) +>collection : Symbol(collection, Decl(immutable.ts, 357, 31)) >Iterable : Symbol(Iterable, Decl(lib.es2015.iterable.d.ts, --, --)) ->T : Symbol(T, Decl(immutable.d.ts, 357, 28)) ->Collection : Symbol(Collection, Decl(immutable.d.ts, 331, 3), Decl(immutable.d.ts, 402, 3), Decl(immutable.d.ts, 403, 79), Decl(immutable.d.ts, 404, 80), Decl(immutable.d.ts, 405, 86)) ->Indexed : Symbol(Indexed, Decl(immutable.d.ts, 355, 5), Decl(immutable.d.ts, 356, 28), Decl(immutable.d.ts, 357, 79)) ->T : Symbol(T, Decl(immutable.d.ts, 357, 28)) +>T : Symbol(T, Decl(immutable.ts, 357, 28)) +>Collection : Symbol(Collection, Decl(immutable.ts, 331, 3), Decl(immutable.ts, 402, 3), Decl(immutable.ts, 403, 79), Decl(immutable.ts, 404, 80), Decl(immutable.ts, 405, 86)) +>Indexed : Symbol(Indexed, Decl(immutable.ts, 355, 5), Decl(immutable.ts, 356, 28), Decl(immutable.ts, 357, 79)) +>T : Symbol(T, Decl(immutable.ts, 357, 28)) export interface Indexed extends Collection { ->Indexed : Symbol(Indexed, Decl(immutable.d.ts, 355, 5), Decl(immutable.d.ts, 356, 28), Decl(immutable.d.ts, 357, 79)) ->T : Symbol(T, Decl(immutable.d.ts, 358, 29)) ->Collection : Symbol(Collection, Decl(immutable.d.ts, 331, 3), Decl(immutable.d.ts, 402, 3), Decl(immutable.d.ts, 403, 79), Decl(immutable.d.ts, 404, 80), Decl(immutable.d.ts, 405, 86)) ->T : Symbol(T, Decl(immutable.d.ts, 358, 29)) +>Indexed : Symbol(Indexed, Decl(immutable.ts, 355, 5), Decl(immutable.ts, 356, 28), Decl(immutable.ts, 357, 79)) +>T : Symbol(T, Decl(immutable.ts, 358, 29)) +>Collection : Symbol(Collection, Decl(immutable.ts, 331, 3), Decl(immutable.ts, 402, 3), Decl(immutable.ts, 403, 79), Decl(immutable.ts, 404, 80), Decl(immutable.ts, 405, 86)) +>T : Symbol(T, Decl(immutable.ts, 358, 29)) toJS(): Array; ->toJS : Symbol(Indexed.toJS, Decl(immutable.d.ts, 358, 63)) +>toJS : Symbol(Indexed.toJS, Decl(immutable.ts, 358, 63)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) toJSON(): Array; ->toJSON : Symbol(Indexed.toJSON, Decl(immutable.d.ts, 359, 25)) +>toJSON : Symbol(Indexed.toJSON, Decl(immutable.ts, 359, 25)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) ->T : Symbol(T, Decl(immutable.d.ts, 358, 29)) +>T : Symbol(T, Decl(immutable.ts, 358, 29)) // Reading values get(index: number, notSetValue: NSV): T | NSV; ->get : Symbol(Indexed.get, Decl(immutable.d.ts, 360, 25), Decl(immutable.d.ts, 362, 57)) ->NSV : Symbol(NSV, Decl(immutable.d.ts, 362, 10)) ->index : Symbol(index, Decl(immutable.d.ts, 362, 15)) ->notSetValue : Symbol(notSetValue, Decl(immutable.d.ts, 362, 29)) ->NSV : Symbol(NSV, Decl(immutable.d.ts, 362, 10)) ->T : Symbol(T, Decl(immutable.d.ts, 358, 29)) ->NSV : Symbol(NSV, Decl(immutable.d.ts, 362, 10)) +>get : Symbol(Indexed.get, Decl(immutable.ts, 360, 25), Decl(immutable.ts, 362, 57)) +>NSV : Symbol(NSV, Decl(immutable.ts, 362, 10)) +>index : Symbol(index, Decl(immutable.ts, 362, 15)) +>notSetValue : Symbol(notSetValue, Decl(immutable.ts, 362, 29)) +>NSV : Symbol(NSV, Decl(immutable.ts, 362, 10)) +>T : Symbol(T, Decl(immutable.ts, 358, 29)) +>NSV : Symbol(NSV, Decl(immutable.ts, 362, 10)) get(index: number): T | undefined; ->get : Symbol(Indexed.get, Decl(immutable.d.ts, 360, 25), Decl(immutable.d.ts, 362, 57)) ->index : Symbol(index, Decl(immutable.d.ts, 363, 10)) ->T : Symbol(T, Decl(immutable.d.ts, 358, 29)) +>get : Symbol(Indexed.get, Decl(immutable.ts, 360, 25), Decl(immutable.ts, 362, 57)) +>index : Symbol(index, Decl(immutable.ts, 363, 10)) +>T : Symbol(T, Decl(immutable.ts, 358, 29)) // Conversion to Seq toSeq(): Seq.Indexed; ->toSeq : Symbol(Indexed.toSeq, Decl(immutable.d.ts, 363, 40)) ->Seq : Symbol(Seq, Decl(immutable.d.ts, 260, 78), Decl(immutable.d.ts, 314, 3), Decl(immutable.d.ts, 315, 58), Decl(immutable.d.ts, 316, 81), Decl(immutable.d.ts, 317, 76) ... and 4 more) ->Indexed : Symbol(Seq.Indexed, Decl(immutable.d.ts, 281, 5), Decl(immutable.d.ts, 284, 5), Decl(immutable.d.ts, 285, 48), Decl(immutable.d.ts, 286, 49), Decl(immutable.d.ts, 287, 72)) ->T : Symbol(T, Decl(immutable.d.ts, 358, 29)) +>toSeq : Symbol(Indexed.toSeq, Decl(immutable.ts, 363, 40)) +>Seq : Symbol(Seq, Decl(immutable.ts, 260, 78), Decl(immutable.ts, 314, 3), Decl(immutable.ts, 315, 58), Decl(immutable.ts, 316, 81), Decl(immutable.ts, 317, 76) ... and 4 more) +>Indexed : Symbol(Seq.Indexed, Decl(immutable.ts, 281, 5), Decl(immutable.ts, 284, 5), Decl(immutable.ts, 285, 48), Decl(immutable.ts, 286, 49), Decl(immutable.ts, 287, 72)) +>T : Symbol(T, Decl(immutable.ts, 358, 29)) fromEntrySeq(): Seq.Keyed; ->fromEntrySeq : Symbol(Indexed.fromEntrySeq, Decl(immutable.d.ts, 365, 30)) ->Seq : Symbol(Seq, Decl(immutable.d.ts, 260, 78), Decl(immutable.d.ts, 314, 3), Decl(immutable.d.ts, 315, 58), Decl(immutable.d.ts, 316, 81), Decl(immutable.d.ts, 317, 76) ... and 4 more) ->Keyed : Symbol(Seq.Keyed, Decl(immutable.d.ts, 263, 56), Decl(immutable.d.ts, 264, 26), Decl(immutable.d.ts, 265, 79), Decl(immutable.d.ts, 266, 76), Decl(immutable.d.ts, 267, 51) ... and 1 more) +>fromEntrySeq : Symbol(Indexed.fromEntrySeq, Decl(immutable.ts, 365, 30)) +>Seq : Symbol(Seq, Decl(immutable.ts, 260, 78), Decl(immutable.ts, 314, 3), Decl(immutable.ts, 315, 58), Decl(immutable.ts, 316, 81), Decl(immutable.ts, 317, 76) ... and 4 more) +>Keyed : Symbol(Seq.Keyed, Decl(immutable.ts, 263, 56), Decl(immutable.ts, 264, 26), Decl(immutable.ts, 265, 79), Decl(immutable.ts, 266, 76), Decl(immutable.ts, 267, 51) ... and 1 more) // Combination interpose(separator: T): this; ->interpose : Symbol(Indexed.interpose, Decl(immutable.d.ts, 366, 42)) ->separator : Symbol(separator, Decl(immutable.d.ts, 368, 16)) ->T : Symbol(T, Decl(immutable.d.ts, 358, 29)) +>interpose : Symbol(Indexed.interpose, Decl(immutable.ts, 366, 42)) +>separator : Symbol(separator, Decl(immutable.ts, 368, 16)) +>T : Symbol(T, Decl(immutable.ts, 358, 29)) interleave(...collections: Array>): this; ->interleave : Symbol(Indexed.interleave, Decl(immutable.d.ts, 368, 36)) ->collections : Symbol(collections, Decl(immutable.d.ts, 369, 17)) +>interleave : Symbol(Indexed.interleave, Decl(immutable.ts, 368, 36)) +>collections : Symbol(collections, Decl(immutable.ts, 369, 17)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) ->Collection : Symbol(Collection, Decl(immutable.d.ts, 331, 3), Decl(immutable.d.ts, 402, 3), Decl(immutable.d.ts, 403, 79), Decl(immutable.d.ts, 404, 80), Decl(immutable.d.ts, 405, 86)) ->T : Symbol(T, Decl(immutable.d.ts, 358, 29)) +>Collection : Symbol(Collection, Decl(immutable.ts, 331, 3), Decl(immutable.ts, 402, 3), Decl(immutable.ts, 403, 79), Decl(immutable.ts, 404, 80), Decl(immutable.ts, 405, 86)) +>T : Symbol(T, Decl(immutable.ts, 358, 29)) splice(index: number, removeNum: number, ...values: Array): this; ->splice : Symbol(Indexed.splice, Decl(immutable.d.ts, 369, 66)) ->index : Symbol(index, Decl(immutable.d.ts, 370, 13)) ->removeNum : Symbol(removeNum, Decl(immutable.d.ts, 370, 27)) ->values : Symbol(values, Decl(immutable.d.ts, 370, 46)) +>splice : Symbol(Indexed.splice, Decl(immutable.ts, 369, 66)) +>index : Symbol(index, Decl(immutable.ts, 370, 13)) +>removeNum : Symbol(removeNum, Decl(immutable.ts, 370, 27)) +>values : Symbol(values, Decl(immutable.ts, 370, 46)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) ->T : Symbol(T, Decl(immutable.d.ts, 358, 29)) +>T : Symbol(T, Decl(immutable.ts, 358, 29)) zip(...collections: Array>): Collection.Indexed; ->zip : Symbol(Indexed.zip, Decl(immutable.d.ts, 370, 74)) ->collections : Symbol(collections, Decl(immutable.d.ts, 371, 10)) +>zip : Symbol(Indexed.zip, Decl(immutable.ts, 370, 74)) +>collections : Symbol(collections, Decl(immutable.ts, 371, 10)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) ->Collection : Symbol(Collection, Decl(immutable.d.ts, 331, 3), Decl(immutable.d.ts, 402, 3), Decl(immutable.d.ts, 403, 79), Decl(immutable.d.ts, 404, 80), Decl(immutable.d.ts, 405, 86)) ->Collection : Symbol(Collection, Decl(immutable.d.ts, 331, 3), Decl(immutable.d.ts, 402, 3), Decl(immutable.d.ts, 403, 79), Decl(immutable.d.ts, 404, 80), Decl(immutable.d.ts, 405, 86)) ->Indexed : Symbol(Indexed, Decl(immutable.d.ts, 355, 5), Decl(immutable.d.ts, 356, 28), Decl(immutable.d.ts, 357, 79)) +>Collection : Symbol(Collection, Decl(immutable.ts, 331, 3), Decl(immutable.ts, 402, 3), Decl(immutable.ts, 403, 79), Decl(immutable.ts, 404, 80), Decl(immutable.ts, 405, 86)) +>Collection : Symbol(Collection, Decl(immutable.ts, 331, 3), Decl(immutable.ts, 402, 3), Decl(immutable.ts, 403, 79), Decl(immutable.ts, 404, 80), Decl(immutable.ts, 405, 86)) +>Indexed : Symbol(Indexed, Decl(immutable.ts, 355, 5), Decl(immutable.ts, 356, 28), Decl(immutable.ts, 357, 79)) zipWith(zipper: (value: T, otherValue: U) => Z, otherCollection: Collection): Collection.Indexed; ->zipWith : Symbol(Indexed.zipWith, Decl(immutable.d.ts, 371, 80), Decl(immutable.d.ts, 372, 120), Decl(immutable.d.ts, 373, 175)) ->U : Symbol(U, Decl(immutable.d.ts, 372, 14)) ->Z : Symbol(Z, Decl(immutable.d.ts, 372, 16)) ->zipper : Symbol(zipper, Decl(immutable.d.ts, 372, 20)) ->value : Symbol(value, Decl(immutable.d.ts, 372, 29)) ->T : Symbol(T, Decl(immutable.d.ts, 358, 29)) ->otherValue : Symbol(otherValue, Decl(immutable.d.ts, 372, 38)) ->U : Symbol(U, Decl(immutable.d.ts, 372, 14)) ->Z : Symbol(Z, Decl(immutable.d.ts, 372, 16)) ->otherCollection : Symbol(otherCollection, Decl(immutable.d.ts, 372, 59)) ->Collection : Symbol(Collection, Decl(immutable.d.ts, 331, 3), Decl(immutable.d.ts, 402, 3), Decl(immutable.d.ts, 403, 79), Decl(immutable.d.ts, 404, 80), Decl(immutable.d.ts, 405, 86)) ->U : Symbol(U, Decl(immutable.d.ts, 372, 14)) ->Collection : Symbol(Collection, Decl(immutable.d.ts, 331, 3), Decl(immutable.d.ts, 402, 3), Decl(immutable.d.ts, 403, 79), Decl(immutable.d.ts, 404, 80), Decl(immutable.d.ts, 405, 86)) ->Indexed : Symbol(Indexed, Decl(immutable.d.ts, 355, 5), Decl(immutable.d.ts, 356, 28), Decl(immutable.d.ts, 357, 79)) ->Z : Symbol(Z, Decl(immutable.d.ts, 372, 16)) +>zipWith : Symbol(Indexed.zipWith, Decl(immutable.ts, 371, 80), Decl(immutable.ts, 372, 120), Decl(immutable.ts, 373, 175)) +>U : Symbol(U, Decl(immutable.ts, 372, 14)) +>Z : Symbol(Z, Decl(immutable.ts, 372, 16)) +>zipper : Symbol(zipper, Decl(immutable.ts, 372, 20)) +>value : Symbol(value, Decl(immutable.ts, 372, 29)) +>T : Symbol(T, Decl(immutable.ts, 358, 29)) +>otherValue : Symbol(otherValue, Decl(immutable.ts, 372, 38)) +>U : Symbol(U, Decl(immutable.ts, 372, 14)) +>Z : Symbol(Z, Decl(immutable.ts, 372, 16)) +>otherCollection : Symbol(otherCollection, Decl(immutable.ts, 372, 59)) +>Collection : Symbol(Collection, Decl(immutable.ts, 331, 3), Decl(immutable.ts, 402, 3), Decl(immutable.ts, 403, 79), Decl(immutable.ts, 404, 80), Decl(immutable.ts, 405, 86)) +>U : Symbol(U, Decl(immutable.ts, 372, 14)) +>Collection : Symbol(Collection, Decl(immutable.ts, 331, 3), Decl(immutable.ts, 402, 3), Decl(immutable.ts, 403, 79), Decl(immutable.ts, 404, 80), Decl(immutable.ts, 405, 86)) +>Indexed : Symbol(Indexed, Decl(immutable.ts, 355, 5), Decl(immutable.ts, 356, 28), Decl(immutable.ts, 357, 79)) +>Z : Symbol(Z, Decl(immutable.ts, 372, 16)) zipWith(zipper: (value: T, otherValue: U, thirdValue: V) => Z, otherCollection: Collection, thirdCollection: Collection): Collection.Indexed; ->zipWith : Symbol(Indexed.zipWith, Decl(immutable.d.ts, 371, 80), Decl(immutable.d.ts, 372, 120), Decl(immutable.d.ts, 373, 175)) ->U : Symbol(U, Decl(immutable.d.ts, 373, 14)) ->V : Symbol(V, Decl(immutable.d.ts, 373, 16)) ->Z : Symbol(Z, Decl(immutable.d.ts, 373, 19)) ->zipper : Symbol(zipper, Decl(immutable.d.ts, 373, 23)) ->value : Symbol(value, Decl(immutable.d.ts, 373, 32)) ->T : Symbol(T, Decl(immutable.d.ts, 358, 29)) ->otherValue : Symbol(otherValue, Decl(immutable.d.ts, 373, 41)) ->U : Symbol(U, Decl(immutable.d.ts, 373, 14)) ->thirdValue : Symbol(thirdValue, Decl(immutable.d.ts, 373, 56)) ->V : Symbol(V, Decl(immutable.d.ts, 373, 16)) ->Z : Symbol(Z, Decl(immutable.d.ts, 373, 19)) ->otherCollection : Symbol(otherCollection, Decl(immutable.d.ts, 373, 77)) ->Collection : Symbol(Collection, Decl(immutable.d.ts, 331, 3), Decl(immutable.d.ts, 402, 3), Decl(immutable.d.ts, 403, 79), Decl(immutable.d.ts, 404, 80), Decl(immutable.d.ts, 405, 86)) ->U : Symbol(U, Decl(immutable.d.ts, 373, 14)) ->thirdCollection : Symbol(thirdCollection, Decl(immutable.d.ts, 373, 114)) ->Collection : Symbol(Collection, Decl(immutable.d.ts, 331, 3), Decl(immutable.d.ts, 402, 3), Decl(immutable.d.ts, 403, 79), Decl(immutable.d.ts, 404, 80), Decl(immutable.d.ts, 405, 86)) ->V : Symbol(V, Decl(immutable.d.ts, 373, 16)) ->Collection : Symbol(Collection, Decl(immutable.d.ts, 331, 3), Decl(immutable.d.ts, 402, 3), Decl(immutable.d.ts, 403, 79), Decl(immutable.d.ts, 404, 80), Decl(immutable.d.ts, 405, 86)) ->Indexed : Symbol(Indexed, Decl(immutable.d.ts, 355, 5), Decl(immutable.d.ts, 356, 28), Decl(immutable.d.ts, 357, 79)) ->Z : Symbol(Z, Decl(immutable.d.ts, 373, 19)) +>zipWith : Symbol(Indexed.zipWith, Decl(immutable.ts, 371, 80), Decl(immutable.ts, 372, 120), Decl(immutable.ts, 373, 175)) +>U : Symbol(U, Decl(immutable.ts, 373, 14)) +>V : Symbol(V, Decl(immutable.ts, 373, 16)) +>Z : Symbol(Z, Decl(immutable.ts, 373, 19)) +>zipper : Symbol(zipper, Decl(immutable.ts, 373, 23)) +>value : Symbol(value, Decl(immutable.ts, 373, 32)) +>T : Symbol(T, Decl(immutable.ts, 358, 29)) +>otherValue : Symbol(otherValue, Decl(immutable.ts, 373, 41)) +>U : Symbol(U, Decl(immutable.ts, 373, 14)) +>thirdValue : Symbol(thirdValue, Decl(immutable.ts, 373, 56)) +>V : Symbol(V, Decl(immutable.ts, 373, 16)) +>Z : Symbol(Z, Decl(immutable.ts, 373, 19)) +>otherCollection : Symbol(otherCollection, Decl(immutable.ts, 373, 77)) +>Collection : Symbol(Collection, Decl(immutable.ts, 331, 3), Decl(immutable.ts, 402, 3), Decl(immutable.ts, 403, 79), Decl(immutable.ts, 404, 80), Decl(immutable.ts, 405, 86)) +>U : Symbol(U, Decl(immutable.ts, 373, 14)) +>thirdCollection : Symbol(thirdCollection, Decl(immutable.ts, 373, 114)) +>Collection : Symbol(Collection, Decl(immutable.ts, 331, 3), Decl(immutable.ts, 402, 3), Decl(immutable.ts, 403, 79), Decl(immutable.ts, 404, 80), Decl(immutable.ts, 405, 86)) +>V : Symbol(V, Decl(immutable.ts, 373, 16)) +>Collection : Symbol(Collection, Decl(immutable.ts, 331, 3), Decl(immutable.ts, 402, 3), Decl(immutable.ts, 403, 79), Decl(immutable.ts, 404, 80), Decl(immutable.ts, 405, 86)) +>Indexed : Symbol(Indexed, Decl(immutable.ts, 355, 5), Decl(immutable.ts, 356, 28), Decl(immutable.ts, 357, 79)) +>Z : Symbol(Z, Decl(immutable.ts, 373, 19)) zipWith(zipper: (...any: Array) => Z, ...collections: Array>): Collection.Indexed; ->zipWith : Symbol(Indexed.zipWith, Decl(immutable.d.ts, 371, 80), Decl(immutable.d.ts, 372, 120), Decl(immutable.d.ts, 373, 175)) ->Z : Symbol(Z, Decl(immutable.d.ts, 374, 14)) ->zipper : Symbol(zipper, Decl(immutable.d.ts, 374, 17)) ->any : Symbol(any, Decl(immutable.d.ts, 374, 26)) +>zipWith : Symbol(Indexed.zipWith, Decl(immutable.ts, 371, 80), Decl(immutable.ts, 372, 120), Decl(immutable.ts, 373, 175)) +>Z : Symbol(Z, Decl(immutable.ts, 374, 14)) +>zipper : Symbol(zipper, Decl(immutable.ts, 374, 17)) +>any : Symbol(any, Decl(immutable.ts, 374, 26)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) ->Z : Symbol(Z, Decl(immutable.d.ts, 374, 14)) ->collections : Symbol(collections, Decl(immutable.d.ts, 374, 51)) +>Z : Symbol(Z, Decl(immutable.ts, 374, 14)) +>collections : Symbol(collections, Decl(immutable.ts, 374, 51)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) ->Collection : Symbol(Collection, Decl(immutable.d.ts, 331, 3), Decl(immutable.d.ts, 402, 3), Decl(immutable.d.ts, 403, 79), Decl(immutable.d.ts, 404, 80), Decl(immutable.d.ts, 405, 86)) ->Collection : Symbol(Collection, Decl(immutable.d.ts, 331, 3), Decl(immutable.d.ts, 402, 3), Decl(immutable.d.ts, 403, 79), Decl(immutable.d.ts, 404, 80), Decl(immutable.d.ts, 405, 86)) ->Indexed : Symbol(Indexed, Decl(immutable.d.ts, 355, 5), Decl(immutable.d.ts, 356, 28), Decl(immutable.d.ts, 357, 79)) ->Z : Symbol(Z, Decl(immutable.d.ts, 374, 14)) +>Collection : Symbol(Collection, Decl(immutable.ts, 331, 3), Decl(immutable.ts, 402, 3), Decl(immutable.ts, 403, 79), Decl(immutable.ts, 404, 80), Decl(immutable.ts, 405, 86)) +>Collection : Symbol(Collection, Decl(immutable.ts, 331, 3), Decl(immutable.ts, 402, 3), Decl(immutable.ts, 403, 79), Decl(immutable.ts, 404, 80), Decl(immutable.ts, 405, 86)) +>Indexed : Symbol(Indexed, Decl(immutable.ts, 355, 5), Decl(immutable.ts, 356, 28), Decl(immutable.ts, 357, 79)) +>Z : Symbol(Z, Decl(immutable.ts, 374, 14)) // Search for value indexOf(searchValue: T): number; ->indexOf : Symbol(Indexed.indexOf, Decl(immutable.d.ts, 374, 120)) ->searchValue : Symbol(searchValue, Decl(immutable.d.ts, 376, 14)) ->T : Symbol(T, Decl(immutable.d.ts, 358, 29)) +>indexOf : Symbol(Indexed.indexOf, Decl(immutable.ts, 374, 120)) +>searchValue : Symbol(searchValue, Decl(immutable.ts, 376, 14)) +>T : Symbol(T, Decl(immutable.ts, 358, 29)) lastIndexOf(searchValue: T): number; ->lastIndexOf : Symbol(Indexed.lastIndexOf, Decl(immutable.d.ts, 376, 38)) ->searchValue : Symbol(searchValue, Decl(immutable.d.ts, 377, 18)) ->T : Symbol(T, Decl(immutable.d.ts, 358, 29)) +>lastIndexOf : Symbol(Indexed.lastIndexOf, Decl(immutable.ts, 376, 38)) +>searchValue : Symbol(searchValue, Decl(immutable.ts, 377, 18)) +>T : Symbol(T, Decl(immutable.ts, 358, 29)) findIndex(predicate: (value: T, index: number, iter: this) => boolean, context?: any): number; ->findIndex : Symbol(Indexed.findIndex, Decl(immutable.d.ts, 377, 42)) ->predicate : Symbol(predicate, Decl(immutable.d.ts, 378, 16)) ->value : Symbol(value, Decl(immutable.d.ts, 378, 28)) ->T : Symbol(T, Decl(immutable.d.ts, 358, 29)) ->index : Symbol(index, Decl(immutable.d.ts, 378, 37)) ->iter : Symbol(iter, Decl(immutable.d.ts, 378, 52)) ->context : Symbol(context, Decl(immutable.d.ts, 378, 76)) +>findIndex : Symbol(Indexed.findIndex, Decl(immutable.ts, 377, 42)) +>predicate : Symbol(predicate, Decl(immutable.ts, 378, 16)) +>value : Symbol(value, Decl(immutable.ts, 378, 28)) +>T : Symbol(T, Decl(immutable.ts, 358, 29)) +>index : Symbol(index, Decl(immutable.ts, 378, 37)) +>iter : Symbol(iter, Decl(immutable.ts, 378, 52)) +>context : Symbol(context, Decl(immutable.ts, 378, 76)) findLastIndex(predicate: (value: T, index: number, iter: this) => boolean, context?: any): number; ->findLastIndex : Symbol(Indexed.findLastIndex, Decl(immutable.d.ts, 378, 100)) ->predicate : Symbol(predicate, Decl(immutable.d.ts, 379, 20)) ->value : Symbol(value, Decl(immutable.d.ts, 379, 32)) ->T : Symbol(T, Decl(immutable.d.ts, 358, 29)) ->index : Symbol(index, Decl(immutable.d.ts, 379, 41)) ->iter : Symbol(iter, Decl(immutable.d.ts, 379, 56)) ->context : Symbol(context, Decl(immutable.d.ts, 379, 80)) +>findLastIndex : Symbol(Indexed.findLastIndex, Decl(immutable.ts, 378, 100)) +>predicate : Symbol(predicate, Decl(immutable.ts, 379, 20)) +>value : Symbol(value, Decl(immutable.ts, 379, 32)) +>T : Symbol(T, Decl(immutable.ts, 358, 29)) +>index : Symbol(index, Decl(immutable.ts, 379, 41)) +>iter : Symbol(iter, Decl(immutable.ts, 379, 56)) +>context : Symbol(context, Decl(immutable.ts, 379, 80)) // Sequence algorithms concat(...valuesOrCollections: Array | C>): Collection.Indexed; ->concat : Symbol(Indexed.concat, Decl(immutable.d.ts, 379, 104)) ->C : Symbol(C, Decl(immutable.d.ts, 381, 13)) ->valuesOrCollections : Symbol(valuesOrCollections, Decl(immutable.d.ts, 381, 16)) +>concat : Symbol(Indexed.concat, Decl(immutable.ts, 379, 104)) +>C : Symbol(C, Decl(immutable.ts, 381, 13)) +>valuesOrCollections : Symbol(valuesOrCollections, Decl(immutable.ts, 381, 16)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) >Iterable : Symbol(Iterable, Decl(lib.es2015.iterable.d.ts, --, --)) ->C : Symbol(C, Decl(immutable.d.ts, 381, 13)) ->C : Symbol(C, Decl(immutable.d.ts, 381, 13)) ->Collection : Symbol(Collection, Decl(immutable.d.ts, 331, 3), Decl(immutable.d.ts, 402, 3), Decl(immutable.d.ts, 403, 79), Decl(immutable.d.ts, 404, 80), Decl(immutable.d.ts, 405, 86)) ->Indexed : Symbol(Indexed, Decl(immutable.d.ts, 355, 5), Decl(immutable.d.ts, 356, 28), Decl(immutable.d.ts, 357, 79)) ->T : Symbol(T, Decl(immutable.d.ts, 358, 29)) ->C : Symbol(C, Decl(immutable.d.ts, 381, 13)) +>C : Symbol(C, Decl(immutable.ts, 381, 13)) +>C : Symbol(C, Decl(immutable.ts, 381, 13)) +>Collection : Symbol(Collection, Decl(immutable.ts, 331, 3), Decl(immutable.ts, 402, 3), Decl(immutable.ts, 403, 79), Decl(immutable.ts, 404, 80), Decl(immutable.ts, 405, 86)) +>Indexed : Symbol(Indexed, Decl(immutable.ts, 355, 5), Decl(immutable.ts, 356, 28), Decl(immutable.ts, 357, 79)) +>T : Symbol(T, Decl(immutable.ts, 358, 29)) +>C : Symbol(C, Decl(immutable.ts, 381, 13)) map(mapper: (value: T, key: number, iter: this) => M, context?: any): Collection.Indexed; ->map : Symbol(Indexed.map, Decl(immutable.d.ts, 381, 91)) ->M : Symbol(M, Decl(immutable.d.ts, 382, 10)) ->mapper : Symbol(mapper, Decl(immutable.d.ts, 382, 13)) ->value : Symbol(value, Decl(immutable.d.ts, 382, 22)) ->T : Symbol(T, Decl(immutable.d.ts, 358, 29)) ->key : Symbol(key, Decl(immutable.d.ts, 382, 31)) ->iter : Symbol(iter, Decl(immutable.d.ts, 382, 44)) ->M : Symbol(M, Decl(immutable.d.ts, 382, 10)) ->context : Symbol(context, Decl(immutable.d.ts, 382, 62)) ->Collection : Symbol(Collection, Decl(immutable.d.ts, 331, 3), Decl(immutable.d.ts, 402, 3), Decl(immutable.d.ts, 403, 79), Decl(immutable.d.ts, 404, 80), Decl(immutable.d.ts, 405, 86)) ->Indexed : Symbol(Indexed, Decl(immutable.d.ts, 355, 5), Decl(immutable.d.ts, 356, 28), Decl(immutable.d.ts, 357, 79)) ->M : Symbol(M, Decl(immutable.d.ts, 382, 10)) +>map : Symbol(Indexed.map, Decl(immutable.ts, 381, 91)) +>M : Symbol(M, Decl(immutable.ts, 382, 10)) +>mapper : Symbol(mapper, Decl(immutable.ts, 382, 13)) +>value : Symbol(value, Decl(immutable.ts, 382, 22)) +>T : Symbol(T, Decl(immutable.ts, 358, 29)) +>key : Symbol(key, Decl(immutable.ts, 382, 31)) +>iter : Symbol(iter, Decl(immutable.ts, 382, 44)) +>M : Symbol(M, Decl(immutable.ts, 382, 10)) +>context : Symbol(context, Decl(immutable.ts, 382, 62)) +>Collection : Symbol(Collection, Decl(immutable.ts, 331, 3), Decl(immutable.ts, 402, 3), Decl(immutable.ts, 403, 79), Decl(immutable.ts, 404, 80), Decl(immutable.ts, 405, 86)) +>Indexed : Symbol(Indexed, Decl(immutable.ts, 355, 5), Decl(immutable.ts, 356, 28), Decl(immutable.ts, 357, 79)) +>M : Symbol(M, Decl(immutable.ts, 382, 10)) flatMap(mapper: (value: T, key: number, iter: this) => Iterable, context?: any): Collection.Indexed; ->flatMap : Symbol(Indexed.flatMap, Decl(immutable.d.ts, 382, 101)) ->M : Symbol(M, Decl(immutable.d.ts, 383, 14)) ->mapper : Symbol(mapper, Decl(immutable.d.ts, 383, 17)) ->value : Symbol(value, Decl(immutable.d.ts, 383, 26)) ->T : Symbol(T, Decl(immutable.d.ts, 358, 29)) ->key : Symbol(key, Decl(immutable.d.ts, 383, 35)) ->iter : Symbol(iter, Decl(immutable.d.ts, 383, 48)) +>flatMap : Symbol(Indexed.flatMap, Decl(immutable.ts, 382, 101)) +>M : Symbol(M, Decl(immutable.ts, 383, 14)) +>mapper : Symbol(mapper, Decl(immutable.ts, 383, 17)) +>value : Symbol(value, Decl(immutable.ts, 383, 26)) +>T : Symbol(T, Decl(immutable.ts, 358, 29)) +>key : Symbol(key, Decl(immutable.ts, 383, 35)) +>iter : Symbol(iter, Decl(immutable.ts, 383, 48)) >Iterable : Symbol(Iterable, Decl(lib.es2015.iterable.d.ts, --, --)) ->M : Symbol(M, Decl(immutable.d.ts, 383, 14)) ->context : Symbol(context, Decl(immutable.d.ts, 383, 76)) ->Collection : Symbol(Collection, Decl(immutable.d.ts, 331, 3), Decl(immutable.d.ts, 402, 3), Decl(immutable.d.ts, 403, 79), Decl(immutable.d.ts, 404, 80), Decl(immutable.d.ts, 405, 86)) ->Indexed : Symbol(Indexed, Decl(immutable.d.ts, 355, 5), Decl(immutable.d.ts, 356, 28), Decl(immutable.d.ts, 357, 79)) ->M : Symbol(M, Decl(immutable.d.ts, 383, 14)) +>M : Symbol(M, Decl(immutable.ts, 383, 14)) +>context : Symbol(context, Decl(immutable.ts, 383, 76)) +>Collection : Symbol(Collection, Decl(immutable.ts, 331, 3), Decl(immutable.ts, 402, 3), Decl(immutable.ts, 403, 79), Decl(immutable.ts, 404, 80), Decl(immutable.ts, 405, 86)) +>Indexed : Symbol(Indexed, Decl(immutable.ts, 355, 5), Decl(immutable.ts, 356, 28), Decl(immutable.ts, 357, 79)) +>M : Symbol(M, Decl(immutable.ts, 383, 14)) filter(predicate: (value: T, index: number, iter: this) => value is F, context?: any): Collection.Indexed; ->filter : Symbol(Indexed.filter, Decl(immutable.d.ts, 383, 115), Decl(immutable.d.ts, 384, 128)) ->F : Symbol(F, Decl(immutable.d.ts, 384, 13)) ->T : Symbol(T, Decl(immutable.d.ts, 358, 29)) ->predicate : Symbol(predicate, Decl(immutable.d.ts, 384, 26)) ->value : Symbol(value, Decl(immutable.d.ts, 384, 38)) ->T : Symbol(T, Decl(immutable.d.ts, 358, 29)) ->index : Symbol(index, Decl(immutable.d.ts, 384, 47)) ->iter : Symbol(iter, Decl(immutable.d.ts, 384, 62)) ->value : Symbol(value, Decl(immutable.d.ts, 384, 38)) ->F : Symbol(F, Decl(immutable.d.ts, 384, 13)) ->context : Symbol(context, Decl(immutable.d.ts, 384, 89)) ->Collection : Symbol(Collection, Decl(immutable.d.ts, 331, 3), Decl(immutable.d.ts, 402, 3), Decl(immutable.d.ts, 403, 79), Decl(immutable.d.ts, 404, 80), Decl(immutable.d.ts, 405, 86)) ->Indexed : Symbol(Indexed, Decl(immutable.d.ts, 355, 5), Decl(immutable.d.ts, 356, 28), Decl(immutable.d.ts, 357, 79)) ->F : Symbol(F, Decl(immutable.d.ts, 384, 13)) +>filter : Symbol(Indexed.filter, Decl(immutable.ts, 383, 115), Decl(immutable.ts, 384, 128)) +>F : Symbol(F, Decl(immutable.ts, 384, 13)) +>T : Symbol(T, Decl(immutable.ts, 358, 29)) +>predicate : Symbol(predicate, Decl(immutable.ts, 384, 26)) +>value : Symbol(value, Decl(immutable.ts, 384, 38)) +>T : Symbol(T, Decl(immutable.ts, 358, 29)) +>index : Symbol(index, Decl(immutable.ts, 384, 47)) +>iter : Symbol(iter, Decl(immutable.ts, 384, 62)) +>value : Symbol(value, Decl(immutable.ts, 384, 38)) +>F : Symbol(F, Decl(immutable.ts, 384, 13)) +>context : Symbol(context, Decl(immutable.ts, 384, 89)) +>Collection : Symbol(Collection, Decl(immutable.ts, 331, 3), Decl(immutable.ts, 402, 3), Decl(immutable.ts, 403, 79), Decl(immutable.ts, 404, 80), Decl(immutable.ts, 405, 86)) +>Indexed : Symbol(Indexed, Decl(immutable.ts, 355, 5), Decl(immutable.ts, 356, 28), Decl(immutable.ts, 357, 79)) +>F : Symbol(F, Decl(immutable.ts, 384, 13)) filter(predicate: (value: T, index: number, iter: this) => any, context?: any): this; ->filter : Symbol(Indexed.filter, Decl(immutable.d.ts, 383, 115), Decl(immutable.d.ts, 384, 128)) ->predicate : Symbol(predicate, Decl(immutable.d.ts, 385, 13)) ->value : Symbol(value, Decl(immutable.d.ts, 385, 25)) ->T : Symbol(T, Decl(immutable.d.ts, 358, 29)) ->index : Symbol(index, Decl(immutable.d.ts, 385, 34)) ->iter : Symbol(iter, Decl(immutable.d.ts, 385, 49)) ->context : Symbol(context, Decl(immutable.d.ts, 385, 69)) +>filter : Symbol(Indexed.filter, Decl(immutable.ts, 383, 115), Decl(immutable.ts, 384, 128)) +>predicate : Symbol(predicate, Decl(immutable.ts, 385, 13)) +>value : Symbol(value, Decl(immutable.ts, 385, 25)) +>T : Symbol(T, Decl(immutable.ts, 358, 29)) +>index : Symbol(index, Decl(immutable.ts, 385, 34)) +>iter : Symbol(iter, Decl(immutable.ts, 385, 49)) +>context : Symbol(context, Decl(immutable.ts, 385, 69)) [Symbol.iterator](): IterableIterator; >Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.es2015.iterable.d.ts, --, --)) >Symbol : Symbol(Symbol, Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.symbol.d.ts, --, --), Decl(lib.es2015.symbol.d.ts, --, --)) >iterator : Symbol(SymbolConstructor.iterator, Decl(lib.es2015.iterable.d.ts, --, --)) >IterableIterator : Symbol(IterableIterator, Decl(lib.es2015.iterable.d.ts, --, --)) ->T : Symbol(T, Decl(immutable.d.ts, 358, 29)) +>T : Symbol(T, Decl(immutable.ts, 358, 29)) } export module Set {} ->Set : Symbol(Set, Decl(immutable.d.ts, 387, 5), Decl(immutable.d.ts, 388, 24), Decl(immutable.d.ts, 389, 71)) +>Set : Symbol(Set, Decl(immutable.ts, 387, 5), Decl(immutable.ts, 388, 24), Decl(immutable.ts, 389, 71)) export function Set(collection: Iterable): Collection.Set; ->Set : Symbol(Set, Decl(immutable.d.ts, 387, 5), Decl(immutable.d.ts, 388, 24), Decl(immutable.d.ts, 389, 71)) ->T : Symbol(T, Decl(immutable.d.ts, 389, 24)) ->collection : Symbol(collection, Decl(immutable.d.ts, 389, 27)) +>Set : Symbol(Set, Decl(immutable.ts, 387, 5), Decl(immutable.ts, 388, 24), Decl(immutable.ts, 389, 71)) +>T : Symbol(T, Decl(immutable.ts, 389, 24)) +>collection : Symbol(collection, Decl(immutable.ts, 389, 27)) >Iterable : Symbol(Iterable, Decl(lib.es2015.iterable.d.ts, --, --)) ->T : Symbol(T, Decl(immutable.d.ts, 389, 24)) ->Collection : Symbol(Collection, Decl(immutable.d.ts, 331, 3), Decl(immutable.d.ts, 402, 3), Decl(immutable.d.ts, 403, 79), Decl(immutable.d.ts, 404, 80), Decl(immutable.d.ts, 405, 86)) ->Set : Symbol(Set, Decl(immutable.d.ts, 387, 5), Decl(immutable.d.ts, 388, 24), Decl(immutable.d.ts, 389, 71)) ->T : Symbol(T, Decl(immutable.d.ts, 389, 24)) +>T : Symbol(T, Decl(immutable.ts, 389, 24)) +>Collection : Symbol(Collection, Decl(immutable.ts, 331, 3), Decl(immutable.ts, 402, 3), Decl(immutable.ts, 403, 79), Decl(immutable.ts, 404, 80), Decl(immutable.ts, 405, 86)) +>Set : Symbol(Set, Decl(immutable.ts, 387, 5), Decl(immutable.ts, 388, 24), Decl(immutable.ts, 389, 71)) +>T : Symbol(T, Decl(immutable.ts, 389, 24)) export interface Set extends Collection { ->Set : Symbol(Set, Decl(immutable.d.ts, 387, 5), Decl(immutable.d.ts, 388, 24), Decl(immutable.d.ts, 389, 71)) ->T : Symbol(T, Decl(immutable.d.ts, 390, 25)) ->Collection : Symbol(Collection, Decl(immutable.d.ts, 331, 3), Decl(immutable.d.ts, 402, 3), Decl(immutable.d.ts, 403, 79), Decl(immutable.d.ts, 404, 80), Decl(immutable.d.ts, 405, 86)) ->T : Symbol(T, Decl(immutable.d.ts, 390, 25)) +>Set : Symbol(Set, Decl(immutable.ts, 387, 5), Decl(immutable.ts, 388, 24), Decl(immutable.ts, 389, 71)) +>T : Symbol(T, Decl(immutable.ts, 390, 25)) +>Collection : Symbol(Collection, Decl(immutable.ts, 331, 3), Decl(immutable.ts, 402, 3), Decl(immutable.ts, 403, 79), Decl(immutable.ts, 404, 80), Decl(immutable.ts, 405, 86)) +>T : Symbol(T, Decl(immutable.ts, 390, 25)) toJS(): Array; ->toJS : Symbol(Set.toJS, Decl(immutable.d.ts, 390, 58)) +>toJS : Symbol(Set.toJS, Decl(immutable.ts, 390, 58)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) toJSON(): Array; ->toJSON : Symbol(Set.toJSON, Decl(immutable.d.ts, 391, 25)) +>toJSON : Symbol(Set.toJSON, Decl(immutable.ts, 391, 25)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) ->T : Symbol(T, Decl(immutable.d.ts, 390, 25)) +>T : Symbol(T, Decl(immutable.ts, 390, 25)) toSeq(): Seq.Set; ->toSeq : Symbol(Set.toSeq, Decl(immutable.d.ts, 392, 25)) ->Seq : Symbol(Seq, Decl(immutable.d.ts, 260, 78), Decl(immutable.d.ts, 314, 3), Decl(immutable.d.ts, 315, 58), Decl(immutable.d.ts, 316, 81), Decl(immutable.d.ts, 317, 76) ... and 4 more) ->Set : Symbol(Seq.Set, Decl(immutable.d.ts, 297, 5), Decl(immutable.d.ts, 300, 5), Decl(immutable.d.ts, 301, 40), Decl(immutable.d.ts, 302, 41), Decl(immutable.d.ts, 303, 64)) ->T : Symbol(T, Decl(immutable.d.ts, 390, 25)) +>toSeq : Symbol(Set.toSeq, Decl(immutable.ts, 392, 25)) +>Seq : Symbol(Seq, Decl(immutable.ts, 260, 78), Decl(immutable.ts, 314, 3), Decl(immutable.ts, 315, 58), Decl(immutable.ts, 316, 81), Decl(immutable.ts, 317, 76) ... and 4 more) +>Set : Symbol(Seq.Set, Decl(immutable.ts, 297, 5), Decl(immutable.ts, 300, 5), Decl(immutable.ts, 301, 40), Decl(immutable.ts, 302, 41), Decl(immutable.ts, 303, 64)) +>T : Symbol(T, Decl(immutable.ts, 390, 25)) // Sequence algorithms concat(...valuesOrCollections: Array | C>): Collection.Set; ->concat : Symbol(Set.concat, Decl(immutable.d.ts, 393, 26)) ->C : Symbol(C, Decl(immutable.d.ts, 395, 13)) ->valuesOrCollections : Symbol(valuesOrCollections, Decl(immutable.d.ts, 395, 16)) +>concat : Symbol(Set.concat, Decl(immutable.ts, 393, 26)) +>C : Symbol(C, Decl(immutable.ts, 395, 13)) +>valuesOrCollections : Symbol(valuesOrCollections, Decl(immutable.ts, 395, 16)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) >Iterable : Symbol(Iterable, Decl(lib.es2015.iterable.d.ts, --, --)) ->C : Symbol(C, Decl(immutable.d.ts, 395, 13)) ->C : Symbol(C, Decl(immutable.d.ts, 395, 13)) ->Collection : Symbol(Collection, Decl(immutable.d.ts, 331, 3), Decl(immutable.d.ts, 402, 3), Decl(immutable.d.ts, 403, 79), Decl(immutable.d.ts, 404, 80), Decl(immutable.d.ts, 405, 86)) ->Set : Symbol(Set, Decl(immutable.d.ts, 387, 5), Decl(immutable.d.ts, 388, 24), Decl(immutable.d.ts, 389, 71)) ->T : Symbol(T, Decl(immutable.d.ts, 390, 25)) ->C : Symbol(C, Decl(immutable.d.ts, 395, 13)) +>C : Symbol(C, Decl(immutable.ts, 395, 13)) +>C : Symbol(C, Decl(immutable.ts, 395, 13)) +>Collection : Symbol(Collection, Decl(immutable.ts, 331, 3), Decl(immutable.ts, 402, 3), Decl(immutable.ts, 403, 79), Decl(immutable.ts, 404, 80), Decl(immutable.ts, 405, 86)) +>Set : Symbol(Set, Decl(immutable.ts, 387, 5), Decl(immutable.ts, 388, 24), Decl(immutable.ts, 389, 71)) +>T : Symbol(T, Decl(immutable.ts, 390, 25)) +>C : Symbol(C, Decl(immutable.ts, 395, 13)) map(mapper: (value: T, key: never, iter: this) => M, context?: any): Collection.Set; ->map : Symbol(Set.map, Decl(immutable.d.ts, 395, 87)) ->M : Symbol(M, Decl(immutable.d.ts, 396, 10)) ->mapper : Symbol(mapper, Decl(immutable.d.ts, 396, 13)) ->value : Symbol(value, Decl(immutable.d.ts, 396, 22)) ->T : Symbol(T, Decl(immutable.d.ts, 390, 25)) ->key : Symbol(key, Decl(immutable.d.ts, 396, 31)) ->iter : Symbol(iter, Decl(immutable.d.ts, 396, 43)) ->M : Symbol(M, Decl(immutable.d.ts, 396, 10)) ->context : Symbol(context, Decl(immutable.d.ts, 396, 61)) ->Collection : Symbol(Collection, Decl(immutable.d.ts, 331, 3), Decl(immutable.d.ts, 402, 3), Decl(immutable.d.ts, 403, 79), Decl(immutable.d.ts, 404, 80), Decl(immutable.d.ts, 405, 86)) ->Set : Symbol(Set, Decl(immutable.d.ts, 387, 5), Decl(immutable.d.ts, 388, 24), Decl(immutable.d.ts, 389, 71)) ->M : Symbol(M, Decl(immutable.d.ts, 396, 10)) +>map : Symbol(Set.map, Decl(immutable.ts, 395, 87)) +>M : Symbol(M, Decl(immutable.ts, 396, 10)) +>mapper : Symbol(mapper, Decl(immutable.ts, 396, 13)) +>value : Symbol(value, Decl(immutable.ts, 396, 22)) +>T : Symbol(T, Decl(immutable.ts, 390, 25)) +>key : Symbol(key, Decl(immutable.ts, 396, 31)) +>iter : Symbol(iter, Decl(immutable.ts, 396, 43)) +>M : Symbol(M, Decl(immutable.ts, 396, 10)) +>context : Symbol(context, Decl(immutable.ts, 396, 61)) +>Collection : Symbol(Collection, Decl(immutable.ts, 331, 3), Decl(immutable.ts, 402, 3), Decl(immutable.ts, 403, 79), Decl(immutable.ts, 404, 80), Decl(immutable.ts, 405, 86)) +>Set : Symbol(Set, Decl(immutable.ts, 387, 5), Decl(immutable.ts, 388, 24), Decl(immutable.ts, 389, 71)) +>M : Symbol(M, Decl(immutable.ts, 396, 10)) flatMap(mapper: (value: T, key: never, iter: this) => Iterable, context?: any): Collection.Set; ->flatMap : Symbol(Set.flatMap, Decl(immutable.d.ts, 396, 96)) ->M : Symbol(M, Decl(immutable.d.ts, 397, 14)) ->mapper : Symbol(mapper, Decl(immutable.d.ts, 397, 17)) ->value : Symbol(value, Decl(immutable.d.ts, 397, 26)) ->T : Symbol(T, Decl(immutable.d.ts, 390, 25)) ->key : Symbol(key, Decl(immutable.d.ts, 397, 35)) ->iter : Symbol(iter, Decl(immutable.d.ts, 397, 47)) +>flatMap : Symbol(Set.flatMap, Decl(immutable.ts, 396, 96)) +>M : Symbol(M, Decl(immutable.ts, 397, 14)) +>mapper : Symbol(mapper, Decl(immutable.ts, 397, 17)) +>value : Symbol(value, Decl(immutable.ts, 397, 26)) +>T : Symbol(T, Decl(immutable.ts, 390, 25)) +>key : Symbol(key, Decl(immutable.ts, 397, 35)) +>iter : Symbol(iter, Decl(immutable.ts, 397, 47)) >Iterable : Symbol(Iterable, Decl(lib.es2015.iterable.d.ts, --, --)) ->M : Symbol(M, Decl(immutable.d.ts, 397, 14)) ->context : Symbol(context, Decl(immutable.d.ts, 397, 75)) ->Collection : Symbol(Collection, Decl(immutable.d.ts, 331, 3), Decl(immutable.d.ts, 402, 3), Decl(immutable.d.ts, 403, 79), Decl(immutable.d.ts, 404, 80), Decl(immutable.d.ts, 405, 86)) ->Set : Symbol(Set, Decl(immutable.d.ts, 387, 5), Decl(immutable.d.ts, 388, 24), Decl(immutable.d.ts, 389, 71)) ->M : Symbol(M, Decl(immutable.d.ts, 397, 14)) +>M : Symbol(M, Decl(immutable.ts, 397, 14)) +>context : Symbol(context, Decl(immutable.ts, 397, 75)) +>Collection : Symbol(Collection, Decl(immutable.ts, 331, 3), Decl(immutable.ts, 402, 3), Decl(immutable.ts, 403, 79), Decl(immutable.ts, 404, 80), Decl(immutable.ts, 405, 86)) +>Set : Symbol(Set, Decl(immutable.ts, 387, 5), Decl(immutable.ts, 388, 24), Decl(immutable.ts, 389, 71)) +>M : Symbol(M, Decl(immutable.ts, 397, 14)) filter(predicate: (value: T, key: never, iter: this) => value is F, context?: any): Collection.Set; ->filter : Symbol(Set.filter, Decl(immutable.d.ts, 397, 111), Decl(immutable.d.ts, 398, 121)) ->F : Symbol(F, Decl(immutable.d.ts, 398, 13)) ->T : Symbol(T, Decl(immutable.d.ts, 390, 25)) ->predicate : Symbol(predicate, Decl(immutable.d.ts, 398, 26)) ->value : Symbol(value, Decl(immutable.d.ts, 398, 38)) ->T : Symbol(T, Decl(immutable.d.ts, 390, 25)) ->key : Symbol(key, Decl(immutable.d.ts, 398, 47)) ->iter : Symbol(iter, Decl(immutable.d.ts, 398, 59)) ->value : Symbol(value, Decl(immutable.d.ts, 398, 38)) ->F : Symbol(F, Decl(immutable.d.ts, 398, 13)) ->context : Symbol(context, Decl(immutable.d.ts, 398, 86)) ->Collection : Symbol(Collection, Decl(immutable.d.ts, 331, 3), Decl(immutable.d.ts, 402, 3), Decl(immutable.d.ts, 403, 79), Decl(immutable.d.ts, 404, 80), Decl(immutable.d.ts, 405, 86)) ->Set : Symbol(Set, Decl(immutable.d.ts, 387, 5), Decl(immutable.d.ts, 388, 24), Decl(immutable.d.ts, 389, 71)) ->F : Symbol(F, Decl(immutable.d.ts, 398, 13)) +>filter : Symbol(Set.filter, Decl(immutable.ts, 397, 111), Decl(immutable.ts, 398, 121)) +>F : Symbol(F, Decl(immutable.ts, 398, 13)) +>T : Symbol(T, Decl(immutable.ts, 390, 25)) +>predicate : Symbol(predicate, Decl(immutable.ts, 398, 26)) +>value : Symbol(value, Decl(immutable.ts, 398, 38)) +>T : Symbol(T, Decl(immutable.ts, 390, 25)) +>key : Symbol(key, Decl(immutable.ts, 398, 47)) +>iter : Symbol(iter, Decl(immutable.ts, 398, 59)) +>value : Symbol(value, Decl(immutable.ts, 398, 38)) +>F : Symbol(F, Decl(immutable.ts, 398, 13)) +>context : Symbol(context, Decl(immutable.ts, 398, 86)) +>Collection : Symbol(Collection, Decl(immutable.ts, 331, 3), Decl(immutable.ts, 402, 3), Decl(immutable.ts, 403, 79), Decl(immutable.ts, 404, 80), Decl(immutable.ts, 405, 86)) +>Set : Symbol(Set, Decl(immutable.ts, 387, 5), Decl(immutable.ts, 388, 24), Decl(immutable.ts, 389, 71)) +>F : Symbol(F, Decl(immutable.ts, 398, 13)) filter(predicate: (value: T, key: never, iter: this) => any, context?: any): this; ->filter : Symbol(Set.filter, Decl(immutable.d.ts, 397, 111), Decl(immutable.d.ts, 398, 121)) ->predicate : Symbol(predicate, Decl(immutable.d.ts, 399, 13)) ->value : Symbol(value, Decl(immutable.d.ts, 399, 25)) ->T : Symbol(T, Decl(immutable.d.ts, 390, 25)) ->key : Symbol(key, Decl(immutable.d.ts, 399, 34)) ->iter : Symbol(iter, Decl(immutable.d.ts, 399, 46)) ->context : Symbol(context, Decl(immutable.d.ts, 399, 66)) +>filter : Symbol(Set.filter, Decl(immutable.ts, 397, 111), Decl(immutable.ts, 398, 121)) +>predicate : Symbol(predicate, Decl(immutable.ts, 399, 13)) +>value : Symbol(value, Decl(immutable.ts, 399, 25)) +>T : Symbol(T, Decl(immutable.ts, 390, 25)) +>key : Symbol(key, Decl(immutable.ts, 399, 34)) +>iter : Symbol(iter, Decl(immutable.ts, 399, 46)) +>context : Symbol(context, Decl(immutable.ts, 399, 66)) [Symbol.iterator](): IterableIterator; >Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.es2015.iterable.d.ts, --, --)) >Symbol : Symbol(Symbol, Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.symbol.d.ts, --, --), Decl(lib.es2015.symbol.d.ts, --, --)) >iterator : Symbol(SymbolConstructor.iterator, Decl(lib.es2015.iterable.d.ts, --, --)) >IterableIterator : Symbol(IterableIterator, Decl(lib.es2015.iterable.d.ts, --, --)) ->T : Symbol(T, Decl(immutable.d.ts, 390, 25)) +>T : Symbol(T, Decl(immutable.ts, 390, 25)) } } export function Collection>(collection: I): I; ->Collection : Symbol(Collection, Decl(immutable.d.ts, 331, 3), Decl(immutable.d.ts, 402, 3), Decl(immutable.d.ts, 403, 79), Decl(immutable.d.ts, 404, 80), Decl(immutable.d.ts, 405, 86)) ->I : Symbol(I, Decl(immutable.d.ts, 403, 29)) ->Collection : Symbol(Collection, Decl(immutable.d.ts, 331, 3), Decl(immutable.d.ts, 402, 3), Decl(immutable.d.ts, 403, 79), Decl(immutable.d.ts, 404, 80), Decl(immutable.d.ts, 405, 86)) ->collection : Symbol(collection, Decl(immutable.d.ts, 403, 61)) ->I : Symbol(I, Decl(immutable.d.ts, 403, 29)) ->I : Symbol(I, Decl(immutable.d.ts, 403, 29)) +>Collection : Symbol(Collection, Decl(immutable.ts, 331, 3), Decl(immutable.ts, 402, 3), Decl(immutable.ts, 403, 79), Decl(immutable.ts, 404, 80), Decl(immutable.ts, 405, 86)) +>I : Symbol(I, Decl(immutable.ts, 403, 29)) +>Collection : Symbol(Collection, Decl(immutable.ts, 331, 3), Decl(immutable.ts, 402, 3), Decl(immutable.ts, 403, 79), Decl(immutable.ts, 404, 80), Decl(immutable.ts, 405, 86)) +>collection : Symbol(collection, Decl(immutable.ts, 403, 61)) +>I : Symbol(I, Decl(immutable.ts, 403, 29)) +>I : Symbol(I, Decl(immutable.ts, 403, 29)) export function Collection(collection: Iterable): Collection.Indexed; ->Collection : Symbol(Collection, Decl(immutable.d.ts, 331, 3), Decl(immutable.d.ts, 402, 3), Decl(immutable.d.ts, 403, 79), Decl(immutable.d.ts, 404, 80), Decl(immutable.d.ts, 405, 86)) ->T : Symbol(T, Decl(immutable.d.ts, 404, 29)) ->collection : Symbol(collection, Decl(immutable.d.ts, 404, 32)) +>Collection : Symbol(Collection, Decl(immutable.ts, 331, 3), Decl(immutable.ts, 402, 3), Decl(immutable.ts, 403, 79), Decl(immutable.ts, 404, 80), Decl(immutable.ts, 405, 86)) +>T : Symbol(T, Decl(immutable.ts, 404, 29)) +>collection : Symbol(collection, Decl(immutable.ts, 404, 32)) >Iterable : Symbol(Iterable, Decl(lib.es2015.iterable.d.ts, --, --)) ->T : Symbol(T, Decl(immutable.d.ts, 404, 29)) ->Collection : Symbol(Collection, Decl(immutable.d.ts, 331, 3), Decl(immutable.d.ts, 402, 3), Decl(immutable.d.ts, 403, 79), Decl(immutable.d.ts, 404, 80), Decl(immutable.d.ts, 405, 86)) ->Indexed : Symbol(Collection.Indexed, Decl(immutable.d.ts, 355, 5), Decl(immutable.d.ts, 356, 28), Decl(immutable.d.ts, 357, 79)) ->T : Symbol(T, Decl(immutable.d.ts, 404, 29)) +>T : Symbol(T, Decl(immutable.ts, 404, 29)) +>Collection : Symbol(Collection, Decl(immutable.ts, 331, 3), Decl(immutable.ts, 402, 3), Decl(immutable.ts, 403, 79), Decl(immutable.ts, 404, 80), Decl(immutable.ts, 405, 86)) +>Indexed : Symbol(Collection.Indexed, Decl(immutable.ts, 355, 5), Decl(immutable.ts, 356, 28), Decl(immutable.ts, 357, 79)) +>T : Symbol(T, Decl(immutable.ts, 404, 29)) export function Collection(obj: {[key: string]: V}): Collection.Keyed; ->Collection : Symbol(Collection, Decl(immutable.d.ts, 331, 3), Decl(immutable.d.ts, 402, 3), Decl(immutable.d.ts, 403, 79), Decl(immutable.d.ts, 404, 80), Decl(immutable.d.ts, 405, 86)) ->V : Symbol(V, Decl(immutable.d.ts, 405, 29)) ->obj : Symbol(obj, Decl(immutable.d.ts, 405, 32)) ->key : Symbol(key, Decl(immutable.d.ts, 405, 39)) ->V : Symbol(V, Decl(immutable.d.ts, 405, 29)) ->Collection : Symbol(Collection, Decl(immutable.d.ts, 331, 3), Decl(immutable.d.ts, 402, 3), Decl(immutable.d.ts, 403, 79), Decl(immutable.d.ts, 404, 80), Decl(immutable.d.ts, 405, 86)) ->Keyed : Symbol(Collection.Keyed, Decl(immutable.d.ts, 336, 51), Decl(immutable.d.ts, 337, 26), Decl(immutable.d.ts, 338, 86), Decl(immutable.d.ts, 339, 83)) ->V : Symbol(V, Decl(immutable.d.ts, 405, 29)) +>Collection : Symbol(Collection, Decl(immutable.ts, 331, 3), Decl(immutable.ts, 402, 3), Decl(immutable.ts, 403, 79), Decl(immutable.ts, 404, 80), Decl(immutable.ts, 405, 86)) +>V : Symbol(V, Decl(immutable.ts, 405, 29)) +>obj : Symbol(obj, Decl(immutable.ts, 405, 32)) +>key : Symbol(key, Decl(immutable.ts, 405, 39)) +>V : Symbol(V, Decl(immutable.ts, 405, 29)) +>Collection : Symbol(Collection, Decl(immutable.ts, 331, 3), Decl(immutable.ts, 402, 3), Decl(immutable.ts, 403, 79), Decl(immutable.ts, 404, 80), Decl(immutable.ts, 405, 86)) +>Keyed : Symbol(Collection.Keyed, Decl(immutable.ts, 336, 51), Decl(immutable.ts, 337, 26), Decl(immutable.ts, 338, 86), Decl(immutable.ts, 339, 83)) +>V : Symbol(V, Decl(immutable.ts, 405, 29)) export interface Collection extends ValueObject { ->Collection : Symbol(Collection, Decl(immutable.d.ts, 331, 3), Decl(immutable.d.ts, 402, 3), Decl(immutable.d.ts, 403, 79), Decl(immutable.d.ts, 404, 80), Decl(immutable.d.ts, 405, 86)) ->K : Symbol(K, Decl(immutable.d.ts, 406, 30)) ->V : Symbol(V, Decl(immutable.d.ts, 406, 32)) ->ValueObject : Symbol(ValueObject, Decl(immutable.d.ts, 13, 76)) +>Collection : Symbol(Collection, Decl(immutable.ts, 331, 3), Decl(immutable.ts, 402, 3), Decl(immutable.ts, 403, 79), Decl(immutable.ts, 404, 80), Decl(immutable.ts, 405, 86)) +>K : Symbol(K, Decl(immutable.ts, 406, 30)) +>V : Symbol(V, Decl(immutable.ts, 406, 32)) +>ValueObject : Symbol(ValueObject, Decl(immutable.ts, 13, 76)) // Value equality equals(other: any): boolean; ->equals : Symbol(Collection.equals, Decl(immutable.d.ts, 406, 57)) ->other : Symbol(other, Decl(immutable.d.ts, 408, 11)) +>equals : Symbol(Collection.equals, Decl(immutable.ts, 406, 57)) +>other : Symbol(other, Decl(immutable.ts, 408, 11)) hashCode(): number; ->hashCode : Symbol(Collection.hashCode, Decl(immutable.d.ts, 408, 32)) +>hashCode : Symbol(Collection.hashCode, Decl(immutable.ts, 408, 32)) // Reading values get(key: K, notSetValue: NSV): V | NSV; ->get : Symbol(Collection.get, Decl(immutable.d.ts, 409, 23), Decl(immutable.d.ts, 411, 48)) ->NSV : Symbol(NSV, Decl(immutable.d.ts, 411, 8)) ->key : Symbol(key, Decl(immutable.d.ts, 411, 13)) ->K : Symbol(K, Decl(immutable.d.ts, 406, 30)) ->notSetValue : Symbol(notSetValue, Decl(immutable.d.ts, 411, 20)) ->NSV : Symbol(NSV, Decl(immutable.d.ts, 411, 8)) ->V : Symbol(V, Decl(immutable.d.ts, 406, 32)) ->NSV : Symbol(NSV, Decl(immutable.d.ts, 411, 8)) +>get : Symbol(Collection.get, Decl(immutable.ts, 409, 23), Decl(immutable.ts, 411, 48)) +>NSV : Symbol(NSV, Decl(immutable.ts, 411, 8)) +>key : Symbol(key, Decl(immutable.ts, 411, 13)) +>K : Symbol(K, Decl(immutable.ts, 406, 30)) +>notSetValue : Symbol(notSetValue, Decl(immutable.ts, 411, 20)) +>NSV : Symbol(NSV, Decl(immutable.ts, 411, 8)) +>V : Symbol(V, Decl(immutable.ts, 406, 32)) +>NSV : Symbol(NSV, Decl(immutable.ts, 411, 8)) get(key: K): V | undefined; ->get : Symbol(Collection.get, Decl(immutable.d.ts, 409, 23), Decl(immutable.d.ts, 411, 48)) ->key : Symbol(key, Decl(immutable.d.ts, 412, 8)) ->K : Symbol(K, Decl(immutable.d.ts, 406, 30)) ->V : Symbol(V, Decl(immutable.d.ts, 406, 32)) +>get : Symbol(Collection.get, Decl(immutable.ts, 409, 23), Decl(immutable.ts, 411, 48)) +>key : Symbol(key, Decl(immutable.ts, 412, 8)) +>K : Symbol(K, Decl(immutable.ts, 406, 30)) +>V : Symbol(V, Decl(immutable.ts, 406, 32)) has(key: K): boolean; ->has : Symbol(Collection.has, Decl(immutable.d.ts, 412, 31)) ->key : Symbol(key, Decl(immutable.d.ts, 413, 8)) ->K : Symbol(K, Decl(immutable.d.ts, 406, 30)) +>has : Symbol(Collection.has, Decl(immutable.ts, 412, 31)) +>key : Symbol(key, Decl(immutable.ts, 413, 8)) +>K : Symbol(K, Decl(immutable.ts, 406, 30)) includes(value: V): boolean; ->includes : Symbol(Collection.includes, Decl(immutable.d.ts, 413, 25)) ->value : Symbol(value, Decl(immutable.d.ts, 414, 13)) ->V : Symbol(V, Decl(immutable.d.ts, 406, 32)) +>includes : Symbol(Collection.includes, Decl(immutable.ts, 413, 25)) +>value : Symbol(value, Decl(immutable.ts, 414, 13)) +>V : Symbol(V, Decl(immutable.ts, 406, 32)) contains(value: V): boolean; ->contains : Symbol(Collection.contains, Decl(immutable.d.ts, 414, 32)) ->value : Symbol(value, Decl(immutable.d.ts, 415, 13)) ->V : Symbol(V, Decl(immutable.d.ts, 406, 32)) +>contains : Symbol(Collection.contains, Decl(immutable.ts, 414, 32)) +>value : Symbol(value, Decl(immutable.ts, 415, 13)) +>V : Symbol(V, Decl(immutable.ts, 406, 32)) first(): V | undefined; ->first : Symbol(Collection.first, Decl(immutable.d.ts, 415, 32)) ->V : Symbol(V, Decl(immutable.d.ts, 406, 32)) +>first : Symbol(Collection.first, Decl(immutable.ts, 415, 32)) +>V : Symbol(V, Decl(immutable.ts, 406, 32)) last(): V | undefined; ->last : Symbol(Collection.last, Decl(immutable.d.ts, 416, 27)) ->V : Symbol(V, Decl(immutable.d.ts, 406, 32)) +>last : Symbol(Collection.last, Decl(immutable.ts, 416, 27)) +>V : Symbol(V, Decl(immutable.ts, 406, 32)) // Reading deep values getIn(searchKeyPath: Iterable, notSetValue?: any): any; ->getIn : Symbol(Collection.getIn, Decl(immutable.d.ts, 417, 26)) ->searchKeyPath : Symbol(searchKeyPath, Decl(immutable.d.ts, 419, 10)) +>getIn : Symbol(Collection.getIn, Decl(immutable.ts, 417, 26)) +>searchKeyPath : Symbol(searchKeyPath, Decl(immutable.ts, 419, 10)) >Iterable : Symbol(Iterable, Decl(lib.es2015.iterable.d.ts, --, --)) ->notSetValue : Symbol(notSetValue, Decl(immutable.d.ts, 419, 39)) +>notSetValue : Symbol(notSetValue, Decl(immutable.ts, 419, 39)) hasIn(searchKeyPath: Iterable): boolean; ->hasIn : Symbol(Collection.hasIn, Decl(immutable.d.ts, 419, 64)) ->searchKeyPath : Symbol(searchKeyPath, Decl(immutable.d.ts, 420, 10)) +>hasIn : Symbol(Collection.hasIn, Decl(immutable.ts, 419, 64)) +>searchKeyPath : Symbol(searchKeyPath, Decl(immutable.ts, 420, 10)) >Iterable : Symbol(Iterable, Decl(lib.es2015.iterable.d.ts, --, --)) // Persistent changes update(updater: (value: this) => R): R; ->update : Symbol(Collection.update, Decl(immutable.d.ts, 420, 49)) ->R : Symbol(R, Decl(immutable.d.ts, 422, 11)) ->updater : Symbol(updater, Decl(immutable.d.ts, 422, 14)) ->value : Symbol(value, Decl(immutable.d.ts, 422, 24)) ->R : Symbol(R, Decl(immutable.d.ts, 422, 11)) ->R : Symbol(R, Decl(immutable.d.ts, 422, 11)) +>update : Symbol(Collection.update, Decl(immutable.ts, 420, 49)) +>R : Symbol(R, Decl(immutable.ts, 422, 11)) +>updater : Symbol(updater, Decl(immutable.ts, 422, 14)) +>value : Symbol(value, Decl(immutable.ts, 422, 24)) +>R : Symbol(R, Decl(immutable.ts, 422, 11)) +>R : Symbol(R, Decl(immutable.ts, 422, 11)) // Conversion to JavaScript types toJS(): Array | { [key: string]: any }; ->toJS : Symbol(Collection.toJS, Decl(immutable.d.ts, 422, 46)) +>toJS : Symbol(Collection.toJS, Decl(immutable.ts, 422, 46)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) ->key : Symbol(key, Decl(immutable.d.ts, 424, 28)) +>key : Symbol(key, Decl(immutable.ts, 424, 28)) toJSON(): Array | { [key: string]: V }; ->toJSON : Symbol(Collection.toJSON, Decl(immutable.d.ts, 424, 48)) +>toJSON : Symbol(Collection.toJSON, Decl(immutable.ts, 424, 48)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) ->V : Symbol(V, Decl(immutable.d.ts, 406, 32)) ->key : Symbol(key, Decl(immutable.d.ts, 425, 28)) ->V : Symbol(V, Decl(immutable.d.ts, 406, 32)) +>V : Symbol(V, Decl(immutable.ts, 406, 32)) +>key : Symbol(key, Decl(immutable.ts, 425, 28)) +>V : Symbol(V, Decl(immutable.ts, 406, 32)) toArray(): Array; ->toArray : Symbol(Collection.toArray, Decl(immutable.d.ts, 425, 46)) +>toArray : Symbol(Collection.toArray, Decl(immutable.ts, 425, 46)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) ->V : Symbol(V, Decl(immutable.d.ts, 406, 32)) +>V : Symbol(V, Decl(immutable.ts, 406, 32)) toObject(): { [key: string]: V }; ->toObject : Symbol(Collection.toObject, Decl(immutable.d.ts, 426, 24)) ->key : Symbol(key, Decl(immutable.d.ts, 427, 19)) ->V : Symbol(V, Decl(immutable.d.ts, 406, 32)) +>toObject : Symbol(Collection.toObject, Decl(immutable.ts, 426, 24)) +>key : Symbol(key, Decl(immutable.ts, 427, 19)) +>V : Symbol(V, Decl(immutable.ts, 406, 32)) // Conversion to Collections toMap(): Map; ->toMap : Symbol(Collection.toMap, Decl(immutable.d.ts, 427, 37)) ->Map : Symbol(Map, Decl(immutable.d.ts, 62, 3), Decl(immutable.d.ts, 66, 3), Decl(immutable.d.ts, 67, 69), Decl(immutable.d.ts, 68, 71), Decl(immutable.d.ts, 69, 66) ... and 2 more) ->K : Symbol(K, Decl(immutable.d.ts, 406, 30)) ->V : Symbol(V, Decl(immutable.d.ts, 406, 32)) +>toMap : Symbol(Collection.toMap, Decl(immutable.ts, 427, 37)) +>Map : Symbol(Map, Decl(immutable.ts, 62, 3), Decl(immutable.ts, 66, 3), Decl(immutable.ts, 67, 69), Decl(immutable.ts, 68, 71), Decl(immutable.ts, 69, 66) ... and 2 more) +>K : Symbol(K, Decl(immutable.ts, 406, 30)) +>V : Symbol(V, Decl(immutable.ts, 406, 32)) toOrderedMap(): OrderedMap; ->toOrderedMap : Symbol(Collection.toOrderedMap, Decl(immutable.d.ts, 429, 23)) ->OrderedMap : Symbol(OrderedMap, Decl(immutable.d.ts, 108, 3), Decl(immutable.d.ts, 111, 3), Decl(immutable.d.ts, 112, 83), Decl(immutable.d.ts, 113, 85), Decl(immutable.d.ts, 114, 80) ... and 2 more) ->K : Symbol(K, Decl(immutable.d.ts, 406, 30)) ->V : Symbol(V, Decl(immutable.d.ts, 406, 32)) +>toOrderedMap : Symbol(Collection.toOrderedMap, Decl(immutable.ts, 429, 23)) +>OrderedMap : Symbol(OrderedMap, Decl(immutable.ts, 108, 3), Decl(immutable.ts, 111, 3), Decl(immutable.ts, 112, 83), Decl(immutable.ts, 113, 85), Decl(immutable.ts, 114, 80) ... and 2 more) +>K : Symbol(K, Decl(immutable.ts, 406, 30)) +>V : Symbol(V, Decl(immutable.ts, 406, 32)) toSet(): Set; ->toSet : Symbol(Collection.toSet, Decl(immutable.d.ts, 430, 37)) ->Set : Symbol(Set, Decl(immutable.d.ts, 127, 3), Decl(immutable.d.ts, 135, 3), Decl(immutable.d.ts, 136, 34), Decl(immutable.d.ts, 137, 35), Decl(immutable.d.ts, 138, 58)) ->V : Symbol(V, Decl(immutable.d.ts, 406, 32)) +>toSet : Symbol(Collection.toSet, Decl(immutable.ts, 430, 37)) +>Set : Symbol(Set, Decl(immutable.ts, 127, 3), Decl(immutable.ts, 135, 3), Decl(immutable.ts, 136, 34), Decl(immutable.ts, 137, 35), Decl(immutable.ts, 138, 58)) +>V : Symbol(V, Decl(immutable.ts, 406, 32)) toOrderedSet(): OrderedSet; ->toOrderedSet : Symbol(Collection.toOrderedSet, Decl(immutable.d.ts, 431, 20)) ->OrderedSet : Symbol(OrderedSet, Decl(immutable.d.ts, 159, 3), Decl(immutable.d.ts, 165, 3), Decl(immutable.d.ts, 166, 48), Decl(immutable.d.ts, 167, 49), Decl(immutable.d.ts, 168, 72)) ->V : Symbol(V, Decl(immutable.d.ts, 406, 32)) +>toOrderedSet : Symbol(Collection.toOrderedSet, Decl(immutable.ts, 431, 20)) +>OrderedSet : Symbol(OrderedSet, Decl(immutable.ts, 159, 3), Decl(immutable.ts, 165, 3), Decl(immutable.ts, 166, 48), Decl(immutable.ts, 167, 49), Decl(immutable.ts, 168, 72)) +>V : Symbol(V, Decl(immutable.ts, 406, 32)) toList(): List; ->toList : Symbol(Collection.toList, Decl(immutable.d.ts, 432, 34)) ->List : Symbol(List, Decl(immutable.d.ts, 17, 3), Decl(immutable.d.ts, 21, 3), Decl(immutable.d.ts, 22, 36), Decl(immutable.d.ts, 23, 37), Decl(immutable.d.ts, 24, 60)) ->V : Symbol(V, Decl(immutable.d.ts, 406, 32)) +>toList : Symbol(Collection.toList, Decl(immutable.ts, 432, 34)) +>List : Symbol(List, Decl(immutable.ts, 17, 3), Decl(immutable.ts, 21, 3), Decl(immutable.ts, 22, 36), Decl(immutable.ts, 23, 37), Decl(immutable.ts, 24, 60)) +>V : Symbol(V, Decl(immutable.ts, 406, 32)) toStack(): Stack; ->toStack : Symbol(Collection.toStack, Decl(immutable.d.ts, 433, 22)) ->Stack : Symbol(Stack, Decl(immutable.d.ts, 180, 3), Decl(immutable.d.ts, 184, 3), Decl(immutable.d.ts, 185, 38), Decl(immutable.d.ts, 186, 39), Decl(immutable.d.ts, 187, 62)) ->V : Symbol(V, Decl(immutable.d.ts, 406, 32)) +>toStack : Symbol(Collection.toStack, Decl(immutable.ts, 433, 22)) +>Stack : Symbol(Stack, Decl(immutable.ts, 180, 3), Decl(immutable.ts, 184, 3), Decl(immutable.ts, 185, 38), Decl(immutable.ts, 186, 39), Decl(immutable.ts, 187, 62)) +>V : Symbol(V, Decl(immutable.ts, 406, 32)) // Conversion to Seq toSeq(): this; ->toSeq : Symbol(Collection.toSeq, Decl(immutable.d.ts, 434, 24)) +>toSeq : Symbol(Collection.toSeq, Decl(immutable.ts, 434, 24)) toKeyedSeq(): Seq.Keyed; ->toKeyedSeq : Symbol(Collection.toKeyedSeq, Decl(immutable.d.ts, 436, 18)) ->Seq : Symbol(Seq, Decl(immutable.d.ts, 260, 78), Decl(immutable.d.ts, 314, 3), Decl(immutable.d.ts, 315, 58), Decl(immutable.d.ts, 316, 81), Decl(immutable.d.ts, 317, 76) ... and 4 more) ->Keyed : Symbol(Seq.Keyed, Decl(immutable.d.ts, 263, 56), Decl(immutable.d.ts, 264, 26), Decl(immutable.d.ts, 265, 79), Decl(immutable.d.ts, 266, 76), Decl(immutable.d.ts, 267, 51) ... and 1 more) ->K : Symbol(K, Decl(immutable.d.ts, 406, 30)) ->V : Symbol(V, Decl(immutable.d.ts, 406, 32)) +>toKeyedSeq : Symbol(Collection.toKeyedSeq, Decl(immutable.ts, 436, 18)) +>Seq : Symbol(Seq, Decl(immutable.ts, 260, 78), Decl(immutable.ts, 314, 3), Decl(immutable.ts, 315, 58), Decl(immutable.ts, 316, 81), Decl(immutable.ts, 317, 76) ... and 4 more) +>Keyed : Symbol(Seq.Keyed, Decl(immutable.ts, 263, 56), Decl(immutable.ts, 264, 26), Decl(immutable.ts, 265, 79), Decl(immutable.ts, 266, 76), Decl(immutable.ts, 267, 51) ... and 1 more) +>K : Symbol(K, Decl(immutable.ts, 406, 30)) +>V : Symbol(V, Decl(immutable.ts, 406, 32)) toIndexedSeq(): Seq.Indexed; ->toIndexedSeq : Symbol(Collection.toIndexedSeq, Decl(immutable.d.ts, 437, 34)) ->Seq : Symbol(Seq, Decl(immutable.d.ts, 260, 78), Decl(immutable.d.ts, 314, 3), Decl(immutable.d.ts, 315, 58), Decl(immutable.d.ts, 316, 81), Decl(immutable.d.ts, 317, 76) ... and 4 more) ->Indexed : Symbol(Seq.Indexed, Decl(immutable.d.ts, 281, 5), Decl(immutable.d.ts, 284, 5), Decl(immutable.d.ts, 285, 48), Decl(immutable.d.ts, 286, 49), Decl(immutable.d.ts, 287, 72)) ->V : Symbol(V, Decl(immutable.d.ts, 406, 32)) +>toIndexedSeq : Symbol(Collection.toIndexedSeq, Decl(immutable.ts, 437, 34)) +>Seq : Symbol(Seq, Decl(immutable.ts, 260, 78), Decl(immutable.ts, 314, 3), Decl(immutable.ts, 315, 58), Decl(immutable.ts, 316, 81), Decl(immutable.ts, 317, 76) ... and 4 more) +>Indexed : Symbol(Seq.Indexed, Decl(immutable.ts, 281, 5), Decl(immutable.ts, 284, 5), Decl(immutable.ts, 285, 48), Decl(immutable.ts, 286, 49), Decl(immutable.ts, 287, 72)) +>V : Symbol(V, Decl(immutable.ts, 406, 32)) toSetSeq(): Seq.Set; ->toSetSeq : Symbol(Collection.toSetSeq, Decl(immutable.d.ts, 438, 35)) ->Seq : Symbol(Seq, Decl(immutable.d.ts, 260, 78), Decl(immutable.d.ts, 314, 3), Decl(immutable.d.ts, 315, 58), Decl(immutable.d.ts, 316, 81), Decl(immutable.d.ts, 317, 76) ... and 4 more) ->Set : Symbol(Seq.Set, Decl(immutable.d.ts, 297, 5), Decl(immutable.d.ts, 300, 5), Decl(immutable.d.ts, 301, 40), Decl(immutable.d.ts, 302, 41), Decl(immutable.d.ts, 303, 64)) ->V : Symbol(V, Decl(immutable.d.ts, 406, 32)) +>toSetSeq : Symbol(Collection.toSetSeq, Decl(immutable.ts, 438, 35)) +>Seq : Symbol(Seq, Decl(immutable.ts, 260, 78), Decl(immutable.ts, 314, 3), Decl(immutable.ts, 315, 58), Decl(immutable.ts, 316, 81), Decl(immutable.ts, 317, 76) ... and 4 more) +>Set : Symbol(Seq.Set, Decl(immutable.ts, 297, 5), Decl(immutable.ts, 300, 5), Decl(immutable.ts, 301, 40), Decl(immutable.ts, 302, 41), Decl(immutable.ts, 303, 64)) +>V : Symbol(V, Decl(immutable.ts, 406, 32)) // Iterators keys(): IterableIterator; ->keys : Symbol(Collection.keys, Decl(immutable.d.ts, 439, 27)) +>keys : Symbol(Collection.keys, Decl(immutable.ts, 439, 27)) >IterableIterator : Symbol(IterableIterator, Decl(lib.es2015.iterable.d.ts, --, --)) ->K : Symbol(K, Decl(immutable.d.ts, 406, 30)) +>K : Symbol(K, Decl(immutable.ts, 406, 30)) values(): IterableIterator; ->values : Symbol(Collection.values, Decl(immutable.d.ts, 441, 32)) +>values : Symbol(Collection.values, Decl(immutable.ts, 441, 32)) >IterableIterator : Symbol(IterableIterator, Decl(lib.es2015.iterable.d.ts, --, --)) ->V : Symbol(V, Decl(immutable.d.ts, 406, 32)) +>V : Symbol(V, Decl(immutable.ts, 406, 32)) entries(): IterableIterator<[K, V]>; ->entries : Symbol(Collection.entries, Decl(immutable.d.ts, 442, 34)) +>entries : Symbol(Collection.entries, Decl(immutable.ts, 442, 34)) >IterableIterator : Symbol(IterableIterator, Decl(lib.es2015.iterable.d.ts, --, --)) ->K : Symbol(K, Decl(immutable.d.ts, 406, 30)) ->V : Symbol(V, Decl(immutable.d.ts, 406, 32)) +>K : Symbol(K, Decl(immutable.ts, 406, 30)) +>V : Symbol(V, Decl(immutable.ts, 406, 32)) // Collections (Seq) keySeq(): Seq.Indexed; ->keySeq : Symbol(Collection.keySeq, Decl(immutable.d.ts, 443, 40)) ->Seq : Symbol(Seq, Decl(immutable.d.ts, 260, 78), Decl(immutable.d.ts, 314, 3), Decl(immutable.d.ts, 315, 58), Decl(immutable.d.ts, 316, 81), Decl(immutable.d.ts, 317, 76) ... and 4 more) ->Indexed : Symbol(Seq.Indexed, Decl(immutable.d.ts, 281, 5), Decl(immutable.d.ts, 284, 5), Decl(immutable.d.ts, 285, 48), Decl(immutable.d.ts, 286, 49), Decl(immutable.d.ts, 287, 72)) ->K : Symbol(K, Decl(immutable.d.ts, 406, 30)) +>keySeq : Symbol(Collection.keySeq, Decl(immutable.ts, 443, 40)) +>Seq : Symbol(Seq, Decl(immutable.ts, 260, 78), Decl(immutable.ts, 314, 3), Decl(immutable.ts, 315, 58), Decl(immutable.ts, 316, 81), Decl(immutable.ts, 317, 76) ... and 4 more) +>Indexed : Symbol(Seq.Indexed, Decl(immutable.ts, 281, 5), Decl(immutable.ts, 284, 5), Decl(immutable.ts, 285, 48), Decl(immutable.ts, 286, 49), Decl(immutable.ts, 287, 72)) +>K : Symbol(K, Decl(immutable.ts, 406, 30)) valueSeq(): Seq.Indexed; ->valueSeq : Symbol(Collection.valueSeq, Decl(immutable.d.ts, 445, 29)) ->Seq : Symbol(Seq, Decl(immutable.d.ts, 260, 78), Decl(immutable.d.ts, 314, 3), Decl(immutable.d.ts, 315, 58), Decl(immutable.d.ts, 316, 81), Decl(immutable.d.ts, 317, 76) ... and 4 more) ->Indexed : Symbol(Seq.Indexed, Decl(immutable.d.ts, 281, 5), Decl(immutable.d.ts, 284, 5), Decl(immutable.d.ts, 285, 48), Decl(immutable.d.ts, 286, 49), Decl(immutable.d.ts, 287, 72)) ->V : Symbol(V, Decl(immutable.d.ts, 406, 32)) +>valueSeq : Symbol(Collection.valueSeq, Decl(immutable.ts, 445, 29)) +>Seq : Symbol(Seq, Decl(immutable.ts, 260, 78), Decl(immutable.ts, 314, 3), Decl(immutable.ts, 315, 58), Decl(immutable.ts, 316, 81), Decl(immutable.ts, 317, 76) ... and 4 more) +>Indexed : Symbol(Seq.Indexed, Decl(immutable.ts, 281, 5), Decl(immutable.ts, 284, 5), Decl(immutable.ts, 285, 48), Decl(immutable.ts, 286, 49), Decl(immutable.ts, 287, 72)) +>V : Symbol(V, Decl(immutable.ts, 406, 32)) entrySeq(): Seq.Indexed<[K, V]>; ->entrySeq : Symbol(Collection.entrySeq, Decl(immutable.d.ts, 446, 31)) ->Seq : Symbol(Seq, Decl(immutable.d.ts, 260, 78), Decl(immutable.d.ts, 314, 3), Decl(immutable.d.ts, 315, 58), Decl(immutable.d.ts, 316, 81), Decl(immutable.d.ts, 317, 76) ... and 4 more) ->Indexed : Symbol(Seq.Indexed, Decl(immutable.d.ts, 281, 5), Decl(immutable.d.ts, 284, 5), Decl(immutable.d.ts, 285, 48), Decl(immutable.d.ts, 286, 49), Decl(immutable.d.ts, 287, 72)) ->K : Symbol(K, Decl(immutable.d.ts, 406, 30)) ->V : Symbol(V, Decl(immutable.d.ts, 406, 32)) +>entrySeq : Symbol(Collection.entrySeq, Decl(immutable.ts, 446, 31)) +>Seq : Symbol(Seq, Decl(immutable.ts, 260, 78), Decl(immutable.ts, 314, 3), Decl(immutable.ts, 315, 58), Decl(immutable.ts, 316, 81), Decl(immutable.ts, 317, 76) ... and 4 more) +>Indexed : Symbol(Seq.Indexed, Decl(immutable.ts, 281, 5), Decl(immutable.ts, 284, 5), Decl(immutable.ts, 285, 48), Decl(immutable.ts, 286, 49), Decl(immutable.ts, 287, 72)) +>K : Symbol(K, Decl(immutable.ts, 406, 30)) +>V : Symbol(V, Decl(immutable.ts, 406, 32)) // Sequence algorithms map(mapper: (value: V, key: K, iter: this) => M, context?: any): Collection; ->map : Symbol(Collection.map, Decl(immutable.d.ts, 447, 36)) ->M : Symbol(M, Decl(immutable.d.ts, 449, 8)) ->mapper : Symbol(mapper, Decl(immutable.d.ts, 449, 11)) ->value : Symbol(value, Decl(immutable.d.ts, 449, 20)) ->V : Symbol(V, Decl(immutable.d.ts, 406, 32)) ->key : Symbol(key, Decl(immutable.d.ts, 449, 29)) ->K : Symbol(K, Decl(immutable.d.ts, 406, 30)) ->iter : Symbol(iter, Decl(immutable.d.ts, 449, 37)) ->M : Symbol(M, Decl(immutable.d.ts, 449, 8)) ->context : Symbol(context, Decl(immutable.d.ts, 449, 55)) ->Collection : Symbol(Collection, Decl(immutable.d.ts, 331, 3), Decl(immutable.d.ts, 402, 3), Decl(immutable.d.ts, 403, 79), Decl(immutable.d.ts, 404, 80), Decl(immutable.d.ts, 405, 86)) ->K : Symbol(K, Decl(immutable.d.ts, 406, 30)) ->M : Symbol(M, Decl(immutable.d.ts, 449, 8)) +>map : Symbol(Collection.map, Decl(immutable.ts, 447, 36)) +>M : Symbol(M, Decl(immutable.ts, 449, 8)) +>mapper : Symbol(mapper, Decl(immutable.ts, 449, 11)) +>value : Symbol(value, Decl(immutable.ts, 449, 20)) +>V : Symbol(V, Decl(immutable.ts, 406, 32)) +>key : Symbol(key, Decl(immutable.ts, 449, 29)) +>K : Symbol(K, Decl(immutable.ts, 406, 30)) +>iter : Symbol(iter, Decl(immutable.ts, 449, 37)) +>M : Symbol(M, Decl(immutable.ts, 449, 8)) +>context : Symbol(context, Decl(immutable.ts, 449, 55)) +>Collection : Symbol(Collection, Decl(immutable.ts, 331, 3), Decl(immutable.ts, 402, 3), Decl(immutable.ts, 403, 79), Decl(immutable.ts, 404, 80), Decl(immutable.ts, 405, 86)) +>K : Symbol(K, Decl(immutable.ts, 406, 30)) +>M : Symbol(M, Decl(immutable.ts, 449, 8)) filter(predicate: (value: V, key: K, iter: this) => value is F, context?: any): Collection; ->filter : Symbol(Collection.filter, Decl(immutable.d.ts, 449, 89), Decl(immutable.d.ts, 450, 114)) ->F : Symbol(F, Decl(immutable.d.ts, 450, 11)) ->V : Symbol(V, Decl(immutable.d.ts, 406, 32)) ->predicate : Symbol(predicate, Decl(immutable.d.ts, 450, 24)) ->value : Symbol(value, Decl(immutable.d.ts, 450, 36)) ->V : Symbol(V, Decl(immutable.d.ts, 406, 32)) ->key : Symbol(key, Decl(immutable.d.ts, 450, 45)) ->K : Symbol(K, Decl(immutable.d.ts, 406, 30)) ->iter : Symbol(iter, Decl(immutable.d.ts, 450, 53)) ->value : Symbol(value, Decl(immutable.d.ts, 450, 36)) ->F : Symbol(F, Decl(immutable.d.ts, 450, 11)) ->context : Symbol(context, Decl(immutable.d.ts, 450, 80)) ->Collection : Symbol(Collection, Decl(immutable.d.ts, 331, 3), Decl(immutable.d.ts, 402, 3), Decl(immutable.d.ts, 403, 79), Decl(immutable.d.ts, 404, 80), Decl(immutable.d.ts, 405, 86)) ->K : Symbol(K, Decl(immutable.d.ts, 406, 30)) ->F : Symbol(F, Decl(immutable.d.ts, 450, 11)) +>filter : Symbol(Collection.filter, Decl(immutable.ts, 449, 89), Decl(immutable.ts, 450, 114)) +>F : Symbol(F, Decl(immutable.ts, 450, 11)) +>V : Symbol(V, Decl(immutable.ts, 406, 32)) +>predicate : Symbol(predicate, Decl(immutable.ts, 450, 24)) +>value : Symbol(value, Decl(immutable.ts, 450, 36)) +>V : Symbol(V, Decl(immutable.ts, 406, 32)) +>key : Symbol(key, Decl(immutable.ts, 450, 45)) +>K : Symbol(K, Decl(immutable.ts, 406, 30)) +>iter : Symbol(iter, Decl(immutable.ts, 450, 53)) +>value : Symbol(value, Decl(immutable.ts, 450, 36)) +>F : Symbol(F, Decl(immutable.ts, 450, 11)) +>context : Symbol(context, Decl(immutable.ts, 450, 80)) +>Collection : Symbol(Collection, Decl(immutable.ts, 331, 3), Decl(immutable.ts, 402, 3), Decl(immutable.ts, 403, 79), Decl(immutable.ts, 404, 80), Decl(immutable.ts, 405, 86)) +>K : Symbol(K, Decl(immutable.ts, 406, 30)) +>F : Symbol(F, Decl(immutable.ts, 450, 11)) filter(predicate: (value: V, key: K, iter: this) => any, context?: any): this; ->filter : Symbol(Collection.filter, Decl(immutable.d.ts, 449, 89), Decl(immutable.d.ts, 450, 114)) ->predicate : Symbol(predicate, Decl(immutable.d.ts, 451, 11)) ->value : Symbol(value, Decl(immutable.d.ts, 451, 23)) ->V : Symbol(V, Decl(immutable.d.ts, 406, 32)) ->key : Symbol(key, Decl(immutable.d.ts, 451, 32)) ->K : Symbol(K, Decl(immutable.d.ts, 406, 30)) ->iter : Symbol(iter, Decl(immutable.d.ts, 451, 40)) ->context : Symbol(context, Decl(immutable.d.ts, 451, 60)) +>filter : Symbol(Collection.filter, Decl(immutable.ts, 449, 89), Decl(immutable.ts, 450, 114)) +>predicate : Symbol(predicate, Decl(immutable.ts, 451, 11)) +>value : Symbol(value, Decl(immutable.ts, 451, 23)) +>V : Symbol(V, Decl(immutable.ts, 406, 32)) +>key : Symbol(key, Decl(immutable.ts, 451, 32)) +>K : Symbol(K, Decl(immutable.ts, 406, 30)) +>iter : Symbol(iter, Decl(immutable.ts, 451, 40)) +>context : Symbol(context, Decl(immutable.ts, 451, 60)) filterNot(predicate: (value: V, key: K, iter: this) => boolean, context?: any): this; ->filterNot : Symbol(Collection.filterNot, Decl(immutable.d.ts, 451, 82)) ->predicate : Symbol(predicate, Decl(immutable.d.ts, 452, 14)) ->value : Symbol(value, Decl(immutable.d.ts, 452, 26)) ->V : Symbol(V, Decl(immutable.d.ts, 406, 32)) ->key : Symbol(key, Decl(immutable.d.ts, 452, 35)) ->K : Symbol(K, Decl(immutable.d.ts, 406, 30)) ->iter : Symbol(iter, Decl(immutable.d.ts, 452, 43)) ->context : Symbol(context, Decl(immutable.d.ts, 452, 67)) +>filterNot : Symbol(Collection.filterNot, Decl(immutable.ts, 451, 82)) +>predicate : Symbol(predicate, Decl(immutable.ts, 452, 14)) +>value : Symbol(value, Decl(immutable.ts, 452, 26)) +>V : Symbol(V, Decl(immutable.ts, 406, 32)) +>key : Symbol(key, Decl(immutable.ts, 452, 35)) +>K : Symbol(K, Decl(immutable.ts, 406, 30)) +>iter : Symbol(iter, Decl(immutable.ts, 452, 43)) +>context : Symbol(context, Decl(immutable.ts, 452, 67)) reverse(): this; ->reverse : Symbol(Collection.reverse, Decl(immutable.d.ts, 452, 89)) +>reverse : Symbol(Collection.reverse, Decl(immutable.ts, 452, 89)) sort(comparator?: (valueA: V, valueB: V) => number): this; ->sort : Symbol(Collection.sort, Decl(immutable.d.ts, 453, 20)) ->comparator : Symbol(comparator, Decl(immutable.d.ts, 454, 9)) ->valueA : Symbol(valueA, Decl(immutable.d.ts, 454, 23)) ->V : Symbol(V, Decl(immutable.d.ts, 406, 32)) ->valueB : Symbol(valueB, Decl(immutable.d.ts, 454, 33)) ->V : Symbol(V, Decl(immutable.d.ts, 406, 32)) +>sort : Symbol(Collection.sort, Decl(immutable.ts, 453, 20)) +>comparator : Symbol(comparator, Decl(immutable.ts, 454, 9)) +>valueA : Symbol(valueA, Decl(immutable.ts, 454, 23)) +>V : Symbol(V, Decl(immutable.ts, 406, 32)) +>valueB : Symbol(valueB, Decl(immutable.ts, 454, 33)) +>V : Symbol(V, Decl(immutable.ts, 406, 32)) sortBy(comparatorValueMapper: (value: V, key: K, iter: this) => C, comparator?: (valueA: C, valueB: C) => number): this; ->sortBy : Symbol(Collection.sortBy, Decl(immutable.d.ts, 454, 62)) ->C : Symbol(C, Decl(immutable.d.ts, 455, 11)) ->comparatorValueMapper : Symbol(comparatorValueMapper, Decl(immutable.d.ts, 455, 14)) ->value : Symbol(value, Decl(immutable.d.ts, 455, 38)) ->V : Symbol(V, Decl(immutable.d.ts, 406, 32)) ->key : Symbol(key, Decl(immutable.d.ts, 455, 47)) ->K : Symbol(K, Decl(immutable.d.ts, 406, 30)) ->iter : Symbol(iter, Decl(immutable.d.ts, 455, 55)) ->C : Symbol(C, Decl(immutable.d.ts, 455, 11)) ->comparator : Symbol(comparator, Decl(immutable.d.ts, 455, 73)) ->valueA : Symbol(valueA, Decl(immutable.d.ts, 455, 88)) ->C : Symbol(C, Decl(immutable.d.ts, 455, 11)) ->valueB : Symbol(valueB, Decl(immutable.d.ts, 455, 98)) ->C : Symbol(C, Decl(immutable.d.ts, 455, 11)) +>sortBy : Symbol(Collection.sortBy, Decl(immutable.ts, 454, 62)) +>C : Symbol(C, Decl(immutable.ts, 455, 11)) +>comparatorValueMapper : Symbol(comparatorValueMapper, Decl(immutable.ts, 455, 14)) +>value : Symbol(value, Decl(immutable.ts, 455, 38)) +>V : Symbol(V, Decl(immutable.ts, 406, 32)) +>key : Symbol(key, Decl(immutable.ts, 455, 47)) +>K : Symbol(K, Decl(immutable.ts, 406, 30)) +>iter : Symbol(iter, Decl(immutable.ts, 455, 55)) +>C : Symbol(C, Decl(immutable.ts, 455, 11)) +>comparator : Symbol(comparator, Decl(immutable.ts, 455, 73)) +>valueA : Symbol(valueA, Decl(immutable.ts, 455, 88)) +>C : Symbol(C, Decl(immutable.ts, 455, 11)) +>valueB : Symbol(valueB, Decl(immutable.ts, 455, 98)) +>C : Symbol(C, Decl(immutable.ts, 455, 11)) groupBy(grouper: (value: V, key: K, iter: this) => G, context?: any): /*Map*/Seq.Keyed>; ->groupBy : Symbol(Collection.groupBy, Decl(immutable.d.ts, 455, 127)) ->G : Symbol(G, Decl(immutable.d.ts, 456, 12)) ->grouper : Symbol(grouper, Decl(immutable.d.ts, 456, 15)) ->value : Symbol(value, Decl(immutable.d.ts, 456, 25)) ->V : Symbol(V, Decl(immutable.d.ts, 406, 32)) ->key : Symbol(key, Decl(immutable.d.ts, 456, 34)) ->K : Symbol(K, Decl(immutable.d.ts, 406, 30)) ->iter : Symbol(iter, Decl(immutable.d.ts, 456, 42)) ->G : Symbol(G, Decl(immutable.d.ts, 456, 12)) ->context : Symbol(context, Decl(immutable.d.ts, 456, 60)) ->Seq : Symbol(Seq, Decl(immutable.d.ts, 260, 78), Decl(immutable.d.ts, 314, 3), Decl(immutable.d.ts, 315, 58), Decl(immutable.d.ts, 316, 81), Decl(immutable.d.ts, 317, 76) ... and 4 more) ->Keyed : Symbol(Seq.Keyed, Decl(immutable.d.ts, 263, 56), Decl(immutable.d.ts, 264, 26), Decl(immutable.d.ts, 265, 79), Decl(immutable.d.ts, 266, 76), Decl(immutable.d.ts, 267, 51) ... and 1 more) ->G : Symbol(G, Decl(immutable.d.ts, 456, 12)) ->Collection : Symbol(Collection, Decl(immutable.d.ts, 331, 3), Decl(immutable.d.ts, 402, 3), Decl(immutable.d.ts, 403, 79), Decl(immutable.d.ts, 404, 80), Decl(immutable.d.ts, 405, 86)) ->K : Symbol(K, Decl(immutable.d.ts, 406, 30)) ->V : Symbol(V, Decl(immutable.d.ts, 406, 32)) +>groupBy : Symbol(Collection.groupBy, Decl(immutable.ts, 455, 127)) +>G : Symbol(G, Decl(immutable.ts, 456, 12)) +>grouper : Symbol(grouper, Decl(immutable.ts, 456, 15)) +>value : Symbol(value, Decl(immutable.ts, 456, 25)) +>V : Symbol(V, Decl(immutable.ts, 406, 32)) +>key : Symbol(key, Decl(immutable.ts, 456, 34)) +>K : Symbol(K, Decl(immutable.ts, 406, 30)) +>iter : Symbol(iter, Decl(immutable.ts, 456, 42)) +>G : Symbol(G, Decl(immutable.ts, 456, 12)) +>context : Symbol(context, Decl(immutable.ts, 456, 60)) +>Seq : Symbol(Seq, Decl(immutable.ts, 260, 78), Decl(immutable.ts, 314, 3), Decl(immutable.ts, 315, 58), Decl(immutable.ts, 316, 81), Decl(immutable.ts, 317, 76) ... and 4 more) +>Keyed : Symbol(Seq.Keyed, Decl(immutable.ts, 263, 56), Decl(immutable.ts, 264, 26), Decl(immutable.ts, 265, 79), Decl(immutable.ts, 266, 76), Decl(immutable.ts, 267, 51) ... and 1 more) +>G : Symbol(G, Decl(immutable.ts, 456, 12)) +>Collection : Symbol(Collection, Decl(immutable.ts, 331, 3), Decl(immutable.ts, 402, 3), Decl(immutable.ts, 403, 79), Decl(immutable.ts, 404, 80), Decl(immutable.ts, 405, 86)) +>K : Symbol(K, Decl(immutable.ts, 406, 30)) +>V : Symbol(V, Decl(immutable.ts, 406, 32)) // Side effects forEach(sideEffect: (value: V, key: K, iter: this) => any, context?: any): number; ->forEach : Symbol(Collection.forEach, Decl(immutable.d.ts, 456, 123)) ->sideEffect : Symbol(sideEffect, Decl(immutable.d.ts, 458, 12)) ->value : Symbol(value, Decl(immutable.d.ts, 458, 25)) ->V : Symbol(V, Decl(immutable.d.ts, 406, 32)) ->key : Symbol(key, Decl(immutable.d.ts, 458, 34)) ->K : Symbol(K, Decl(immutable.d.ts, 406, 30)) ->iter : Symbol(iter, Decl(immutable.d.ts, 458, 42)) ->context : Symbol(context, Decl(immutable.d.ts, 458, 62)) +>forEach : Symbol(Collection.forEach, Decl(immutable.ts, 456, 123)) +>sideEffect : Symbol(sideEffect, Decl(immutable.ts, 458, 12)) +>value : Symbol(value, Decl(immutable.ts, 458, 25)) +>V : Symbol(V, Decl(immutable.ts, 406, 32)) +>key : Symbol(key, Decl(immutable.ts, 458, 34)) +>K : Symbol(K, Decl(immutable.ts, 406, 30)) +>iter : Symbol(iter, Decl(immutable.ts, 458, 42)) +>context : Symbol(context, Decl(immutable.ts, 458, 62)) // Creating subsets slice(begin?: number, end?: number): this; ->slice : Symbol(Collection.slice, Decl(immutable.d.ts, 458, 86)) ->begin : Symbol(begin, Decl(immutable.d.ts, 460, 10)) ->end : Symbol(end, Decl(immutable.d.ts, 460, 25)) +>slice : Symbol(Collection.slice, Decl(immutable.ts, 458, 86)) +>begin : Symbol(begin, Decl(immutable.ts, 460, 10)) +>end : Symbol(end, Decl(immutable.ts, 460, 25)) rest(): this; ->rest : Symbol(Collection.rest, Decl(immutable.d.ts, 460, 46)) +>rest : Symbol(Collection.rest, Decl(immutable.ts, 460, 46)) butLast(): this; ->butLast : Symbol(Collection.butLast, Decl(immutable.d.ts, 461, 17)) +>butLast : Symbol(Collection.butLast, Decl(immutable.ts, 461, 17)) skip(amount: number): this; ->skip : Symbol(Collection.skip, Decl(immutable.d.ts, 462, 20)) ->amount : Symbol(amount, Decl(immutable.d.ts, 463, 9)) +>skip : Symbol(Collection.skip, Decl(immutable.ts, 462, 20)) +>amount : Symbol(amount, Decl(immutable.ts, 463, 9)) skipLast(amount: number): this; ->skipLast : Symbol(Collection.skipLast, Decl(immutable.d.ts, 463, 31)) ->amount : Symbol(amount, Decl(immutable.d.ts, 464, 13)) +>skipLast : Symbol(Collection.skipLast, Decl(immutable.ts, 463, 31)) +>amount : Symbol(amount, Decl(immutable.ts, 464, 13)) skipWhile(predicate: (value: V, key: K, iter: this) => boolean, context?: any): this; ->skipWhile : Symbol(Collection.skipWhile, Decl(immutable.d.ts, 464, 35)) ->predicate : Symbol(predicate, Decl(immutable.d.ts, 465, 14)) ->value : Symbol(value, Decl(immutable.d.ts, 465, 26)) ->V : Symbol(V, Decl(immutable.d.ts, 406, 32)) ->key : Symbol(key, Decl(immutable.d.ts, 465, 35)) ->K : Symbol(K, Decl(immutable.d.ts, 406, 30)) ->iter : Symbol(iter, Decl(immutable.d.ts, 465, 43)) ->context : Symbol(context, Decl(immutable.d.ts, 465, 67)) +>skipWhile : Symbol(Collection.skipWhile, Decl(immutable.ts, 464, 35)) +>predicate : Symbol(predicate, Decl(immutable.ts, 465, 14)) +>value : Symbol(value, Decl(immutable.ts, 465, 26)) +>V : Symbol(V, Decl(immutable.ts, 406, 32)) +>key : Symbol(key, Decl(immutable.ts, 465, 35)) +>K : Symbol(K, Decl(immutable.ts, 406, 30)) +>iter : Symbol(iter, Decl(immutable.ts, 465, 43)) +>context : Symbol(context, Decl(immutable.ts, 465, 67)) skipUntil(predicate: (value: V, key: K, iter: this) => boolean, context?: any): this; ->skipUntil : Symbol(Collection.skipUntil, Decl(immutable.d.ts, 465, 89)) ->predicate : Symbol(predicate, Decl(immutable.d.ts, 466, 14)) ->value : Symbol(value, Decl(immutable.d.ts, 466, 26)) ->V : Symbol(V, Decl(immutable.d.ts, 406, 32)) ->key : Symbol(key, Decl(immutable.d.ts, 466, 35)) ->K : Symbol(K, Decl(immutable.d.ts, 406, 30)) ->iter : Symbol(iter, Decl(immutable.d.ts, 466, 43)) ->context : Symbol(context, Decl(immutable.d.ts, 466, 67)) +>skipUntil : Symbol(Collection.skipUntil, Decl(immutable.ts, 465, 89)) +>predicate : Symbol(predicate, Decl(immutable.ts, 466, 14)) +>value : Symbol(value, Decl(immutable.ts, 466, 26)) +>V : Symbol(V, Decl(immutable.ts, 406, 32)) +>key : Symbol(key, Decl(immutable.ts, 466, 35)) +>K : Symbol(K, Decl(immutable.ts, 406, 30)) +>iter : Symbol(iter, Decl(immutable.ts, 466, 43)) +>context : Symbol(context, Decl(immutable.ts, 466, 67)) take(amount: number): this; ->take : Symbol(Collection.take, Decl(immutable.d.ts, 466, 89)) ->amount : Symbol(amount, Decl(immutable.d.ts, 467, 9)) +>take : Symbol(Collection.take, Decl(immutable.ts, 466, 89)) +>amount : Symbol(amount, Decl(immutable.ts, 467, 9)) takeLast(amount: number): this; ->takeLast : Symbol(Collection.takeLast, Decl(immutable.d.ts, 467, 31)) ->amount : Symbol(amount, Decl(immutable.d.ts, 468, 13)) +>takeLast : Symbol(Collection.takeLast, Decl(immutable.ts, 467, 31)) +>amount : Symbol(amount, Decl(immutable.ts, 468, 13)) takeWhile(predicate: (value: V, key: K, iter: this) => boolean, context?: any): this; ->takeWhile : Symbol(Collection.takeWhile, Decl(immutable.d.ts, 468, 35)) ->predicate : Symbol(predicate, Decl(immutable.d.ts, 469, 14)) ->value : Symbol(value, Decl(immutable.d.ts, 469, 26)) ->V : Symbol(V, Decl(immutable.d.ts, 406, 32)) ->key : Symbol(key, Decl(immutable.d.ts, 469, 35)) ->K : Symbol(K, Decl(immutable.d.ts, 406, 30)) ->iter : Symbol(iter, Decl(immutable.d.ts, 469, 43)) ->context : Symbol(context, Decl(immutable.d.ts, 469, 67)) +>takeWhile : Symbol(Collection.takeWhile, Decl(immutable.ts, 468, 35)) +>predicate : Symbol(predicate, Decl(immutable.ts, 469, 14)) +>value : Symbol(value, Decl(immutable.ts, 469, 26)) +>V : Symbol(V, Decl(immutable.ts, 406, 32)) +>key : Symbol(key, Decl(immutable.ts, 469, 35)) +>K : Symbol(K, Decl(immutable.ts, 406, 30)) +>iter : Symbol(iter, Decl(immutable.ts, 469, 43)) +>context : Symbol(context, Decl(immutable.ts, 469, 67)) takeUntil(predicate: (value: V, key: K, iter: this) => boolean, context?: any): this; ->takeUntil : Symbol(Collection.takeUntil, Decl(immutable.d.ts, 469, 89)) ->predicate : Symbol(predicate, Decl(immutable.d.ts, 470, 14)) ->value : Symbol(value, Decl(immutable.d.ts, 470, 26)) ->V : Symbol(V, Decl(immutable.d.ts, 406, 32)) ->key : Symbol(key, Decl(immutable.d.ts, 470, 35)) ->K : Symbol(K, Decl(immutable.d.ts, 406, 30)) ->iter : Symbol(iter, Decl(immutable.d.ts, 470, 43)) ->context : Symbol(context, Decl(immutable.d.ts, 470, 67)) +>takeUntil : Symbol(Collection.takeUntil, Decl(immutable.ts, 469, 89)) +>predicate : Symbol(predicate, Decl(immutable.ts, 470, 14)) +>value : Symbol(value, Decl(immutable.ts, 470, 26)) +>V : Symbol(V, Decl(immutable.ts, 406, 32)) +>key : Symbol(key, Decl(immutable.ts, 470, 35)) +>K : Symbol(K, Decl(immutable.ts, 406, 30)) +>iter : Symbol(iter, Decl(immutable.ts, 470, 43)) +>context : Symbol(context, Decl(immutable.ts, 470, 67)) // Combination concat(...valuesOrCollections: Array): Collection; ->concat : Symbol(Collection.concat, Decl(immutable.d.ts, 470, 89)) ->valuesOrCollections : Symbol(valuesOrCollections, Decl(immutable.d.ts, 472, 11)) +>concat : Symbol(Collection.concat, Decl(immutable.ts, 470, 89)) +>valuesOrCollections : Symbol(valuesOrCollections, Decl(immutable.ts, 472, 11)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) ->Collection : Symbol(Collection, Decl(immutable.d.ts, 331, 3), Decl(immutable.d.ts, 402, 3), Decl(immutable.d.ts, 403, 79), Decl(immutable.d.ts, 404, 80), Decl(immutable.d.ts, 405, 86)) +>Collection : Symbol(Collection, Decl(immutable.ts, 331, 3), Decl(immutable.ts, 402, 3), Decl(immutable.ts, 403, 79), Decl(immutable.ts, 404, 80), Decl(immutable.ts, 405, 86)) flatten(depth?: number): Collection; ->flatten : Symbol(Collection.flatten, Decl(immutable.d.ts, 472, 69), Decl(immutable.d.ts, 473, 50)) ->depth : Symbol(depth, Decl(immutable.d.ts, 473, 12)) ->Collection : Symbol(Collection, Decl(immutable.d.ts, 331, 3), Decl(immutable.d.ts, 402, 3), Decl(immutable.d.ts, 403, 79), Decl(immutable.d.ts, 404, 80), Decl(immutable.d.ts, 405, 86)) +>flatten : Symbol(Collection.flatten, Decl(immutable.ts, 472, 69), Decl(immutable.ts, 473, 50)) +>depth : Symbol(depth, Decl(immutable.ts, 473, 12)) +>Collection : Symbol(Collection, Decl(immutable.ts, 331, 3), Decl(immutable.ts, 402, 3), Decl(immutable.ts, 403, 79), Decl(immutable.ts, 404, 80), Decl(immutable.ts, 405, 86)) flatten(shallow?: boolean): Collection; ->flatten : Symbol(Collection.flatten, Decl(immutable.d.ts, 472, 69), Decl(immutable.d.ts, 473, 50)) ->shallow : Symbol(shallow, Decl(immutable.d.ts, 474, 12)) ->Collection : Symbol(Collection, Decl(immutable.d.ts, 331, 3), Decl(immutable.d.ts, 402, 3), Decl(immutable.d.ts, 403, 79), Decl(immutable.d.ts, 404, 80), Decl(immutable.d.ts, 405, 86)) +>flatten : Symbol(Collection.flatten, Decl(immutable.ts, 472, 69), Decl(immutable.ts, 473, 50)) +>shallow : Symbol(shallow, Decl(immutable.ts, 474, 12)) +>Collection : Symbol(Collection, Decl(immutable.ts, 331, 3), Decl(immutable.ts, 402, 3), Decl(immutable.ts, 403, 79), Decl(immutable.ts, 404, 80), Decl(immutable.ts, 405, 86)) flatMap(mapper: (value: V, key: K, iter: this) => Iterable, context?: any): Collection; ->flatMap : Symbol(Collection.flatMap, Decl(immutable.d.ts, 474, 53)) ->M : Symbol(M, Decl(immutable.d.ts, 475, 12)) ->mapper : Symbol(mapper, Decl(immutable.d.ts, 475, 15)) ->value : Symbol(value, Decl(immutable.d.ts, 475, 24)) ->V : Symbol(V, Decl(immutable.d.ts, 406, 32)) ->key : Symbol(key, Decl(immutable.d.ts, 475, 33)) ->K : Symbol(K, Decl(immutable.d.ts, 406, 30)) ->iter : Symbol(iter, Decl(immutable.d.ts, 475, 41)) +>flatMap : Symbol(Collection.flatMap, Decl(immutable.ts, 474, 53)) +>M : Symbol(M, Decl(immutable.ts, 475, 12)) +>mapper : Symbol(mapper, Decl(immutable.ts, 475, 15)) +>value : Symbol(value, Decl(immutable.ts, 475, 24)) +>V : Symbol(V, Decl(immutable.ts, 406, 32)) +>key : Symbol(key, Decl(immutable.ts, 475, 33)) +>K : Symbol(K, Decl(immutable.ts, 406, 30)) +>iter : Symbol(iter, Decl(immutable.ts, 475, 41)) >Iterable : Symbol(Iterable, Decl(lib.es2015.iterable.d.ts, --, --)) ->M : Symbol(M, Decl(immutable.d.ts, 475, 12)) ->context : Symbol(context, Decl(immutable.d.ts, 475, 69)) ->Collection : Symbol(Collection, Decl(immutable.d.ts, 331, 3), Decl(immutable.d.ts, 402, 3), Decl(immutable.d.ts, 403, 79), Decl(immutable.d.ts, 404, 80), Decl(immutable.d.ts, 405, 86)) ->K : Symbol(K, Decl(immutable.d.ts, 406, 30)) ->M : Symbol(M, Decl(immutable.d.ts, 475, 12)) +>M : Symbol(M, Decl(immutable.ts, 475, 12)) +>context : Symbol(context, Decl(immutable.ts, 475, 69)) +>Collection : Symbol(Collection, Decl(immutable.ts, 331, 3), Decl(immutable.ts, 402, 3), Decl(immutable.ts, 403, 79), Decl(immutable.ts, 404, 80), Decl(immutable.ts, 405, 86)) +>K : Symbol(K, Decl(immutable.ts, 406, 30)) +>M : Symbol(M, Decl(immutable.ts, 475, 12)) // Reducing a value reduce(reducer: (reduction: R, value: V, key: K, iter: this) => R, initialReduction: R, context?: any): R; ->reduce : Symbol(Collection.reduce, Decl(immutable.d.ts, 475, 103), Decl(immutable.d.ts, 477, 113)) ->R : Symbol(R, Decl(immutable.d.ts, 477, 11)) ->reducer : Symbol(reducer, Decl(immutable.d.ts, 477, 14)) ->reduction : Symbol(reduction, Decl(immutable.d.ts, 477, 24)) ->R : Symbol(R, Decl(immutable.d.ts, 477, 11)) ->value : Symbol(value, Decl(immutable.d.ts, 477, 37)) ->V : Symbol(V, Decl(immutable.d.ts, 406, 32)) ->key : Symbol(key, Decl(immutable.d.ts, 477, 47)) ->K : Symbol(K, Decl(immutable.d.ts, 406, 30)) ->iter : Symbol(iter, Decl(immutable.d.ts, 477, 55)) ->R : Symbol(R, Decl(immutable.d.ts, 477, 11)) ->initialReduction : Symbol(initialReduction, Decl(immutable.d.ts, 477, 73)) ->R : Symbol(R, Decl(immutable.d.ts, 477, 11)) ->context : Symbol(context, Decl(immutable.d.ts, 477, 94)) ->R : Symbol(R, Decl(immutable.d.ts, 477, 11)) +>reduce : Symbol(Collection.reduce, Decl(immutable.ts, 475, 103), Decl(immutable.ts, 477, 113)) +>R : Symbol(R, Decl(immutable.ts, 477, 11)) +>reducer : Symbol(reducer, Decl(immutable.ts, 477, 14)) +>reduction : Symbol(reduction, Decl(immutable.ts, 477, 24)) +>R : Symbol(R, Decl(immutable.ts, 477, 11)) +>value : Symbol(value, Decl(immutable.ts, 477, 37)) +>V : Symbol(V, Decl(immutable.ts, 406, 32)) +>key : Symbol(key, Decl(immutable.ts, 477, 47)) +>K : Symbol(K, Decl(immutable.ts, 406, 30)) +>iter : Symbol(iter, Decl(immutable.ts, 477, 55)) +>R : Symbol(R, Decl(immutable.ts, 477, 11)) +>initialReduction : Symbol(initialReduction, Decl(immutable.ts, 477, 73)) +>R : Symbol(R, Decl(immutable.ts, 477, 11)) +>context : Symbol(context, Decl(immutable.ts, 477, 94)) +>R : Symbol(R, Decl(immutable.ts, 477, 11)) reduce(reducer: (reduction: V | R, value: V, key: K, iter: this) => R): R; ->reduce : Symbol(Collection.reduce, Decl(immutable.d.ts, 475, 103), Decl(immutable.d.ts, 477, 113)) ->R : Symbol(R, Decl(immutable.d.ts, 478, 11)) ->reducer : Symbol(reducer, Decl(immutable.d.ts, 478, 14)) ->reduction : Symbol(reduction, Decl(immutable.d.ts, 478, 24)) ->V : Symbol(V, Decl(immutable.d.ts, 406, 32)) ->R : Symbol(R, Decl(immutable.d.ts, 478, 11)) ->value : Symbol(value, Decl(immutable.d.ts, 478, 41)) ->V : Symbol(V, Decl(immutable.d.ts, 406, 32)) ->key : Symbol(key, Decl(immutable.d.ts, 478, 51)) ->K : Symbol(K, Decl(immutable.d.ts, 406, 30)) ->iter : Symbol(iter, Decl(immutable.d.ts, 478, 59)) ->R : Symbol(R, Decl(immutable.d.ts, 478, 11)) ->R : Symbol(R, Decl(immutable.d.ts, 478, 11)) +>reduce : Symbol(Collection.reduce, Decl(immutable.ts, 475, 103), Decl(immutable.ts, 477, 113)) +>R : Symbol(R, Decl(immutable.ts, 478, 11)) +>reducer : Symbol(reducer, Decl(immutable.ts, 478, 14)) +>reduction : Symbol(reduction, Decl(immutable.ts, 478, 24)) +>V : Symbol(V, Decl(immutable.ts, 406, 32)) +>R : Symbol(R, Decl(immutable.ts, 478, 11)) +>value : Symbol(value, Decl(immutable.ts, 478, 41)) +>V : Symbol(V, Decl(immutable.ts, 406, 32)) +>key : Symbol(key, Decl(immutable.ts, 478, 51)) +>K : Symbol(K, Decl(immutable.ts, 406, 30)) +>iter : Symbol(iter, Decl(immutable.ts, 478, 59)) +>R : Symbol(R, Decl(immutable.ts, 478, 11)) +>R : Symbol(R, Decl(immutable.ts, 478, 11)) reduceRight(reducer: (reduction: R, value: V, key: K, iter: this) => R, initialReduction: R, context?: any): R; ->reduceRight : Symbol(Collection.reduceRight, Decl(immutable.d.ts, 478, 81), Decl(immutable.d.ts, 479, 118)) ->R : Symbol(R, Decl(immutable.d.ts, 479, 16)) ->reducer : Symbol(reducer, Decl(immutable.d.ts, 479, 19)) ->reduction : Symbol(reduction, Decl(immutable.d.ts, 479, 29)) ->R : Symbol(R, Decl(immutable.d.ts, 479, 16)) ->value : Symbol(value, Decl(immutable.d.ts, 479, 42)) ->V : Symbol(V, Decl(immutable.d.ts, 406, 32)) ->key : Symbol(key, Decl(immutable.d.ts, 479, 52)) ->K : Symbol(K, Decl(immutable.d.ts, 406, 30)) ->iter : Symbol(iter, Decl(immutable.d.ts, 479, 60)) ->R : Symbol(R, Decl(immutable.d.ts, 479, 16)) ->initialReduction : Symbol(initialReduction, Decl(immutable.d.ts, 479, 78)) ->R : Symbol(R, Decl(immutable.d.ts, 479, 16)) ->context : Symbol(context, Decl(immutable.d.ts, 479, 99)) ->R : Symbol(R, Decl(immutable.d.ts, 479, 16)) +>reduceRight : Symbol(Collection.reduceRight, Decl(immutable.ts, 478, 81), Decl(immutable.ts, 479, 118)) +>R : Symbol(R, Decl(immutable.ts, 479, 16)) +>reducer : Symbol(reducer, Decl(immutable.ts, 479, 19)) +>reduction : Symbol(reduction, Decl(immutable.ts, 479, 29)) +>R : Symbol(R, Decl(immutable.ts, 479, 16)) +>value : Symbol(value, Decl(immutable.ts, 479, 42)) +>V : Symbol(V, Decl(immutable.ts, 406, 32)) +>key : Symbol(key, Decl(immutable.ts, 479, 52)) +>K : Symbol(K, Decl(immutable.ts, 406, 30)) +>iter : Symbol(iter, Decl(immutable.ts, 479, 60)) +>R : Symbol(R, Decl(immutable.ts, 479, 16)) +>initialReduction : Symbol(initialReduction, Decl(immutable.ts, 479, 78)) +>R : Symbol(R, Decl(immutable.ts, 479, 16)) +>context : Symbol(context, Decl(immutable.ts, 479, 99)) +>R : Symbol(R, Decl(immutable.ts, 479, 16)) reduceRight(reducer: (reduction: V | R, value: V, key: K, iter: this) => R): R; ->reduceRight : Symbol(Collection.reduceRight, Decl(immutable.d.ts, 478, 81), Decl(immutable.d.ts, 479, 118)) ->R : Symbol(R, Decl(immutable.d.ts, 480, 16)) ->reducer : Symbol(reducer, Decl(immutable.d.ts, 480, 19)) ->reduction : Symbol(reduction, Decl(immutable.d.ts, 480, 29)) ->V : Symbol(V, Decl(immutable.d.ts, 406, 32)) ->R : Symbol(R, Decl(immutable.d.ts, 480, 16)) ->value : Symbol(value, Decl(immutable.d.ts, 480, 46)) ->V : Symbol(V, Decl(immutable.d.ts, 406, 32)) ->key : Symbol(key, Decl(immutable.d.ts, 480, 56)) ->K : Symbol(K, Decl(immutable.d.ts, 406, 30)) ->iter : Symbol(iter, Decl(immutable.d.ts, 480, 64)) ->R : Symbol(R, Decl(immutable.d.ts, 480, 16)) ->R : Symbol(R, Decl(immutable.d.ts, 480, 16)) +>reduceRight : Symbol(Collection.reduceRight, Decl(immutable.ts, 478, 81), Decl(immutable.ts, 479, 118)) +>R : Symbol(R, Decl(immutable.ts, 480, 16)) +>reducer : Symbol(reducer, Decl(immutable.ts, 480, 19)) +>reduction : Symbol(reduction, Decl(immutable.ts, 480, 29)) +>V : Symbol(V, Decl(immutable.ts, 406, 32)) +>R : Symbol(R, Decl(immutable.ts, 480, 16)) +>value : Symbol(value, Decl(immutable.ts, 480, 46)) +>V : Symbol(V, Decl(immutable.ts, 406, 32)) +>key : Symbol(key, Decl(immutable.ts, 480, 56)) +>K : Symbol(K, Decl(immutable.ts, 406, 30)) +>iter : Symbol(iter, Decl(immutable.ts, 480, 64)) +>R : Symbol(R, Decl(immutable.ts, 480, 16)) +>R : Symbol(R, Decl(immutable.ts, 480, 16)) every(predicate: (value: V, key: K, iter: this) => boolean, context?: any): boolean; ->every : Symbol(Collection.every, Decl(immutable.d.ts, 480, 86)) ->predicate : Symbol(predicate, Decl(immutable.d.ts, 481, 10)) ->value : Symbol(value, Decl(immutable.d.ts, 481, 22)) ->V : Symbol(V, Decl(immutable.d.ts, 406, 32)) ->key : Symbol(key, Decl(immutable.d.ts, 481, 31)) ->K : Symbol(K, Decl(immutable.d.ts, 406, 30)) ->iter : Symbol(iter, Decl(immutable.d.ts, 481, 39)) ->context : Symbol(context, Decl(immutable.d.ts, 481, 63)) +>every : Symbol(Collection.every, Decl(immutable.ts, 480, 86)) +>predicate : Symbol(predicate, Decl(immutable.ts, 481, 10)) +>value : Symbol(value, Decl(immutable.ts, 481, 22)) +>V : Symbol(V, Decl(immutable.ts, 406, 32)) +>key : Symbol(key, Decl(immutable.ts, 481, 31)) +>K : Symbol(K, Decl(immutable.ts, 406, 30)) +>iter : Symbol(iter, Decl(immutable.ts, 481, 39)) +>context : Symbol(context, Decl(immutable.ts, 481, 63)) some(predicate: (value: V, key: K, iter: this) => boolean, context?: any): boolean; ->some : Symbol(Collection.some, Decl(immutable.d.ts, 481, 88)) ->predicate : Symbol(predicate, Decl(immutable.d.ts, 482, 9)) ->value : Symbol(value, Decl(immutable.d.ts, 482, 21)) ->V : Symbol(V, Decl(immutable.d.ts, 406, 32)) ->key : Symbol(key, Decl(immutable.d.ts, 482, 30)) ->K : Symbol(K, Decl(immutable.d.ts, 406, 30)) ->iter : Symbol(iter, Decl(immutable.d.ts, 482, 38)) ->context : Symbol(context, Decl(immutable.d.ts, 482, 62)) +>some : Symbol(Collection.some, Decl(immutable.ts, 481, 88)) +>predicate : Symbol(predicate, Decl(immutable.ts, 482, 9)) +>value : Symbol(value, Decl(immutable.ts, 482, 21)) +>V : Symbol(V, Decl(immutable.ts, 406, 32)) +>key : Symbol(key, Decl(immutable.ts, 482, 30)) +>K : Symbol(K, Decl(immutable.ts, 406, 30)) +>iter : Symbol(iter, Decl(immutable.ts, 482, 38)) +>context : Symbol(context, Decl(immutable.ts, 482, 62)) join(separator?: string): string; ->join : Symbol(Collection.join, Decl(immutable.d.ts, 482, 87)) ->separator : Symbol(separator, Decl(immutable.d.ts, 483, 9)) +>join : Symbol(Collection.join, Decl(immutable.ts, 482, 87)) +>separator : Symbol(separator, Decl(immutable.ts, 483, 9)) isEmpty(): boolean; ->isEmpty : Symbol(Collection.isEmpty, Decl(immutable.d.ts, 483, 37)) +>isEmpty : Symbol(Collection.isEmpty, Decl(immutable.ts, 483, 37)) count(): number; ->count : Symbol(Collection.count, Decl(immutable.d.ts, 484, 23), Decl(immutable.d.ts, 485, 20)) +>count : Symbol(Collection.count, Decl(immutable.ts, 484, 23), Decl(immutable.ts, 485, 20)) count(predicate: (value: V, key: K, iter: this) => boolean, context?: any): number; ->count : Symbol(Collection.count, Decl(immutable.d.ts, 484, 23), Decl(immutable.d.ts, 485, 20)) ->predicate : Symbol(predicate, Decl(immutable.d.ts, 486, 10)) ->value : Symbol(value, Decl(immutable.d.ts, 486, 22)) ->V : Symbol(V, Decl(immutable.d.ts, 406, 32)) ->key : Symbol(key, Decl(immutable.d.ts, 486, 31)) ->K : Symbol(K, Decl(immutable.d.ts, 406, 30)) ->iter : Symbol(iter, Decl(immutable.d.ts, 486, 39)) ->context : Symbol(context, Decl(immutable.d.ts, 486, 63)) +>count : Symbol(Collection.count, Decl(immutable.ts, 484, 23), Decl(immutable.ts, 485, 20)) +>predicate : Symbol(predicate, Decl(immutable.ts, 486, 10)) +>value : Symbol(value, Decl(immutable.ts, 486, 22)) +>V : Symbol(V, Decl(immutable.ts, 406, 32)) +>key : Symbol(key, Decl(immutable.ts, 486, 31)) +>K : Symbol(K, Decl(immutable.ts, 406, 30)) +>iter : Symbol(iter, Decl(immutable.ts, 486, 39)) +>context : Symbol(context, Decl(immutable.ts, 486, 63)) countBy(grouper: (value: V, key: K, iter: this) => G, context?: any): Map; ->countBy : Symbol(Collection.countBy, Decl(immutable.d.ts, 486, 87)) ->G : Symbol(G, Decl(immutable.d.ts, 487, 12)) ->grouper : Symbol(grouper, Decl(immutable.d.ts, 487, 15)) ->value : Symbol(value, Decl(immutable.d.ts, 487, 25)) ->V : Symbol(V, Decl(immutable.d.ts, 406, 32)) ->key : Symbol(key, Decl(immutable.d.ts, 487, 34)) ->K : Symbol(K, Decl(immutable.d.ts, 406, 30)) ->iter : Symbol(iter, Decl(immutable.d.ts, 487, 42)) ->G : Symbol(G, Decl(immutable.d.ts, 487, 12)) ->context : Symbol(context, Decl(immutable.d.ts, 487, 60)) ->Map : Symbol(Map, Decl(immutable.d.ts, 62, 3), Decl(immutable.d.ts, 66, 3), Decl(immutable.d.ts, 67, 69), Decl(immutable.d.ts, 68, 71), Decl(immutable.d.ts, 69, 66) ... and 2 more) ->G : Symbol(G, Decl(immutable.d.ts, 487, 12)) +>countBy : Symbol(Collection.countBy, Decl(immutable.ts, 486, 87)) +>G : Symbol(G, Decl(immutable.ts, 487, 12)) +>grouper : Symbol(grouper, Decl(immutable.ts, 487, 15)) +>value : Symbol(value, Decl(immutable.ts, 487, 25)) +>V : Symbol(V, Decl(immutable.ts, 406, 32)) +>key : Symbol(key, Decl(immutable.ts, 487, 34)) +>K : Symbol(K, Decl(immutable.ts, 406, 30)) +>iter : Symbol(iter, Decl(immutable.ts, 487, 42)) +>G : Symbol(G, Decl(immutable.ts, 487, 12)) +>context : Symbol(context, Decl(immutable.ts, 487, 60)) +>Map : Symbol(Map, Decl(immutable.ts, 62, 3), Decl(immutable.ts, 66, 3), Decl(immutable.ts, 67, 69), Decl(immutable.ts, 68, 71), Decl(immutable.ts, 69, 66) ... and 2 more) +>G : Symbol(G, Decl(immutable.ts, 487, 12)) // Search for value find(predicate: (value: V, key: K, iter: this) => boolean, context?: any, notSetValue?: V): V | undefined; ->find : Symbol(Collection.find, Decl(immutable.d.ts, 487, 92)) ->predicate : Symbol(predicate, Decl(immutable.d.ts, 489, 9)) ->value : Symbol(value, Decl(immutable.d.ts, 489, 21)) ->V : Symbol(V, Decl(immutable.d.ts, 406, 32)) ->key : Symbol(key, Decl(immutable.d.ts, 489, 30)) ->K : Symbol(K, Decl(immutable.d.ts, 406, 30)) ->iter : Symbol(iter, Decl(immutable.d.ts, 489, 38)) ->context : Symbol(context, Decl(immutable.d.ts, 489, 62)) ->notSetValue : Symbol(notSetValue, Decl(immutable.d.ts, 489, 77)) ->V : Symbol(V, Decl(immutable.d.ts, 406, 32)) ->V : Symbol(V, Decl(immutable.d.ts, 406, 32)) +>find : Symbol(Collection.find, Decl(immutable.ts, 487, 92)) +>predicate : Symbol(predicate, Decl(immutable.ts, 489, 9)) +>value : Symbol(value, Decl(immutable.ts, 489, 21)) +>V : Symbol(V, Decl(immutable.ts, 406, 32)) +>key : Symbol(key, Decl(immutable.ts, 489, 30)) +>K : Symbol(K, Decl(immutable.ts, 406, 30)) +>iter : Symbol(iter, Decl(immutable.ts, 489, 38)) +>context : Symbol(context, Decl(immutable.ts, 489, 62)) +>notSetValue : Symbol(notSetValue, Decl(immutable.ts, 489, 77)) +>V : Symbol(V, Decl(immutable.ts, 406, 32)) +>V : Symbol(V, Decl(immutable.ts, 406, 32)) findLast(predicate: (value: V, key: K, iter: this) => boolean, context?: any, notSetValue?: V): V | undefined; ->findLast : Symbol(Collection.findLast, Decl(immutable.d.ts, 489, 110)) ->predicate : Symbol(predicate, Decl(immutable.d.ts, 490, 13)) ->value : Symbol(value, Decl(immutable.d.ts, 490, 25)) ->V : Symbol(V, Decl(immutable.d.ts, 406, 32)) ->key : Symbol(key, Decl(immutable.d.ts, 490, 34)) ->K : Symbol(K, Decl(immutable.d.ts, 406, 30)) ->iter : Symbol(iter, Decl(immutable.d.ts, 490, 42)) ->context : Symbol(context, Decl(immutable.d.ts, 490, 66)) ->notSetValue : Symbol(notSetValue, Decl(immutable.d.ts, 490, 81)) ->V : Symbol(V, Decl(immutable.d.ts, 406, 32)) ->V : Symbol(V, Decl(immutable.d.ts, 406, 32)) +>findLast : Symbol(Collection.findLast, Decl(immutable.ts, 489, 110)) +>predicate : Symbol(predicate, Decl(immutable.ts, 490, 13)) +>value : Symbol(value, Decl(immutable.ts, 490, 25)) +>V : Symbol(V, Decl(immutable.ts, 406, 32)) +>key : Symbol(key, Decl(immutable.ts, 490, 34)) +>K : Symbol(K, Decl(immutable.ts, 406, 30)) +>iter : Symbol(iter, Decl(immutable.ts, 490, 42)) +>context : Symbol(context, Decl(immutable.ts, 490, 66)) +>notSetValue : Symbol(notSetValue, Decl(immutable.ts, 490, 81)) +>V : Symbol(V, Decl(immutable.ts, 406, 32)) +>V : Symbol(V, Decl(immutable.ts, 406, 32)) findEntry(predicate: (value: V, key: K, iter: this) => boolean, context?: any, notSetValue?: V): [K, V] | undefined; ->findEntry : Symbol(Collection.findEntry, Decl(immutable.d.ts, 490, 114)) ->predicate : Symbol(predicate, Decl(immutable.d.ts, 491, 14)) ->value : Symbol(value, Decl(immutable.d.ts, 491, 26)) ->V : Symbol(V, Decl(immutable.d.ts, 406, 32)) ->key : Symbol(key, Decl(immutable.d.ts, 491, 35)) ->K : Symbol(K, Decl(immutable.d.ts, 406, 30)) ->iter : Symbol(iter, Decl(immutable.d.ts, 491, 43)) ->context : Symbol(context, Decl(immutable.d.ts, 491, 67)) ->notSetValue : Symbol(notSetValue, Decl(immutable.d.ts, 491, 82)) ->V : Symbol(V, Decl(immutable.d.ts, 406, 32)) ->K : Symbol(K, Decl(immutable.d.ts, 406, 30)) ->V : Symbol(V, Decl(immutable.d.ts, 406, 32)) +>findEntry : Symbol(Collection.findEntry, Decl(immutable.ts, 490, 114)) +>predicate : Symbol(predicate, Decl(immutable.ts, 491, 14)) +>value : Symbol(value, Decl(immutable.ts, 491, 26)) +>V : Symbol(V, Decl(immutable.ts, 406, 32)) +>key : Symbol(key, Decl(immutable.ts, 491, 35)) +>K : Symbol(K, Decl(immutable.ts, 406, 30)) +>iter : Symbol(iter, Decl(immutable.ts, 491, 43)) +>context : Symbol(context, Decl(immutable.ts, 491, 67)) +>notSetValue : Symbol(notSetValue, Decl(immutable.ts, 491, 82)) +>V : Symbol(V, Decl(immutable.ts, 406, 32)) +>K : Symbol(K, Decl(immutable.ts, 406, 30)) +>V : Symbol(V, Decl(immutable.ts, 406, 32)) findLastEntry(predicate: (value: V, key: K, iter: this) => boolean, context?: any, notSetValue?: V): [K, V] | undefined; ->findLastEntry : Symbol(Collection.findLastEntry, Decl(immutable.d.ts, 491, 120)) ->predicate : Symbol(predicate, Decl(immutable.d.ts, 492, 18)) ->value : Symbol(value, Decl(immutable.d.ts, 492, 30)) ->V : Symbol(V, Decl(immutable.d.ts, 406, 32)) ->key : Symbol(key, Decl(immutable.d.ts, 492, 39)) ->K : Symbol(K, Decl(immutable.d.ts, 406, 30)) ->iter : Symbol(iter, Decl(immutable.d.ts, 492, 47)) ->context : Symbol(context, Decl(immutable.d.ts, 492, 71)) ->notSetValue : Symbol(notSetValue, Decl(immutable.d.ts, 492, 86)) ->V : Symbol(V, Decl(immutable.d.ts, 406, 32)) ->K : Symbol(K, Decl(immutable.d.ts, 406, 30)) ->V : Symbol(V, Decl(immutable.d.ts, 406, 32)) +>findLastEntry : Symbol(Collection.findLastEntry, Decl(immutable.ts, 491, 120)) +>predicate : Symbol(predicate, Decl(immutable.ts, 492, 18)) +>value : Symbol(value, Decl(immutable.ts, 492, 30)) +>V : Symbol(V, Decl(immutable.ts, 406, 32)) +>key : Symbol(key, Decl(immutable.ts, 492, 39)) +>K : Symbol(K, Decl(immutable.ts, 406, 30)) +>iter : Symbol(iter, Decl(immutable.ts, 492, 47)) +>context : Symbol(context, Decl(immutable.ts, 492, 71)) +>notSetValue : Symbol(notSetValue, Decl(immutable.ts, 492, 86)) +>V : Symbol(V, Decl(immutable.ts, 406, 32)) +>K : Symbol(K, Decl(immutable.ts, 406, 30)) +>V : Symbol(V, Decl(immutable.ts, 406, 32)) findKey(predicate: (value: V, key: K, iter: this) => boolean, context?: any): K | undefined; ->findKey : Symbol(Collection.findKey, Decl(immutable.d.ts, 492, 124)) ->predicate : Symbol(predicate, Decl(immutable.d.ts, 493, 12)) ->value : Symbol(value, Decl(immutable.d.ts, 493, 24)) ->V : Symbol(V, Decl(immutable.d.ts, 406, 32)) ->key : Symbol(key, Decl(immutable.d.ts, 493, 33)) ->K : Symbol(K, Decl(immutable.d.ts, 406, 30)) ->iter : Symbol(iter, Decl(immutable.d.ts, 493, 41)) ->context : Symbol(context, Decl(immutable.d.ts, 493, 65)) ->K : Symbol(K, Decl(immutable.d.ts, 406, 30)) +>findKey : Symbol(Collection.findKey, Decl(immutable.ts, 492, 124)) +>predicate : Symbol(predicate, Decl(immutable.ts, 493, 12)) +>value : Symbol(value, Decl(immutable.ts, 493, 24)) +>V : Symbol(V, Decl(immutable.ts, 406, 32)) +>key : Symbol(key, Decl(immutable.ts, 493, 33)) +>K : Symbol(K, Decl(immutable.ts, 406, 30)) +>iter : Symbol(iter, Decl(immutable.ts, 493, 41)) +>context : Symbol(context, Decl(immutable.ts, 493, 65)) +>K : Symbol(K, Decl(immutable.ts, 406, 30)) findLastKey(predicate: (value: V, key: K, iter: this) => boolean, context?: any): K | undefined; ->findLastKey : Symbol(Collection.findLastKey, Decl(immutable.d.ts, 493, 96)) ->predicate : Symbol(predicate, Decl(immutable.d.ts, 494, 16)) ->value : Symbol(value, Decl(immutable.d.ts, 494, 28)) ->V : Symbol(V, Decl(immutable.d.ts, 406, 32)) ->key : Symbol(key, Decl(immutable.d.ts, 494, 37)) ->K : Symbol(K, Decl(immutable.d.ts, 406, 30)) ->iter : Symbol(iter, Decl(immutable.d.ts, 494, 45)) ->context : Symbol(context, Decl(immutable.d.ts, 494, 69)) ->K : Symbol(K, Decl(immutable.d.ts, 406, 30)) +>findLastKey : Symbol(Collection.findLastKey, Decl(immutable.ts, 493, 96)) +>predicate : Symbol(predicate, Decl(immutable.ts, 494, 16)) +>value : Symbol(value, Decl(immutable.ts, 494, 28)) +>V : Symbol(V, Decl(immutable.ts, 406, 32)) +>key : Symbol(key, Decl(immutable.ts, 494, 37)) +>K : Symbol(K, Decl(immutable.ts, 406, 30)) +>iter : Symbol(iter, Decl(immutable.ts, 494, 45)) +>context : Symbol(context, Decl(immutable.ts, 494, 69)) +>K : Symbol(K, Decl(immutable.ts, 406, 30)) keyOf(searchValue: V): K | undefined; ->keyOf : Symbol(Collection.keyOf, Decl(immutable.d.ts, 494, 100)) ->searchValue : Symbol(searchValue, Decl(immutable.d.ts, 495, 10)) ->V : Symbol(V, Decl(immutable.d.ts, 406, 32)) ->K : Symbol(K, Decl(immutable.d.ts, 406, 30)) +>keyOf : Symbol(Collection.keyOf, Decl(immutable.ts, 494, 100)) +>searchValue : Symbol(searchValue, Decl(immutable.ts, 495, 10)) +>V : Symbol(V, Decl(immutable.ts, 406, 32)) +>K : Symbol(K, Decl(immutable.ts, 406, 30)) lastKeyOf(searchValue: V): K | undefined; ->lastKeyOf : Symbol(Collection.lastKeyOf, Decl(immutable.d.ts, 495, 41)) ->searchValue : Symbol(searchValue, Decl(immutable.d.ts, 496, 14)) ->V : Symbol(V, Decl(immutable.d.ts, 406, 32)) ->K : Symbol(K, Decl(immutable.d.ts, 406, 30)) +>lastKeyOf : Symbol(Collection.lastKeyOf, Decl(immutable.ts, 495, 41)) +>searchValue : Symbol(searchValue, Decl(immutable.ts, 496, 14)) +>V : Symbol(V, Decl(immutable.ts, 406, 32)) +>K : Symbol(K, Decl(immutable.ts, 406, 30)) max(comparator?: (valueA: V, valueB: V) => number): V | undefined; ->max : Symbol(Collection.max, Decl(immutable.d.ts, 496, 45)) ->comparator : Symbol(comparator, Decl(immutable.d.ts, 497, 8)) ->valueA : Symbol(valueA, Decl(immutable.d.ts, 497, 22)) ->V : Symbol(V, Decl(immutable.d.ts, 406, 32)) ->valueB : Symbol(valueB, Decl(immutable.d.ts, 497, 32)) ->V : Symbol(V, Decl(immutable.d.ts, 406, 32)) ->V : Symbol(V, Decl(immutable.d.ts, 406, 32)) +>max : Symbol(Collection.max, Decl(immutable.ts, 496, 45)) +>comparator : Symbol(comparator, Decl(immutable.ts, 497, 8)) +>valueA : Symbol(valueA, Decl(immutable.ts, 497, 22)) +>V : Symbol(V, Decl(immutable.ts, 406, 32)) +>valueB : Symbol(valueB, Decl(immutable.ts, 497, 32)) +>V : Symbol(V, Decl(immutable.ts, 406, 32)) +>V : Symbol(V, Decl(immutable.ts, 406, 32)) maxBy(comparatorValueMapper: (value: V, key: K, iter: this) => C, comparator?: (valueA: C, valueB: C) => number): V | undefined; ->maxBy : Symbol(Collection.maxBy, Decl(immutable.d.ts, 497, 70)) ->C : Symbol(C, Decl(immutable.d.ts, 498, 10)) ->comparatorValueMapper : Symbol(comparatorValueMapper, Decl(immutable.d.ts, 498, 13)) ->value : Symbol(value, Decl(immutable.d.ts, 498, 37)) ->V : Symbol(V, Decl(immutable.d.ts, 406, 32)) ->key : Symbol(key, Decl(immutable.d.ts, 498, 46)) ->K : Symbol(K, Decl(immutable.d.ts, 406, 30)) ->iter : Symbol(iter, Decl(immutable.d.ts, 498, 54)) ->C : Symbol(C, Decl(immutable.d.ts, 498, 10)) ->comparator : Symbol(comparator, Decl(immutable.d.ts, 498, 72)) ->valueA : Symbol(valueA, Decl(immutable.d.ts, 498, 87)) ->C : Symbol(C, Decl(immutable.d.ts, 498, 10)) ->valueB : Symbol(valueB, Decl(immutable.d.ts, 498, 97)) ->C : Symbol(C, Decl(immutable.d.ts, 498, 10)) ->V : Symbol(V, Decl(immutable.d.ts, 406, 32)) +>maxBy : Symbol(Collection.maxBy, Decl(immutable.ts, 497, 70)) +>C : Symbol(C, Decl(immutable.ts, 498, 10)) +>comparatorValueMapper : Symbol(comparatorValueMapper, Decl(immutable.ts, 498, 13)) +>value : Symbol(value, Decl(immutable.ts, 498, 37)) +>V : Symbol(V, Decl(immutable.ts, 406, 32)) +>key : Symbol(key, Decl(immutable.ts, 498, 46)) +>K : Symbol(K, Decl(immutable.ts, 406, 30)) +>iter : Symbol(iter, Decl(immutable.ts, 498, 54)) +>C : Symbol(C, Decl(immutable.ts, 498, 10)) +>comparator : Symbol(comparator, Decl(immutable.ts, 498, 72)) +>valueA : Symbol(valueA, Decl(immutable.ts, 498, 87)) +>C : Symbol(C, Decl(immutable.ts, 498, 10)) +>valueB : Symbol(valueB, Decl(immutable.ts, 498, 97)) +>C : Symbol(C, Decl(immutable.ts, 498, 10)) +>V : Symbol(V, Decl(immutable.ts, 406, 32)) min(comparator?: (valueA: V, valueB: V) => number): V | undefined; ->min : Symbol(Collection.min, Decl(immutable.d.ts, 498, 135)) ->comparator : Symbol(comparator, Decl(immutable.d.ts, 499, 8)) ->valueA : Symbol(valueA, Decl(immutable.d.ts, 499, 22)) ->V : Symbol(V, Decl(immutable.d.ts, 406, 32)) ->valueB : Symbol(valueB, Decl(immutable.d.ts, 499, 32)) ->V : Symbol(V, Decl(immutable.d.ts, 406, 32)) ->V : Symbol(V, Decl(immutable.d.ts, 406, 32)) +>min : Symbol(Collection.min, Decl(immutable.ts, 498, 135)) +>comparator : Symbol(comparator, Decl(immutable.ts, 499, 8)) +>valueA : Symbol(valueA, Decl(immutable.ts, 499, 22)) +>V : Symbol(V, Decl(immutable.ts, 406, 32)) +>valueB : Symbol(valueB, Decl(immutable.ts, 499, 32)) +>V : Symbol(V, Decl(immutable.ts, 406, 32)) +>V : Symbol(V, Decl(immutable.ts, 406, 32)) minBy(comparatorValueMapper: (value: V, key: K, iter: this) => C, comparator?: (valueA: C, valueB: C) => number): V | undefined; ->minBy : Symbol(Collection.minBy, Decl(immutable.d.ts, 499, 70)) ->C : Symbol(C, Decl(immutable.d.ts, 500, 10)) ->comparatorValueMapper : Symbol(comparatorValueMapper, Decl(immutable.d.ts, 500, 13)) ->value : Symbol(value, Decl(immutable.d.ts, 500, 37)) ->V : Symbol(V, Decl(immutable.d.ts, 406, 32)) ->key : Symbol(key, Decl(immutable.d.ts, 500, 46)) ->K : Symbol(K, Decl(immutable.d.ts, 406, 30)) ->iter : Symbol(iter, Decl(immutable.d.ts, 500, 54)) ->C : Symbol(C, Decl(immutable.d.ts, 500, 10)) ->comparator : Symbol(comparator, Decl(immutable.d.ts, 500, 72)) ->valueA : Symbol(valueA, Decl(immutable.d.ts, 500, 87)) ->C : Symbol(C, Decl(immutable.d.ts, 500, 10)) ->valueB : Symbol(valueB, Decl(immutable.d.ts, 500, 97)) ->C : Symbol(C, Decl(immutable.d.ts, 500, 10)) ->V : Symbol(V, Decl(immutable.d.ts, 406, 32)) +>minBy : Symbol(Collection.minBy, Decl(immutable.ts, 499, 70)) +>C : Symbol(C, Decl(immutable.ts, 500, 10)) +>comparatorValueMapper : Symbol(comparatorValueMapper, Decl(immutable.ts, 500, 13)) +>value : Symbol(value, Decl(immutable.ts, 500, 37)) +>V : Symbol(V, Decl(immutable.ts, 406, 32)) +>key : Symbol(key, Decl(immutable.ts, 500, 46)) +>K : Symbol(K, Decl(immutable.ts, 406, 30)) +>iter : Symbol(iter, Decl(immutable.ts, 500, 54)) +>C : Symbol(C, Decl(immutable.ts, 500, 10)) +>comparator : Symbol(comparator, Decl(immutable.ts, 500, 72)) +>valueA : Symbol(valueA, Decl(immutable.ts, 500, 87)) +>C : Symbol(C, Decl(immutable.ts, 500, 10)) +>valueB : Symbol(valueB, Decl(immutable.ts, 500, 97)) +>C : Symbol(C, Decl(immutable.ts, 500, 10)) +>V : Symbol(V, Decl(immutable.ts, 406, 32)) // Comparison isSubset(iter: Iterable): boolean; ->isSubset : Symbol(Collection.isSubset, Decl(immutable.d.ts, 500, 135)) ->iter : Symbol(iter, Decl(immutable.d.ts, 502, 13)) +>isSubset : Symbol(Collection.isSubset, Decl(immutable.ts, 500, 135)) +>iter : Symbol(iter, Decl(immutable.ts, 502, 13)) >Iterable : Symbol(Iterable, Decl(lib.es2015.iterable.d.ts, --, --)) ->V : Symbol(V, Decl(immutable.d.ts, 406, 32)) +>V : Symbol(V, Decl(immutable.ts, 406, 32)) isSuperset(iter: Iterable): boolean; ->isSuperset : Symbol(Collection.isSuperset, Decl(immutable.d.ts, 502, 41)) ->iter : Symbol(iter, Decl(immutable.d.ts, 503, 15)) +>isSuperset : Symbol(Collection.isSuperset, Decl(immutable.ts, 502, 41)) +>iter : Symbol(iter, Decl(immutable.ts, 503, 15)) >Iterable : Symbol(Iterable, Decl(lib.es2015.iterable.d.ts, --, --)) ->V : Symbol(V, Decl(immutable.d.ts, 406, 32)) +>V : Symbol(V, Decl(immutable.ts, 406, 32)) readonly size: number; ->size : Symbol(Collection.size, Decl(immutable.d.ts, 503, 43)) +>size : Symbol(Collection.size, Decl(immutable.ts, 503, 43)) } } declare module "immutable" { export = Immutable ->Immutable : Symbol(Immutable, Decl(immutable.d.ts, 0, 0)) +>Immutable : Symbol(Immutable, Decl(immutable.ts, 0, 0)) } diff --git a/tests/baselines/reference/complexRecursiveCollections.types b/tests/baselines/reference/complexRecursiveCollections.types index 382a2b86e79..e3d4a01196e 100644 --- a/tests/baselines/reference/complexRecursiveCollections.types +++ b/tests/baselines/reference/complexRecursiveCollections.types @@ -1,4 +1,4 @@ -=== tests/cases/compiler/complex.d.ts === +=== tests/cases/compiler/complex.ts === interface Ara { t: T } >Ara : Ara >T : T @@ -156,7 +156,7 @@ interface N2 extends N1 { >N2 : N2 >T : T } -=== tests/cases/compiler/immutable.d.ts === +=== tests/cases/compiler/immutable.ts === // Test that complex recursive collections can pass the `extends` assignability check without // running out of memory. This bug was exposed in Typescript 2.4 when more generic signatures // started being checked. diff --git a/tests/baselines/reference/decoratorMetadataNoStrictNull.js b/tests/baselines/reference/decoratorMetadataNoStrictNull.js new file mode 100644 index 00000000000..dada68f0960 --- /dev/null +++ b/tests/baselines/reference/decoratorMetadataNoStrictNull.js @@ -0,0 +1,32 @@ +//// [decoratorMetadataNoStrictNull.ts] +const dec = (obj: {}, prop: string) => undefined + +class Foo { + @dec public foo: string | null; + @dec public bar: string; +} + +//// [decoratorMetadataNoStrictNull.js] +var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; +}; +var __metadata = (this && this.__metadata) || function (k, v) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); +}; +var dec = function (obj, prop) { return undefined; }; +var Foo = /** @class */ (function () { + function Foo() { + } + __decorate([ + dec, + __metadata("design:type", String) + ], Foo.prototype, "foo"); + __decorate([ + dec, + __metadata("design:type", String) + ], Foo.prototype, "bar"); + return Foo; +}()); diff --git a/tests/baselines/reference/decoratorMetadataNoStrictNull.symbols b/tests/baselines/reference/decoratorMetadataNoStrictNull.symbols new file mode 100644 index 00000000000..32a6d08f024 --- /dev/null +++ b/tests/baselines/reference/decoratorMetadataNoStrictNull.symbols @@ -0,0 +1,18 @@ +=== tests/cases/compiler/decoratorMetadataNoStrictNull.ts === +const dec = (obj: {}, prop: string) => undefined +>dec : Symbol(dec, Decl(decoratorMetadataNoStrictNull.ts, 0, 5)) +>obj : Symbol(obj, Decl(decoratorMetadataNoStrictNull.ts, 0, 13)) +>prop : Symbol(prop, Decl(decoratorMetadataNoStrictNull.ts, 0, 21)) +>undefined : Symbol(undefined) + +class Foo { +>Foo : Symbol(Foo, Decl(decoratorMetadataNoStrictNull.ts, 0, 48)) + + @dec public foo: string | null; +>dec : Symbol(dec, Decl(decoratorMetadataNoStrictNull.ts, 0, 5)) +>foo : Symbol(Foo.foo, Decl(decoratorMetadataNoStrictNull.ts, 2, 11)) + + @dec public bar: string; +>dec : Symbol(dec, Decl(decoratorMetadataNoStrictNull.ts, 0, 5)) +>bar : Symbol(Foo.bar, Decl(decoratorMetadataNoStrictNull.ts, 3, 33)) +} diff --git a/tests/baselines/reference/decoratorMetadataNoStrictNull.types b/tests/baselines/reference/decoratorMetadataNoStrictNull.types new file mode 100644 index 00000000000..981efe6e50b --- /dev/null +++ b/tests/baselines/reference/decoratorMetadataNoStrictNull.types @@ -0,0 +1,20 @@ +=== tests/cases/compiler/decoratorMetadataNoStrictNull.ts === +const dec = (obj: {}, prop: string) => undefined +>dec : (obj: {}, prop: string) => any +>(obj: {}, prop: string) => undefined : (obj: {}, prop: string) => any +>obj : {} +>prop : string +>undefined : undefined + +class Foo { +>Foo : Foo + + @dec public foo: string | null; +>dec : (obj: {}, prop: string) => any +>foo : string +>null : null + + @dec public bar: string; +>dec : (obj: {}, prop: string) => any +>bar : string +} diff --git a/tests/baselines/reference/decoratorOnClassMethod6.errors.txt b/tests/baselines/reference/decoratorOnClassMethod6.errors.txt index 530e86117ee..b863a9db72c 100644 --- a/tests/baselines/reference/decoratorOnClassMethod6.errors.txt +++ b/tests/baselines/reference/decoratorOnClassMethod6.errors.txt @@ -1,4 +1,4 @@ -tests/cases/conformance/decorators/class/method/decoratorOnClassMethod6.ts(4,5): error TS1241: Unable to resolve signature of method decorator when called as an expression. +tests/cases/conformance/decorators/class/method/decoratorOnClassMethod6.ts(4,5): error TS1329: 'dec' accepts too few arguments to be used as a decorator here. Did you mean to call it first and write '@dec()'? ==== tests/cases/conformance/decorators/class/method/decoratorOnClassMethod6.ts (1 errors) ==== @@ -7,5 +7,5 @@ tests/cases/conformance/decorators/class/method/decoratorOnClassMethod6.ts(4,5): class C { @dec ["method"]() {} ~~~~ -!!! error TS1241: Unable to resolve signature of method decorator when called as an expression. +!!! error TS1329: 'dec' accepts too few arguments to be used as a decorator here. Did you mean to call it first and write '@dec()'? } \ No newline at end of file diff --git a/tests/baselines/reference/decoratorOnClassProperty11.errors.txt b/tests/baselines/reference/decoratorOnClassProperty11.errors.txt index 2a72fefa53e..537daaf44ea 100644 --- a/tests/baselines/reference/decoratorOnClassProperty11.errors.txt +++ b/tests/baselines/reference/decoratorOnClassProperty11.errors.txt @@ -1,4 +1,4 @@ -tests/cases/conformance/decorators/class/property/decoratorOnClassProperty11.ts(4,5): error TS1240: Unable to resolve signature of property decorator when called as an expression. +tests/cases/conformance/decorators/class/property/decoratorOnClassProperty11.ts(4,5): error TS1329: 'dec' accepts too few arguments to be used as a decorator here. Did you mean to call it first and write '@dec()'? ==== tests/cases/conformance/decorators/class/property/decoratorOnClassProperty11.ts (1 errors) ==== @@ -7,5 +7,5 @@ tests/cases/conformance/decorators/class/property/decoratorOnClassProperty11.ts( class C { @dec prop; ~~~~ -!!! error TS1240: Unable to resolve signature of property decorator when called as an expression. +!!! error TS1329: 'dec' accepts too few arguments to be used as a decorator here. Did you mean to call it first and write '@dec()'? } \ No newline at end of file diff --git a/tests/baselines/reference/destructuringArrayBindingPatternAndAssignment1ES5.types b/tests/baselines/reference/destructuringArrayBindingPatternAndAssignment1ES5.types index e2a6174e61f..d0d8561b808 100644 --- a/tests/baselines/reference/destructuringArrayBindingPatternAndAssignment1ES5.types +++ b/tests/baselines/reference/destructuringArrayBindingPatternAndAssignment1ES5.types @@ -28,9 +28,9 @@ var [a0, a1]: any = undefined; >undefined : undefined var [a2 = false, a3 = 1]: any = undefined; ->a2 : boolean +>a2 : any >false : false ->a3 : number +>a3 : any >1 : 1 >undefined : undefined diff --git a/tests/baselines/reference/destructuringArrayBindingPatternAndAssignment1ES5iterable.types b/tests/baselines/reference/destructuringArrayBindingPatternAndAssignment1ES5iterable.types index a650bbad2d2..09dc481c477 100644 --- a/tests/baselines/reference/destructuringArrayBindingPatternAndAssignment1ES5iterable.types +++ b/tests/baselines/reference/destructuringArrayBindingPatternAndAssignment1ES5iterable.types @@ -28,9 +28,9 @@ var [a0, a1]: any = undefined; >undefined : undefined var [a2 = false, a3 = 1]: any = undefined; ->a2 : boolean +>a2 : any >false : false ->a3 : number +>a3 : any >1 : 1 >undefined : undefined diff --git a/tests/baselines/reference/destructuringArrayBindingPatternAndAssignment1ES6.types b/tests/baselines/reference/destructuringArrayBindingPatternAndAssignment1ES6.types index b6f54b55799..a07ea6ca017 100644 --- a/tests/baselines/reference/destructuringArrayBindingPatternAndAssignment1ES6.types +++ b/tests/baselines/reference/destructuringArrayBindingPatternAndAssignment1ES6.types @@ -28,9 +28,9 @@ var [a0, a1]: any = undefined; >undefined : undefined var [a2 = false, a3 = 1]: any = undefined; ->a2 : boolean +>a2 : any >false : false ->a3 : number +>a3 : any >1 : 1 >undefined : undefined diff --git a/tests/baselines/reference/destructuringObjectBindingPatternAndAssignment1ES5.types b/tests/baselines/reference/destructuringObjectBindingPatternAndAssignment1ES5.types index e0aedcbb167..203815fa9c8 100644 --- a/tests/baselines/reference/destructuringObjectBindingPatternAndAssignment1ES5.types +++ b/tests/baselines/reference/destructuringObjectBindingPatternAndAssignment1ES5.types @@ -39,7 +39,7 @@ var {1: b3} = { 1: "string" }; >"string" : "string" var {b4 = 1}: any = { b4: 100000 }; ->b4 : number +>b4 : any >1 : 1 >{ b4: 100000 } : { b4: number; } >b4 : number diff --git a/tests/baselines/reference/destructuringObjectBindingPatternAndAssignment1ES6.types b/tests/baselines/reference/destructuringObjectBindingPatternAndAssignment1ES6.types index 7d68d32ac51..1c3d1f4d00c 100644 --- a/tests/baselines/reference/destructuringObjectBindingPatternAndAssignment1ES6.types +++ b/tests/baselines/reference/destructuringObjectBindingPatternAndAssignment1ES6.types @@ -39,7 +39,7 @@ var {1: b3} = { 1: "string" }; >"string" : "string" var {b4 = 1}: any = { b4: 100000 }; ->b4 : number +>b4 : any >1 : 1 >{ b4: 100000 } : { b4: number; } >b4 : number diff --git a/tests/baselines/reference/destructuringObjectBindingPatternAndAssignment4.types b/tests/baselines/reference/destructuringObjectBindingPatternAndAssignment4.types index 24f7e8ed0ba..104c694fbbd 100644 --- a/tests/baselines/reference/destructuringObjectBindingPatternAndAssignment4.types +++ b/tests/baselines/reference/destructuringObjectBindingPatternAndAssignment4.types @@ -1,20 +1,20 @@ === tests/cases/conformance/es6/destructuring/destructuringObjectBindingPatternAndAssignment4.ts === const { a = 1, ->a : 1 +>a : any >1 : 1 b = 2, ->b : 2 +>b : any >2 : 2 c = b, // ok ->c : 2 ->b : 2 +>c : any +>b : any d = a, // ok ->d : 1 ->a : 1 +>d : any +>a : any e = f, // error >e : any diff --git a/tests/baselines/reference/discriminatedUnionErrorMessage.errors.txt b/tests/baselines/reference/discriminatedUnionErrorMessage.errors.txt index 6f1eb511d37..e54727befd0 100644 --- a/tests/baselines/reference/discriminatedUnionErrorMessage.errors.txt +++ b/tests/baselines/reference/discriminatedUnionErrorMessage.errors.txt @@ -1,6 +1,5 @@ -tests/cases/compiler/discriminatedUnionErrorMessage.ts(8,5): error TS2322: Type '{ kind: "sq"; x: number; y: number; }' is not assignable to type 'Shape'. - Type '{ kind: "sq"; x: number; y: number; }' is not assignable to type 'Square'. - Property 'size' is missing in type '{ kind: "sq"; x: number; y: number; }'. +tests/cases/compiler/discriminatedUnionErrorMessage.ts(10,5): error TS2322: Type '{ kind: "sq"; x: number; y: number; }' is not assignable to type 'Shape'. + Object literal may only specify known properties, and 'x' does not exist in type 'Square'. ==== tests/cases/compiler/discriminatedUnionErrorMessage.ts (1 errors) ==== @@ -12,12 +11,11 @@ tests/cases/compiler/discriminatedUnionErrorMessage.ts(8,5): error TS2322: Type | Rectangle | Circle; let shape: Shape = { - ~~~~~ -!!! error TS2322: Type '{ kind: "sq"; x: number; y: number; }' is not assignable to type 'Shape'. -!!! error TS2322: Type '{ kind: "sq"; x: number; y: number; }' is not assignable to type 'Square'. -!!! error TS2322: Property 'size' is missing in type '{ kind: "sq"; x: number; y: number; }'. kind: "sq", x: 12, + ~~~~~ +!!! error TS2322: Type '{ kind: "sq"; x: number; y: number; }' is not assignable to type 'Shape'. +!!! error TS2322: Object literal may only specify known properties, and 'x' does not exist in type 'Square'. y: 13, } \ No newline at end of file diff --git a/tests/baselines/reference/duplicateExportAssignments.errors.txt b/tests/baselines/reference/duplicateExportAssignments.errors.txt index 17ad0a39847..0ad9507c9a6 100644 --- a/tests/baselines/reference/duplicateExportAssignments.errors.txt +++ b/tests/baselines/reference/duplicateExportAssignments.errors.txt @@ -1,34 +1,34 @@ -tests/cases/conformance/externalModules/foo1.ts(3,1): error TS2300: Duplicate identifier 'export='. -tests/cases/conformance/externalModules/foo1.ts(4,1): error TS2300: Duplicate identifier 'export='. -tests/cases/conformance/externalModules/foo2.ts(3,1): error TS2300: Duplicate identifier 'export='. -tests/cases/conformance/externalModules/foo2.ts(4,1): error TS2300: Duplicate identifier 'export='. -tests/cases/conformance/externalModules/foo3.ts(7,1): error TS2300: Duplicate identifier 'export='. -tests/cases/conformance/externalModules/foo3.ts(8,1): error TS2300: Duplicate identifier 'export='. -tests/cases/conformance/externalModules/foo4.ts(1,1): error TS2300: Duplicate identifier 'export='. -tests/cases/conformance/externalModules/foo4.ts(8,1): error TS2300: Duplicate identifier 'export='. -tests/cases/conformance/externalModules/foo5.ts(4,1): error TS2300: Duplicate identifier 'export='. -tests/cases/conformance/externalModules/foo5.ts(5,1): error TS2300: Duplicate identifier 'export='. -tests/cases/conformance/externalModules/foo5.ts(6,1): error TS2300: Duplicate identifier 'export='. +tests/cases/conformance/externalModules/foo1.ts(3,10): error TS2300: Duplicate identifier 'export='. +tests/cases/conformance/externalModules/foo1.ts(4,10): error TS2300: Duplicate identifier 'export='. +tests/cases/conformance/externalModules/foo2.ts(3,10): error TS2300: Duplicate identifier 'export='. +tests/cases/conformance/externalModules/foo2.ts(4,10): error TS2300: Duplicate identifier 'export='. +tests/cases/conformance/externalModules/foo3.ts(7,10): error TS2300: Duplicate identifier 'export='. +tests/cases/conformance/externalModules/foo3.ts(8,10): error TS2300: Duplicate identifier 'export='. +tests/cases/conformance/externalModules/foo4.ts(1,10): error TS2300: Duplicate identifier 'export='. +tests/cases/conformance/externalModules/foo4.ts(8,10): error TS2300: Duplicate identifier 'export='. +tests/cases/conformance/externalModules/foo5.ts(4,10): error TS2300: Duplicate identifier 'export='. +tests/cases/conformance/externalModules/foo5.ts(5,10): error TS2300: Duplicate identifier 'export='. +tests/cases/conformance/externalModules/foo5.ts(6,10): error TS2300: Duplicate identifier 'export='. ==== tests/cases/conformance/externalModules/foo1.ts (2 errors) ==== var x = 10; var y = 20; export = x; - ~~~~~~~~~~~ + ~ !!! error TS2300: Duplicate identifier 'export='. export = y; - ~~~~~~~~~~~ + ~ !!! error TS2300: Duplicate identifier 'export='. ==== tests/cases/conformance/externalModules/foo2.ts (2 errors) ==== var x = 10; class y {}; export = x; - ~~~~~~~~~~~ + ~ !!! error TS2300: Duplicate identifier 'export='. export = y; - ~~~~~~~~~~~ + ~ !!! error TS2300: Duplicate identifier 'export='. ==== tests/cases/conformance/externalModules/foo3.ts (2 errors) ==== @@ -39,15 +39,15 @@ tests/cases/conformance/externalModules/foo5.ts(6,1): error TS2300: Duplicate id y: number; } export = x; - ~~~~~~~~~~~ + ~ !!! error TS2300: Duplicate identifier 'export='. export = y; - ~~~~~~~~~~~ + ~ !!! error TS2300: Duplicate identifier 'export='. ==== tests/cases/conformance/externalModules/foo4.ts (2 errors) ==== export = x; - ~~~~~~~~~~~ + ~ !!! error TS2300: Duplicate identifier 'export='. function x(){ return 42; @@ -56,7 +56,7 @@ tests/cases/conformance/externalModules/foo5.ts(6,1): error TS2300: Duplicate id return 42; } export = y; - ~~~~~~~~~~~ + ~ !!! error TS2300: Duplicate identifier 'export='. ==== tests/cases/conformance/externalModules/foo5.ts (3 errors) ==== @@ -64,12 +64,12 @@ tests/cases/conformance/externalModules/foo5.ts(6,1): error TS2300: Duplicate id var y = "test"; var z = {}; export = x; - ~~~~~~~~~~~ + ~ !!! error TS2300: Duplicate identifier 'export='. export = y; - ~~~~~~~~~~~ + ~ !!! error TS2300: Duplicate identifier 'export='. export = z; - ~~~~~~~~~~~ + ~ !!! error TS2300: Duplicate identifier 'export='. \ No newline at end of file diff --git a/tests/baselines/reference/duplicateOverloadInTypeAugmentation1.symbols b/tests/baselines/reference/duplicateOverloadInTypeAugmentation1.symbols index 02589e011c4..31efb739e4c 100644 --- a/tests/baselines/reference/duplicateOverloadInTypeAugmentation1.symbols +++ b/tests/baselines/reference/duplicateOverloadInTypeAugmentation1.symbols @@ -4,7 +4,7 @@ interface Array { >T : Symbol(T, Decl(lib.d.ts, --, --), Decl(duplicateOverloadInTypeAugmentation1.ts, 0, 16)) reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T, ->reduce : Symbol(Array.reduce, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(duplicateOverloadInTypeAugmentation1.ts, 0, 20), Decl(duplicateOverloadInTypeAugmentation1.ts, 2, 29)) +>reduce : Symbol(Array.reduce, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(duplicateOverloadInTypeAugmentation1.ts, 0, 20), Decl(duplicateOverloadInTypeAugmentation1.ts, 2, 29)) >callbackfn : Symbol(callbackfn, Decl(duplicateOverloadInTypeAugmentation1.ts, 1, 11)) >previousValue : Symbol(previousValue, Decl(duplicateOverloadInTypeAugmentation1.ts, 1, 24)) >T : Symbol(T, Decl(lib.d.ts, --, --), Decl(duplicateOverloadInTypeAugmentation1.ts, 0, 16)) @@ -21,7 +21,7 @@ interface Array { >T : Symbol(T, Decl(lib.d.ts, --, --), Decl(duplicateOverloadInTypeAugmentation1.ts, 0, 16)) reduce(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: T[]) => U, ->reduce : Symbol(Array.reduce, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(duplicateOverloadInTypeAugmentation1.ts, 0, 20), Decl(duplicateOverloadInTypeAugmentation1.ts, 2, 29)) +>reduce : Symbol(Array.reduce, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(duplicateOverloadInTypeAugmentation1.ts, 0, 20), Decl(duplicateOverloadInTypeAugmentation1.ts, 2, 29)) >U : Symbol(U, Decl(duplicateOverloadInTypeAugmentation1.ts, 3, 11)) >callbackfn : Symbol(callbackfn, Decl(duplicateOverloadInTypeAugmentation1.ts, 3, 14)) >previousValue : Symbol(previousValue, Decl(duplicateOverloadInTypeAugmentation1.ts, 3, 27)) @@ -44,9 +44,9 @@ var a: Array; var r5 = a.reduce((x, y) => x + y); >r5 : Symbol(r5, Decl(duplicateOverloadInTypeAugmentation1.ts, 7, 3)) ->a.reduce : Symbol(Array.reduce, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(duplicateOverloadInTypeAugmentation1.ts, 0, 20), Decl(duplicateOverloadInTypeAugmentation1.ts, 2, 29)) +>a.reduce : Symbol(Array.reduce, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(duplicateOverloadInTypeAugmentation1.ts, 0, 20), Decl(duplicateOverloadInTypeAugmentation1.ts, 2, 29)) >a : Symbol(a, Decl(duplicateOverloadInTypeAugmentation1.ts, 6, 3)) ->reduce : Symbol(Array.reduce, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(duplicateOverloadInTypeAugmentation1.ts, 0, 20), Decl(duplicateOverloadInTypeAugmentation1.ts, 2, 29)) +>reduce : Symbol(Array.reduce, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(duplicateOverloadInTypeAugmentation1.ts, 0, 20), Decl(duplicateOverloadInTypeAugmentation1.ts, 2, 29)) >x : Symbol(x, Decl(duplicateOverloadInTypeAugmentation1.ts, 7, 19)) >y : Symbol(y, Decl(duplicateOverloadInTypeAugmentation1.ts, 7, 21)) >x : Symbol(x, Decl(duplicateOverloadInTypeAugmentation1.ts, 7, 19)) diff --git a/tests/baselines/reference/duplicateOverloadInTypeAugmentation1.types b/tests/baselines/reference/duplicateOverloadInTypeAugmentation1.types index bc7214eb6b9..ea07ece4314 100644 --- a/tests/baselines/reference/duplicateOverloadInTypeAugmentation1.types +++ b/tests/baselines/reference/duplicateOverloadInTypeAugmentation1.types @@ -4,7 +4,7 @@ interface Array { >T : T reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T, ->reduce : { (callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T, initialValue?: T): T; (callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: T[]) => U, initialValue: U): U; (callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T, initialValue?: T): T; (callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: T[]) => U, initialValue: U): U; } +>reduce : { (callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T): T; (callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T, initialValue: T): T; (callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: T[]) => U, initialValue: U): U; (callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T, initialValue?: T): T; (callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: T[]) => U, initialValue: U): U; } >callbackfn : (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T >previousValue : T >T : T @@ -21,7 +21,7 @@ interface Array { >T : T reduce(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: T[]) => U, ->reduce : { (callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T, initialValue?: T): T; (callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: T[]) => U, initialValue: U): U; (callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T, initialValue?: T): T; (callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: T[]) => U, initialValue: U): U; } +>reduce : { (callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T): T; (callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T, initialValue: T): T; (callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: T[]) => U, initialValue: U): U; (callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T, initialValue?: T): T; (callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: T[]) => U, initialValue: U): U; } >U : U >callbackfn : (previousValue: U, currentValue: T, currentIndex: number, array: T[]) => U >previousValue : U @@ -45,9 +45,9 @@ var a: Array; var r5 = a.reduce((x, y) => x + y); >r5 : string >a.reduce((x, y) => x + y) : string ->a.reduce : { (callbackfn: (previousValue: string, currentValue: string, currentIndex: number, array: string[]) => string, initialValue?: string): string; (callbackfn: (previousValue: U, currentValue: string, currentIndex: number, array: string[]) => U, initialValue: U): U; (callbackfn: (previousValue: string, currentValue: string, currentIndex: number, array: string[]) => string, initialValue?: string): string; (callbackfn: (previousValue: U, currentValue: string, currentIndex: number, array: string[]) => U, initialValue: U): U; } +>a.reduce : { (callbackfn: (previousValue: string, currentValue: string, currentIndex: number, array: string[]) => string): string; (callbackfn: (previousValue: string, currentValue: string, currentIndex: number, array: string[]) => string, initialValue: string): string; (callbackfn: (previousValue: U, currentValue: string, currentIndex: number, array: string[]) => U, initialValue: U): U; (callbackfn: (previousValue: string, currentValue: string, currentIndex: number, array: string[]) => string, initialValue?: string): string; (callbackfn: (previousValue: U, currentValue: string, currentIndex: number, array: string[]) => U, initialValue: U): U; } >a : string[] ->reduce : { (callbackfn: (previousValue: string, currentValue: string, currentIndex: number, array: string[]) => string, initialValue?: string): string; (callbackfn: (previousValue: U, currentValue: string, currentIndex: number, array: string[]) => U, initialValue: U): U; (callbackfn: (previousValue: string, currentValue: string, currentIndex: number, array: string[]) => string, initialValue?: string): string; (callbackfn: (previousValue: U, currentValue: string, currentIndex: number, array: string[]) => U, initialValue: U): U; } +>reduce : { (callbackfn: (previousValue: string, currentValue: string, currentIndex: number, array: string[]) => string): string; (callbackfn: (previousValue: string, currentValue: string, currentIndex: number, array: string[]) => string, initialValue: string): string; (callbackfn: (previousValue: U, currentValue: string, currentIndex: number, array: string[]) => U, initialValue: U): U; (callbackfn: (previousValue: string, currentValue: string, currentIndex: number, array: string[]) => string, initialValue?: string): string; (callbackfn: (previousValue: U, currentValue: string, currentIndex: number, array: string[]) => U, initialValue: U): U; } >(x, y) => x + y : (x: string, y: string) => string >x : string >y : string diff --git a/tests/baselines/reference/dynamicImportInDefaultExportExpression.errors.txt b/tests/baselines/reference/dynamicImportInDefaultExportExpression.errors.txt new file mode 100644 index 00000000000..8bf6704b743 --- /dev/null +++ b/tests/baselines/reference/dynamicImportInDefaultExportExpression.errors.txt @@ -0,0 +1,11 @@ +tests/cases/compiler/dynamicImportInDefaultExportExpression.ts(3,23): error TS2307: Cannot find module './foo2'. + + +==== tests/cases/compiler/dynamicImportInDefaultExportExpression.ts (1 errors) ==== + export default { + getInstance: function () { + return import('./foo2'); + ~~~~~~~~ +!!! error TS2307: Cannot find module './foo2'. + } + } \ No newline at end of file diff --git a/tests/baselines/reference/dynamicImportInDefaultExportExpression.js b/tests/baselines/reference/dynamicImportInDefaultExportExpression.js new file mode 100644 index 00000000000..75e5e0d57a2 --- /dev/null +++ b/tests/baselines/reference/dynamicImportInDefaultExportExpression.js @@ -0,0 +1,15 @@ +//// [dynamicImportInDefaultExportExpression.ts] +export default { + getInstance: function () { + return import('./foo2'); + } +} + +//// [dynamicImportInDefaultExportExpression.js] +"use strict"; +exports.__esModule = true; +exports["default"] = { + getInstance: function () { + return Promise.resolve().then(function () { return require('./foo2'); }); + } +}; diff --git a/tests/baselines/reference/dynamicImportInDefaultExportExpression.symbols b/tests/baselines/reference/dynamicImportInDefaultExportExpression.symbols new file mode 100644 index 00000000000..d16b5f0a374 --- /dev/null +++ b/tests/baselines/reference/dynamicImportInDefaultExportExpression.symbols @@ -0,0 +1,8 @@ +=== tests/cases/compiler/dynamicImportInDefaultExportExpression.ts === +export default { + getInstance: function () { +>getInstance : Symbol(getInstance, Decl(dynamicImportInDefaultExportExpression.ts, 0, 16)) + + return import('./foo2'); + } +} diff --git a/tests/baselines/reference/dynamicImportInDefaultExportExpression.types b/tests/baselines/reference/dynamicImportInDefaultExportExpression.types new file mode 100644 index 00000000000..c75894a17ff --- /dev/null +++ b/tests/baselines/reference/dynamicImportInDefaultExportExpression.types @@ -0,0 +1,13 @@ +=== tests/cases/compiler/dynamicImportInDefaultExportExpression.ts === +export default { +>{ getInstance: function () { return import('./foo2'); }} : { getInstance: () => Promise; } + + getInstance: function () { +>getInstance : () => Promise +>function () { return import('./foo2'); } : () => Promise + + return import('./foo2'); +>import('./foo2') : Promise +>'./foo2' : "./foo2" + } +} diff --git a/tests/baselines/reference/dynamicImportWithNestedThis_es2015.js b/tests/baselines/reference/dynamicImportWithNestedThis_es2015.js new file mode 100644 index 00000000000..4f79e0caec1 --- /dev/null +++ b/tests/baselines/reference/dynamicImportWithNestedThis_es2015.js @@ -0,0 +1,38 @@ +//// [dynamicImportWithNestedThis_es2015.ts] +// https://github.com/Microsoft/TypeScript/issues/17564 +class C { + private _path = './other'; + + dynamic() { + return import(this._path); + } +} + +const c = new C(); +c.dynamic(); + +//// [dynamicImportWithNestedThis_es2015.js] +(function (factory) { + if (typeof module === "object" && typeof module.exports === "object") { + var v = factory(require, exports); + if (v !== undefined) module.exports = v; + } + else if (typeof define === "function" && define.amd) { + define(["require", "exports"], factory); + } +})(function (require, exports) { + "use strict"; + var __syncRequire = typeof module === "object" && typeof module.exports === "object"; + // https://github.com/Microsoft/TypeScript/issues/17564 + class C { + constructor() { + this._path = './other'; + } + dynamic() { + return _a = this._path, __syncRequire ? Promise.resolve().then(() => require(_a)) : new Promise((resolve_1, reject_1) => { require([_a], resolve_1, reject_1); }); + var _a; + } + } + const c = new C(); + c.dynamic(); +}); diff --git a/tests/baselines/reference/dynamicImportWithNestedThis_es2015.symbols b/tests/baselines/reference/dynamicImportWithNestedThis_es2015.symbols new file mode 100644 index 00000000000..7043a071124 --- /dev/null +++ b/tests/baselines/reference/dynamicImportWithNestedThis_es2015.symbols @@ -0,0 +1,27 @@ +=== tests/cases/compiler/dynamicImportWithNestedThis_es2015.ts === +// https://github.com/Microsoft/TypeScript/issues/17564 +class C { +>C : Symbol(C, Decl(dynamicImportWithNestedThis_es2015.ts, 0, 0)) + + private _path = './other'; +>_path : Symbol(C._path, Decl(dynamicImportWithNestedThis_es2015.ts, 1, 9)) + + dynamic() { +>dynamic : Symbol(C.dynamic, Decl(dynamicImportWithNestedThis_es2015.ts, 2, 27)) + + return import(this._path); +>this._path : Symbol(C._path, Decl(dynamicImportWithNestedThis_es2015.ts, 1, 9)) +>this : Symbol(C, Decl(dynamicImportWithNestedThis_es2015.ts, 0, 0)) +>_path : Symbol(C._path, Decl(dynamicImportWithNestedThis_es2015.ts, 1, 9)) + } +} + +const c = new C(); +>c : Symbol(c, Decl(dynamicImportWithNestedThis_es2015.ts, 9, 5)) +>C : Symbol(C, Decl(dynamicImportWithNestedThis_es2015.ts, 0, 0)) + +c.dynamic(); +>c.dynamic : Symbol(C.dynamic, Decl(dynamicImportWithNestedThis_es2015.ts, 2, 27)) +>c : Symbol(c, Decl(dynamicImportWithNestedThis_es2015.ts, 9, 5)) +>dynamic : Symbol(C.dynamic, Decl(dynamicImportWithNestedThis_es2015.ts, 2, 27)) + diff --git a/tests/baselines/reference/dynamicImportWithNestedThis_es2015.types b/tests/baselines/reference/dynamicImportWithNestedThis_es2015.types new file mode 100644 index 00000000000..165929a43cf --- /dev/null +++ b/tests/baselines/reference/dynamicImportWithNestedThis_es2015.types @@ -0,0 +1,31 @@ +=== tests/cases/compiler/dynamicImportWithNestedThis_es2015.ts === +// https://github.com/Microsoft/TypeScript/issues/17564 +class C { +>C : C + + private _path = './other'; +>_path : string +>'./other' : "./other" + + dynamic() { +>dynamic : () => Promise + + return import(this._path); +>import(this._path) : Promise +>this._path : string +>this : this +>_path : string + } +} + +const c = new C(); +>c : C +>new C() : C +>C : typeof C + +c.dynamic(); +>c.dynamic() : Promise +>c.dynamic : () => Promise +>c : C +>dynamic : () => Promise + diff --git a/tests/baselines/reference/dynamicImportWithNestedThis_es5.js b/tests/baselines/reference/dynamicImportWithNestedThis_es5.js new file mode 100644 index 00000000000..fcfde9e9887 --- /dev/null +++ b/tests/baselines/reference/dynamicImportWithNestedThis_es5.js @@ -0,0 +1,40 @@ +//// [dynamicImportWithNestedThis_es5.ts] +// https://github.com/Microsoft/TypeScript/issues/17564 +class C { + private _path = './other'; + + dynamic() { + return import(this._path); + } +} + +const c = new C(); +c.dynamic(); + +//// [dynamicImportWithNestedThis_es5.js] +(function (factory) { + if (typeof module === "object" && typeof module.exports === "object") { + var v = factory(require, exports); + if (v !== undefined) module.exports = v; + } + else if (typeof define === "function" && define.amd) { + define(["require", "exports"], factory); + } +})(function (require, exports) { + "use strict"; + var __syncRequire = typeof module === "object" && typeof module.exports === "object"; + // https://github.com/Microsoft/TypeScript/issues/17564 + var C = /** @class */ (function () { + function C() { + this._path = './other'; + } + C.prototype.dynamic = function () { + var _this = this; + return _a = this._path, __syncRequire ? Promise.resolve().then(function () { return require(_a); }) : new Promise(function (resolve_1, reject_1) { require([_a], resolve_1, reject_1); }); + var _a; + }; + return C; + }()); + var c = new C(); + c.dynamic(); +}); diff --git a/tests/baselines/reference/dynamicImportWithNestedThis_es5.symbols b/tests/baselines/reference/dynamicImportWithNestedThis_es5.symbols new file mode 100644 index 00000000000..6a127548030 --- /dev/null +++ b/tests/baselines/reference/dynamicImportWithNestedThis_es5.symbols @@ -0,0 +1,27 @@ +=== tests/cases/compiler/dynamicImportWithNestedThis_es5.ts === +// https://github.com/Microsoft/TypeScript/issues/17564 +class C { +>C : Symbol(C, Decl(dynamicImportWithNestedThis_es5.ts, 0, 0)) + + private _path = './other'; +>_path : Symbol(C._path, Decl(dynamicImportWithNestedThis_es5.ts, 1, 9)) + + dynamic() { +>dynamic : Symbol(C.dynamic, Decl(dynamicImportWithNestedThis_es5.ts, 2, 27)) + + return import(this._path); +>this._path : Symbol(C._path, Decl(dynamicImportWithNestedThis_es5.ts, 1, 9)) +>this : Symbol(C, Decl(dynamicImportWithNestedThis_es5.ts, 0, 0)) +>_path : Symbol(C._path, Decl(dynamicImportWithNestedThis_es5.ts, 1, 9)) + } +} + +const c = new C(); +>c : Symbol(c, Decl(dynamicImportWithNestedThis_es5.ts, 9, 5)) +>C : Symbol(C, Decl(dynamicImportWithNestedThis_es5.ts, 0, 0)) + +c.dynamic(); +>c.dynamic : Symbol(C.dynamic, Decl(dynamicImportWithNestedThis_es5.ts, 2, 27)) +>c : Symbol(c, Decl(dynamicImportWithNestedThis_es5.ts, 9, 5)) +>dynamic : Symbol(C.dynamic, Decl(dynamicImportWithNestedThis_es5.ts, 2, 27)) + diff --git a/tests/baselines/reference/dynamicImportWithNestedThis_es5.types b/tests/baselines/reference/dynamicImportWithNestedThis_es5.types new file mode 100644 index 00000000000..78b0f472971 --- /dev/null +++ b/tests/baselines/reference/dynamicImportWithNestedThis_es5.types @@ -0,0 +1,31 @@ +=== tests/cases/compiler/dynamicImportWithNestedThis_es5.ts === +// https://github.com/Microsoft/TypeScript/issues/17564 +class C { +>C : C + + private _path = './other'; +>_path : string +>'./other' : "./other" + + dynamic() { +>dynamic : () => Promise + + return import(this._path); +>import(this._path) : Promise +>this._path : string +>this : this +>_path : string + } +} + +const c = new C(); +>c : C +>new C() : C +>C : typeof C + +c.dynamic(); +>c.dynamic() : Promise +>c.dynamic : () => Promise +>c : C +>dynamic : () => Promise + diff --git a/tests/baselines/reference/es5-commonjs7.symbols b/tests/baselines/reference/es5-commonjs7.symbols index ed8247a6878..eb6dc062573 100644 --- a/tests/baselines/reference/es5-commonjs7.symbols +++ b/tests/baselines/reference/es5-commonjs7.symbols @@ -1,6 +1,6 @@ === tests/cases/compiler/test.d.ts === export default undefined; ->undefined : Symbol(default) +>undefined : Symbol(undefined) export var __esModule; >__esModule : Symbol(__esModule, Decl(test.d.ts, 1, 10)) diff --git a/tests/baselines/reference/excessPropertyCheckWithUnions.errors.txt b/tests/baselines/reference/excessPropertyCheckWithUnions.errors.txt new file mode 100644 index 00000000000..3b7e5a787d2 --- /dev/null +++ b/tests/baselines/reference/excessPropertyCheckWithUnions.errors.txt @@ -0,0 +1,99 @@ +tests/cases/compiler/excessPropertyCheckWithUnions.ts(10,30): error TS2322: Type '{ tag: "T"; a1: string; }' is not assignable to type 'ADT'. + Object literal may only specify known properties, and 'a1' does not exist in type '{ tag: "T"; }'. +tests/cases/compiler/excessPropertyCheckWithUnions.ts(11,21): error TS2322: Type '{ tag: "A"; d20: 12; }' is not assignable to type 'ADT'. + Object literal may only specify known properties, and 'd20' does not exist in type '{ tag: "A"; a1: string; }'. +tests/cases/compiler/excessPropertyCheckWithUnions.ts(12,1): error TS2322: Type '{ tag: "D"; }' is not assignable to type 'ADT'. + Type '{ tag: "D"; }' is not assignable to type '{ tag: "D"; d20: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20; }'. + Property 'd20' is missing in type '{ tag: "D"; }'. +tests/cases/compiler/excessPropertyCheckWithUnions.ts(33,28): error TS2322: Type '{ tag: "A"; x: string; extra: number; }' is not assignable to type 'Ambiguous'. + Object literal may only specify known properties, and 'extra' does not exist in type 'Ambiguous'. +tests/cases/compiler/excessPropertyCheckWithUnions.ts(34,26): error TS2322: Type '{ tag: "A"; y: number; extra: number; }' is not assignable to type 'Ambiguous'. + Object literal may only specify known properties, and 'extra' does not exist in type 'Ambiguous'. +tests/cases/compiler/excessPropertyCheckWithUnions.ts(39,1): error TS2322: Type '{ tag: "A"; }' is not assignable to type 'Ambiguous'. + Type '{ tag: "A"; }' is not assignable to type '{ tag: "C"; }'. + Types of property 'tag' are incompatible. + Type '"A"' is not assignable to type '"C"'. +tests/cases/compiler/excessPropertyCheckWithUnions.ts(40,1): error TS2322: Type '{ tag: "A"; z: true; }' is not assignable to type 'Ambiguous'. + Type '{ tag: "A"; z: true; }' is not assignable to type '{ tag: "C"; }'. + Types of property 'tag' are incompatible. + Type '"A"' is not assignable to type '"C"'. + + +==== tests/cases/compiler/excessPropertyCheckWithUnions.ts (7 errors) ==== + type ADT = { + tag: "A", + a1: string + } | { + tag: "D", + d20: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 + } | { + tag: "T", + } + let wrong: ADT = { tag: "T", a1: "extra" } + ~~~~~~~~~~~ +!!! error TS2322: Type '{ tag: "T"; a1: string; }' is not assignable to type 'ADT'. +!!! error TS2322: Object literal may only specify known properties, and 'a1' does not exist in type '{ tag: "T"; }'. + wrong = { tag: "A", d20: 12 } + ~~~~~~~ +!!! error TS2322: Type '{ tag: "A"; d20: 12; }' is not assignable to type 'ADT'. +!!! error TS2322: Object literal may only specify known properties, and 'd20' does not exist in type '{ tag: "A"; a1: string; }'. + wrong = { tag: "D" } + ~~~~~ +!!! error TS2322: Type '{ tag: "D"; }' is not assignable to type 'ADT'. +!!! error TS2322: Type '{ tag: "D"; }' is not assignable to type '{ tag: "D"; d20: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20; }'. +!!! error TS2322: Property 'd20' is missing in type '{ tag: "D"; }'. + + type Ambiguous = { + tag: "A", + x: string + } | { + tag: "A", + y: number + } | { + tag: "B", + z: boolean + } | { + tag: "C" + } + let amb: Ambiguous + // no error for ambiguous tag, even when it could satisfy both constituents at once + amb = { tag: "A", x: "hi" } + amb = { tag: "A", y: 12 } + amb = { tag: "A", x: "hi", y: 12 } + + // correctly error on excess property 'extra', even when ambiguous + amb = { tag: "A", x: "hi", extra: 12 } + ~~~~~~~~~ +!!! error TS2322: Type '{ tag: "A"; x: string; extra: number; }' is not assignable to type 'Ambiguous'. +!!! error TS2322: Object literal may only specify known properties, and 'extra' does not exist in type 'Ambiguous'. + amb = { tag: "A", y: 12, extra: 12 } + ~~~~~~~~~ +!!! error TS2322: Type '{ tag: "A"; y: number; extra: number; }' is not assignable to type 'Ambiguous'. +!!! error TS2322: Object literal may only specify known properties, and 'extra' does not exist in type 'Ambiguous'. + + // assignability errors still work. + // But note that the error for `z: true` is the fallback one of reporting on + // the last constituent since assignability error reporting can't find a single best discriminant either. + amb = { tag: "A" } + ~~~ +!!! error TS2322: Type '{ tag: "A"; }' is not assignable to type 'Ambiguous'. +!!! error TS2322: Type '{ tag: "A"; }' is not assignable to type '{ tag: "C"; }'. +!!! error TS2322: Types of property 'tag' are incompatible. +!!! error TS2322: Type '"A"' is not assignable to type '"C"'. + amb = { tag: "A", z: true } + ~~~ +!!! error TS2322: Type '{ tag: "A"; z: true; }' is not assignable to type 'Ambiguous'. +!!! error TS2322: Type '{ tag: "A"; z: true; }' is not assignable to type '{ tag: "C"; }'. +!!! error TS2322: Types of property 'tag' are incompatible. +!!! error TS2322: Type '"A"' is not assignable to type '"C"'. + + type Overlapping = + | { a: 1, b: 1, first: string } + | { a: 2, second: string } + | { b: 3, third: string } + let over: Overlapping + + // these two are not reported because there are two discriminant properties + over = { a: 1, b: 1, first: "ok", second: "error" } + over = { a: 1, b: 1, first: "ok", third: "error" } + \ No newline at end of file diff --git a/tests/baselines/reference/excessPropertyCheckWithUnions.js b/tests/baselines/reference/excessPropertyCheckWithUnions.js new file mode 100644 index 00000000000..c6da660b52d --- /dev/null +++ b/tests/baselines/reference/excessPropertyCheckWithUnions.js @@ -0,0 +1,74 @@ +//// [excessPropertyCheckWithUnions.ts] +type ADT = { + tag: "A", + a1: string +} | { + tag: "D", + d20: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 +} | { + tag: "T", +} +let wrong: ADT = { tag: "T", a1: "extra" } +wrong = { tag: "A", d20: 12 } +wrong = { tag: "D" } + +type Ambiguous = { + tag: "A", + x: string +} | { + tag: "A", + y: number +} | { + tag: "B", + z: boolean +} | { + tag: "C" +} +let amb: Ambiguous +// no error for ambiguous tag, even when it could satisfy both constituents at once +amb = { tag: "A", x: "hi" } +amb = { tag: "A", y: 12 } +amb = { tag: "A", x: "hi", y: 12 } + +// correctly error on excess property 'extra', even when ambiguous +amb = { tag: "A", x: "hi", extra: 12 } +amb = { tag: "A", y: 12, extra: 12 } + +// assignability errors still work. +// But note that the error for `z: true` is the fallback one of reporting on +// the last constituent since assignability error reporting can't find a single best discriminant either. +amb = { tag: "A" } +amb = { tag: "A", z: true } + +type Overlapping = + | { a: 1, b: 1, first: string } + | { a: 2, second: string } + | { b: 3, third: string } +let over: Overlapping + +// these two are not reported because there are two discriminant properties +over = { a: 1, b: 1, first: "ok", second: "error" } +over = { a: 1, b: 1, first: "ok", third: "error" } + + +//// [excessPropertyCheckWithUnions.js] +var wrong = { tag: "T", a1: "extra" }; +wrong = { tag: "A", d20: 12 }; +wrong = { tag: "D" }; +var amb; +// no error for ambiguous tag, even when it could satisfy both constituents at once +amb = { tag: "A", x: "hi" }; +amb = { tag: "A", y: 12 }; +amb = { tag: "A", x: "hi", y: 12 }; +// correctly error on excess property 'extra', even when ambiguous +amb = { tag: "A", x: "hi", extra: 12 }; +amb = { tag: "A", y: 12, extra: 12 }; +// assignability errors still work. +// But note that the error for `z: true` is the fallback one of reporting on +// the last constituent since assignability error reporting can't find a single best discriminant either. +amb = { tag: "A" }; +amb = { tag: "A", z: true }; +var over; +// these two are not reported because there are two discriminant properties +over = { a: 1, b: 1, first: "ok", second: "error" }; +over = { a: 1, b: 1, first: "ok", third: "error" }; diff --git a/tests/baselines/reference/excessPropertyCheckWithUnions.symbols b/tests/baselines/reference/excessPropertyCheckWithUnions.symbols new file mode 100644 index 00000000000..332166e396c --- /dev/null +++ b/tests/baselines/reference/excessPropertyCheckWithUnions.symbols @@ -0,0 +1,144 @@ +=== tests/cases/compiler/excessPropertyCheckWithUnions.ts === +type ADT = { +>ADT : Symbol(ADT, Decl(excessPropertyCheckWithUnions.ts, 0, 0)) + + tag: "A", +>tag : Symbol(tag, Decl(excessPropertyCheckWithUnions.ts, 0, 12)) + + a1: string +>a1 : Symbol(a1, Decl(excessPropertyCheckWithUnions.ts, 1, 13)) + +} | { + tag: "D", +>tag : Symbol(tag, Decl(excessPropertyCheckWithUnions.ts, 3, 5)) + + d20: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 +>d20 : Symbol(d20, Decl(excessPropertyCheckWithUnions.ts, 4, 13)) + +} | { + tag: "T", +>tag : Symbol(tag, Decl(excessPropertyCheckWithUnions.ts, 6, 5)) +} +let wrong: ADT = { tag: "T", a1: "extra" } +>wrong : Symbol(wrong, Decl(excessPropertyCheckWithUnions.ts, 9, 3)) +>ADT : Symbol(ADT, Decl(excessPropertyCheckWithUnions.ts, 0, 0)) +>tag : Symbol(tag, Decl(excessPropertyCheckWithUnions.ts, 9, 18)) +>a1 : Symbol(a1, Decl(excessPropertyCheckWithUnions.ts, 9, 28)) + +wrong = { tag: "A", d20: 12 } +>wrong : Symbol(wrong, Decl(excessPropertyCheckWithUnions.ts, 9, 3)) +>tag : Symbol(tag, Decl(excessPropertyCheckWithUnions.ts, 10, 9)) +>d20 : Symbol(d20, Decl(excessPropertyCheckWithUnions.ts, 10, 19)) + +wrong = { tag: "D" } +>wrong : Symbol(wrong, Decl(excessPropertyCheckWithUnions.ts, 9, 3)) +>tag : Symbol(tag, Decl(excessPropertyCheckWithUnions.ts, 11, 9)) + +type Ambiguous = { +>Ambiguous : Symbol(Ambiguous, Decl(excessPropertyCheckWithUnions.ts, 11, 20)) + + tag: "A", +>tag : Symbol(tag, Decl(excessPropertyCheckWithUnions.ts, 13, 18)) + + x: string +>x : Symbol(x, Decl(excessPropertyCheckWithUnions.ts, 14, 13)) + +} | { + tag: "A", +>tag : Symbol(tag, Decl(excessPropertyCheckWithUnions.ts, 16, 5)) + + y: number +>y : Symbol(y, Decl(excessPropertyCheckWithUnions.ts, 17, 13)) + +} | { + tag: "B", +>tag : Symbol(tag, Decl(excessPropertyCheckWithUnions.ts, 19, 5)) + + z: boolean +>z : Symbol(z, Decl(excessPropertyCheckWithUnions.ts, 20, 13)) + +} | { + tag: "C" +>tag : Symbol(tag, Decl(excessPropertyCheckWithUnions.ts, 22, 5)) +} +let amb: Ambiguous +>amb : Symbol(amb, Decl(excessPropertyCheckWithUnions.ts, 25, 3)) +>Ambiguous : Symbol(Ambiguous, Decl(excessPropertyCheckWithUnions.ts, 11, 20)) + +// no error for ambiguous tag, even when it could satisfy both constituents at once +amb = { tag: "A", x: "hi" } +>amb : Symbol(amb, Decl(excessPropertyCheckWithUnions.ts, 25, 3)) +>tag : Symbol(tag, Decl(excessPropertyCheckWithUnions.ts, 27, 7)) +>x : Symbol(x, Decl(excessPropertyCheckWithUnions.ts, 27, 17)) + +amb = { tag: "A", y: 12 } +>amb : Symbol(amb, Decl(excessPropertyCheckWithUnions.ts, 25, 3)) +>tag : Symbol(tag, Decl(excessPropertyCheckWithUnions.ts, 28, 7)) +>y : Symbol(y, Decl(excessPropertyCheckWithUnions.ts, 28, 17)) + +amb = { tag: "A", x: "hi", y: 12 } +>amb : Symbol(amb, Decl(excessPropertyCheckWithUnions.ts, 25, 3)) +>tag : Symbol(tag, Decl(excessPropertyCheckWithUnions.ts, 29, 7)) +>x : Symbol(x, Decl(excessPropertyCheckWithUnions.ts, 29, 17)) +>y : Symbol(y, Decl(excessPropertyCheckWithUnions.ts, 29, 26)) + +// correctly error on excess property 'extra', even when ambiguous +amb = { tag: "A", x: "hi", extra: 12 } +>amb : Symbol(amb, Decl(excessPropertyCheckWithUnions.ts, 25, 3)) +>tag : Symbol(tag, Decl(excessPropertyCheckWithUnions.ts, 32, 7)) +>x : Symbol(x, Decl(excessPropertyCheckWithUnions.ts, 32, 17)) +>extra : Symbol(extra, Decl(excessPropertyCheckWithUnions.ts, 32, 26)) + +amb = { tag: "A", y: 12, extra: 12 } +>amb : Symbol(amb, Decl(excessPropertyCheckWithUnions.ts, 25, 3)) +>tag : Symbol(tag, Decl(excessPropertyCheckWithUnions.ts, 33, 7)) +>y : Symbol(y, Decl(excessPropertyCheckWithUnions.ts, 33, 17)) +>extra : Symbol(extra, Decl(excessPropertyCheckWithUnions.ts, 33, 24)) + +// assignability errors still work. +// But note that the error for `z: true` is the fallback one of reporting on +// the last constituent since assignability error reporting can't find a single best discriminant either. +amb = { tag: "A" } +>amb : Symbol(amb, Decl(excessPropertyCheckWithUnions.ts, 25, 3)) +>tag : Symbol(tag, Decl(excessPropertyCheckWithUnions.ts, 38, 7)) + +amb = { tag: "A", z: true } +>amb : Symbol(amb, Decl(excessPropertyCheckWithUnions.ts, 25, 3)) +>tag : Symbol(tag, Decl(excessPropertyCheckWithUnions.ts, 39, 7)) +>z : Symbol(z, Decl(excessPropertyCheckWithUnions.ts, 39, 17)) + +type Overlapping = +>Overlapping : Symbol(Overlapping, Decl(excessPropertyCheckWithUnions.ts, 39, 27)) + + | { a: 1, b: 1, first: string } +>a : Symbol(a, Decl(excessPropertyCheckWithUnions.ts, 42, 7)) +>b : Symbol(b, Decl(excessPropertyCheckWithUnions.ts, 42, 13)) +>first : Symbol(first, Decl(excessPropertyCheckWithUnions.ts, 42, 19)) + + | { a: 2, second: string } +>a : Symbol(a, Decl(excessPropertyCheckWithUnions.ts, 43, 7)) +>second : Symbol(second, Decl(excessPropertyCheckWithUnions.ts, 43, 13)) + + | { b: 3, third: string } +>b : Symbol(b, Decl(excessPropertyCheckWithUnions.ts, 44, 7)) +>third : Symbol(third, Decl(excessPropertyCheckWithUnions.ts, 44, 13)) + +let over: Overlapping +>over : Symbol(over, Decl(excessPropertyCheckWithUnions.ts, 45, 3)) +>Overlapping : Symbol(Overlapping, Decl(excessPropertyCheckWithUnions.ts, 39, 27)) + +// these two are not reported because there are two discriminant properties +over = { a: 1, b: 1, first: "ok", second: "error" } +>over : Symbol(over, Decl(excessPropertyCheckWithUnions.ts, 45, 3)) +>a : Symbol(a, Decl(excessPropertyCheckWithUnions.ts, 48, 8)) +>b : Symbol(b, Decl(excessPropertyCheckWithUnions.ts, 48, 14)) +>first : Symbol(first, Decl(excessPropertyCheckWithUnions.ts, 48, 20)) +>second : Symbol(second, Decl(excessPropertyCheckWithUnions.ts, 48, 33)) + +over = { a: 1, b: 1, first: "ok", third: "error" } +>over : Symbol(over, Decl(excessPropertyCheckWithUnions.ts, 45, 3)) +>a : Symbol(a, Decl(excessPropertyCheckWithUnions.ts, 49, 8)) +>b : Symbol(b, Decl(excessPropertyCheckWithUnions.ts, 49, 14)) +>first : Symbol(first, Decl(excessPropertyCheckWithUnions.ts, 49, 20)) +>third : Symbol(third, Decl(excessPropertyCheckWithUnions.ts, 49, 33)) + diff --git a/tests/baselines/reference/excessPropertyCheckWithUnions.types b/tests/baselines/reference/excessPropertyCheckWithUnions.types new file mode 100644 index 00000000000..1d6bdd32eb2 --- /dev/null +++ b/tests/baselines/reference/excessPropertyCheckWithUnions.types @@ -0,0 +1,196 @@ +=== tests/cases/compiler/excessPropertyCheckWithUnions.ts === +type ADT = { +>ADT : ADT + + tag: "A", +>tag : "A" + + a1: string +>a1 : string + +} | { + tag: "D", +>tag : "D" + + d20: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 +>d20 : 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 + +} | { + tag: "T", +>tag : "T" +} +let wrong: ADT = { tag: "T", a1: "extra" } +>wrong : ADT +>ADT : ADT +>{ tag: "T", a1: "extra" } : { tag: "T"; a1: string; } +>tag : string +>"T" : "T" +>a1 : string +>"extra" : "extra" + +wrong = { tag: "A", d20: 12 } +>wrong = { tag: "A", d20: 12 } : { tag: "A"; d20: 12; } +>wrong : ADT +>{ tag: "A", d20: 12 } : { tag: "A"; d20: 12; } +>tag : string +>"A" : "A" +>d20 : number +>12 : 12 + +wrong = { tag: "D" } +>wrong = { tag: "D" } : { tag: "D"; } +>wrong : ADT +>{ tag: "D" } : { tag: "D"; } +>tag : string +>"D" : "D" + +type Ambiguous = { +>Ambiguous : Ambiguous + + tag: "A", +>tag : "A" + + x: string +>x : string + +} | { + tag: "A", +>tag : "A" + + y: number +>y : number + +} | { + tag: "B", +>tag : "B" + + z: boolean +>z : boolean + +} | { + tag: "C" +>tag : "C" +} +let amb: Ambiguous +>amb : Ambiguous +>Ambiguous : Ambiguous + +// no error for ambiguous tag, even when it could satisfy both constituents at once +amb = { tag: "A", x: "hi" } +>amb = { tag: "A", x: "hi" } : { tag: "A"; x: string; } +>amb : Ambiguous +>{ tag: "A", x: "hi" } : { tag: "A"; x: string; } +>tag : string +>"A" : "A" +>x : string +>"hi" : "hi" + +amb = { tag: "A", y: 12 } +>amb = { tag: "A", y: 12 } : { tag: "A"; y: number; } +>amb : Ambiguous +>{ tag: "A", y: 12 } : { tag: "A"; y: number; } +>tag : string +>"A" : "A" +>y : number +>12 : 12 + +amb = { tag: "A", x: "hi", y: 12 } +>amb = { tag: "A", x: "hi", y: 12 } : { tag: "A"; x: string; y: number; } +>amb : Ambiguous +>{ tag: "A", x: "hi", y: 12 } : { tag: "A"; x: string; y: number; } +>tag : string +>"A" : "A" +>x : string +>"hi" : "hi" +>y : number +>12 : 12 + +// correctly error on excess property 'extra', even when ambiguous +amb = { tag: "A", x: "hi", extra: 12 } +>amb = { tag: "A", x: "hi", extra: 12 } : { tag: "A"; x: string; extra: number; } +>amb : Ambiguous +>{ tag: "A", x: "hi", extra: 12 } : { tag: "A"; x: string; extra: number; } +>tag : string +>"A" : "A" +>x : string +>"hi" : "hi" +>extra : number +>12 : 12 + +amb = { tag: "A", y: 12, extra: 12 } +>amb = { tag: "A", y: 12, extra: 12 } : { tag: "A"; y: number; extra: number; } +>amb : Ambiguous +>{ tag: "A", y: 12, extra: 12 } : { tag: "A"; y: number; extra: number; } +>tag : string +>"A" : "A" +>y : number +>12 : 12 +>extra : number +>12 : 12 + +// assignability errors still work. +// But note that the error for `z: true` is the fallback one of reporting on +// the last constituent since assignability error reporting can't find a single best discriminant either. +amb = { tag: "A" } +>amb = { tag: "A" } : { tag: "A"; } +>amb : Ambiguous +>{ tag: "A" } : { tag: "A"; } +>tag : string +>"A" : "A" + +amb = { tag: "A", z: true } +>amb = { tag: "A", z: true } : { tag: "A"; z: true; } +>amb : Ambiguous +>{ tag: "A", z: true } : { tag: "A"; z: true; } +>tag : string +>"A" : "A" +>z : boolean +>true : true + +type Overlapping = +>Overlapping : Overlapping + + | { a: 1, b: 1, first: string } +>a : 1 +>b : 1 +>first : string + + | { a: 2, second: string } +>a : 2 +>second : string + + | { b: 3, third: string } +>b : 3 +>third : string + +let over: Overlapping +>over : Overlapping +>Overlapping : Overlapping + +// these two are not reported because there are two discriminant properties +over = { a: 1, b: 1, first: "ok", second: "error" } +>over = { a: 1, b: 1, first: "ok", second: "error" } : { a: 1; b: 1; first: string; second: string; } +>over : Overlapping +>{ a: 1, b: 1, first: "ok", second: "error" } : { a: 1; b: 1; first: string; second: string; } +>a : number +>1 : 1 +>b : number +>1 : 1 +>first : string +>"ok" : "ok" +>second : string +>"error" : "error" + +over = { a: 1, b: 1, first: "ok", third: "error" } +>over = { a: 1, b: 1, first: "ok", third: "error" } : { a: 1; b: 1; first: string; third: string; } +>over : Overlapping +>{ a: 1, b: 1, first: "ok", third: "error" } : { a: 1; b: 1; first: string; third: string; } +>a : number +>1 : 1 +>b : number +>1 : 1 +>first : string +>"ok" : "ok" +>third : string +>"error" : "error" + diff --git a/tests/baselines/reference/exportDefaultVariable.symbols b/tests/baselines/reference/exportDefaultVariable.symbols index cd7ebed926c..9c924c32f4e 100644 --- a/tests/baselines/reference/exportDefaultVariable.symbols +++ b/tests/baselines/reference/exportDefaultVariable.symbols @@ -6,6 +6,6 @@ declare var io: any; declare module 'module' { export default io; ->io : Symbol(default, Decl(exportDefaultVariable.ts, 2, 11)) +>io : Symbol(io, Decl(exportDefaultVariable.ts, 2, 11)) } diff --git a/tests/baselines/reference/extractConstant/extractConstant_PreserveTrivia.js b/tests/baselines/reference/extractConstant/extractConstant_PreserveTrivia.js new file mode 100644 index 00000000000..22abb77901d --- /dev/null +++ b/tests/baselines/reference/extractConstant/extractConstant_PreserveTrivia.js @@ -0,0 +1,17 @@ +// ==ORIGINAL== + +// a +var q = /*b*/ //c + /*d*/ /*[#|*/1 /*e*/ //f + /*g*/ + /*h*/ //i + /*j*/ 2/*|]*/ /*k*/ //l + /*m*/; /*n*/ //o +// ==SCOPE::Extract to constant in enclosing scope== +const newLocal = 1 /*e*/ //f + /*g*/ + /*h*/ //i + /*j*/ 2; + +// a +var q = /*b*/ //c + /*d*/ /*RENAME*/newLocal /*k*/ //l + /*m*/; /*n*/ //o \ No newline at end of file diff --git a/tests/baselines/reference/extractConstant/extractConstant_PreserveTrivia.ts b/tests/baselines/reference/extractConstant/extractConstant_PreserveTrivia.ts new file mode 100644 index 00000000000..22abb77901d --- /dev/null +++ b/tests/baselines/reference/extractConstant/extractConstant_PreserveTrivia.ts @@ -0,0 +1,17 @@ +// ==ORIGINAL== + +// a +var q = /*b*/ //c + /*d*/ /*[#|*/1 /*e*/ //f + /*g*/ + /*h*/ //i + /*j*/ 2/*|]*/ /*k*/ //l + /*m*/; /*n*/ //o +// ==SCOPE::Extract to constant in enclosing scope== +const newLocal = 1 /*e*/ //f + /*g*/ + /*h*/ //i + /*j*/ 2; + +// a +var q = /*b*/ //c + /*d*/ /*RENAME*/newLocal /*k*/ //l + /*m*/; /*n*/ //o \ No newline at end of file diff --git a/tests/baselines/reference/extractConstant/extractConstant_This_Constructor.js b/tests/baselines/reference/extractConstant/extractConstant_This_Constructor.js new file mode 100644 index 00000000000..cf45ab2cd3f --- /dev/null +++ b/tests/baselines/reference/extractConstant/extractConstant_This_Constructor.js @@ -0,0 +1,16 @@ +// ==ORIGINAL== + +class C { + constructor() { + /*[#|*/this.m2()/*|]*/; + } + m2() { return 1; } +} +// ==SCOPE::Extract to constant in enclosing scope== + +class C { + constructor() { + const /*RENAME*/newLocal = this.m2(); + } + m2() { return 1; } +} \ No newline at end of file diff --git a/tests/baselines/reference/extractConstant/extractConstant_This_Constructor.ts b/tests/baselines/reference/extractConstant/extractConstant_This_Constructor.ts new file mode 100644 index 00000000000..d36d1a6fa21 --- /dev/null +++ b/tests/baselines/reference/extractConstant/extractConstant_This_Constructor.ts @@ -0,0 +1,26 @@ +// ==ORIGINAL== + +class C { + constructor() { + /*[#|*/this.m2()/*|]*/; + } + m2() { return 1; } +} +// ==SCOPE::Extract to constant in enclosing scope== + +class C { + constructor() { + const /*RENAME*/newLocal = this.m2(); + } + m2() { return 1; } +} +// ==SCOPE::Extract to readonly field in class 'C'== + +class C { + private readonly newProperty = this.m2(); + + constructor() { + this./*RENAME*/newProperty; + } + m2() { return 1; } +} \ No newline at end of file diff --git a/tests/baselines/reference/extractConstant/extractConstant_This_Method.js b/tests/baselines/reference/extractConstant/extractConstant_This_Method.js new file mode 100644 index 00000000000..fd703868e9f --- /dev/null +++ b/tests/baselines/reference/extractConstant/extractConstant_This_Method.js @@ -0,0 +1,16 @@ +// ==ORIGINAL== + +class C { + m1() { + /*[#|*/this.m2()/*|]*/; + } + m2() { return 1; } +} +// ==SCOPE::Extract to constant in enclosing scope== + +class C { + m1() { + const /*RENAME*/newLocal = this.m2(); + } + m2() { return 1; } +} \ No newline at end of file diff --git a/tests/baselines/reference/extractConstant/extractConstant_This_Method.ts b/tests/baselines/reference/extractConstant/extractConstant_This_Method.ts new file mode 100644 index 00000000000..0dbaa4372d4 --- /dev/null +++ b/tests/baselines/reference/extractConstant/extractConstant_This_Method.ts @@ -0,0 +1,26 @@ +// ==ORIGINAL== + +class C { + m1() { + /*[#|*/this.m2()/*|]*/; + } + m2() { return 1; } +} +// ==SCOPE::Extract to constant in enclosing scope== + +class C { + m1() { + const /*RENAME*/newLocal = this.m2(); + } + m2() { return 1; } +} +// ==SCOPE::Extract to readonly field in class 'C'== + +class C { + private readonly newProperty = this.m2(); + + m1() { + this./*RENAME*/newProperty; + } + m2() { return 1; } +} \ No newline at end of file diff --git a/tests/baselines/reference/extractConstant/extractConstant_This_Property.ts b/tests/baselines/reference/extractConstant/extractConstant_This_Property.ts new file mode 100644 index 00000000000..04b3b50da1b --- /dev/null +++ b/tests/baselines/reference/extractConstant/extractConstant_This_Property.ts @@ -0,0 +1,18 @@ +// ==ORIGINAL== + +namespace N { // Force this test to be TS-only + class C { + x = 1; + y = /*[#|*/this.x/*|]*/; + } +} +// ==SCOPE::Extract to readonly field in class 'C'== + +namespace N { // Force this test to be TS-only + class C { + x = 1; + private readonly newProperty = this.x; + + y = this./*RENAME*/newProperty; + } +} \ No newline at end of file diff --git a/tests/baselines/reference/extractFunction/extractFunction1.ts b/tests/baselines/reference/extractFunction/extractFunction1.ts index 8243644e1ef..4b0b7dd9f2e 100644 --- a/tests/baselines/reference/extractFunction/extractFunction1.ts +++ b/tests/baselines/reference/extractFunction/extractFunction1.ts @@ -89,6 +89,7 @@ namespace A { } } } + function newFunction(x: number, a: number, foo: () => void) { let y = 5; let z = x; diff --git a/tests/baselines/reference/extractFunction/extractFunction10.ts b/tests/baselines/reference/extractFunction/extractFunction10.ts index a15381c1a18..99651f03e88 100644 --- a/tests/baselines/reference/extractFunction/extractFunction10.ts +++ b/tests/baselines/reference/extractFunction/extractFunction10.ts @@ -49,6 +49,7 @@ namespace A { } } } + function newFunction() { let a1: A.I = { x: 1 }; return a1.x + 10; diff --git a/tests/baselines/reference/extractFunction/extractFunction11.ts b/tests/baselines/reference/extractFunction/extractFunction11.ts index d07a1826439..baca3914b03 100644 --- a/tests/baselines/reference/extractFunction/extractFunction11.ts +++ b/tests/baselines/reference/extractFunction/extractFunction11.ts @@ -17,7 +17,7 @@ namespace A { class C { a() { let z = 1; - var __return: any; + let __return; ({ __return, z } = this./*RENAME*/newMethod(z)); return __return; } @@ -36,7 +36,7 @@ namespace A { class C { a() { let z = 1; - var __return: any; + let __return; ({ __return, z } = /*RENAME*/newFunction(z)); return __return; } @@ -55,12 +55,13 @@ namespace A { class C { a() { let z = 1; - var __return: any; + let __return; ({ __return, y, z } = /*RENAME*/newFunction(y, z)); return __return; } } } + function newFunction(y: number, z: number) { let a1 = { x: 1 }; y = 10; diff --git a/tests/baselines/reference/extractFunction/extractFunction12.ts b/tests/baselines/reference/extractFunction/extractFunction12.ts index 37274bdcc87..49e87151b9b 100644 --- a/tests/baselines/reference/extractFunction/extractFunction12.ts +++ b/tests/baselines/reference/extractFunction/extractFunction12.ts @@ -20,7 +20,7 @@ namespace A { b() {} a() { let z = 1; - var __return: any; + let __return; ({ __return, z } = this./*RENAME*/newMethod(z)); return __return; } diff --git a/tests/baselines/reference/extractFunction/extractFunction13.ts b/tests/baselines/reference/extractFunction/extractFunction13.ts index 4987039d5da..e39476160c5 100644 --- a/tests/baselines/reference/extractFunction/extractFunction13.ts +++ b/tests/baselines/reference/extractFunction/extractFunction13.ts @@ -20,7 +20,7 @@ (u2a: U2a, u2b: U2b) => { function F2(t2a: T2a, t2b: T2b) { (u3a: U3a, u3b: U3b) => { - /*RENAME*/newFunction(u3a); + /*RENAME*/newFunction(u3a); } function newFunction(u3a: U3a) { @@ -40,7 +40,7 @@ (u2a: U2a, u2b: U2b) => { function F2(t2a: T2a, t2b: T2b) { (u3a: U3a, u3b: U3b) => { - /*RENAME*/newFunction(t2a, u2a, u3a); + /*RENAME*/newFunction(t2a, u2a, u3a); } } } @@ -60,12 +60,13 @@ (u2a: U2a, u2b: U2b) => { function F2(t2a: T2a, t2b: T2b) { (u3a: U3a, u3b: U3b) => { - /*RENAME*/newFunction(t1a, t2a, u1a, u2a, u3a); + /*RENAME*/newFunction(t1a, t2a, u1a, u2a, u3a); } } } } } + function newFunction(t1a: T1a, t2a: T2a, u1a: U1a, u2a: U2a, u3a: U3a) { t1a.toString(); t2a.toString(); diff --git a/tests/baselines/reference/extractFunction/extractFunction14.ts b/tests/baselines/reference/extractFunction/extractFunction14.ts index 53cabbe600f..86f8c9b5b63 100644 --- a/tests/baselines/reference/extractFunction/extractFunction14.ts +++ b/tests/baselines/reference/extractFunction/extractFunction14.ts @@ -33,6 +33,7 @@ function F(t1: T) { /*RENAME*/newFunction(t1, t2); } } + function newFunction(t1: T, t2: T) { t1.toString(); t2.toString(); diff --git a/tests/baselines/reference/extractFunction/extractFunction15.ts b/tests/baselines/reference/extractFunction/extractFunction15.ts index a09383282aa..3b291f4d86c 100644 --- a/tests/baselines/reference/extractFunction/extractFunction15.ts +++ b/tests/baselines/reference/extractFunction/extractFunction15.ts @@ -30,6 +30,7 @@ function F(t1: T) { /*RENAME*/newFunction(t2); } } + function newFunction(t2: U) { t2.toString(); } diff --git a/tests/baselines/reference/extractFunction/extractFunction16.ts b/tests/baselines/reference/extractFunction/extractFunction16.ts index 79c72f31198..5800fa6945b 100644 --- a/tests/baselines/reference/extractFunction/extractFunction16.ts +++ b/tests/baselines/reference/extractFunction/extractFunction16.ts @@ -14,6 +14,7 @@ function F() { function F() { const array: T[] = /*RENAME*/newFunction(); } + function newFunction(): T[] { return []; } diff --git a/tests/baselines/reference/extractFunction/extractFunction17.ts b/tests/baselines/reference/extractFunction/extractFunction17.ts index 733b1b27623..45d9953fb95 100644 --- a/tests/baselines/reference/extractFunction/extractFunction17.ts +++ b/tests/baselines/reference/extractFunction/extractFunction17.ts @@ -20,6 +20,7 @@ class C { /*RENAME*/newFunction(t1); } } + function newFunction(t1: T1) { t1.toString(); } diff --git a/tests/baselines/reference/extractFunction/extractFunction18.ts b/tests/baselines/reference/extractFunction/extractFunction18.ts index 8c44de12981..bdfcce6bbdc 100644 --- a/tests/baselines/reference/extractFunction/extractFunction18.ts +++ b/tests/baselines/reference/extractFunction/extractFunction18.ts @@ -20,6 +20,7 @@ class C { /*RENAME*/newFunction(t1); } } + function newFunction(t1: T1) { t1.toString(); } diff --git a/tests/baselines/reference/extractFunction/extractFunction19.ts b/tests/baselines/reference/extractFunction/extractFunction19.ts index 3a2723513f4..0b3192a49fb 100644 --- a/tests/baselines/reference/extractFunction/extractFunction19.ts +++ b/tests/baselines/reference/extractFunction/extractFunction19.ts @@ -14,6 +14,7 @@ function F(v: V) { function F(v: V) { /*RENAME*/newFunction(v); } + function newFunction(v: V) { v.toString(); } diff --git a/tests/baselines/reference/extractFunction/extractFunction2.ts b/tests/baselines/reference/extractFunction/extractFunction2.ts index 3872812b312..be72a7fd52f 100644 --- a/tests/baselines/reference/extractFunction/extractFunction2.ts +++ b/tests/baselines/reference/extractFunction/extractFunction2.ts @@ -78,6 +78,7 @@ namespace A { } } } + function newFunction(x: number, foo: () => void) { let y = 5; let z = x; diff --git a/tests/baselines/reference/extractFunction/extractFunction20.js b/tests/baselines/reference/extractFunction/extractFunction20.js index b65d3dae5da..17bef1c6044 100644 --- a/tests/baselines/reference/extractFunction/extractFunction20.js +++ b/tests/baselines/reference/extractFunction/extractFunction20.js @@ -22,6 +22,7 @@ const _ = class { return /*RENAME*/newFunction(); } } + function newFunction() { let a1 = { x: 1 }; return a1.x + 10; diff --git a/tests/baselines/reference/extractFunction/extractFunction20.ts b/tests/baselines/reference/extractFunction/extractFunction20.ts index 1fe72020ad7..ce09d4457d3 100644 --- a/tests/baselines/reference/extractFunction/extractFunction20.ts +++ b/tests/baselines/reference/extractFunction/extractFunction20.ts @@ -22,6 +22,7 @@ const _ = class { return /*RENAME*/newFunction(); } } + function newFunction() { let a1 = { x: 1 }; return a1.x + 10; diff --git a/tests/baselines/reference/extractFunction/extractFunction21.js b/tests/baselines/reference/extractFunction/extractFunction21.js index 4454f36ac62..08c4512fee7 100644 --- a/tests/baselines/reference/extractFunction/extractFunction21.js +++ b/tests/baselines/reference/extractFunction/extractFunction21.js @@ -20,6 +20,7 @@ function foo() { x = /*RENAME*/newFunction(x); return; } + function newFunction(x) { x++; return x; diff --git a/tests/baselines/reference/extractFunction/extractFunction21.ts b/tests/baselines/reference/extractFunction/extractFunction21.ts index 530a10bea95..4adb05f3bf1 100644 --- a/tests/baselines/reference/extractFunction/extractFunction21.ts +++ b/tests/baselines/reference/extractFunction/extractFunction21.ts @@ -20,6 +20,7 @@ function foo() { x = /*RENAME*/newFunction(x); return; } + function newFunction(x: number) { x++; return x; diff --git a/tests/baselines/reference/extractFunction/extractFunction22.js b/tests/baselines/reference/extractFunction/extractFunction22.js index 60891105c6e..0fb69c87b04 100644 --- a/tests/baselines/reference/extractFunction/extractFunction22.js +++ b/tests/baselines/reference/extractFunction/extractFunction22.js @@ -26,6 +26,7 @@ function test() { return /*RENAME*/newFunction(); } } + function newFunction() { return 1; } diff --git a/tests/baselines/reference/extractFunction/extractFunction22.ts b/tests/baselines/reference/extractFunction/extractFunction22.ts index 60891105c6e..0fb69c87b04 100644 --- a/tests/baselines/reference/extractFunction/extractFunction22.ts +++ b/tests/baselines/reference/extractFunction/extractFunction22.ts @@ -26,6 +26,7 @@ function test() { return /*RENAME*/newFunction(); } } + function newFunction() { return 1; } diff --git a/tests/baselines/reference/extractFunction/extractFunction23.ts b/tests/baselines/reference/extractFunction/extractFunction23.ts index 3092d6490ba..b3730a5b54f 100644 --- a/tests/baselines/reference/extractFunction/extractFunction23.ts +++ b/tests/baselines/reference/extractFunction/extractFunction23.ts @@ -38,6 +38,7 @@ namespace NS { } function M3() { } } + function newFunction() { return 1; } diff --git a/tests/baselines/reference/extractFunction/extractFunction24.js b/tests/baselines/reference/extractFunction/extractFunction24.js index dbac567afc6..2c1d353f51a 100644 --- a/tests/baselines/reference/extractFunction/extractFunction24.js +++ b/tests/baselines/reference/extractFunction/extractFunction24.js @@ -38,6 +38,7 @@ function Outer() { } function M3() { } } + function newFunction() { return 1; } diff --git a/tests/baselines/reference/extractFunction/extractFunction24.ts b/tests/baselines/reference/extractFunction/extractFunction24.ts index dbac567afc6..2c1d353f51a 100644 --- a/tests/baselines/reference/extractFunction/extractFunction24.ts +++ b/tests/baselines/reference/extractFunction/extractFunction24.ts @@ -38,6 +38,7 @@ function Outer() { } function M3() { } } + function newFunction() { return 1; } diff --git a/tests/baselines/reference/extractFunction/extractFunction26.js b/tests/baselines/reference/extractFunction/extractFunction26.js index c05af641d4b..2c821c05ad1 100644 --- a/tests/baselines/reference/extractFunction/extractFunction26.js +++ b/tests/baselines/reference/extractFunction/extractFunction26.js @@ -26,6 +26,7 @@ class C { } M3() { } } + function newFunction() { return 1; } diff --git a/tests/baselines/reference/extractFunction/extractFunction26.ts b/tests/baselines/reference/extractFunction/extractFunction26.ts index 37eba24bfde..300686c12ab 100644 --- a/tests/baselines/reference/extractFunction/extractFunction26.ts +++ b/tests/baselines/reference/extractFunction/extractFunction26.ts @@ -26,6 +26,7 @@ class C { } M3() { } } + function newFunction() { return 1; } diff --git a/tests/baselines/reference/extractFunction/extractFunction27.js b/tests/baselines/reference/extractFunction/extractFunction27.js index 96bca6b24c5..702127b9d76 100644 --- a/tests/baselines/reference/extractFunction/extractFunction27.js +++ b/tests/baselines/reference/extractFunction/extractFunction27.js @@ -29,6 +29,7 @@ class C { constructor() { } M3() { } } + function newFunction() { return 1; } diff --git a/tests/baselines/reference/extractFunction/extractFunction27.ts b/tests/baselines/reference/extractFunction/extractFunction27.ts index 335d74e002d..1acbe67707a 100644 --- a/tests/baselines/reference/extractFunction/extractFunction27.ts +++ b/tests/baselines/reference/extractFunction/extractFunction27.ts @@ -29,6 +29,7 @@ class C { constructor() { } M3() { } } + function newFunction() { return 1; } diff --git a/tests/baselines/reference/extractFunction/extractFunction28.js b/tests/baselines/reference/extractFunction/extractFunction28.js index a82b864448d..cf0742626dd 100644 --- a/tests/baselines/reference/extractFunction/extractFunction28.js +++ b/tests/baselines/reference/extractFunction/extractFunction28.js @@ -29,6 +29,7 @@ class C { M3() { } constructor() { } } + function newFunction() { return 1; } diff --git a/tests/baselines/reference/extractFunction/extractFunction28.ts b/tests/baselines/reference/extractFunction/extractFunction28.ts index bde2661f934..f15d7956f1c 100644 --- a/tests/baselines/reference/extractFunction/extractFunction28.ts +++ b/tests/baselines/reference/extractFunction/extractFunction28.ts @@ -29,6 +29,7 @@ class C { M3() { } constructor() { } } + function newFunction() { return 1; } diff --git a/tests/baselines/reference/extractFunction/extractFunction3.ts b/tests/baselines/reference/extractFunction/extractFunction3.ts index 9c4c1aaa9d7..7a481e76cfa 100644 --- a/tests/baselines/reference/extractFunction/extractFunction3.ts +++ b/tests/baselines/reference/extractFunction/extractFunction3.ts @@ -73,6 +73,7 @@ namespace A { } } } + function* newFunction(z: number, foo: () => void) { let y = 5; yield z; diff --git a/tests/baselines/reference/extractFunction/extractFunction30.ts b/tests/baselines/reference/extractFunction/extractFunction30.ts index b57b48c30a9..f90548c333c 100644 --- a/tests/baselines/reference/extractFunction/extractFunction30.ts +++ b/tests/baselines/reference/extractFunction/extractFunction30.ts @@ -14,6 +14,7 @@ function F() { function F() { /*RENAME*/newFunction(); } + function newFunction() { let t: T; } diff --git a/tests/baselines/reference/extractFunction/extractFunction31.ts b/tests/baselines/reference/extractFunction/extractFunction31.ts index d7252a14011..2dea17689b6 100644 --- a/tests/baselines/reference/extractFunction/extractFunction31.ts +++ b/tests/baselines/reference/extractFunction/extractFunction31.ts @@ -37,6 +37,7 @@ namespace N { f = /*RENAME*/newFunction(f); } } + function newFunction(f: () => number) { f = function(): number { return N.value; diff --git a/tests/baselines/reference/extractFunction/extractFunction32.ts b/tests/baselines/reference/extractFunction/extractFunction32.ts index 4070763b79f..720d0b227b0 100644 --- a/tests/baselines/reference/extractFunction/extractFunction32.ts +++ b/tests/baselines/reference/extractFunction/extractFunction32.ts @@ -37,6 +37,7 @@ namespace N { /*RENAME*/newFunction(); } } + function newFunction() { var c = class { M() { diff --git a/tests/baselines/reference/extractFunction/extractFunction33.js b/tests/baselines/reference/extractFunction/extractFunction33.js index 46c0f176b56..cc027a14b6c 100644 --- a/tests/baselines/reference/extractFunction/extractFunction33.js +++ b/tests/baselines/reference/extractFunction/extractFunction33.js @@ -14,6 +14,7 @@ function F() { function F() { /*RENAME*/newFunction(); } + function newFunction() { function G() { } } diff --git a/tests/baselines/reference/extractFunction/extractFunction33.ts b/tests/baselines/reference/extractFunction/extractFunction33.ts index 46c0f176b56..cc027a14b6c 100644 --- a/tests/baselines/reference/extractFunction/extractFunction33.ts +++ b/tests/baselines/reference/extractFunction/extractFunction33.ts @@ -14,6 +14,7 @@ function F() { function F() { /*RENAME*/newFunction(); } + function newFunction() { function G() { } } diff --git a/tests/baselines/reference/extractFunction/extractFunction4.ts b/tests/baselines/reference/extractFunction/extractFunction4.ts index 4108976b6b3..46aad65c68c 100644 --- a/tests/baselines/reference/extractFunction/extractFunction4.ts +++ b/tests/baselines/reference/extractFunction/extractFunction4.ts @@ -81,6 +81,7 @@ namespace A { } } } + async function newFunction(z: number, z1: any, foo: () => void) { let y = 5; if (z) { diff --git a/tests/baselines/reference/extractFunction/extractFunction5.ts b/tests/baselines/reference/extractFunction/extractFunction5.ts index 3122ba24553..085a73fdf93 100644 --- a/tests/baselines/reference/extractFunction/extractFunction5.ts +++ b/tests/baselines/reference/extractFunction/extractFunction5.ts @@ -89,6 +89,7 @@ namespace A { } } } + function newFunction(x: number, a: number) { let y = 5; let z = x; diff --git a/tests/baselines/reference/extractFunction/extractFunction6.ts b/tests/baselines/reference/extractFunction/extractFunction6.ts index f6c94216b46..613635c658a 100644 --- a/tests/baselines/reference/extractFunction/extractFunction6.ts +++ b/tests/baselines/reference/extractFunction/extractFunction6.ts @@ -43,7 +43,7 @@ namespace A { function a() { let a = 1; - var __return: any; + let __return; ({ __return, a } = /*RENAME*/newFunction(a)); return __return; } @@ -65,7 +65,7 @@ namespace A { function a() { let a = 1; - var __return: any; + let __return; ({ __return, a } = /*RENAME*/newFunction(a)); return __return; } @@ -87,12 +87,13 @@ namespace A { function a() { let a = 1; - var __return: any; + let __return; ({ __return, a } = /*RENAME*/newFunction(x, a)); return __return; } } } + function newFunction(x: number, a: number) { let y = 5; let z = x; diff --git a/tests/baselines/reference/extractFunction/extractFunction7.ts b/tests/baselines/reference/extractFunction/extractFunction7.ts index 91377868e0f..0f57a0cfba8 100644 --- a/tests/baselines/reference/extractFunction/extractFunction7.ts +++ b/tests/baselines/reference/extractFunction/extractFunction7.ts @@ -49,7 +49,7 @@ namespace A { function a() { let a = 1; - var __return: any; + let __return; ({ __return, a } = /*RENAME*/newFunction(a)); return __return; } @@ -73,7 +73,7 @@ namespace A { function a() { let a = 1; - var __return: any; + let __return; ({ __return, a } = /*RENAME*/newFunction(a)); return __return; } @@ -97,12 +97,13 @@ namespace A { function a() { let a = 1; - var __return: any; + let __return; ({ __return, a } = /*RENAME*/newFunction(x, a)); return __return; } } } + function newFunction(x: number, a: number) { let y = 5; let z = x; diff --git a/tests/baselines/reference/extractFunction/extractFunction9.ts b/tests/baselines/reference/extractFunction/extractFunction9.ts index 7db12096cbc..3df391c1fae 100644 --- a/tests/baselines/reference/extractFunction/extractFunction9.ts +++ b/tests/baselines/reference/extractFunction/extractFunction9.ts @@ -59,6 +59,7 @@ namespace A { } } } + function newFunction() { let a1: A.I = { x: 1 }; return a1.x + 10; diff --git a/tests/baselines/reference/extractFunction/extractFunction_PreserveTrivia.js b/tests/baselines/reference/extractFunction/extractFunction_PreserveTrivia.js new file mode 100644 index 00000000000..b10a04e9ef0 --- /dev/null +++ b/tests/baselines/reference/extractFunction/extractFunction_PreserveTrivia.js @@ -0,0 +1,20 @@ +// ==ORIGINAL== + +// a +var q = /*b*/ //c + /*d*/ /*[#|*/1 /*e*/ //f + /*g*/ + /*h*/ //i + /*j*/ 2/*|]*/ /*k*/ //l + /*m*/; /*n*/ //o +// ==SCOPE::Extract to function in global scope== + +// a +var q = /*b*/ //c + /*d*/ /*RENAME*/newFunction() /*k*/ //l + /*m*/; /*n*/ //o + +function newFunction() { + return 1 /*e*/ //f + /*g*/ + /*h*/ //i + /*j*/ 2; +} diff --git a/tests/baselines/reference/extractFunction/extractFunction_PreserveTrivia.ts b/tests/baselines/reference/extractFunction/extractFunction_PreserveTrivia.ts new file mode 100644 index 00000000000..b10a04e9ef0 --- /dev/null +++ b/tests/baselines/reference/extractFunction/extractFunction_PreserveTrivia.ts @@ -0,0 +1,20 @@ +// ==ORIGINAL== + +// a +var q = /*b*/ //c + /*d*/ /*[#|*/1 /*e*/ //f + /*g*/ + /*h*/ //i + /*j*/ 2/*|]*/ /*k*/ //l + /*m*/; /*n*/ //o +// ==SCOPE::Extract to function in global scope== + +// a +var q = /*b*/ //c + /*d*/ /*RENAME*/newFunction() /*k*/ //l + /*m*/; /*n*/ //o + +function newFunction() { + return 1 /*e*/ //f + /*g*/ + /*h*/ //i + /*j*/ 2; +} diff --git a/tests/baselines/reference/extractFunction/extractFunction_RepeatedSubstitution.ts b/tests/baselines/reference/extractFunction/extractFunction_RepeatedSubstitution.ts index 68cc7d2248a..52ccce68059 100644 --- a/tests/baselines/reference/extractFunction/extractFunction_RepeatedSubstitution.ts +++ b/tests/baselines/reference/extractFunction/extractFunction_RepeatedSubstitution.ts @@ -17,6 +17,7 @@ namespace X { export const j = 10; export const y = /*RENAME*/newFunction(); } + function newFunction() { return X.j * X.j; } diff --git a/tests/baselines/reference/extractFunction/extractFunction_VariableDeclaration_Const_NoType.js b/tests/baselines/reference/extractFunction/extractFunction_VariableDeclaration_Const_NoType.js new file mode 100644 index 00000000000..fff1488ef41 --- /dev/null +++ b/tests/baselines/reference/extractFunction/extractFunction_VariableDeclaration_Const_NoType.js @@ -0,0 +1,14 @@ +// ==ORIGINAL== + +/*[#|*/const x = 1;/*|]*/ +x; + +// ==SCOPE::Extract to function in global scope== + +const x = /*RENAME*/newFunction(); +x; + +function newFunction() { + const x = 1; + return x; +} diff --git a/tests/baselines/reference/extractFunction/extractFunction_VariableDeclaration_Const_NoType.ts b/tests/baselines/reference/extractFunction/extractFunction_VariableDeclaration_Const_NoType.ts new file mode 100644 index 00000000000..fff1488ef41 --- /dev/null +++ b/tests/baselines/reference/extractFunction/extractFunction_VariableDeclaration_Const_NoType.ts @@ -0,0 +1,14 @@ +// ==ORIGINAL== + +/*[#|*/const x = 1;/*|]*/ +x; + +// ==SCOPE::Extract to function in global scope== + +const x = /*RENAME*/newFunction(); +x; + +function newFunction() { + const x = 1; + return x; +} diff --git a/tests/baselines/reference/extractFunction/extractFunction_VariableDeclaration_Const_Type.ts b/tests/baselines/reference/extractFunction/extractFunction_VariableDeclaration_Const_Type.ts new file mode 100644 index 00000000000..94576953758 --- /dev/null +++ b/tests/baselines/reference/extractFunction/extractFunction_VariableDeclaration_Const_Type.ts @@ -0,0 +1,14 @@ +// ==ORIGINAL== + +/*[#|*/const x: number = 1;/*|]*/ +x; + +// ==SCOPE::Extract to function in global scope== + +const x: number = /*RENAME*/newFunction(); +x; + +function newFunction() { + const x: number = 1; + return x; +} diff --git a/tests/baselines/reference/extractFunction/extractFunction_VariableDeclaration_ConsumedTwice.ts b/tests/baselines/reference/extractFunction/extractFunction_VariableDeclaration_ConsumedTwice.ts new file mode 100644 index 00000000000..ac57711614c --- /dev/null +++ b/tests/baselines/reference/extractFunction/extractFunction_VariableDeclaration_ConsumedTwice.ts @@ -0,0 +1,14 @@ +// ==ORIGINAL== + +/*[#|*/const x: number = 1;/*|]*/ +x; x; + +// ==SCOPE::Extract to function in global scope== + +const x: number = /*RENAME*/newFunction(); +x; x; + +function newFunction() { + const x: number = 1; + return x; +} diff --git a/tests/baselines/reference/extractFunction/extractFunction_VariableDeclaration_DeclaredTwice.js b/tests/baselines/reference/extractFunction/extractFunction_VariableDeclaration_DeclaredTwice.js new file mode 100644 index 00000000000..e6f314acd9c --- /dev/null +++ b/tests/baselines/reference/extractFunction/extractFunction_VariableDeclaration_DeclaredTwice.js @@ -0,0 +1,16 @@ +// ==ORIGINAL== + +/*[#|*/var x = 1; +var x = 2;/*|]*/ +x; + +// ==SCOPE::Extract to function in global scope== + +var x = /*RENAME*/newFunction(); +x; + +function newFunction() { + var x = 1; + var x = 2; + return x; +} diff --git a/tests/baselines/reference/extractFunction/extractFunction_VariableDeclaration_DeclaredTwice.ts b/tests/baselines/reference/extractFunction/extractFunction_VariableDeclaration_DeclaredTwice.ts new file mode 100644 index 00000000000..e6f314acd9c --- /dev/null +++ b/tests/baselines/reference/extractFunction/extractFunction_VariableDeclaration_DeclaredTwice.ts @@ -0,0 +1,16 @@ +// ==ORIGINAL== + +/*[#|*/var x = 1; +var x = 2;/*|]*/ +x; + +// ==SCOPE::Extract to function in global scope== + +var x = /*RENAME*/newFunction(); +x; + +function newFunction() { + var x = 1; + var x = 2; + return x; +} diff --git a/tests/baselines/reference/extractFunction/extractFunction_VariableDeclaration_Let_NoType.js b/tests/baselines/reference/extractFunction/extractFunction_VariableDeclaration_Let_NoType.js new file mode 100644 index 00000000000..4f407ce5703 --- /dev/null +++ b/tests/baselines/reference/extractFunction/extractFunction_VariableDeclaration_Let_NoType.js @@ -0,0 +1,14 @@ +// ==ORIGINAL== + +/*[#|*/let x = 1;/*|]*/ +x; + +// ==SCOPE::Extract to function in global scope== + +let x = /*RENAME*/newFunction(); +x; + +function newFunction() { + let x = 1; + return x; +} diff --git a/tests/baselines/reference/extractFunction/extractFunction_VariableDeclaration_Let_NoType.ts b/tests/baselines/reference/extractFunction/extractFunction_VariableDeclaration_Let_NoType.ts new file mode 100644 index 00000000000..4f407ce5703 --- /dev/null +++ b/tests/baselines/reference/extractFunction/extractFunction_VariableDeclaration_Let_NoType.ts @@ -0,0 +1,14 @@ +// ==ORIGINAL== + +/*[#|*/let x = 1;/*|]*/ +x; + +// ==SCOPE::Extract to function in global scope== + +let x = /*RENAME*/newFunction(); +x; + +function newFunction() { + let x = 1; + return x; +} diff --git a/tests/baselines/reference/extractFunction/extractFunction_VariableDeclaration_Let_Type.ts b/tests/baselines/reference/extractFunction/extractFunction_VariableDeclaration_Let_Type.ts new file mode 100644 index 00000000000..048b77094ea --- /dev/null +++ b/tests/baselines/reference/extractFunction/extractFunction_VariableDeclaration_Let_Type.ts @@ -0,0 +1,14 @@ +// ==ORIGINAL== + +/*[#|*/let x: number = 1;/*|]*/ +x; + +// ==SCOPE::Extract to function in global scope== + +let x: number = /*RENAME*/newFunction(); +x; + +function newFunction() { + let x: number = 1; + return x; +} diff --git a/tests/baselines/reference/extractFunction/extractFunction_VariableDeclaration_Multiple1.ts b/tests/baselines/reference/extractFunction/extractFunction_VariableDeclaration_Multiple1.ts new file mode 100644 index 00000000000..07ec452e360 --- /dev/null +++ b/tests/baselines/reference/extractFunction/extractFunction_VariableDeclaration_Multiple1.ts @@ -0,0 +1,14 @@ +// ==ORIGINAL== + +/*[#|*/const x = 1, y: string = "a";/*|]*/ +x; y; + +// ==SCOPE::Extract to function in global scope== + +const { x, y }: { x: number; y: string; } = /*RENAME*/newFunction(); +x; y; + +function newFunction() { + const x = 1, y: string = "a"; + return { x, y }; +} diff --git a/tests/baselines/reference/extractFunction/extractFunction_VariableDeclaration_Multiple2.js b/tests/baselines/reference/extractFunction/extractFunction_VariableDeclaration_Multiple2.js new file mode 100644 index 00000000000..c58c39bf6b8 --- /dev/null +++ b/tests/baselines/reference/extractFunction/extractFunction_VariableDeclaration_Multiple2.js @@ -0,0 +1,16 @@ +// ==ORIGINAL== + +/*[#|*/const x = 1, y = "a"; +const z = 3;/*|]*/ +x; y; z; + +// ==SCOPE::Extract to function in global scope== + +const { x, y, z } = /*RENAME*/newFunction(); +x; y; z; + +function newFunction() { + const x = 1, y = "a"; + const z = 3; + return { x, y, z }; +} diff --git a/tests/baselines/reference/extractFunction/extractFunction_VariableDeclaration_Multiple2.ts b/tests/baselines/reference/extractFunction/extractFunction_VariableDeclaration_Multiple2.ts new file mode 100644 index 00000000000..c58c39bf6b8 --- /dev/null +++ b/tests/baselines/reference/extractFunction/extractFunction_VariableDeclaration_Multiple2.ts @@ -0,0 +1,16 @@ +// ==ORIGINAL== + +/*[#|*/const x = 1, y = "a"; +const z = 3;/*|]*/ +x; y; z; + +// ==SCOPE::Extract to function in global scope== + +const { x, y, z } = /*RENAME*/newFunction(); +x; y; z; + +function newFunction() { + const x = 1, y = "a"; + const z = 3; + return { x, y, z }; +} diff --git a/tests/baselines/reference/extractFunction/extractFunction_VariableDeclaration_Multiple3.ts b/tests/baselines/reference/extractFunction/extractFunction_VariableDeclaration_Multiple3.ts new file mode 100644 index 00000000000..b8ae2b72883 --- /dev/null +++ b/tests/baselines/reference/extractFunction/extractFunction_VariableDeclaration_Multiple3.ts @@ -0,0 +1,16 @@ +// ==ORIGINAL== + +/*[#|*/const x = 1, y: string = "a"; +let z = 3;/*|]*/ +x; y; z; + +// ==SCOPE::Extract to function in global scope== + +var { x, y, z }: { x: number; y: string; z: number; } = /*RENAME*/newFunction(); +x; y; z; + +function newFunction() { + const x = 1, y: string = "a"; + let z = 3; + return { x, y, z }; +} diff --git a/tests/baselines/reference/extractFunction/extractFunction_VariableDeclaration_ShorthandProperty.js b/tests/baselines/reference/extractFunction/extractFunction_VariableDeclaration_ShorthandProperty.js new file mode 100644 index 00000000000..e8250613625 --- /dev/null +++ b/tests/baselines/reference/extractFunction/extractFunction_VariableDeclaration_ShorthandProperty.js @@ -0,0 +1,28 @@ +// ==ORIGINAL== + +function f() { + /*[#|*/let x;/*|]*/ + return { x }; +} +// ==SCOPE::Extract to inner function in function 'f'== + +function f() { + let x = /*RENAME*/newFunction(); + return { x }; + + function newFunction() { + let x; + return x; + } +} +// ==SCOPE::Extract to function in global scope== + +function f() { + let x = /*RENAME*/newFunction(); + return { x }; +} + +function newFunction() { + let x; + return x; +} diff --git a/tests/baselines/reference/extractFunction/extractFunction_VariableDeclaration_ShorthandProperty.ts b/tests/baselines/reference/extractFunction/extractFunction_VariableDeclaration_ShorthandProperty.ts new file mode 100644 index 00000000000..e8250613625 --- /dev/null +++ b/tests/baselines/reference/extractFunction/extractFunction_VariableDeclaration_ShorthandProperty.ts @@ -0,0 +1,28 @@ +// ==ORIGINAL== + +function f() { + /*[#|*/let x;/*|]*/ + return { x }; +} +// ==SCOPE::Extract to inner function in function 'f'== + +function f() { + let x = /*RENAME*/newFunction(); + return { x }; + + function newFunction() { + let x; + return x; + } +} +// ==SCOPE::Extract to function in global scope== + +function f() { + let x = /*RENAME*/newFunction(); + return { x }; +} + +function newFunction() { + let x; + return x; +} diff --git a/tests/baselines/reference/extractFunction/extractFunction_VariableDeclaration_Var.js b/tests/baselines/reference/extractFunction/extractFunction_VariableDeclaration_Var.js new file mode 100644 index 00000000000..5a784c366c1 --- /dev/null +++ b/tests/baselines/reference/extractFunction/extractFunction_VariableDeclaration_Var.js @@ -0,0 +1,14 @@ +// ==ORIGINAL== + +/*[#|*/var x = 1;/*|]*/ +x; + +// ==SCOPE::Extract to function in global scope== + +var x = /*RENAME*/newFunction(); +x; + +function newFunction() { + var x = 1; + return x; +} diff --git a/tests/baselines/reference/extractFunction/extractFunction_VariableDeclaration_Var.ts b/tests/baselines/reference/extractFunction/extractFunction_VariableDeclaration_Var.ts new file mode 100644 index 00000000000..5a784c366c1 --- /dev/null +++ b/tests/baselines/reference/extractFunction/extractFunction_VariableDeclaration_Var.ts @@ -0,0 +1,14 @@ +// ==ORIGINAL== + +/*[#|*/var x = 1;/*|]*/ +x; + +// ==SCOPE::Extract to function in global scope== + +var x = /*RENAME*/newFunction(); +x; + +function newFunction() { + var x = 1; + return x; +} diff --git a/tests/baselines/reference/extractFunction/extractFunction_VariableDeclaration_Writes_Const_NoType.js b/tests/baselines/reference/extractFunction/extractFunction_VariableDeclaration_Writes_Const_NoType.js new file mode 100644 index 00000000000..a8629d2907c --- /dev/null +++ b/tests/baselines/reference/extractFunction/extractFunction_VariableDeclaration_Writes_Const_NoType.js @@ -0,0 +1,35 @@ +// ==ORIGINAL== + +function f() { + let a = 1; + /*[#|*/const x = 1; + a++;/*|]*/ + a; x; +} +// ==SCOPE::Extract to inner function in function 'f'== + +function f() { + let a = 1; + const x = /*RENAME*/newFunction(); + a; x; + + function newFunction() { + const x = 1; + a++; + return x; + } +} +// ==SCOPE::Extract to function in global scope== + +function f() { + let a = 1; + let x; + ({ x, a } = /*RENAME*/newFunction(a)); + a; x; +} + +function newFunction(a) { + const x = 1; + a++; + return { x, a }; +} diff --git a/tests/baselines/reference/extractFunction/extractFunction_VariableDeclaration_Writes_Const_NoType.ts b/tests/baselines/reference/extractFunction/extractFunction_VariableDeclaration_Writes_Const_NoType.ts new file mode 100644 index 00000000000..c70dbe95c7b --- /dev/null +++ b/tests/baselines/reference/extractFunction/extractFunction_VariableDeclaration_Writes_Const_NoType.ts @@ -0,0 +1,35 @@ +// ==ORIGINAL== + +function f() { + let a = 1; + /*[#|*/const x = 1; + a++;/*|]*/ + a; x; +} +// ==SCOPE::Extract to inner function in function 'f'== + +function f() { + let a = 1; + const x = /*RENAME*/newFunction(); + a; x; + + function newFunction() { + const x = 1; + a++; + return x; + } +} +// ==SCOPE::Extract to function in global scope== + +function f() { + let a = 1; + let x; + ({ x, a } = /*RENAME*/newFunction(a)); + a; x; +} + +function newFunction(a: number) { + const x = 1; + a++; + return { x, a }; +} diff --git a/tests/baselines/reference/extractFunction/extractFunction_VariableDeclaration_Writes_Const_Type.ts b/tests/baselines/reference/extractFunction/extractFunction_VariableDeclaration_Writes_Const_Type.ts new file mode 100644 index 00000000000..3c0912061aa --- /dev/null +++ b/tests/baselines/reference/extractFunction/extractFunction_VariableDeclaration_Writes_Const_Type.ts @@ -0,0 +1,35 @@ +// ==ORIGINAL== + +function f() { + let a = 1; + /*[#|*/const x: number = 1; + a++;/*|]*/ + a; x; +} +// ==SCOPE::Extract to inner function in function 'f'== + +function f() { + let a = 1; + const x: number = /*RENAME*/newFunction(); + a; x; + + function newFunction() { + const x: number = 1; + a++; + return x; + } +} +// ==SCOPE::Extract to function in global scope== + +function f() { + let a = 1; + let x: number | undefined; + ({ x, a } = /*RENAME*/newFunction(a)); + a; x; +} + +function newFunction(a: number) { + const x: number = 1; + a++; + return { x, a }; +} diff --git a/tests/baselines/reference/extractFunction/extractFunction_VariableDeclaration_Writes_Let_LiteralType1.ts b/tests/baselines/reference/extractFunction/extractFunction_VariableDeclaration_Writes_Let_LiteralType1.ts new file mode 100644 index 00000000000..06de0fd4f36 --- /dev/null +++ b/tests/baselines/reference/extractFunction/extractFunction_VariableDeclaration_Writes_Let_LiteralType1.ts @@ -0,0 +1,35 @@ +// ==ORIGINAL== + +function f() { + let a = 1; + /*[#|*/let x: 0o10 | 10 | 0b10 = 10; + a++;/*|]*/ + a; x; +} +// ==SCOPE::Extract to inner function in function 'f'== + +function f() { + let a = 1; + let x: 8 | 10 | 2 = /*RENAME*/newFunction(); + a; x; + + function newFunction() { + let x: 0o10 | 10 | 0b10 = 10; + a++; + return x; + } +} +// ==SCOPE::Extract to function in global scope== + +function f() { + let a = 1; + let x: (8 | 10 | 2) | undefined; + ({ x, a } = /*RENAME*/newFunction(a)); + a; x; +} + +function newFunction(a: number) { + let x: 0o10 | 10 | 0b10 = 10; + a++; + return { x, a }; +} diff --git a/tests/baselines/reference/extractFunction/extractFunction_VariableDeclaration_Writes_Let_LiteralType2.ts b/tests/baselines/reference/extractFunction/extractFunction_VariableDeclaration_Writes_Let_LiteralType2.ts new file mode 100644 index 00000000000..4679b89f068 --- /dev/null +++ b/tests/baselines/reference/extractFunction/extractFunction_VariableDeclaration_Writes_Let_LiteralType2.ts @@ -0,0 +1,35 @@ +// ==ORIGINAL== + +function f() { + let a = 1; + /*[#|*/let x: "a" | 'b' = 'a'; + a++;/*|]*/ + a; x; +} +// ==SCOPE::Extract to inner function in function 'f'== + +function f() { + let a = 1; + let x: "a" | 'b' = /*RENAME*/newFunction(); + a; x; + + function newFunction() { + let x: "a" | 'b' = 'a'; + a++; + return x; + } +} +// ==SCOPE::Extract to function in global scope== + +function f() { + let a = 1; + let x: ("a" | 'b') | undefined; + ({ x, a } = /*RENAME*/newFunction(a)); + a; x; +} + +function newFunction(a: number) { + let x: "a" | 'b' = 'a'; + a++; + return { x, a }; +} diff --git a/tests/baselines/reference/extractFunction/extractFunction_VariableDeclaration_Writes_Let_NoType.js b/tests/baselines/reference/extractFunction/extractFunction_VariableDeclaration_Writes_Let_NoType.js new file mode 100644 index 00000000000..a86870d72a3 --- /dev/null +++ b/tests/baselines/reference/extractFunction/extractFunction_VariableDeclaration_Writes_Let_NoType.js @@ -0,0 +1,35 @@ +// ==ORIGINAL== + +function f() { + let a = 1; + /*[#|*/let x = 1; + a++;/*|]*/ + a; x; +} +// ==SCOPE::Extract to inner function in function 'f'== + +function f() { + let a = 1; + let x = /*RENAME*/newFunction(); + a; x; + + function newFunction() { + let x = 1; + a++; + return x; + } +} +// ==SCOPE::Extract to function in global scope== + +function f() { + let a = 1; + let x; + ({ x, a } = /*RENAME*/newFunction(a)); + a; x; +} + +function newFunction(a) { + let x = 1; + a++; + return { x, a }; +} diff --git a/tests/baselines/reference/extractFunction/extractFunction_VariableDeclaration_Writes_Let_NoType.ts b/tests/baselines/reference/extractFunction/extractFunction_VariableDeclaration_Writes_Let_NoType.ts new file mode 100644 index 00000000000..9b711765c95 --- /dev/null +++ b/tests/baselines/reference/extractFunction/extractFunction_VariableDeclaration_Writes_Let_NoType.ts @@ -0,0 +1,35 @@ +// ==ORIGINAL== + +function f() { + let a = 1; + /*[#|*/let x = 1; + a++;/*|]*/ + a; x; +} +// ==SCOPE::Extract to inner function in function 'f'== + +function f() { + let a = 1; + let x = /*RENAME*/newFunction(); + a; x; + + function newFunction() { + let x = 1; + a++; + return x; + } +} +// ==SCOPE::Extract to function in global scope== + +function f() { + let a = 1; + let x; + ({ x, a } = /*RENAME*/newFunction(a)); + a; x; +} + +function newFunction(a: number) { + let x = 1; + a++; + return { x, a }; +} diff --git a/tests/baselines/reference/extractFunction/extractFunction_VariableDeclaration_Writes_Let_Type.ts b/tests/baselines/reference/extractFunction/extractFunction_VariableDeclaration_Writes_Let_Type.ts new file mode 100644 index 00000000000..652faab4890 --- /dev/null +++ b/tests/baselines/reference/extractFunction/extractFunction_VariableDeclaration_Writes_Let_Type.ts @@ -0,0 +1,35 @@ +// ==ORIGINAL== + +function f() { + let a = 1; + /*[#|*/let x: number = 1; + a++;/*|]*/ + a; x; +} +// ==SCOPE::Extract to inner function in function 'f'== + +function f() { + let a = 1; + let x: number = /*RENAME*/newFunction(); + a; x; + + function newFunction() { + let x: number = 1; + a++; + return x; + } +} +// ==SCOPE::Extract to function in global scope== + +function f() { + let a = 1; + let x: number | undefined; + ({ x, a } = /*RENAME*/newFunction(a)); + a; x; +} + +function newFunction(a: number) { + let x: number = 1; + a++; + return { x, a }; +} diff --git a/tests/baselines/reference/extractFunction/extractFunction_VariableDeclaration_Writes_Let_TypeWithComments.ts b/tests/baselines/reference/extractFunction/extractFunction_VariableDeclaration_Writes_Let_TypeWithComments.ts new file mode 100644 index 00000000000..71c4d9b79ff --- /dev/null +++ b/tests/baselines/reference/extractFunction/extractFunction_VariableDeclaration_Writes_Let_TypeWithComments.ts @@ -0,0 +1,35 @@ +// ==ORIGINAL== + +function f() { + let a = 1; + /*[#|*/let x: /*A*/ "a" /*B*/ | /*C*/ 'b' /*D*/ = 'a'; + a++;/*|]*/ + a; x; +} +// ==SCOPE::Extract to inner function in function 'f'== + +function f() { + let a = 1; + let x: /*A*/ "a" /*B*/ | /*C*/ 'b' /*D*/ = /*RENAME*/newFunction(); + a; x; + + function newFunction() { + let x: /*A*/ "a" /*B*/ | /*C*/ 'b' /*D*/ = 'a'; + a++; + return x; + } +} +// ==SCOPE::Extract to function in global scope== + +function f() { + let a = 1; + let x: (/*A*/ "a" /*B*/ | /*C*/ 'b' /*D*/) | undefined; + ({ x, a } = /*RENAME*/newFunction(a)); + a; x; +} + +function newFunction(a: number) { + let x: /*A*/ "a" /*B*/ | /*C*/ 'b' /*D*/ = 'a'; + a++; + return { x, a }; +} diff --git a/tests/baselines/reference/extractFunction/extractFunction_VariableDeclaration_Writes_Mixed1.js b/tests/baselines/reference/extractFunction/extractFunction_VariableDeclaration_Writes_Mixed1.js new file mode 100644 index 00000000000..5de10b2cf76 --- /dev/null +++ b/tests/baselines/reference/extractFunction/extractFunction_VariableDeclaration_Writes_Mixed1.js @@ -0,0 +1,39 @@ +// ==ORIGINAL== + +function f() { + let a = 1; + /*[#|*/const x = 1; + let y = 2; + a++;/*|]*/ + a; x; y; +} +// ==SCOPE::Extract to inner function in function 'f'== + +function f() { + let a = 1; + var { x, y } = /*RENAME*/newFunction(); + a; x; y; + + function newFunction() { + const x = 1; + let y = 2; + a++; + return { x, y }; + } +} +// ==SCOPE::Extract to function in global scope== + +function f() { + let a = 1; + let x; + let y; + ({ x, y, a } = /*RENAME*/newFunction(a)); + a; x; y; +} + +function newFunction(a) { + const x = 1; + let y = 2; + a++; + return { x, y, a }; +} diff --git a/tests/baselines/reference/extractFunction/extractFunction_VariableDeclaration_Writes_Mixed1.ts b/tests/baselines/reference/extractFunction/extractFunction_VariableDeclaration_Writes_Mixed1.ts new file mode 100644 index 00000000000..d4da8ffca7b --- /dev/null +++ b/tests/baselines/reference/extractFunction/extractFunction_VariableDeclaration_Writes_Mixed1.ts @@ -0,0 +1,39 @@ +// ==ORIGINAL== + +function f() { + let a = 1; + /*[#|*/const x = 1; + let y = 2; + a++;/*|]*/ + a; x; y; +} +// ==SCOPE::Extract to inner function in function 'f'== + +function f() { + let a = 1; + var { x, y } = /*RENAME*/newFunction(); + a; x; y; + + function newFunction() { + const x = 1; + let y = 2; + a++; + return { x, y }; + } +} +// ==SCOPE::Extract to function in global scope== + +function f() { + let a = 1; + let x; + let y; + ({ x, y, a } = /*RENAME*/newFunction(a)); + a; x; y; +} + +function newFunction(a: number) { + const x = 1; + let y = 2; + a++; + return { x, y, a }; +} diff --git a/tests/baselines/reference/extractFunction/extractFunction_VariableDeclaration_Writes_Mixed2.js b/tests/baselines/reference/extractFunction/extractFunction_VariableDeclaration_Writes_Mixed2.js new file mode 100644 index 00000000000..e1526a77ffd --- /dev/null +++ b/tests/baselines/reference/extractFunction/extractFunction_VariableDeclaration_Writes_Mixed2.js @@ -0,0 +1,39 @@ +// ==ORIGINAL== + +function f() { + let a = 1; + /*[#|*/var x = 1; + let y = 2; + a++;/*|]*/ + a; x; y; +} +// ==SCOPE::Extract to inner function in function 'f'== + +function f() { + let a = 1; + var { x, y } = /*RENAME*/newFunction(); + a; x; y; + + function newFunction() { + var x = 1; + let y = 2; + a++; + return { x, y }; + } +} +// ==SCOPE::Extract to function in global scope== + +function f() { + let a = 1; + var x; + let y; + ({ x, y, a } = /*RENAME*/newFunction(a)); + a; x; y; +} + +function newFunction(a) { + var x = 1; + let y = 2; + a++; + return { x, y, a }; +} diff --git a/tests/baselines/reference/extractFunction/extractFunction_VariableDeclaration_Writes_Mixed2.ts b/tests/baselines/reference/extractFunction/extractFunction_VariableDeclaration_Writes_Mixed2.ts new file mode 100644 index 00000000000..ec3d62c039b --- /dev/null +++ b/tests/baselines/reference/extractFunction/extractFunction_VariableDeclaration_Writes_Mixed2.ts @@ -0,0 +1,39 @@ +// ==ORIGINAL== + +function f() { + let a = 1; + /*[#|*/var x = 1; + let y = 2; + a++;/*|]*/ + a; x; y; +} +// ==SCOPE::Extract to inner function in function 'f'== + +function f() { + let a = 1; + var { x, y } = /*RENAME*/newFunction(); + a; x; y; + + function newFunction() { + var x = 1; + let y = 2; + a++; + return { x, y }; + } +} +// ==SCOPE::Extract to function in global scope== + +function f() { + let a = 1; + var x; + let y; + ({ x, y, a } = /*RENAME*/newFunction(a)); + a; x; y; +} + +function newFunction(a: number) { + var x = 1; + let y = 2; + a++; + return { x, y, a }; +} diff --git a/tests/baselines/reference/extractFunction/extractFunction_VariableDeclaration_Writes_Mixed3.ts b/tests/baselines/reference/extractFunction/extractFunction_VariableDeclaration_Writes_Mixed3.ts new file mode 100644 index 00000000000..b2c53e3f160 --- /dev/null +++ b/tests/baselines/reference/extractFunction/extractFunction_VariableDeclaration_Writes_Mixed3.ts @@ -0,0 +1,39 @@ +// ==ORIGINAL== + +function f() { + let a = 1; + /*[#|*/let x: number = 1; + let y = 2; + a++;/*|]*/ + a; x; y; +} +// ==SCOPE::Extract to inner function in function 'f'== + +function f() { + let a = 1; + let { x, y }: { x: number; y: number; } = /*RENAME*/newFunction(); + a; x; y; + + function newFunction() { + let x: number = 1; + let y = 2; + a++; + return { x, y }; + } +} +// ==SCOPE::Extract to function in global scope== + +function f() { + let a = 1; + let x: number | undefined; + let y; + ({ x, y, a } = /*RENAME*/newFunction(a)); + a; x; y; +} + +function newFunction(a: number) { + let x: number = 1; + let y = 2; + a++; + return { x, y, a }; +} diff --git a/tests/baselines/reference/extractFunction/extractFunction_VariableDeclaration_Writes_UnionUndefined.ts b/tests/baselines/reference/extractFunction/extractFunction_VariableDeclaration_Writes_UnionUndefined.ts new file mode 100644 index 00000000000..b76bf6c4999 --- /dev/null +++ b/tests/baselines/reference/extractFunction/extractFunction_VariableDeclaration_Writes_UnionUndefined.ts @@ -0,0 +1,43 @@ +// ==ORIGINAL== + +function f() { + let a = 1; + /*[#|*/let x: number | undefined = 1; + let y: undefined | number = 2; + let z: (undefined | number) = 3; + a++;/*|]*/ + a; x; y; z; +} +// ==SCOPE::Extract to inner function in function 'f'== + +function f() { + let a = 1; + let { x, y, z }: { x: number; y: number; z: number; } = /*RENAME*/newFunction(); + a; x; y; z; + + function newFunction() { + let x: number | undefined = 1; + let y: undefined | number = 2; + let z: (undefined | number) = 3; + a++; + return { x, y, z }; + } +} +// ==SCOPE::Extract to function in global scope== + +function f() { + let a = 1; + let x: number | undefined; + let y: undefined | number; + let z: (undefined | number); + ({ x, y, z, a } = /*RENAME*/newFunction(a)); + a; x; y; z; +} + +function newFunction(a: number) { + let x: number | undefined = 1; + let y: undefined | number = 2; + let z: (undefined | number) = 3; + a++; + return { x, y, z, a }; +} diff --git a/tests/baselines/reference/extractFunction/extractFunction_VariableDeclaration_Writes_Var.js b/tests/baselines/reference/extractFunction/extractFunction_VariableDeclaration_Writes_Var.js new file mode 100644 index 00000000000..6a7b821e5b1 --- /dev/null +++ b/tests/baselines/reference/extractFunction/extractFunction_VariableDeclaration_Writes_Var.js @@ -0,0 +1,35 @@ +// ==ORIGINAL== + +function f() { + let a = 1; + /*[#|*/var x = 1; + a++;/*|]*/ + a; x; +} +// ==SCOPE::Extract to inner function in function 'f'== + +function f() { + let a = 1; + var x = /*RENAME*/newFunction(); + a; x; + + function newFunction() { + var x = 1; + a++; + return x; + } +} +// ==SCOPE::Extract to function in global scope== + +function f() { + let a = 1; + var x; + ({ x, a } = /*RENAME*/newFunction(a)); + a; x; +} + +function newFunction(a) { + var x = 1; + a++; + return { x, a }; +} diff --git a/tests/baselines/reference/extractFunction/extractFunction_VariableDeclaration_Writes_Var.ts b/tests/baselines/reference/extractFunction/extractFunction_VariableDeclaration_Writes_Var.ts new file mode 100644 index 00000000000..e9cbe7ad345 --- /dev/null +++ b/tests/baselines/reference/extractFunction/extractFunction_VariableDeclaration_Writes_Var.ts @@ -0,0 +1,35 @@ +// ==ORIGINAL== + +function f() { + let a = 1; + /*[#|*/var x = 1; + a++;/*|]*/ + a; x; +} +// ==SCOPE::Extract to inner function in function 'f'== + +function f() { + let a = 1; + var x = /*RENAME*/newFunction(); + a; x; + + function newFunction() { + var x = 1; + a++; + return x; + } +} +// ==SCOPE::Extract to function in global scope== + +function f() { + let a = 1; + var x; + ({ x, a } = /*RENAME*/newFunction(a)); + a; x; +} + +function newFunction(a: number) { + var x = 1; + a++; + return { x, a }; +} diff --git a/tests/baselines/reference/genericContextualTypingSpecialization.symbols b/tests/baselines/reference/genericContextualTypingSpecialization.symbols index b244ab496be..0dcc8cb5899 100644 --- a/tests/baselines/reference/genericContextualTypingSpecialization.symbols +++ b/tests/baselines/reference/genericContextualTypingSpecialization.symbols @@ -3,9 +3,9 @@ var b: number[]; >b : Symbol(b, Decl(genericContextualTypingSpecialization.ts, 0, 3)) b.reduce((c, d) => c + d, 0); // should not error on '+' ->b.reduce : Symbol(Array.reduce, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>b.reduce : Symbol(Array.reduce, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >b : Symbol(b, Decl(genericContextualTypingSpecialization.ts, 0, 3)) ->reduce : Symbol(Array.reduce, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>reduce : Symbol(Array.reduce, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >c : Symbol(c, Decl(genericContextualTypingSpecialization.ts, 1, 18)) >d : Symbol(d, Decl(genericContextualTypingSpecialization.ts, 1, 20)) >c : Symbol(c, Decl(genericContextualTypingSpecialization.ts, 1, 18)) diff --git a/tests/baselines/reference/genericContextualTypingSpecialization.types b/tests/baselines/reference/genericContextualTypingSpecialization.types index 82255020347..d7d61010507 100644 --- a/tests/baselines/reference/genericContextualTypingSpecialization.types +++ b/tests/baselines/reference/genericContextualTypingSpecialization.types @@ -4,9 +4,9 @@ var b: number[]; b.reduce((c, d) => c + d, 0); // should not error on '+' >b.reduce((c, d) => c + d, 0) : number ->b.reduce : { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue?: number): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; } +>b.reduce : { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number): number; (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue: number): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; } >b : number[] ->reduce : { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue?: number): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; } +>reduce : { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number): number; (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue: number): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; } >(c, d) => c + d : (c: number, d: number) => number >c : number >d : number diff --git a/tests/baselines/reference/genericDefaults.js b/tests/baselines/reference/genericDefaults.js index 06503b89d58..be6b76ea43c 100644 --- a/tests/baselines/reference/genericDefaults.js +++ b/tests/baselines/reference/genericDefaults.js @@ -487,7 +487,10 @@ const t03c00 = (>x).a; const t03c01 = (>x).a; const t03c02 = (>x).a; const t03c03 = (>x).a; -const t03c04 = (>x).a; +const t03c04 = (>x).a; + +// https://github.com/Microsoft/TypeScript/issues/16221 +interface SelfReference> {} //// [genericDefaults.js] // no inference @@ -1024,3 +1027,5 @@ declare const t03c01: [1, 1]; declare const t03c02: [number, number]; declare const t03c03: [1, 1]; declare const t03c04: [number, 1]; +interface SelfReference> { +} diff --git a/tests/baselines/reference/genericDefaults.symbols b/tests/baselines/reference/genericDefaults.symbols index 6c9e97b265e..755a34c7a63 100644 --- a/tests/baselines/reference/genericDefaults.symbols +++ b/tests/baselines/reference/genericDefaults.symbols @@ -2291,3 +2291,9 @@ const t03c04 = (>x).a; >x : Symbol(x, Decl(genericDefaults.ts, 13, 13)) >a : Symbol(a, Decl(genericDefaults.ts, 483, 47)) +// https://github.com/Microsoft/TypeScript/issues/16221 +interface SelfReference> {} +>SelfReference : Symbol(SelfReference, Decl(genericDefaults.ts, 488, 37)) +>T : Symbol(T, Decl(genericDefaults.ts, 491, 24)) +>SelfReference : Symbol(SelfReference, Decl(genericDefaults.ts, 488, 37)) + diff --git a/tests/baselines/reference/genericDefaults.types b/tests/baselines/reference/genericDefaults.types index 739588badb9..0013daefd89 100644 --- a/tests/baselines/reference/genericDefaults.types +++ b/tests/baselines/reference/genericDefaults.types @@ -2643,3 +2643,9 @@ const t03c04 = (>x).a; >x : any >a : [number, 1] +// https://github.com/Microsoft/TypeScript/issues/16221 +interface SelfReference> {} +>SelfReference : SelfReference +>T : T +>SelfReference : SelfReference + diff --git a/tests/baselines/reference/genericDefaultsErrors.errors.txt b/tests/baselines/reference/genericDefaultsErrors.errors.txt index 6200046c49f..b1afd6f173b 100644 --- a/tests/baselines/reference/genericDefaultsErrors.errors.txt +++ b/tests/baselines/reference/genericDefaultsErrors.errors.txt @@ -21,9 +21,10 @@ tests/cases/compiler/genericDefaultsErrors.ts(33,15): error TS2707: Generic type tests/cases/compiler/genericDefaultsErrors.ts(36,15): error TS2707: Generic type 'i09' requires between 2 and 3 type arguments. tests/cases/compiler/genericDefaultsErrors.ts(38,20): error TS2304: Cannot find name 'T'. tests/cases/compiler/genericDefaultsErrors.ts(38,20): error TS4033: Property 'x' of exported interface has or is using private name 'T'. +tests/cases/compiler/genericDefaultsErrors.ts(42,29): error TS2716: Type parameter 'T' has a circular default. -==== tests/cases/compiler/genericDefaultsErrors.ts (21 errors) ==== +==== tests/cases/compiler/genericDefaultsErrors.ts (22 errors) ==== declare const x: any; declare function f03(): void; // error @@ -106,4 +107,9 @@ tests/cases/compiler/genericDefaultsErrors.ts(38,20): error TS4033: Property 'x' !!! error TS2304: Cannot find name 'T'. ~ !!! error TS4033: Property 'x' of exported interface has or is using private name 'T'. - interface i10 {} \ No newline at end of file + interface i10 {} + + // https://github.com/Microsoft/TypeScript/issues/16221 + interface SelfReference {} + ~~~~~~~~~~~~~ +!!! error TS2716: Type parameter 'T' has a circular default. \ No newline at end of file diff --git a/tests/baselines/reference/genericDefaultsErrors.js b/tests/baselines/reference/genericDefaultsErrors.js index c737644e999..19201172b2f 100644 --- a/tests/baselines/reference/genericDefaultsErrors.js +++ b/tests/baselines/reference/genericDefaultsErrors.js @@ -37,7 +37,10 @@ type i09t03 = i09<1, 2, 3>; // ok type i09t04 = i09<1, 2, 3, 4>; // error interface i10 { x: T; } // error -interface i10 {} +interface i10 {} + +// https://github.com/Microsoft/TypeScript/issues/16221 +interface SelfReference {} //// [genericDefaultsErrors.js] f11(); // ok diff --git a/tests/baselines/reference/genericDefaultsErrors.symbols b/tests/baselines/reference/genericDefaultsErrors.symbols index 495b56ea25a..e6e5cb86062 100644 --- a/tests/baselines/reference/genericDefaultsErrors.symbols +++ b/tests/baselines/reference/genericDefaultsErrors.symbols @@ -136,3 +136,9 @@ interface i10 {} >i10 : Symbol(i10, Decl(genericDefaultsErrors.ts, 35, 30), Decl(genericDefaultsErrors.ts, 37, 23)) >T : Symbol(T, Decl(genericDefaultsErrors.ts, 38, 14)) +// https://github.com/Microsoft/TypeScript/issues/16221 +interface SelfReference {} +>SelfReference : Symbol(SelfReference, Decl(genericDefaultsErrors.ts, 38, 28)) +>T : Symbol(T, Decl(genericDefaultsErrors.ts, 41, 24)) +>SelfReference : Symbol(SelfReference, Decl(genericDefaultsErrors.ts, 38, 28)) + diff --git a/tests/baselines/reference/genericDefaultsErrors.types b/tests/baselines/reference/genericDefaultsErrors.types index 46bae67bc25..87e9af0bb07 100644 --- a/tests/baselines/reference/genericDefaultsErrors.types +++ b/tests/baselines/reference/genericDefaultsErrors.types @@ -145,3 +145,9 @@ interface i10 {} >i10 : i10 >T : T +// https://github.com/Microsoft/TypeScript/issues/16221 +interface SelfReference {} +>SelfReference : SelfReference +>T : T +>SelfReference : SelfReference + diff --git a/tests/baselines/reference/genericReduce.symbols b/tests/baselines/reference/genericReduce.symbols index f220972a350..a939c5cf92d 100644 --- a/tests/baselines/reference/genericReduce.symbols +++ b/tests/baselines/reference/genericReduce.symbols @@ -14,9 +14,9 @@ var b = a.map(s => s.length); var n1 = b.reduce((x, y) => x + y); >n1 : Symbol(n1, Decl(genericReduce.ts, 2, 3)) ->b.reduce : Symbol(Array.reduce, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>b.reduce : Symbol(Array.reduce, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >b : Symbol(b, Decl(genericReduce.ts, 1, 3)) ->reduce : Symbol(Array.reduce, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>reduce : Symbol(Array.reduce, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(genericReduce.ts, 2, 19)) >y : Symbol(y, Decl(genericReduce.ts, 2, 21)) >x : Symbol(x, Decl(genericReduce.ts, 2, 19)) @@ -24,9 +24,9 @@ var n1 = b.reduce((x, y) => x + y); var n2 = b.reduceRight((x, y) => x + y); >n2 : Symbol(n2, Decl(genericReduce.ts, 3, 3)) ->b.reduceRight : Symbol(Array.reduceRight, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>b.reduceRight : Symbol(Array.reduceRight, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >b : Symbol(b, Decl(genericReduce.ts, 1, 3)) ->reduceRight : Symbol(Array.reduceRight, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>reduceRight : Symbol(Array.reduceRight, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(genericReduce.ts, 3, 24)) >y : Symbol(y, Decl(genericReduce.ts, 3, 26)) >x : Symbol(x, Decl(genericReduce.ts, 3, 24)) @@ -50,9 +50,9 @@ n2.toExponential(2); // should not error if 'n2' is correctly number. var n3 = b.reduce( (x, y) => x + y, ""); // Initial value is of type string >n3 : Symbol(n3, Decl(genericReduce.ts, 10, 3)) ->b.reduce : Symbol(Array.reduce, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>b.reduce : Symbol(Array.reduce, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >b : Symbol(b, Decl(genericReduce.ts, 1, 3)) ->reduce : Symbol(Array.reduce, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>reduce : Symbol(Array.reduce, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(genericReduce.ts, 10, 28)) >y : Symbol(y, Decl(genericReduce.ts, 10, 30)) >x : Symbol(x, Decl(genericReduce.ts, 10, 28)) diff --git a/tests/baselines/reference/genericReduce.types b/tests/baselines/reference/genericReduce.types index 628398f86fd..65a069426a7 100644 --- a/tests/baselines/reference/genericReduce.types +++ b/tests/baselines/reference/genericReduce.types @@ -22,9 +22,9 @@ var b = a.map(s => s.length); var n1 = b.reduce((x, y) => x + y); >n1 : number >b.reduce((x, y) => x + y) : number ->b.reduce : { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue?: number): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; } +>b.reduce : { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number): number; (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue: number): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; } >b : number[] ->reduce : { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue?: number): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; } +>reduce : { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number): number; (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue: number): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; } >(x, y) => x + y : (x: number, y: number) => number >x : number >y : number @@ -35,9 +35,9 @@ var n1 = b.reduce((x, y) => x + y); var n2 = b.reduceRight((x, y) => x + y); >n2 : number >b.reduceRight((x, y) => x + y) : number ->b.reduceRight : { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue?: number): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; } +>b.reduceRight : { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number): number; (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue: number): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; } >b : number[] ->reduceRight : { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue?: number): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; } +>reduceRight : { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number): number; (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue: number): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; } >(x, y) => x + y : (x: number, y: number) => number >x : number >y : number @@ -76,9 +76,9 @@ n2.toExponential(2); // should not error if 'n2' is correctly number. var n3 = b.reduce( (x, y) => x + y, ""); // Initial value is of type string >n3 : string >b.reduce( (x, y) => x + y, "") : string ->b.reduce : { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue?: number): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; } +>b.reduce : { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number): number; (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue: number): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; } >b : number[] ->reduce : { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue?: number): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; } +>reduce : { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number): number; (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue: number): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; } >(x, y) => x + y : (x: string, y: number) => string >x : string >y : number diff --git a/tests/baselines/reference/importCallExpressionAsyncES6AMD.js b/tests/baselines/reference/importCallExpressionAsyncES6AMD.js index 9819da8369b..7f86625bbfc 100644 --- a/tests/baselines/reference/importCallExpressionAsyncES6AMD.js +++ b/tests/baselines/reference/importCallExpressionAsyncES6AMD.js @@ -42,34 +42,34 @@ define(["require", "exports"], function (require, exports) { Object.defineProperty(exports, "__esModule", { value: true }); function fn() { return __awaiter(this, void 0, void 0, function* () { - const req = yield new Promise(function (resolve_1, reject_1) { require(['./test'], resolve_1, reject_1); }); // ONE + const req = yield new Promise((resolve_1, reject_1) => { require(['./test'], resolve_1, reject_1); }); // ONE }); } exports.fn = fn; class cl1 { m() { return __awaiter(this, void 0, void 0, function* () { - const req = yield new Promise(function (resolve_2, reject_2) { require(['./test'], resolve_2, reject_2); }); // TWO + const req = yield new Promise((resolve_2, reject_2) => { require(['./test'], resolve_2, reject_2); }); // TWO }); } } exports.cl1 = cl1; exports.obj = { m: () => __awaiter(this, void 0, void 0, function* () { - const req = yield new Promise(function (resolve_3, reject_3) { require(['./test'], resolve_3, reject_3); }); // THREE + const req = yield new Promise((resolve_3, reject_3) => { require(['./test'], resolve_3, reject_3); }); // THREE }) }; class cl2 { constructor() { this.p = { m: () => __awaiter(this, void 0, void 0, function* () { - const req = yield new Promise(function (resolve_4, reject_4) { require(['./test'], resolve_4, reject_4); }); // FOUR + const req = yield new Promise((resolve_4, reject_4) => { require(['./test'], resolve_4, reject_4); }); // FOUR }) }; } } exports.cl2 = cl2; exports.l = () => __awaiter(this, void 0, void 0, function* () { - const req = yield new Promise(function (resolve_5, reject_5) { require(['./test'], resolve_5, reject_5); }); // FIVE + const req = yield new Promise((resolve_5, reject_5) => { require(['./test'], resolve_5, reject_5); }); // FIVE }); }); diff --git a/tests/baselines/reference/importCallExpressionAsyncES6CJS.js b/tests/baselines/reference/importCallExpressionAsyncES6CJS.js index b512ae94b48..20961f96330 100644 --- a/tests/baselines/reference/importCallExpressionAsyncES6CJS.js +++ b/tests/baselines/reference/importCallExpressionAsyncES6CJS.js @@ -41,33 +41,33 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge Object.defineProperty(exports, "__esModule", { value: true }); function fn() { return __awaiter(this, void 0, void 0, function* () { - const req = yield Promise.resolve().then(function () { return require('./test'); }); // ONE + const req = yield Promise.resolve().then(() => require('./test')); // ONE }); } exports.fn = fn; class cl1 { m() { return __awaiter(this, void 0, void 0, function* () { - const req = yield Promise.resolve().then(function () { return require('./test'); }); // TWO + const req = yield Promise.resolve().then(() => require('./test')); // TWO }); } } exports.cl1 = cl1; exports.obj = { m: () => __awaiter(this, void 0, void 0, function* () { - const req = yield Promise.resolve().then(function () { return require('./test'); }); // THREE + const req = yield Promise.resolve().then(() => require('./test')); // THREE }) }; class cl2 { constructor() { this.p = { m: () => __awaiter(this, void 0, void 0, function* () { - const req = yield Promise.resolve().then(function () { return require('./test'); }); // FOUR + const req = yield Promise.resolve().then(() => require('./test')); // FOUR }) }; } } exports.cl2 = cl2; exports.l = () => __awaiter(this, void 0, void 0, function* () { - const req = yield Promise.resolve().then(function () { return require('./test'); }); // FIVE + const req = yield Promise.resolve().then(() => require('./test')); // FIVE }); diff --git a/tests/baselines/reference/importCallExpressionAsyncES6UMD.js b/tests/baselines/reference/importCallExpressionAsyncES6UMD.js index f77d5150118..1d4aff02670 100644 --- a/tests/baselines/reference/importCallExpressionAsyncES6UMD.js +++ b/tests/baselines/reference/importCallExpressionAsyncES6UMD.js @@ -51,34 +51,34 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge Object.defineProperty(exports, "__esModule", { value: true }); function fn() { return __awaiter(this, void 0, void 0, function* () { - const req = yield __syncRequire ? Promise.resolve().then(function () { return require('./test'); }) : new Promise(function (resolve_1, reject_1) { require(['./test'], resolve_1, reject_1); }); // ONE + const req = yield __syncRequire ? Promise.resolve().then(() => require('./test')) : new Promise((resolve_1, reject_1) => { require(['./test'], resolve_1, reject_1); }); // ONE }); } exports.fn = fn; class cl1 { m() { return __awaiter(this, void 0, void 0, function* () { - const req = yield __syncRequire ? Promise.resolve().then(function () { return require('./test'); }) : new Promise(function (resolve_2, reject_2) { require(['./test'], resolve_2, reject_2); }); // TWO + const req = yield __syncRequire ? Promise.resolve().then(() => require('./test')) : new Promise((resolve_2, reject_2) => { require(['./test'], resolve_2, reject_2); }); // TWO }); } } exports.cl1 = cl1; exports.obj = { m: () => __awaiter(this, void 0, void 0, function* () { - const req = yield __syncRequire ? Promise.resolve().then(function () { return require('./test'); }) : new Promise(function (resolve_3, reject_3) { require(['./test'], resolve_3, reject_3); }); // THREE + const req = yield __syncRequire ? Promise.resolve().then(() => require('./test')) : new Promise((resolve_3, reject_3) => { require(['./test'], resolve_3, reject_3); }); // THREE }) }; class cl2 { constructor() { this.p = { m: () => __awaiter(this, void 0, void 0, function* () { - const req = yield __syncRequire ? Promise.resolve().then(function () { return require('./test'); }) : new Promise(function (resolve_4, reject_4) { require(['./test'], resolve_4, reject_4); }); // FOUR + const req = yield __syncRequire ? Promise.resolve().then(() => require('./test')) : new Promise((resolve_4, reject_4) => { require(['./test'], resolve_4, reject_4); }); // FOUR }) }; } } exports.cl2 = cl2; exports.l = () => __awaiter(this, void 0, void 0, function* () { - const req = yield __syncRequire ? Promise.resolve().then(function () { return require('./test'); }) : new Promise(function (resolve_5, reject_5) { require(['./test'], resolve_5, reject_5); }); // FIVE + const req = yield __syncRequire ? Promise.resolve().then(() => require('./test')) : new Promise((resolve_5, reject_5) => { require(['./test'], resolve_5, reject_5); }); // FIVE }); }); diff --git a/tests/baselines/reference/importCallExpressionCheckReturntype1.js b/tests/baselines/reference/importCallExpressionCheckReturntype1.js index facb6913388..3cc4893ff67 100644 --- a/tests/baselines/reference/importCallExpressionCheckReturntype1.js +++ b/tests/baselines/reference/importCallExpressionCheckReturntype1.js @@ -30,6 +30,6 @@ exports.C = C; //// [1.js] "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -let p1 = Promise.resolve().then(function () { return require("./defaultPath"); }); -let p2 = Promise.resolve().then(function () { return require("./defaultPath"); }); -let p3 = Promise.resolve().then(function () { return require("./defaultPath"); }); +let p1 = Promise.resolve().then(() => require("./defaultPath")); +let p2 = Promise.resolve().then(() => require("./defaultPath")); +let p3 = Promise.resolve().then(() => require("./defaultPath")); diff --git a/tests/baselines/reference/importCallExpressionDeclarationEmit1.js b/tests/baselines/reference/importCallExpressionDeclarationEmit1.js index 07f95d3b3b2..721d85abe71 100644 --- a/tests/baselines/reference/importCallExpressionDeclarationEmit1.js +++ b/tests/baselines/reference/importCallExpressionDeclarationEmit1.js @@ -15,12 +15,12 @@ function returnDynamicLoad(path: string) { } //// [importCallExpressionDeclarationEmit1.js] -Promise.resolve().then(function () { return require(getSpecifier()); }); -var p0 = Promise.resolve().then(function () { return require(`${directory}\${moduleFile}`); }); -var p1 = Promise.resolve().then(function () { return require(getSpecifier()); }); -const p2 = Promise.resolve().then(function () { return require(whatToLoad ? getSpecifier() : "defaulPath"); }); +Promise.resolve().then(() => require(getSpecifier())); +var p0 = Promise.resolve().then(() => require(`${directory}\${moduleFile}`)); +var p1 = Promise.resolve().then(() => require(getSpecifier())); +const p2 = Promise.resolve().then(() => require(whatToLoad ? getSpecifier() : "defaulPath")); function returnDynamicLoad(path) { - return Promise.resolve().then(function () { return require(path); }); + return Promise.resolve().then(() => require(path)); } diff --git a/tests/baselines/reference/importCallExpressionES6AMD.js b/tests/baselines/reference/importCallExpressionES6AMD.js index 08fec3b27fd..1c5430c9f04 100644 --- a/tests/baselines/reference/importCallExpressionES6AMD.js +++ b/tests/baselines/reference/importCallExpressionES6AMD.js @@ -39,23 +39,23 @@ define(["require", "exports"], function (require, exports) { define(["require", "exports"], function (require, exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); - new Promise(function (resolve_1, reject_1) { require(["./0"], resolve_1, reject_1); }); - var p1 = new Promise(function (resolve_2, reject_2) { require(["./0"], resolve_2, reject_2); }); + new Promise((resolve_1, reject_1) => { require(["./0"], resolve_1, reject_1); }); + var p1 = new Promise((resolve_2, reject_2) => { require(["./0"], resolve_2, reject_2); }); p1.then(zero => { return zero.foo(); }); - exports.p2 = new Promise(function (resolve_3, reject_3) { require(["./0"], resolve_3, reject_3); }); + exports.p2 = new Promise((resolve_3, reject_3) => { require(["./0"], resolve_3, reject_3); }); function foo() { - const p2 = new Promise(function (resolve_4, reject_4) { require(["./0"], resolve_4, reject_4); }); + const p2 = new Promise((resolve_4, reject_4) => { require(["./0"], resolve_4, reject_4); }); } class C { method() { - const loadAsync = new Promise(function (resolve_5, reject_5) { require(["./0"], resolve_5, reject_5); }); + const loadAsync = new Promise((resolve_5, reject_5) => { require(["./0"], resolve_5, reject_5); }); } } class D { method() { - const loadAsync = new Promise(function (resolve_6, reject_6) { require(["./0"], resolve_6, reject_6); }); + const loadAsync = new Promise((resolve_6, reject_6) => { require(["./0"], resolve_6, reject_6); }); } } exports.D = D; diff --git a/tests/baselines/reference/importCallExpressionES6CJS.js b/tests/baselines/reference/importCallExpressionES6CJS.js index 28833e17479..a1d8108bdea 100644 --- a/tests/baselines/reference/importCallExpressionES6CJS.js +++ b/tests/baselines/reference/importCallExpressionES6CJS.js @@ -36,23 +36,23 @@ exports.foo = foo; //// [1.js] "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -Promise.resolve().then(function () { return require("./0"); }); -var p1 = Promise.resolve().then(function () { return require("./0"); }); +Promise.resolve().then(() => require("./0")); +var p1 = Promise.resolve().then(() => require("./0")); p1.then(zero => { return zero.foo(); }); -exports.p2 = Promise.resolve().then(function () { return require("./0"); }); +exports.p2 = Promise.resolve().then(() => require("./0")); function foo() { - const p2 = Promise.resolve().then(function () { return require("./0"); }); + const p2 = Promise.resolve().then(() => require("./0")); } class C { method() { - const loadAsync = Promise.resolve().then(function () { return require("./0"); }); + const loadAsync = Promise.resolve().then(() => require("./0")); } } class D { method() { - const loadAsync = Promise.resolve().then(function () { return require("./0"); }); + const loadAsync = Promise.resolve().then(() => require("./0")); } } exports.D = D; diff --git a/tests/baselines/reference/importCallExpressionES6UMD.js b/tests/baselines/reference/importCallExpressionES6UMD.js index cc7dfef0074..750a1a7cc0c 100644 --- a/tests/baselines/reference/importCallExpressionES6UMD.js +++ b/tests/baselines/reference/importCallExpressionES6UMD.js @@ -56,23 +56,23 @@ export class D { "use strict"; var __syncRequire = typeof module === "object" && typeof module.exports === "object"; Object.defineProperty(exports, "__esModule", { value: true }); - __syncRequire ? Promise.resolve().then(function () { return require("./0"); }) : new Promise(function (resolve_1, reject_1) { require(["./0"], resolve_1, reject_1); }); - var p1 = __syncRequire ? Promise.resolve().then(function () { return require("./0"); }) : new Promise(function (resolve_2, reject_2) { require(["./0"], resolve_2, reject_2); }); + __syncRequire ? Promise.resolve().then(() => require("./0")) : new Promise((resolve_1, reject_1) => { require(["./0"], resolve_1, reject_1); }); + var p1 = __syncRequire ? Promise.resolve().then(() => require("./0")) : new Promise((resolve_2, reject_2) => { require(["./0"], resolve_2, reject_2); }); p1.then(zero => { return zero.foo(); }); - exports.p2 = __syncRequire ? Promise.resolve().then(function () { return require("./0"); }) : new Promise(function (resolve_3, reject_3) { require(["./0"], resolve_3, reject_3); }); + exports.p2 = __syncRequire ? Promise.resolve().then(() => require("./0")) : new Promise((resolve_3, reject_3) => { require(["./0"], resolve_3, reject_3); }); function foo() { - const p2 = __syncRequire ? Promise.resolve().then(function () { return require("./0"); }) : new Promise(function (resolve_4, reject_4) { require(["./0"], resolve_4, reject_4); }); + const p2 = __syncRequire ? Promise.resolve().then(() => require("./0")) : new Promise((resolve_4, reject_4) => { require(["./0"], resolve_4, reject_4); }); } class C { method() { - const loadAsync = __syncRequire ? Promise.resolve().then(function () { return require("./0"); }) : new Promise(function (resolve_5, reject_5) { require(["./0"], resolve_5, reject_5); }); + const loadAsync = __syncRequire ? Promise.resolve().then(() => require("./0")) : new Promise((resolve_5, reject_5) => { require(["./0"], resolve_5, reject_5); }); } } class D { method() { - const loadAsync = __syncRequire ? Promise.resolve().then(function () { return require("./0"); }) : new Promise(function (resolve_6, reject_6) { require(["./0"], resolve_6, reject_6); }); + const loadAsync = __syncRequire ? Promise.resolve().then(() => require("./0")) : new Promise((resolve_6, reject_6) => { require(["./0"], resolve_6, reject_6); }); } } exports.D = D; diff --git a/tests/baselines/reference/importCallExpressionGrammarError.js b/tests/baselines/reference/importCallExpressionGrammarError.js index b30b0c9ddd5..435eab35d4e 100644 --- a/tests/baselines/reference/importCallExpressionGrammarError.js +++ b/tests/baselines/reference/importCallExpressionGrammarError.js @@ -12,8 +12,8 @@ const p4 = import("pathToModule", "secondModule"); //// [importCallExpressionGrammarError.js] var a = ["./0"]; -Promise.resolve().then(function () { return require(...["PathModule"]); }); -var p1 = Promise.resolve().then(function () { return require(...a); }); -const p2 = Promise.resolve().then(function () { return require(); }); -const p3 = Promise.resolve().then(function () { return require(); }); -const p4 = Promise.resolve().then(function () { return require("pathToModule", "secondModule"); }); +Promise.resolve().then(() => require(...["PathModule"])); +var p1 = Promise.resolve().then(() => require(...a)); +const p2 = Promise.resolve().then(() => require()); +const p3 = Promise.resolve().then(() => require()); +const p4 = Promise.resolve().then(() => require("pathToModule")); diff --git a/tests/baselines/reference/importCallExpressionInAMD1.js b/tests/baselines/reference/importCallExpressionInAMD1.js index 5c858160353..64e5aee2dda 100644 --- a/tests/baselines/reference/importCallExpressionInAMD1.js +++ b/tests/baselines/reference/importCallExpressionInAMD1.js @@ -27,13 +27,13 @@ define(["require", "exports"], function (require, exports) { define(["require", "exports"], function (require, exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); - new Promise(function (resolve_1, reject_1) { require(["./0"], resolve_1, reject_1); }); - var p1 = new Promise(function (resolve_2, reject_2) { require(["./0"], resolve_2, reject_2); }); + new Promise((resolve_1, reject_1) => { require(["./0"], resolve_1, reject_1); }); + var p1 = new Promise((resolve_2, reject_2) => { require(["./0"], resolve_2, reject_2); }); p1.then(zero => { return zero.foo(); }); - exports.p2 = new Promise(function (resolve_3, reject_3) { require(["./0"], resolve_3, reject_3); }); + exports.p2 = new Promise((resolve_3, reject_3) => { require(["./0"], resolve_3, reject_3); }); function foo() { - const p2 = new Promise(function (resolve_4, reject_4) { require(["./0"], resolve_4, reject_4); }); + const p2 = new Promise((resolve_4, reject_4) => { require(["./0"], resolve_4, reject_4); }); } }); diff --git a/tests/baselines/reference/importCallExpressionInAMD2.js b/tests/baselines/reference/importCallExpressionInAMD2.js index 7347e2f8105..0d3f0e08d21 100644 --- a/tests/baselines/reference/importCallExpressionInAMD2.js +++ b/tests/baselines/reference/importCallExpressionInAMD2.js @@ -35,5 +35,5 @@ define(["require", "exports"], function (require, exports) { b.print(); }); } - foo(new Promise(function (resolve_1, reject_1) { require(["./0"], resolve_1, reject_1); })); + foo(new Promise((resolve_1, reject_1) => { require(["./0"], resolve_1, reject_1); })); }); diff --git a/tests/baselines/reference/importCallExpressionInAMD3.js b/tests/baselines/reference/importCallExpressionInAMD3.js index 471f35a6415..07e7e922541 100644 --- a/tests/baselines/reference/importCallExpressionInAMD3.js +++ b/tests/baselines/reference/importCallExpressionInAMD3.js @@ -26,7 +26,7 @@ define(["require", "exports"], function (require, exports) { define(["require", "exports"], function (require, exports) { "use strict"; async function foo() { - class C extends (await new Promise(function (resolve_1, reject_1) { require(["./0"], resolve_1, reject_1); })).B { + class C extends (await new Promise((resolve_1, reject_1) => { require(["./0"], resolve_1, reject_1); })).B { } var c = new C(); c.print(); diff --git a/tests/baselines/reference/importCallExpressionInAMD4.js b/tests/baselines/reference/importCallExpressionInAMD4.js index 43ba5afcd30..2fe29e5ae06 100644 --- a/tests/baselines/reference/importCallExpressionInAMD4.js +++ b/tests/baselines/reference/importCallExpressionInAMD4.js @@ -64,30 +64,30 @@ define(["require", "exports"], function (require, exports) { Object.defineProperty(exports, "__esModule", { value: true }); class C { constructor() { - this.myModule = new Promise(function (resolve_1, reject_1) { require(["./0"], resolve_1, reject_1); }); + this.myModule = new Promise((resolve_1, reject_1) => { require(["./0"], resolve_1, reject_1); }); } method() { - const loadAsync = new Promise(function (resolve_2, reject_2) { require(["./0"], resolve_2, reject_2); }); + const loadAsync = new Promise((resolve_2, reject_2) => { require(["./0"], resolve_2, reject_2); }); this.myModule.then(Zero => { console.log(Zero.foo()); }, async (err) => { console.log(err); - let one = await new Promise(function (resolve_3, reject_3) { require(["./1"], resolve_3, reject_3); }); + let one = await new Promise((resolve_3, reject_3) => { require(["./1"], resolve_3, reject_3); }); console.log(one.backup()); }); } } class D { constructor() { - this.myModule = new Promise(function (resolve_4, reject_4) { require(["./0"], resolve_4, reject_4); }); + this.myModule = new Promise((resolve_4, reject_4) => { require(["./0"], resolve_4, reject_4); }); } method() { - const loadAsync = new Promise(function (resolve_5, reject_5) { require(["./0"], resolve_5, reject_5); }); + const loadAsync = new Promise((resolve_5, reject_5) => { require(["./0"], resolve_5, reject_5); }); this.myModule.then(Zero => { console.log(Zero.foo()); }, async (err) => { console.log(err); - let one = await new Promise(function (resolve_6, reject_6) { require(["./1"], resolve_6, reject_6); }); + let one = await new Promise((resolve_6, reject_6) => { require(["./1"], resolve_6, reject_6); }); console.log(one.backup()); }); } diff --git a/tests/baselines/reference/importCallExpressionInCJS1.js b/tests/baselines/reference/importCallExpressionInCJS1.js index 359e743144b..c814f5e5671 100644 --- a/tests/baselines/reference/importCallExpressionInCJS1.js +++ b/tests/baselines/reference/importCallExpressionInCJS1.js @@ -24,12 +24,12 @@ exports.foo = foo; //// [1.js] "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -Promise.resolve().then(function () { return require("./0"); }); -var p1 = Promise.resolve().then(function () { return require("./0"); }); +Promise.resolve().then(() => require("./0")); +var p1 = Promise.resolve().then(() => require("./0")); p1.then(zero => { return zero.foo(); }); -exports.p2 = Promise.resolve().then(function () { return require("./0"); }); +exports.p2 = Promise.resolve().then(() => require("./0")); function foo() { - const p2 = Promise.resolve().then(function () { return require("./0"); }); + const p2 = Promise.resolve().then(() => require("./0")); } diff --git a/tests/baselines/reference/importCallExpressionInCJS2.js b/tests/baselines/reference/importCallExpressionInCJS2.js index aa983a7a2fe..fb559cb1193 100644 --- a/tests/baselines/reference/importCallExpressionInCJS2.js +++ b/tests/baselines/reference/importCallExpressionInCJS2.js @@ -32,9 +32,9 @@ exports.backup = backup; async function compute(promise) { let j = await promise; if (!j) { - j = await Promise.resolve().then(function () { return require("./1"); }); + j = await Promise.resolve().then(() => require("./1")); return j.backup(); } return j.foo(); } -compute(Promise.resolve().then(function () { return require("./0"); })); +compute(Promise.resolve().then(() => require("./0"))); diff --git a/tests/baselines/reference/importCallExpressionInCJS3.js b/tests/baselines/reference/importCallExpressionInCJS3.js index 2f956d9ac3a..616fbc9c3f9 100644 --- a/tests/baselines/reference/importCallExpressionInCJS3.js +++ b/tests/baselines/reference/importCallExpressionInCJS3.js @@ -31,4 +31,4 @@ function foo(x) { b.print(); }); } -foo(Promise.resolve().then(function () { return require("./0"); })); +foo(Promise.resolve().then(() => require("./0"))); diff --git a/tests/baselines/reference/importCallExpressionInCJS4.js b/tests/baselines/reference/importCallExpressionInCJS4.js index 554a0b222ab..b88295110b8 100644 --- a/tests/baselines/reference/importCallExpressionInCJS4.js +++ b/tests/baselines/reference/importCallExpressionInCJS4.js @@ -22,7 +22,7 @@ class B { exports.B = B; //// [2.js] async function foo() { - class C extends (await Promise.resolve().then(function () { return require("./0"); })).B { + class C extends (await Promise.resolve().then(() => require("./0"))).B { } var c = new C(); c.print(); diff --git a/tests/baselines/reference/importCallExpressionInCJS5.js b/tests/baselines/reference/importCallExpressionInCJS5.js index eeb4db275fa..b32b0e52c50 100644 --- a/tests/baselines/reference/importCallExpressionInCJS5.js +++ b/tests/baselines/reference/importCallExpressionInCJS5.js @@ -59,30 +59,30 @@ exports.backup = backup; Object.defineProperty(exports, "__esModule", { value: true }); class C { constructor() { - this.myModule = Promise.resolve().then(function () { return require("./0"); }); + this.myModule = Promise.resolve().then(() => require("./0")); } method() { - const loadAsync = Promise.resolve().then(function () { return require("./0"); }); + const loadAsync = Promise.resolve().then(() => require("./0")); this.myModule.then(Zero => { console.log(Zero.foo()); }, async (err) => { console.log(err); - let one = await Promise.resolve().then(function () { return require("./1"); }); + let one = await Promise.resolve().then(() => require("./1")); console.log(one.backup()); }); } } class D { constructor() { - this.myModule = Promise.resolve().then(function () { return require("./0"); }); + this.myModule = Promise.resolve().then(() => require("./0")); } method() { - const loadAsync = Promise.resolve().then(function () { return require("./0"); }); + const loadAsync = Promise.resolve().then(() => require("./0")); this.myModule.then(Zero => { console.log(Zero.foo()); }, async (err) => { console.log(err); - let one = await Promise.resolve().then(function () { return require("./1"); }); + let one = await Promise.resolve().then(() => require("./1")); console.log(one.backup()); }); } diff --git a/tests/baselines/reference/importCallExpressionInExportEqualsAMD.js b/tests/baselines/reference/importCallExpressionInExportEqualsAMD.js index f2fda1fadd7..1fcef2bde39 100644 --- a/tests/baselines/reference/importCallExpressionInExportEqualsAMD.js +++ b/tests/baselines/reference/importCallExpressionInExportEqualsAMD.js @@ -17,6 +17,6 @@ define(["require", "exports"], function (require, exports) { define(["require", "exports"], function (require, exports) { "use strict"; return async function () { - const something = await new Promise(function (resolve_1, reject_1) { require(["./something"], resolve_1, reject_1); }); + const something = await new Promise((resolve_1, reject_1) => { require(["./something"], resolve_1, reject_1); }); }; }); diff --git a/tests/baselines/reference/importCallExpressionInExportEqualsCJS.js b/tests/baselines/reference/importCallExpressionInExportEqualsCJS.js index 5d7e2816116..72e3a0ec0af 100644 --- a/tests/baselines/reference/importCallExpressionInExportEqualsCJS.js +++ b/tests/baselines/reference/importCallExpressionInExportEqualsCJS.js @@ -14,5 +14,5 @@ module.exports = 42; //// [index.js] "use strict"; module.exports = async function () { - const something = await Promise.resolve().then(function () { return require("./something"); }); + const something = await Promise.resolve().then(() => require("./something")); }; diff --git a/tests/baselines/reference/importCallExpressionInExportEqualsUMD.js b/tests/baselines/reference/importCallExpressionInExportEqualsUMD.js index e0c6e2a925f..5f70891b09e 100644 --- a/tests/baselines/reference/importCallExpressionInExportEqualsUMD.js +++ b/tests/baselines/reference/importCallExpressionInExportEqualsUMD.js @@ -34,6 +34,6 @@ export = async function() { "use strict"; var __syncRequire = typeof module === "object" && typeof module.exports === "object"; return async function () { - const something = await (__syncRequire ? Promise.resolve().then(function () { return require("./something"); }) : new Promise(function (resolve_1, reject_1) { require(["./something"], resolve_1, reject_1); })); + const something = await (__syncRequire ? Promise.resolve().then(() => require("./something")) : new Promise((resolve_1, reject_1) => { require(["./something"], resolve_1, reject_1); })); }; }); diff --git a/tests/baselines/reference/importCallExpressionInScriptContext1.js b/tests/baselines/reference/importCallExpressionInScriptContext1.js index 2c2d2f904d5..53c6118f61b 100644 --- a/tests/baselines/reference/importCallExpressionInScriptContext1.js +++ b/tests/baselines/reference/importCallExpressionInScriptContext1.js @@ -13,5 +13,5 @@ Object.defineProperty(exports, "__esModule", { value: true }); function foo() { return "foo"; } exports.foo = foo; //// [1.js] -var p1 = Promise.resolve().then(function () { return require("./0"); }); +var p1 = Promise.resolve().then(() => require("./0")); function arguments() { } // this is allow as the file doesn't have implicit "use strict" diff --git a/tests/baselines/reference/importCallExpressionInScriptContext2.js b/tests/baselines/reference/importCallExpressionInScriptContext2.js index 6b6e0109fda..4a0d4a1bf5a 100644 --- a/tests/baselines/reference/importCallExpressionInScriptContext2.js +++ b/tests/baselines/reference/importCallExpressionInScriptContext2.js @@ -15,5 +15,5 @@ function foo() { return "foo"; } exports.foo = foo; //// [1.js] "use strict"; -var p1 = Promise.resolve().then(function () { return require("./0"); }); +var p1 = Promise.resolve().then(() => require("./0")); function arguments() { } diff --git a/tests/baselines/reference/importCallExpressionInUMD1.js b/tests/baselines/reference/importCallExpressionInUMD1.js index ee99468f7f3..597e68e2d6f 100644 --- a/tests/baselines/reference/importCallExpressionInUMD1.js +++ b/tests/baselines/reference/importCallExpressionInUMD1.js @@ -44,13 +44,13 @@ function foo() { "use strict"; var __syncRequire = typeof module === "object" && typeof module.exports === "object"; Object.defineProperty(exports, "__esModule", { value: true }); - __syncRequire ? Promise.resolve().then(function () { return require("./0"); }) : new Promise(function (resolve_1, reject_1) { require(["./0"], resolve_1, reject_1); }); - var p1 = __syncRequire ? Promise.resolve().then(function () { return require("./0"); }) : new Promise(function (resolve_2, reject_2) { require(["./0"], resolve_2, reject_2); }); + __syncRequire ? Promise.resolve().then(() => require("./0")) : new Promise((resolve_1, reject_1) => { require(["./0"], resolve_1, reject_1); }); + var p1 = __syncRequire ? Promise.resolve().then(() => require("./0")) : new Promise((resolve_2, reject_2) => { require(["./0"], resolve_2, reject_2); }); p1.then(zero => { return zero.foo(); }); - exports.p2 = __syncRequire ? Promise.resolve().then(function () { return require("./0"); }) : new Promise(function (resolve_3, reject_3) { require(["./0"], resolve_3, reject_3); }); + exports.p2 = __syncRequire ? Promise.resolve().then(() => require("./0")) : new Promise((resolve_3, reject_3) => { require(["./0"], resolve_3, reject_3); }); function foo() { - const p2 = __syncRequire ? Promise.resolve().then(function () { return require("./0"); }) : new Promise(function (resolve_4, reject_4) { require(["./0"], resolve_4, reject_4); }); + const p2 = __syncRequire ? Promise.resolve().then(() => require("./0")) : new Promise((resolve_4, reject_4) => { require(["./0"], resolve_4, reject_4); }); } }); diff --git a/tests/baselines/reference/importCallExpressionInUMD2.js b/tests/baselines/reference/importCallExpressionInUMD2.js index db8b87a2f79..516800968c1 100644 --- a/tests/baselines/reference/importCallExpressionInUMD2.js +++ b/tests/baselines/reference/importCallExpressionInUMD2.js @@ -52,5 +52,5 @@ foo(import("./0")); b.print(); }); } - foo(__syncRequire ? Promise.resolve().then(function () { return require("./0"); }) : new Promise(function (resolve_1, reject_1) { require(["./0"], resolve_1, reject_1); })); + foo(__syncRequire ? Promise.resolve().then(() => require("./0")) : new Promise((resolve_1, reject_1) => { require(["./0"], resolve_1, reject_1); })); }); diff --git a/tests/baselines/reference/importCallExpressionInUMD3.js b/tests/baselines/reference/importCallExpressionInUMD3.js index 41106e3ab78..57d200ca70c 100644 --- a/tests/baselines/reference/importCallExpressionInUMD3.js +++ b/tests/baselines/reference/importCallExpressionInUMD3.js @@ -43,7 +43,7 @@ foo(); "use strict"; var __syncRequire = typeof module === "object" && typeof module.exports === "object"; async function foo() { - class C extends (await (__syncRequire ? Promise.resolve().then(function () { return require("./0"); }) : new Promise(function (resolve_1, reject_1) { require(["./0"], resolve_1, reject_1); }))).B { + class C extends (await (__syncRequire ? Promise.resolve().then(() => require("./0")) : new Promise((resolve_1, reject_1) => { require(["./0"], resolve_1, reject_1); }))).B { } var c = new C(); c.print(); diff --git a/tests/baselines/reference/importCallExpressionInUMD4.js b/tests/baselines/reference/importCallExpressionInUMD4.js index 477a7826bc0..70a574f0302 100644 --- a/tests/baselines/reference/importCallExpressionInUMD4.js +++ b/tests/baselines/reference/importCallExpressionInUMD4.js @@ -89,30 +89,30 @@ export class D { Object.defineProperty(exports, "__esModule", { value: true }); class C { constructor() { - this.myModule = __syncRequire ? Promise.resolve().then(function () { return require("./0"); }) : new Promise(function (resolve_1, reject_1) { require(["./0"], resolve_1, reject_1); }); + this.myModule = __syncRequire ? Promise.resolve().then(() => require("./0")) : new Promise((resolve_1, reject_1) => { require(["./0"], resolve_1, reject_1); }); } method() { - const loadAsync = __syncRequire ? Promise.resolve().then(function () { return require("./0"); }) : new Promise(function (resolve_2, reject_2) { require(["./0"], resolve_2, reject_2); }); + const loadAsync = __syncRequire ? Promise.resolve().then(() => require("./0")) : new Promise((resolve_2, reject_2) => { require(["./0"], resolve_2, reject_2); }); this.myModule.then(Zero => { console.log(Zero.foo()); }, async (err) => { console.log(err); - let one = await (__syncRequire ? Promise.resolve().then(function () { return require("./1"); }) : new Promise(function (resolve_3, reject_3) { require(["./1"], resolve_3, reject_3); })); + let one = await (__syncRequire ? Promise.resolve().then(() => require("./1")) : new Promise((resolve_3, reject_3) => { require(["./1"], resolve_3, reject_3); })); console.log(one.backup()); }); } } class D { constructor() { - this.myModule = __syncRequire ? Promise.resolve().then(function () { return require("./0"); }) : new Promise(function (resolve_4, reject_4) { require(["./0"], resolve_4, reject_4); }); + this.myModule = __syncRequire ? Promise.resolve().then(() => require("./0")) : new Promise((resolve_4, reject_4) => { require(["./0"], resolve_4, reject_4); }); } method() { - const loadAsync = __syncRequire ? Promise.resolve().then(function () { return require("./0"); }) : new Promise(function (resolve_5, reject_5) { require(["./0"], resolve_5, reject_5); }); + const loadAsync = __syncRequire ? Promise.resolve().then(() => require("./0")) : new Promise((resolve_5, reject_5) => { require(["./0"], resolve_5, reject_5); }); this.myModule.then(Zero => { console.log(Zero.foo()); }, async (err) => { console.log(err); - let one = await (__syncRequire ? Promise.resolve().then(function () { return require("./1"); }) : new Promise(function (resolve_6, reject_6) { require(["./1"], resolve_6, reject_6); })); + let one = await (__syncRequire ? Promise.resolve().then(() => require("./1")) : new Promise((resolve_6, reject_6) => { require(["./1"], resolve_6, reject_6); })); console.log(one.backup()); }); } diff --git a/tests/baselines/reference/importCallExpressionNestedAMD.js b/tests/baselines/reference/importCallExpressionNestedAMD.js new file mode 100644 index 00000000000..dc211d44003 --- /dev/null +++ b/tests/baselines/reference/importCallExpressionNestedAMD.js @@ -0,0 +1,33 @@ +//// [tests/cases/conformance/dynamicImport/importCallExpressionNestedAMD.ts] //// + +//// [foo.ts] +export default "./foo"; + +//// [index.ts] +async function foo() { + return await import((await import("./foo")).default); +} + +//// [foo.js] +define(["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.default = "./foo"; +}); +//// [index.js] +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +define(["require", "exports"], function (require, exports) { + "use strict"; + function foo() { + return __awaiter(this, void 0, void 0, function* () { + return yield new Promise((resolve_1, reject_1) => { require([(yield new Promise((resolve_2, reject_2) => { require(["./foo"], resolve_2, reject_2); })).default], resolve_1, reject_1); }); + }); + } +}); diff --git a/tests/baselines/reference/importCallExpressionNestedAMD.symbols b/tests/baselines/reference/importCallExpressionNestedAMD.symbols new file mode 100644 index 00000000000..67e2eabd6fd --- /dev/null +++ b/tests/baselines/reference/importCallExpressionNestedAMD.symbols @@ -0,0 +1,12 @@ +=== tests/cases/conformance/dynamicImport/foo.ts === +export default "./foo"; +No type information for this code. +No type information for this code.=== tests/cases/conformance/dynamicImport/index.ts === +async function foo() { +>foo : Symbol(foo, Decl(index.ts, 0, 0)) + + return await import((await import("./foo")).default); +>(await import("./foo")).default : Symbol(default, Decl(foo.ts, 0, 0)) +>"./foo" : Symbol("tests/cases/conformance/dynamicImport/foo", Decl(foo.ts, 0, 0)) +>default : Symbol(default, Decl(foo.ts, 0, 0)) +} diff --git a/tests/baselines/reference/importCallExpressionNestedAMD.types b/tests/baselines/reference/importCallExpressionNestedAMD.types new file mode 100644 index 00000000000..2f74d78b6c8 --- /dev/null +++ b/tests/baselines/reference/importCallExpressionNestedAMD.types @@ -0,0 +1,17 @@ +=== tests/cases/conformance/dynamicImport/foo.ts === +export default "./foo"; +No type information for this code. +No type information for this code.=== tests/cases/conformance/dynamicImport/index.ts === +async function foo() { +>foo : () => Promise + + return await import((await import("./foo")).default); +>await import((await import("./foo")).default) : any +>import((await import("./foo")).default) : Promise +>(await import("./foo")).default : "./foo" +>(await import("./foo")) : typeof "tests/cases/conformance/dynamicImport/foo" +>await import("./foo") : typeof "tests/cases/conformance/dynamicImport/foo" +>import("./foo") : Promise +>"./foo" : "./foo" +>default : "./foo" +} diff --git a/tests/baselines/reference/importCallExpressionNestedAMD2.js b/tests/baselines/reference/importCallExpressionNestedAMD2.js new file mode 100644 index 00000000000..1e159af2180 --- /dev/null +++ b/tests/baselines/reference/importCallExpressionNestedAMD2.js @@ -0,0 +1,66 @@ +//// [tests/cases/conformance/dynamicImport/importCallExpressionNestedAMD2.ts] //// + +//// [foo.ts] +export default "./foo"; + +//// [index.ts] +async function foo() { + return await import((await import("./foo")).default); +} + +//// [foo.js] +define(["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.default = "./foo"; +}); +//// [index.js] +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __generator = (this && this.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) try { + if (f = 1, y && (t = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [0, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +}; +define(["require", "exports"], function (require, exports) { + "use strict"; + function foo() { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, new Promise(function (resolve_1, reject_1) { require(["./foo"], resolve_1, reject_1); })]; + case 1: return [4 /*yield*/, new Promise(function (resolve_2, reject_2) { require([(_a.sent()).default], resolve_2, reject_2); })]; + case 2: return [2 /*return*/, _a.sent()]; + } + }); + }); + } +}); diff --git a/tests/baselines/reference/importCallExpressionNestedAMD2.symbols b/tests/baselines/reference/importCallExpressionNestedAMD2.symbols new file mode 100644 index 00000000000..67e2eabd6fd --- /dev/null +++ b/tests/baselines/reference/importCallExpressionNestedAMD2.symbols @@ -0,0 +1,12 @@ +=== tests/cases/conformance/dynamicImport/foo.ts === +export default "./foo"; +No type information for this code. +No type information for this code.=== tests/cases/conformance/dynamicImport/index.ts === +async function foo() { +>foo : Symbol(foo, Decl(index.ts, 0, 0)) + + return await import((await import("./foo")).default); +>(await import("./foo")).default : Symbol(default, Decl(foo.ts, 0, 0)) +>"./foo" : Symbol("tests/cases/conformance/dynamicImport/foo", Decl(foo.ts, 0, 0)) +>default : Symbol(default, Decl(foo.ts, 0, 0)) +} diff --git a/tests/baselines/reference/importCallExpressionNestedAMD2.types b/tests/baselines/reference/importCallExpressionNestedAMD2.types new file mode 100644 index 00000000000..2f74d78b6c8 --- /dev/null +++ b/tests/baselines/reference/importCallExpressionNestedAMD2.types @@ -0,0 +1,17 @@ +=== tests/cases/conformance/dynamicImport/foo.ts === +export default "./foo"; +No type information for this code. +No type information for this code.=== tests/cases/conformance/dynamicImport/index.ts === +async function foo() { +>foo : () => Promise + + return await import((await import("./foo")).default); +>await import((await import("./foo")).default) : any +>import((await import("./foo")).default) : Promise +>(await import("./foo")).default : "./foo" +>(await import("./foo")) : typeof "tests/cases/conformance/dynamicImport/foo" +>await import("./foo") : typeof "tests/cases/conformance/dynamicImport/foo" +>import("./foo") : Promise +>"./foo" : "./foo" +>default : "./foo" +} diff --git a/tests/baselines/reference/importCallExpressionNestedCJS.js b/tests/baselines/reference/importCallExpressionNestedCJS.js new file mode 100644 index 00000000000..07c0f234bf7 --- /dev/null +++ b/tests/baselines/reference/importCallExpressionNestedCJS.js @@ -0,0 +1,28 @@ +//// [tests/cases/conformance/dynamicImport/importCallExpressionNestedCJS.ts] //// + +//// [foo.ts] +export default "./foo"; + +//// [index.ts] +async function foo() { + return await import((await import("./foo")).default); +} + +//// [foo.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.default = "./foo"; +//// [index.js] +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +function foo() { + return __awaiter(this, void 0, void 0, function* () { + return yield Promise.resolve().then(() => require((yield Promise.resolve().then(() => require("./foo"))).default)); + }); +} diff --git a/tests/baselines/reference/importCallExpressionNestedCJS.symbols b/tests/baselines/reference/importCallExpressionNestedCJS.symbols new file mode 100644 index 00000000000..67e2eabd6fd --- /dev/null +++ b/tests/baselines/reference/importCallExpressionNestedCJS.symbols @@ -0,0 +1,12 @@ +=== tests/cases/conformance/dynamicImport/foo.ts === +export default "./foo"; +No type information for this code. +No type information for this code.=== tests/cases/conformance/dynamicImport/index.ts === +async function foo() { +>foo : Symbol(foo, Decl(index.ts, 0, 0)) + + return await import((await import("./foo")).default); +>(await import("./foo")).default : Symbol(default, Decl(foo.ts, 0, 0)) +>"./foo" : Symbol("tests/cases/conformance/dynamicImport/foo", Decl(foo.ts, 0, 0)) +>default : Symbol(default, Decl(foo.ts, 0, 0)) +} diff --git a/tests/baselines/reference/importCallExpressionNestedCJS.types b/tests/baselines/reference/importCallExpressionNestedCJS.types new file mode 100644 index 00000000000..2f74d78b6c8 --- /dev/null +++ b/tests/baselines/reference/importCallExpressionNestedCJS.types @@ -0,0 +1,17 @@ +=== tests/cases/conformance/dynamicImport/foo.ts === +export default "./foo"; +No type information for this code. +No type information for this code.=== tests/cases/conformance/dynamicImport/index.ts === +async function foo() { +>foo : () => Promise + + return await import((await import("./foo")).default); +>await import((await import("./foo")).default) : any +>import((await import("./foo")).default) : Promise +>(await import("./foo")).default : "./foo" +>(await import("./foo")) : typeof "tests/cases/conformance/dynamicImport/foo" +>await import("./foo") : typeof "tests/cases/conformance/dynamicImport/foo" +>import("./foo") : Promise +>"./foo" : "./foo" +>default : "./foo" +} diff --git a/tests/baselines/reference/importCallExpressionNestedCJS2.js b/tests/baselines/reference/importCallExpressionNestedCJS2.js new file mode 100644 index 00000000000..c76044ec05c --- /dev/null +++ b/tests/baselines/reference/importCallExpressionNestedCJS2.js @@ -0,0 +1,61 @@ +//// [tests/cases/conformance/dynamicImport/importCallExpressionNestedCJS2.ts] //// + +//// [foo.ts] +export default "./foo"; + +//// [index.ts] +async function foo() { + return await import((await import("./foo")).default); +} + +//// [foo.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.default = "./foo"; +//// [index.js] +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __generator = (this && this.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) try { + if (f = 1, y && (t = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [0, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +}; +function foo() { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, Promise.resolve().then(function () { return require("./foo"); })]; + case 1: return [4 /*yield*/, Promise.resolve().then(function () { return require((_a.sent()).default); })]; + case 2: return [2 /*return*/, _a.sent()]; + } + }); + }); +} diff --git a/tests/baselines/reference/importCallExpressionNestedCJS2.symbols b/tests/baselines/reference/importCallExpressionNestedCJS2.symbols new file mode 100644 index 00000000000..67e2eabd6fd --- /dev/null +++ b/tests/baselines/reference/importCallExpressionNestedCJS2.symbols @@ -0,0 +1,12 @@ +=== tests/cases/conformance/dynamicImport/foo.ts === +export default "./foo"; +No type information for this code. +No type information for this code.=== tests/cases/conformance/dynamicImport/index.ts === +async function foo() { +>foo : Symbol(foo, Decl(index.ts, 0, 0)) + + return await import((await import("./foo")).default); +>(await import("./foo")).default : Symbol(default, Decl(foo.ts, 0, 0)) +>"./foo" : Symbol("tests/cases/conformance/dynamicImport/foo", Decl(foo.ts, 0, 0)) +>default : Symbol(default, Decl(foo.ts, 0, 0)) +} diff --git a/tests/baselines/reference/importCallExpressionNestedCJS2.types b/tests/baselines/reference/importCallExpressionNestedCJS2.types new file mode 100644 index 00000000000..2f74d78b6c8 --- /dev/null +++ b/tests/baselines/reference/importCallExpressionNestedCJS2.types @@ -0,0 +1,17 @@ +=== tests/cases/conformance/dynamicImport/foo.ts === +export default "./foo"; +No type information for this code. +No type information for this code.=== tests/cases/conformance/dynamicImport/index.ts === +async function foo() { +>foo : () => Promise + + return await import((await import("./foo")).default); +>await import((await import("./foo")).default) : any +>import((await import("./foo")).default) : Promise +>(await import("./foo")).default : "./foo" +>(await import("./foo")) : typeof "tests/cases/conformance/dynamicImport/foo" +>await import("./foo") : typeof "tests/cases/conformance/dynamicImport/foo" +>import("./foo") : Promise +>"./foo" : "./foo" +>default : "./foo" +} diff --git a/tests/baselines/reference/importCallExpressionNestedES2015.errors.txt b/tests/baselines/reference/importCallExpressionNestedES2015.errors.txt new file mode 100644 index 00000000000..1208dd0c709 --- /dev/null +++ b/tests/baselines/reference/importCallExpressionNestedES2015.errors.txt @@ -0,0 +1,15 @@ +tests/cases/conformance/dynamicImport/index.ts(2,18): error TS1323: Dynamic import cannot be used when targeting ECMAScript 2015 modules. +tests/cases/conformance/dynamicImport/index.ts(2,32): error TS1323: Dynamic import cannot be used when targeting ECMAScript 2015 modules. + + +==== tests/cases/conformance/dynamicImport/foo.ts (0 errors) ==== + export default "./foo"; + +==== tests/cases/conformance/dynamicImport/index.ts (2 errors) ==== + async function foo() { + return await import((await import("./foo")).default); + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS1323: Dynamic import cannot be used when targeting ECMAScript 2015 modules. + ~~~~~~~~~~~~~~~ +!!! error TS1323: Dynamic import cannot be used when targeting ECMAScript 2015 modules. + } \ No newline at end of file diff --git a/tests/baselines/reference/importCallExpressionNestedES2015.js b/tests/baselines/reference/importCallExpressionNestedES2015.js new file mode 100644 index 00000000000..5c8a6a9edb5 --- /dev/null +++ b/tests/baselines/reference/importCallExpressionNestedES2015.js @@ -0,0 +1,26 @@ +//// [tests/cases/conformance/dynamicImport/importCallExpressionNestedES2015.ts] //// + +//// [foo.ts] +export default "./foo"; + +//// [index.ts] +async function foo() { + return await import((await import("./foo")).default); +} + +//// [foo.js] +export default "./foo"; +//// [index.js] +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +function foo() { + return __awaiter(this, void 0, void 0, function* () { + return yield import((yield import("./foo")).default); + }); +} diff --git a/tests/baselines/reference/importCallExpressionNestedES2015.symbols b/tests/baselines/reference/importCallExpressionNestedES2015.symbols new file mode 100644 index 00000000000..67e2eabd6fd --- /dev/null +++ b/tests/baselines/reference/importCallExpressionNestedES2015.symbols @@ -0,0 +1,12 @@ +=== tests/cases/conformance/dynamicImport/foo.ts === +export default "./foo"; +No type information for this code. +No type information for this code.=== tests/cases/conformance/dynamicImport/index.ts === +async function foo() { +>foo : Symbol(foo, Decl(index.ts, 0, 0)) + + return await import((await import("./foo")).default); +>(await import("./foo")).default : Symbol(default, Decl(foo.ts, 0, 0)) +>"./foo" : Symbol("tests/cases/conformance/dynamicImport/foo", Decl(foo.ts, 0, 0)) +>default : Symbol(default, Decl(foo.ts, 0, 0)) +} diff --git a/tests/baselines/reference/importCallExpressionNestedES2015.types b/tests/baselines/reference/importCallExpressionNestedES2015.types new file mode 100644 index 00000000000..2f74d78b6c8 --- /dev/null +++ b/tests/baselines/reference/importCallExpressionNestedES2015.types @@ -0,0 +1,17 @@ +=== tests/cases/conformance/dynamicImport/foo.ts === +export default "./foo"; +No type information for this code. +No type information for this code.=== tests/cases/conformance/dynamicImport/index.ts === +async function foo() { +>foo : () => Promise + + return await import((await import("./foo")).default); +>await import((await import("./foo")).default) : any +>import((await import("./foo")).default) : Promise +>(await import("./foo")).default : "./foo" +>(await import("./foo")) : typeof "tests/cases/conformance/dynamicImport/foo" +>await import("./foo") : typeof "tests/cases/conformance/dynamicImport/foo" +>import("./foo") : Promise +>"./foo" : "./foo" +>default : "./foo" +} diff --git a/tests/baselines/reference/importCallExpressionNestedES20152.errors.txt b/tests/baselines/reference/importCallExpressionNestedES20152.errors.txt new file mode 100644 index 00000000000..1208dd0c709 --- /dev/null +++ b/tests/baselines/reference/importCallExpressionNestedES20152.errors.txt @@ -0,0 +1,15 @@ +tests/cases/conformance/dynamicImport/index.ts(2,18): error TS1323: Dynamic import cannot be used when targeting ECMAScript 2015 modules. +tests/cases/conformance/dynamicImport/index.ts(2,32): error TS1323: Dynamic import cannot be used when targeting ECMAScript 2015 modules. + + +==== tests/cases/conformance/dynamicImport/foo.ts (0 errors) ==== + export default "./foo"; + +==== tests/cases/conformance/dynamicImport/index.ts (2 errors) ==== + async function foo() { + return await import((await import("./foo")).default); + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS1323: Dynamic import cannot be used when targeting ECMAScript 2015 modules. + ~~~~~~~~~~~~~~~ +!!! error TS1323: Dynamic import cannot be used when targeting ECMAScript 2015 modules. + } \ No newline at end of file diff --git a/tests/baselines/reference/importCallExpressionNestedES20152.js b/tests/baselines/reference/importCallExpressionNestedES20152.js new file mode 100644 index 00000000000..2496f43f84f --- /dev/null +++ b/tests/baselines/reference/importCallExpressionNestedES20152.js @@ -0,0 +1,59 @@ +//// [tests/cases/conformance/dynamicImport/importCallExpressionNestedES20152.ts] //// + +//// [foo.ts] +export default "./foo"; + +//// [index.ts] +async function foo() { + return await import((await import("./foo")).default); +} + +//// [foo.js] +export default "./foo"; +//// [index.js] +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __generator = (this && this.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) try { + if (f = 1, y && (t = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [0, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +}; +function foo() { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, import("./foo")]; + case 1: return [4 /*yield*/, import((_a.sent()).default)]; + case 2: return [2 /*return*/, _a.sent()]; + } + }); + }); +} diff --git a/tests/baselines/reference/importCallExpressionNestedES20152.symbols b/tests/baselines/reference/importCallExpressionNestedES20152.symbols new file mode 100644 index 00000000000..67e2eabd6fd --- /dev/null +++ b/tests/baselines/reference/importCallExpressionNestedES20152.symbols @@ -0,0 +1,12 @@ +=== tests/cases/conformance/dynamicImport/foo.ts === +export default "./foo"; +No type information for this code. +No type information for this code.=== tests/cases/conformance/dynamicImport/index.ts === +async function foo() { +>foo : Symbol(foo, Decl(index.ts, 0, 0)) + + return await import((await import("./foo")).default); +>(await import("./foo")).default : Symbol(default, Decl(foo.ts, 0, 0)) +>"./foo" : Symbol("tests/cases/conformance/dynamicImport/foo", Decl(foo.ts, 0, 0)) +>default : Symbol(default, Decl(foo.ts, 0, 0)) +} diff --git a/tests/baselines/reference/importCallExpressionNestedES20152.types b/tests/baselines/reference/importCallExpressionNestedES20152.types new file mode 100644 index 00000000000..2f74d78b6c8 --- /dev/null +++ b/tests/baselines/reference/importCallExpressionNestedES20152.types @@ -0,0 +1,17 @@ +=== tests/cases/conformance/dynamicImport/foo.ts === +export default "./foo"; +No type information for this code. +No type information for this code.=== tests/cases/conformance/dynamicImport/index.ts === +async function foo() { +>foo : () => Promise + + return await import((await import("./foo")).default); +>await import((await import("./foo")).default) : any +>import((await import("./foo")).default) : Promise +>(await import("./foo")).default : "./foo" +>(await import("./foo")) : typeof "tests/cases/conformance/dynamicImport/foo" +>await import("./foo") : typeof "tests/cases/conformance/dynamicImport/foo" +>import("./foo") : Promise +>"./foo" : "./foo" +>default : "./foo" +} diff --git a/tests/baselines/reference/importCallExpressionNestedESNext.js b/tests/baselines/reference/importCallExpressionNestedESNext.js new file mode 100644 index 00000000000..8ec9b988201 --- /dev/null +++ b/tests/baselines/reference/importCallExpressionNestedESNext.js @@ -0,0 +1,26 @@ +//// [tests/cases/conformance/dynamicImport/importCallExpressionNestedESNext.ts] //// + +//// [foo.ts] +export default "./foo"; + +//// [index.ts] +async function foo() { + return await import((await import("./foo")).default); +} + +//// [foo.js] +export default "./foo"; +//// [index.js] +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +function foo() { + return __awaiter(this, void 0, void 0, function* () { + return yield import((yield import("./foo")).default); + }); +} diff --git a/tests/baselines/reference/importCallExpressionNestedESNext.symbols b/tests/baselines/reference/importCallExpressionNestedESNext.symbols new file mode 100644 index 00000000000..67e2eabd6fd --- /dev/null +++ b/tests/baselines/reference/importCallExpressionNestedESNext.symbols @@ -0,0 +1,12 @@ +=== tests/cases/conformance/dynamicImport/foo.ts === +export default "./foo"; +No type information for this code. +No type information for this code.=== tests/cases/conformance/dynamicImport/index.ts === +async function foo() { +>foo : Symbol(foo, Decl(index.ts, 0, 0)) + + return await import((await import("./foo")).default); +>(await import("./foo")).default : Symbol(default, Decl(foo.ts, 0, 0)) +>"./foo" : Symbol("tests/cases/conformance/dynamicImport/foo", Decl(foo.ts, 0, 0)) +>default : Symbol(default, Decl(foo.ts, 0, 0)) +} diff --git a/tests/baselines/reference/importCallExpressionNestedESNext.types b/tests/baselines/reference/importCallExpressionNestedESNext.types new file mode 100644 index 00000000000..2f74d78b6c8 --- /dev/null +++ b/tests/baselines/reference/importCallExpressionNestedESNext.types @@ -0,0 +1,17 @@ +=== tests/cases/conformance/dynamicImport/foo.ts === +export default "./foo"; +No type information for this code. +No type information for this code.=== tests/cases/conformance/dynamicImport/index.ts === +async function foo() { +>foo : () => Promise + + return await import((await import("./foo")).default); +>await import((await import("./foo")).default) : any +>import((await import("./foo")).default) : Promise +>(await import("./foo")).default : "./foo" +>(await import("./foo")) : typeof "tests/cases/conformance/dynamicImport/foo" +>await import("./foo") : typeof "tests/cases/conformance/dynamicImport/foo" +>import("./foo") : Promise +>"./foo" : "./foo" +>default : "./foo" +} diff --git a/tests/baselines/reference/importCallExpressionNestedESNext2.js b/tests/baselines/reference/importCallExpressionNestedESNext2.js new file mode 100644 index 00000000000..9a4d9f44f7a --- /dev/null +++ b/tests/baselines/reference/importCallExpressionNestedESNext2.js @@ -0,0 +1,59 @@ +//// [tests/cases/conformance/dynamicImport/importCallExpressionNestedESNext2.ts] //// + +//// [foo.ts] +export default "./foo"; + +//// [index.ts] +async function foo() { + return await import((await import("./foo")).default); +} + +//// [foo.js] +export default "./foo"; +//// [index.js] +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __generator = (this && this.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) try { + if (f = 1, y && (t = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [0, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +}; +function foo() { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, import("./foo")]; + case 1: return [4 /*yield*/, import((_a.sent()).default)]; + case 2: return [2 /*return*/, _a.sent()]; + } + }); + }); +} diff --git a/tests/baselines/reference/importCallExpressionNestedESNext2.symbols b/tests/baselines/reference/importCallExpressionNestedESNext2.symbols new file mode 100644 index 00000000000..67e2eabd6fd --- /dev/null +++ b/tests/baselines/reference/importCallExpressionNestedESNext2.symbols @@ -0,0 +1,12 @@ +=== tests/cases/conformance/dynamicImport/foo.ts === +export default "./foo"; +No type information for this code. +No type information for this code.=== tests/cases/conformance/dynamicImport/index.ts === +async function foo() { +>foo : Symbol(foo, Decl(index.ts, 0, 0)) + + return await import((await import("./foo")).default); +>(await import("./foo")).default : Symbol(default, Decl(foo.ts, 0, 0)) +>"./foo" : Symbol("tests/cases/conformance/dynamicImport/foo", Decl(foo.ts, 0, 0)) +>default : Symbol(default, Decl(foo.ts, 0, 0)) +} diff --git a/tests/baselines/reference/importCallExpressionNestedESNext2.types b/tests/baselines/reference/importCallExpressionNestedESNext2.types new file mode 100644 index 00000000000..2f74d78b6c8 --- /dev/null +++ b/tests/baselines/reference/importCallExpressionNestedESNext2.types @@ -0,0 +1,17 @@ +=== tests/cases/conformance/dynamicImport/foo.ts === +export default "./foo"; +No type information for this code. +No type information for this code.=== tests/cases/conformance/dynamicImport/index.ts === +async function foo() { +>foo : () => Promise + + return await import((await import("./foo")).default); +>await import((await import("./foo")).default) : any +>import((await import("./foo")).default) : Promise +>(await import("./foo")).default : "./foo" +>(await import("./foo")) : typeof "tests/cases/conformance/dynamicImport/foo" +>await import("./foo") : typeof "tests/cases/conformance/dynamicImport/foo" +>import("./foo") : Promise +>"./foo" : "./foo" +>default : "./foo" +} diff --git a/tests/baselines/reference/importCallExpressionNestedSystem.js b/tests/baselines/reference/importCallExpressionNestedSystem.js new file mode 100644 index 00000000000..839a3601e38 --- /dev/null +++ b/tests/baselines/reference/importCallExpressionNestedSystem.js @@ -0,0 +1,43 @@ +//// [tests/cases/conformance/dynamicImport/importCallExpressionNestedSystem.ts] //// + +//// [foo.ts] +export default "./foo"; + +//// [index.ts] +async function foo() { + return await import((await import("./foo")).default); +} + +//// [foo.js] +System.register([], function (exports_1, context_1) { + "use strict"; + var __moduleName = context_1 && context_1.id; + return { + setters: [], + execute: function () { + exports_1("default", "./foo"); + } + }; +}); +//// [index.js] +System.register([], function (exports_1, context_1) { + var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + var __moduleName = context_1 && context_1.id; + function foo() { + return __awaiter(this, void 0, void 0, function* () { + return yield context_1.import((yield context_1.import("./foo")).default); + }); + } + return { + setters: [], + execute: function () { + } + }; +}); diff --git a/tests/baselines/reference/importCallExpressionNestedSystem.symbols b/tests/baselines/reference/importCallExpressionNestedSystem.symbols new file mode 100644 index 00000000000..67e2eabd6fd --- /dev/null +++ b/tests/baselines/reference/importCallExpressionNestedSystem.symbols @@ -0,0 +1,12 @@ +=== tests/cases/conformance/dynamicImport/foo.ts === +export default "./foo"; +No type information for this code. +No type information for this code.=== tests/cases/conformance/dynamicImport/index.ts === +async function foo() { +>foo : Symbol(foo, Decl(index.ts, 0, 0)) + + return await import((await import("./foo")).default); +>(await import("./foo")).default : Symbol(default, Decl(foo.ts, 0, 0)) +>"./foo" : Symbol("tests/cases/conformance/dynamicImport/foo", Decl(foo.ts, 0, 0)) +>default : Symbol(default, Decl(foo.ts, 0, 0)) +} diff --git a/tests/baselines/reference/importCallExpressionNestedSystem.types b/tests/baselines/reference/importCallExpressionNestedSystem.types new file mode 100644 index 00000000000..2f74d78b6c8 --- /dev/null +++ b/tests/baselines/reference/importCallExpressionNestedSystem.types @@ -0,0 +1,17 @@ +=== tests/cases/conformance/dynamicImport/foo.ts === +export default "./foo"; +No type information for this code. +No type information for this code.=== tests/cases/conformance/dynamicImport/index.ts === +async function foo() { +>foo : () => Promise + + return await import((await import("./foo")).default); +>await import((await import("./foo")).default) : any +>import((await import("./foo")).default) : Promise +>(await import("./foo")).default : "./foo" +>(await import("./foo")) : typeof "tests/cases/conformance/dynamicImport/foo" +>await import("./foo") : typeof "tests/cases/conformance/dynamicImport/foo" +>import("./foo") : Promise +>"./foo" : "./foo" +>default : "./foo" +} diff --git a/tests/baselines/reference/importCallExpressionNestedSystem2.js b/tests/baselines/reference/importCallExpressionNestedSystem2.js new file mode 100644 index 00000000000..9b0fc20886d --- /dev/null +++ b/tests/baselines/reference/importCallExpressionNestedSystem2.js @@ -0,0 +1,76 @@ +//// [tests/cases/conformance/dynamicImport/importCallExpressionNestedSystem2.ts] //// + +//// [foo.ts] +export default "./foo"; + +//// [index.ts] +async function foo() { + return await import((await import("./foo")).default); +} + +//// [foo.js] +System.register([], function (exports_1, context_1) { + "use strict"; + var __moduleName = context_1 && context_1.id; + return { + setters: [], + execute: function () { + exports_1("default", "./foo"); + } + }; +}); +//// [index.js] +System.register([], function (exports_1, context_1) { + var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + var __generator = (this && this.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) try { + if (f = 1, y && (t = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [0, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } + }; + var __moduleName = context_1 && context_1.id; + function foo() { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, context_1.import("./foo")]; + case 1: return [4 /*yield*/, context_1.import((_a.sent()).default)]; + case 2: return [2 /*return*/, _a.sent()]; + } + }); + }); + } + return { + setters: [], + execute: function () { + } + }; +}); diff --git a/tests/baselines/reference/importCallExpressionNestedSystem2.symbols b/tests/baselines/reference/importCallExpressionNestedSystem2.symbols new file mode 100644 index 00000000000..67e2eabd6fd --- /dev/null +++ b/tests/baselines/reference/importCallExpressionNestedSystem2.symbols @@ -0,0 +1,12 @@ +=== tests/cases/conformance/dynamicImport/foo.ts === +export default "./foo"; +No type information for this code. +No type information for this code.=== tests/cases/conformance/dynamicImport/index.ts === +async function foo() { +>foo : Symbol(foo, Decl(index.ts, 0, 0)) + + return await import((await import("./foo")).default); +>(await import("./foo")).default : Symbol(default, Decl(foo.ts, 0, 0)) +>"./foo" : Symbol("tests/cases/conformance/dynamicImport/foo", Decl(foo.ts, 0, 0)) +>default : Symbol(default, Decl(foo.ts, 0, 0)) +} diff --git a/tests/baselines/reference/importCallExpressionNestedSystem2.types b/tests/baselines/reference/importCallExpressionNestedSystem2.types new file mode 100644 index 00000000000..2f74d78b6c8 --- /dev/null +++ b/tests/baselines/reference/importCallExpressionNestedSystem2.types @@ -0,0 +1,17 @@ +=== tests/cases/conformance/dynamicImport/foo.ts === +export default "./foo"; +No type information for this code. +No type information for this code.=== tests/cases/conformance/dynamicImport/index.ts === +async function foo() { +>foo : () => Promise + + return await import((await import("./foo")).default); +>await import((await import("./foo")).default) : any +>import((await import("./foo")).default) : Promise +>(await import("./foo")).default : "./foo" +>(await import("./foo")) : typeof "tests/cases/conformance/dynamicImport/foo" +>await import("./foo") : typeof "tests/cases/conformance/dynamicImport/foo" +>import("./foo") : Promise +>"./foo" : "./foo" +>default : "./foo" +} diff --git a/tests/baselines/reference/importCallExpressionNestedUMD.js b/tests/baselines/reference/importCallExpressionNestedUMD.js new file mode 100644 index 00000000000..0b1d20af8a4 --- /dev/null +++ b/tests/baselines/reference/importCallExpressionNestedUMD.js @@ -0,0 +1,51 @@ +//// [tests/cases/conformance/dynamicImport/importCallExpressionNestedUMD.ts] //// + +//// [foo.ts] +export default "./foo"; + +//// [index.ts] +async function foo() { + return await import((await import("./foo")).default); +} + +//// [foo.js] +(function (factory) { + if (typeof module === "object" && typeof module.exports === "object") { + var v = factory(require, exports); + if (v !== undefined) module.exports = v; + } + else if (typeof define === "function" && define.amd) { + define(["require", "exports"], factory); + } +})(function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.default = "./foo"; +}); +//// [index.js] +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +(function (factory) { + if (typeof module === "object" && typeof module.exports === "object") { + var v = factory(require, exports); + if (v !== undefined) module.exports = v; + } + else if (typeof define === "function" && define.amd) { + define(["require", "exports"], factory); + } +})(function (require, exports) { + "use strict"; + var __syncRequire = typeof module === "object" && typeof module.exports === "object"; + function foo() { + return __awaiter(this, void 0, void 0, function* () { + return yield _a = (yield __syncRequire ? Promise.resolve().then(() => require("./foo")) : new Promise((resolve_1, reject_1) => { require(["./foo"], resolve_1, reject_1); })).default, __syncRequire ? Promise.resolve().then(() => require(_a)) : new Promise((resolve_2, reject_2) => { require([_a], resolve_2, reject_2); }); + var _a; + }); + } +}); diff --git a/tests/baselines/reference/importCallExpressionNestedUMD.symbols b/tests/baselines/reference/importCallExpressionNestedUMD.symbols new file mode 100644 index 00000000000..67e2eabd6fd --- /dev/null +++ b/tests/baselines/reference/importCallExpressionNestedUMD.symbols @@ -0,0 +1,12 @@ +=== tests/cases/conformance/dynamicImport/foo.ts === +export default "./foo"; +No type information for this code. +No type information for this code.=== tests/cases/conformance/dynamicImport/index.ts === +async function foo() { +>foo : Symbol(foo, Decl(index.ts, 0, 0)) + + return await import((await import("./foo")).default); +>(await import("./foo")).default : Symbol(default, Decl(foo.ts, 0, 0)) +>"./foo" : Symbol("tests/cases/conformance/dynamicImport/foo", Decl(foo.ts, 0, 0)) +>default : Symbol(default, Decl(foo.ts, 0, 0)) +} diff --git a/tests/baselines/reference/importCallExpressionNestedUMD.types b/tests/baselines/reference/importCallExpressionNestedUMD.types new file mode 100644 index 00000000000..2f74d78b6c8 --- /dev/null +++ b/tests/baselines/reference/importCallExpressionNestedUMD.types @@ -0,0 +1,17 @@ +=== tests/cases/conformance/dynamicImport/foo.ts === +export default "./foo"; +No type information for this code. +No type information for this code.=== tests/cases/conformance/dynamicImport/index.ts === +async function foo() { +>foo : () => Promise + + return await import((await import("./foo")).default); +>await import((await import("./foo")).default) : any +>import((await import("./foo")).default) : Promise +>(await import("./foo")).default : "./foo" +>(await import("./foo")) : typeof "tests/cases/conformance/dynamicImport/foo" +>await import("./foo") : typeof "tests/cases/conformance/dynamicImport/foo" +>import("./foo") : Promise +>"./foo" : "./foo" +>default : "./foo" +} diff --git a/tests/baselines/reference/importCallExpressionNestedUMD2.js b/tests/baselines/reference/importCallExpressionNestedUMD2.js new file mode 100644 index 00000000000..86fd0bfa8f1 --- /dev/null +++ b/tests/baselines/reference/importCallExpressionNestedUMD2.js @@ -0,0 +1,84 @@ +//// [tests/cases/conformance/dynamicImport/importCallExpressionNestedUMD2.ts] //// + +//// [foo.ts] +export default "./foo"; + +//// [index.ts] +async function foo() { + return await import((await import("./foo")).default); +} + +//// [foo.js] +(function (factory) { + if (typeof module === "object" && typeof module.exports === "object") { + var v = factory(require, exports); + if (v !== undefined) module.exports = v; + } + else if (typeof define === "function" && define.amd) { + define(["require", "exports"], factory); + } +})(function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.default = "./foo"; +}); +//// [index.js] +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __generator = (this && this.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) try { + if (f = 1, y && (t = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [0, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +}; +(function (factory) { + if (typeof module === "object" && typeof module.exports === "object") { + var v = factory(require, exports); + if (v !== undefined) module.exports = v; + } + else if (typeof define === "function" && define.amd) { + define(["require", "exports"], factory); + } +})(function (require, exports) { + "use strict"; + var __syncRequire = typeof module === "object" && typeof module.exports === "object"; + function foo() { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, __syncRequire ? Promise.resolve().then(function () { return require("./foo"); }) : new Promise(function (resolve_1, reject_1) { require(["./foo"], resolve_1, reject_1); })]; + case 1: return [4 /*yield*/, (_b = (_a.sent()).default, __syncRequire ? Promise.resolve().then(function () { return require(_b); }) : new Promise(function (resolve_2, reject_2) { require([_b], resolve_2, reject_2); }))]; + case 2: return [2 /*return*/, _a.sent()]; + } + var _b; + }); + }); + } +}); diff --git a/tests/baselines/reference/importCallExpressionNestedUMD2.symbols b/tests/baselines/reference/importCallExpressionNestedUMD2.symbols new file mode 100644 index 00000000000..67e2eabd6fd --- /dev/null +++ b/tests/baselines/reference/importCallExpressionNestedUMD2.symbols @@ -0,0 +1,12 @@ +=== tests/cases/conformance/dynamicImport/foo.ts === +export default "./foo"; +No type information for this code. +No type information for this code.=== tests/cases/conformance/dynamicImport/index.ts === +async function foo() { +>foo : Symbol(foo, Decl(index.ts, 0, 0)) + + return await import((await import("./foo")).default); +>(await import("./foo")).default : Symbol(default, Decl(foo.ts, 0, 0)) +>"./foo" : Symbol("tests/cases/conformance/dynamicImport/foo", Decl(foo.ts, 0, 0)) +>default : Symbol(default, Decl(foo.ts, 0, 0)) +} diff --git a/tests/baselines/reference/importCallExpressionNestedUMD2.types b/tests/baselines/reference/importCallExpressionNestedUMD2.types new file mode 100644 index 00000000000..2f74d78b6c8 --- /dev/null +++ b/tests/baselines/reference/importCallExpressionNestedUMD2.types @@ -0,0 +1,17 @@ +=== tests/cases/conformance/dynamicImport/foo.ts === +export default "./foo"; +No type information for this code. +No type information for this code.=== tests/cases/conformance/dynamicImport/index.ts === +async function foo() { +>foo : () => Promise + + return await import((await import("./foo")).default); +>await import((await import("./foo")).default) : any +>import((await import("./foo")).default) : Promise +>(await import("./foo")).default : "./foo" +>(await import("./foo")) : typeof "tests/cases/conformance/dynamicImport/foo" +>await import("./foo") : typeof "tests/cases/conformance/dynamicImport/foo" +>import("./foo") : Promise +>"./foo" : "./foo" +>default : "./foo" +} diff --git a/tests/baselines/reference/importCallExpressionReturnPromiseOfAny.js b/tests/baselines/reference/importCallExpressionReturnPromiseOfAny.js index 728d6636953..8c94510b609 100644 --- a/tests/baselines/reference/importCallExpressionReturnPromiseOfAny.js +++ b/tests/baselines/reference/importCallExpressionReturnPromiseOfAny.js @@ -42,20 +42,20 @@ exports.C = C; //// [1.js] "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -Promise.resolve().then(function () { return require(`${directory}\${moduleFile}`); }); -Promise.resolve().then(function () { return require(getSpecifier()); }); -var p1 = Promise.resolve().then(function () { return require(ValidSomeCondition() ? "./0" : "externalModule"); }); -var p1 = Promise.resolve().then(function () { return require(getSpecifier()); }); -var p11 = Promise.resolve().then(function () { return require(getSpecifier()); }); -const p2 = Promise.resolve().then(function () { return require(whatToLoad ? getSpecifier() : "defaulPath"); }); +Promise.resolve().then(() => require(`${directory}\${moduleFile}`)); +Promise.resolve().then(() => require(getSpecifier())); +var p1 = Promise.resolve().then(() => require(ValidSomeCondition() ? "./0" : "externalModule")); +var p1 = Promise.resolve().then(() => require(getSpecifier())); +var p11 = Promise.resolve().then(() => require(getSpecifier())); +const p2 = Promise.resolve().then(() => require(whatToLoad ? getSpecifier() : "defaulPath")); p1.then(zero => { return zero.foo(); // ok, zero is any }); let j; -var p3 = Promise.resolve().then(function () { return require(j = getSpecifier()); }); +var p3 = Promise.resolve().then(() => require(j = getSpecifier())); function* loadModule(directories) { for (const directory of directories) { const path = `${directory}\moduleFile`; - Promise.resolve().then(function () { return require(yield path); }); + Promise.resolve().then(() => require(yield path)); } } diff --git a/tests/baselines/reference/importCallExpressionSpecifierNotStringTypeError.js b/tests/baselines/reference/importCallExpressionSpecifierNotStringTypeError.js index dde35d8048b..5e2ace1c401 100644 --- a/tests/baselines/reference/importCallExpressionSpecifierNotStringTypeError.js +++ b/tests/baselines/reference/importCallExpressionSpecifierNotStringTypeError.js @@ -15,11 +15,11 @@ var p4 = import(()=>"PathToModule"); //// [importCallExpressionSpecifierNotStringTypeError.js] // Error specifier is not assignable to string -Promise.resolve().then(function () { return require(getSpecifier()); }); -var p1 = Promise.resolve().then(function () { return require(getSpecifier()); }); -const p2 = Promise.resolve().then(function () { return require(whatToLoad ? getSpecifier() : "defaulPath"); }); +Promise.resolve().then(() => require(getSpecifier())); +var p1 = Promise.resolve().then(() => require(getSpecifier())); +const p2 = Promise.resolve().then(() => require(whatToLoad ? getSpecifier() : "defaulPath")); p1.then(zero => { return zero.foo(); // ok, zero is any }); -var p3 = Promise.resolve().then(function () { return require(["path1", "path2"]); }); -var p4 = Promise.resolve().then(function () { return require(() => "PathToModule"); }); +var p3 = Promise.resolve().then(() => require(["path1", "path2"])); +var p4 = Promise.resolve().then(() => require(() => "PathToModule")); diff --git a/tests/baselines/reference/importCallExpressionWithTypeArgument.js b/tests/baselines/reference/importCallExpressionWithTypeArgument.js index 2915669eae5..885992a798b 100644 --- a/tests/baselines/reference/importCallExpressionWithTypeArgument.js +++ b/tests/baselines/reference/importCallExpressionWithTypeArgument.js @@ -15,5 +15,5 @@ function foo() { return "foo"; } exports.foo = foo; //// [1.js] "use strict"; -var p1 = Promise.resolve().then(function () { return require("./0"); }); // error -var p2 = Promise.resolve().then(function () { return require("./0"); }); // error +var p1 = Promise.resolve().then(() => require("./0")); // error +var p2 = Promise.resolve().then(() => require("./0")); // error diff --git a/tests/baselines/reference/incorrectNumberOfTypeArgumentsDuringErrorReporting.errors.txt b/tests/baselines/reference/incorrectNumberOfTypeArgumentsDuringErrorReporting.errors.txt new file mode 100644 index 00000000000..41aadb4d465 --- /dev/null +++ b/tests/baselines/reference/incorrectNumberOfTypeArgumentsDuringErrorReporting.errors.txt @@ -0,0 +1,28 @@ +tests/cases/compiler/incorrectNumberOfTypeArgumentsDuringErrorReporting.ts(18,4): error TS2559: Type 'MyObjA' has no properties in common with type 'ObjA'. + + +==== tests/cases/compiler/incorrectNumberOfTypeArgumentsDuringErrorReporting.ts (1 errors) ==== + interface ObjA { + y?:string, + } + + interface ObjB {[key:string]:any} + + interface Opts {a:A, b:B} + + const fn = < + A extends ObjA, + B extends ObjB = ObjB + >(opts:Opts):string => 'Z' + + interface MyObjA { + x:string, + } + + fn({ + ~~~~~~ +!!! error TS2559: Type 'MyObjA' has no properties in common with type 'ObjA'. + a: {x: 'X', y: 'Y'}, + b: {}, + }) + \ No newline at end of file diff --git a/tests/baselines/reference/incorrectNumberOfTypeArgumentsDuringErrorReporting.js b/tests/baselines/reference/incorrectNumberOfTypeArgumentsDuringErrorReporting.js new file mode 100644 index 00000000000..d74360e8edc --- /dev/null +++ b/tests/baselines/reference/incorrectNumberOfTypeArgumentsDuringErrorReporting.js @@ -0,0 +1,30 @@ +//// [incorrectNumberOfTypeArgumentsDuringErrorReporting.ts] +interface ObjA { + y?:string, +} + +interface ObjB {[key:string]:any} + +interface Opts {a:A, b:B} + +const fn = < + A extends ObjA, + B extends ObjB = ObjB +>(opts:Opts):string => 'Z' + +interface MyObjA { + x:string, +} + +fn({ + a: {x: 'X', y: 'Y'}, + b: {}, +}) + + +//// [incorrectNumberOfTypeArgumentsDuringErrorReporting.js] +var fn = function (opts) { return 'Z'; }; +fn({ + a: { x: 'X', y: 'Y' }, + b: {} +}); diff --git a/tests/baselines/reference/incorrectNumberOfTypeArgumentsDuringErrorReporting.symbols b/tests/baselines/reference/incorrectNumberOfTypeArgumentsDuringErrorReporting.symbols new file mode 100644 index 00000000000..5f94ad312c0 --- /dev/null +++ b/tests/baselines/reference/incorrectNumberOfTypeArgumentsDuringErrorReporting.symbols @@ -0,0 +1,60 @@ +=== tests/cases/compiler/incorrectNumberOfTypeArgumentsDuringErrorReporting.ts === +interface ObjA { +>ObjA : Symbol(ObjA, Decl(incorrectNumberOfTypeArgumentsDuringErrorReporting.ts, 0, 0)) + + y?:string, +>y : Symbol(ObjA.y, Decl(incorrectNumberOfTypeArgumentsDuringErrorReporting.ts, 0, 16)) +} + +interface ObjB {[key:string]:any} +>ObjB : Symbol(ObjB, Decl(incorrectNumberOfTypeArgumentsDuringErrorReporting.ts, 2, 1)) +>key : Symbol(key, Decl(incorrectNumberOfTypeArgumentsDuringErrorReporting.ts, 4, 17)) + +interface Opts {a:A, b:B} +>Opts : Symbol(Opts, Decl(incorrectNumberOfTypeArgumentsDuringErrorReporting.ts, 4, 33)) +>A : Symbol(A, Decl(incorrectNumberOfTypeArgumentsDuringErrorReporting.ts, 6, 15)) +>B : Symbol(B, Decl(incorrectNumberOfTypeArgumentsDuringErrorReporting.ts, 6, 17)) +>a : Symbol(Opts.a, Decl(incorrectNumberOfTypeArgumentsDuringErrorReporting.ts, 6, 22)) +>A : Symbol(A, Decl(incorrectNumberOfTypeArgumentsDuringErrorReporting.ts, 6, 15)) +>b : Symbol(Opts.b, Decl(incorrectNumberOfTypeArgumentsDuringErrorReporting.ts, 6, 26)) +>B : Symbol(B, Decl(incorrectNumberOfTypeArgumentsDuringErrorReporting.ts, 6, 17)) + +const fn = < +>fn : Symbol(fn, Decl(incorrectNumberOfTypeArgumentsDuringErrorReporting.ts, 8, 5)) + + A extends ObjA, +>A : Symbol(A, Decl(incorrectNumberOfTypeArgumentsDuringErrorReporting.ts, 8, 12)) +>ObjA : Symbol(ObjA, Decl(incorrectNumberOfTypeArgumentsDuringErrorReporting.ts, 0, 0)) + + B extends ObjB = ObjB +>B : Symbol(B, Decl(incorrectNumberOfTypeArgumentsDuringErrorReporting.ts, 9, 17)) +>ObjB : Symbol(ObjB, Decl(incorrectNumberOfTypeArgumentsDuringErrorReporting.ts, 2, 1)) +>ObjB : Symbol(ObjB, Decl(incorrectNumberOfTypeArgumentsDuringErrorReporting.ts, 2, 1)) + +>(opts:Opts):string => 'Z' +>opts : Symbol(opts, Decl(incorrectNumberOfTypeArgumentsDuringErrorReporting.ts, 11, 2)) +>Opts : Symbol(Opts, Decl(incorrectNumberOfTypeArgumentsDuringErrorReporting.ts, 4, 33)) +>A : Symbol(A, Decl(incorrectNumberOfTypeArgumentsDuringErrorReporting.ts, 8, 12)) +>B : Symbol(B, Decl(incorrectNumberOfTypeArgumentsDuringErrorReporting.ts, 9, 17)) + +interface MyObjA { +>MyObjA : Symbol(MyObjA, Decl(incorrectNumberOfTypeArgumentsDuringErrorReporting.ts, 11, 32)) + + x:string, +>x : Symbol(MyObjA.x, Decl(incorrectNumberOfTypeArgumentsDuringErrorReporting.ts, 13, 18)) +} + +fn({ +>fn : Symbol(fn, Decl(incorrectNumberOfTypeArgumentsDuringErrorReporting.ts, 8, 5)) +>MyObjA : Symbol(MyObjA, Decl(incorrectNumberOfTypeArgumentsDuringErrorReporting.ts, 11, 32)) + + a: {x: 'X', y: 'Y'}, +>a : Symbol(a, Decl(incorrectNumberOfTypeArgumentsDuringErrorReporting.ts, 17, 12)) +>x : Symbol(x, Decl(incorrectNumberOfTypeArgumentsDuringErrorReporting.ts, 18, 6)) +>y : Symbol(y, Decl(incorrectNumberOfTypeArgumentsDuringErrorReporting.ts, 18, 13)) + + b: {}, +>b : Symbol(b, Decl(incorrectNumberOfTypeArgumentsDuringErrorReporting.ts, 18, 22)) + +}) + diff --git a/tests/baselines/reference/incorrectNumberOfTypeArgumentsDuringErrorReporting.types b/tests/baselines/reference/incorrectNumberOfTypeArgumentsDuringErrorReporting.types new file mode 100644 index 00000000000..681a05eba09 --- /dev/null +++ b/tests/baselines/reference/incorrectNumberOfTypeArgumentsDuringErrorReporting.types @@ -0,0 +1,68 @@ +=== tests/cases/compiler/incorrectNumberOfTypeArgumentsDuringErrorReporting.ts === +interface ObjA { +>ObjA : ObjA + + y?:string, +>y : string +} + +interface ObjB {[key:string]:any} +>ObjB : ObjB +>key : string + +interface Opts {a:A, b:B} +>Opts : Opts +>A : A +>B : B +>a : A +>A : A +>b : B +>B : B + +const fn = < +>fn : (opts: Opts) => string +>< A extends ObjA, B extends ObjB = ObjB>(opts:Opts):string => 'Z' : (opts: Opts) => string + + A extends ObjA, +>A : A +>ObjA : ObjA + + B extends ObjB = ObjB +>B : B +>ObjB : ObjB +>ObjB : ObjB + +>(opts:Opts):string => 'Z' +>opts : Opts +>Opts : Opts +>A : A +>B : B +>'Z' : "Z" + +interface MyObjA { +>MyObjA : MyObjA + + x:string, +>x : string +} + +fn({ +>fn({ a: {x: 'X', y: 'Y'}, b: {},}) : any +>fn : (opts: Opts) => string +>MyObjA : MyObjA +>{ a: {x: 'X', y: 'Y'}, b: {},} : { a: { x: string; y: string; }; b: {}; } + + a: {x: 'X', y: 'Y'}, +>a : { x: string; y: string; } +>{x: 'X', y: 'Y'} : { x: string; y: string; } +>x : string +>'X' : "X" +>y : string +>'Y' : "Y" + + b: {}, +>b : {} +>{} : {} + +}) + diff --git a/tests/baselines/reference/indirectTypeParameterReferences.js b/tests/baselines/reference/indirectTypeParameterReferences.js new file mode 100644 index 00000000000..f947b8f7c1f --- /dev/null +++ b/tests/baselines/reference/indirectTypeParameterReferences.js @@ -0,0 +1,49 @@ +//// [indirectTypeParameterReferences.ts] +// Repro from #19043 + +type B = {b: string} + +const flowtypes = (b: B) => { + type Combined = A & B + + const combined = (fn: (combined: Combined) => void) => null + const literal = (fn: (aPlusB: A & B) => void) => null + + return {combined, literal} +} + +const {combined, literal} = flowtypes<{a: string}>({b: 'b-value'}) + +literal(aPlusB => { + aPlusB.b + aPlusB.a +}) + +combined(comb => { + comb.b + comb.a +}) + +// Repro from #19091 + +declare function f(a: T): { a: typeof a }; +let n: number = f(2).a; + + +//// [indirectTypeParameterReferences.js] +// Repro from #19043 +var flowtypes = function (b) { + var combined = function (fn) { return null; }; + var literal = function (fn) { return null; }; + return { combined: combined, literal: literal }; +}; +var _a = flowtypes({ b: 'b-value' }), combined = _a.combined, literal = _a.literal; +literal(function (aPlusB) { + aPlusB.b; + aPlusB.a; +}); +combined(function (comb) { + comb.b; + comb.a; +}); +var n = f(2).a; diff --git a/tests/baselines/reference/indirectTypeParameterReferences.symbols b/tests/baselines/reference/indirectTypeParameterReferences.symbols new file mode 100644 index 00000000000..cf0f3e7bbc9 --- /dev/null +++ b/tests/baselines/reference/indirectTypeParameterReferences.symbols @@ -0,0 +1,91 @@ +=== tests/cases/compiler/indirectTypeParameterReferences.ts === +// Repro from #19043 + +type B = {b: string} +>B : Symbol(B, Decl(indirectTypeParameterReferences.ts, 0, 0)) +>b : Symbol(b, Decl(indirectTypeParameterReferences.ts, 2, 10)) + +const flowtypes = (b: B) => { +>flowtypes : Symbol(flowtypes, Decl(indirectTypeParameterReferences.ts, 4, 5)) +>A : Symbol(A, Decl(indirectTypeParameterReferences.ts, 4, 19)) +>b : Symbol(b, Decl(indirectTypeParameterReferences.ts, 4, 22)) +>B : Symbol(B, Decl(indirectTypeParameterReferences.ts, 0, 0)) + + type Combined = A & B +>Combined : Symbol(Combined, Decl(indirectTypeParameterReferences.ts, 4, 32)) +>A : Symbol(A, Decl(indirectTypeParameterReferences.ts, 4, 19)) +>B : Symbol(B, Decl(indirectTypeParameterReferences.ts, 0, 0)) + + const combined = (fn: (combined: Combined) => void) => null +>combined : Symbol(combined, Decl(indirectTypeParameterReferences.ts, 7, 7)) +>fn : Symbol(fn, Decl(indirectTypeParameterReferences.ts, 7, 20)) +>combined : Symbol(combined, Decl(indirectTypeParameterReferences.ts, 7, 25)) +>Combined : Symbol(Combined, Decl(indirectTypeParameterReferences.ts, 4, 32)) + + const literal = (fn: (aPlusB: A & B) => void) => null +>literal : Symbol(literal, Decl(indirectTypeParameterReferences.ts, 8, 7)) +>fn : Symbol(fn, Decl(indirectTypeParameterReferences.ts, 8, 19)) +>aPlusB : Symbol(aPlusB, Decl(indirectTypeParameterReferences.ts, 8, 24)) +>A : Symbol(A, Decl(indirectTypeParameterReferences.ts, 4, 19)) +>B : Symbol(B, Decl(indirectTypeParameterReferences.ts, 0, 0)) + + return {combined, literal} +>combined : Symbol(combined, Decl(indirectTypeParameterReferences.ts, 10, 10)) +>literal : Symbol(literal, Decl(indirectTypeParameterReferences.ts, 10, 19)) +} + +const {combined, literal} = flowtypes<{a: string}>({b: 'b-value'}) +>combined : Symbol(combined, Decl(indirectTypeParameterReferences.ts, 13, 7)) +>literal : Symbol(literal, Decl(indirectTypeParameterReferences.ts, 13, 16)) +>flowtypes : Symbol(flowtypes, Decl(indirectTypeParameterReferences.ts, 4, 5)) +>a : Symbol(a, Decl(indirectTypeParameterReferences.ts, 13, 39)) +>b : Symbol(b, Decl(indirectTypeParameterReferences.ts, 13, 52)) + +literal(aPlusB => { +>literal : Symbol(literal, Decl(indirectTypeParameterReferences.ts, 13, 16)) +>aPlusB : Symbol(aPlusB, Decl(indirectTypeParameterReferences.ts, 15, 8)) + + aPlusB.b +>aPlusB.b : Symbol(b, Decl(indirectTypeParameterReferences.ts, 2, 10)) +>aPlusB : Symbol(aPlusB, Decl(indirectTypeParameterReferences.ts, 15, 8)) +>b : Symbol(b, Decl(indirectTypeParameterReferences.ts, 2, 10)) + + aPlusB.a +>aPlusB.a : Symbol(a, Decl(indirectTypeParameterReferences.ts, 13, 39)) +>aPlusB : Symbol(aPlusB, Decl(indirectTypeParameterReferences.ts, 15, 8)) +>a : Symbol(a, Decl(indirectTypeParameterReferences.ts, 13, 39)) + +}) + +combined(comb => { +>combined : Symbol(combined, Decl(indirectTypeParameterReferences.ts, 13, 7)) +>comb : Symbol(comb, Decl(indirectTypeParameterReferences.ts, 20, 9)) + + comb.b +>comb.b : Symbol(b, Decl(indirectTypeParameterReferences.ts, 2, 10)) +>comb : Symbol(comb, Decl(indirectTypeParameterReferences.ts, 20, 9)) +>b : Symbol(b, Decl(indirectTypeParameterReferences.ts, 2, 10)) + + comb.a +>comb.a : Symbol(a, Decl(indirectTypeParameterReferences.ts, 13, 39)) +>comb : Symbol(comb, Decl(indirectTypeParameterReferences.ts, 20, 9)) +>a : Symbol(a, Decl(indirectTypeParameterReferences.ts, 13, 39)) + +}) + +// Repro from #19091 + +declare function f(a: T): { a: typeof a }; +>f : Symbol(f, Decl(indirectTypeParameterReferences.ts, 23, 2)) +>T : Symbol(T, Decl(indirectTypeParameterReferences.ts, 27, 19)) +>a : Symbol(a, Decl(indirectTypeParameterReferences.ts, 27, 22)) +>T : Symbol(T, Decl(indirectTypeParameterReferences.ts, 27, 19)) +>a : Symbol(a, Decl(indirectTypeParameterReferences.ts, 27, 30)) +>a : Symbol(a, Decl(indirectTypeParameterReferences.ts, 27, 22)) + +let n: number = f(2).a; +>n : Symbol(n, Decl(indirectTypeParameterReferences.ts, 28, 3)) +>f(2).a : Symbol(a, Decl(indirectTypeParameterReferences.ts, 27, 30)) +>f : Symbol(f, Decl(indirectTypeParameterReferences.ts, 23, 2)) +>a : Symbol(a, Decl(indirectTypeParameterReferences.ts, 27, 30)) + diff --git a/tests/baselines/reference/indirectTypeParameterReferences.types b/tests/baselines/reference/indirectTypeParameterReferences.types new file mode 100644 index 00000000000..e38f5dd2577 --- /dev/null +++ b/tests/baselines/reference/indirectTypeParameterReferences.types @@ -0,0 +1,106 @@ +=== tests/cases/compiler/indirectTypeParameterReferences.ts === +// Repro from #19043 + +type B = {b: string} +>B : B +>b : string + +const flowtypes = (b: B) => { +>flowtypes : (b: B) => { combined: (fn: (combined: A & B) => void) => any; literal: (fn: (aPlusB: A & B) => void) => any; } +>(b: B) => { type Combined = A & B const combined = (fn: (combined: Combined) => void) => null const literal = (fn: (aPlusB: A & B) => void) => null return {combined, literal}} : (b: B) => { combined: (fn: (combined: A & B) => void) => any; literal: (fn: (aPlusB: A & B) => void) => any; } +>A : A +>b : B +>B : B + + type Combined = A & B +>Combined : A & B +>A : A +>B : B + + const combined = (fn: (combined: Combined) => void) => null +>combined : (fn: (combined: A & B) => void) => any +>(fn: (combined: Combined) => void) => null : (fn: (combined: A & B) => void) => any +>fn : (combined: A & B) => void +>combined : A & B +>Combined : A & B +>null : null + + const literal = (fn: (aPlusB: A & B) => void) => null +>literal : (fn: (aPlusB: A & B) => void) => any +>(fn: (aPlusB: A & B) => void) => null : (fn: (aPlusB: A & B) => void) => any +>fn : (aPlusB: A & B) => void +>aPlusB : A & B +>A : A +>B : B +>null : null + + return {combined, literal} +>{combined, literal} : { combined: (fn: (combined: A & B) => void) => any; literal: (fn: (aPlusB: A & B) => void) => any; } +>combined : (fn: (combined: A & B) => void) => any +>literal : (fn: (aPlusB: A & B) => void) => any +} + +const {combined, literal} = flowtypes<{a: string}>({b: 'b-value'}) +>combined : (fn: (combined: { a: string; } & B) => void) => any +>literal : (fn: (aPlusB: { a: string; } & B) => void) => any +>flowtypes<{a: string}>({b: 'b-value'}) : { combined: (fn: (combined: { a: string; } & B) => void) => any; literal: (fn: (aPlusB: { a: string; } & B) => void) => any; } +>flowtypes : (b: B) => { combined: (fn: (combined: A & B) => void) => any; literal: (fn: (aPlusB: A & B) => void) => any; } +>a : string +>{b: 'b-value'} : { b: string; } +>b : string +>'b-value' : "b-value" + +literal(aPlusB => { +>literal(aPlusB => { aPlusB.b aPlusB.a}) : any +>literal : (fn: (aPlusB: { a: string; } & B) => void) => any +>aPlusB => { aPlusB.b aPlusB.a} : (aPlusB: { a: string; } & B) => void +>aPlusB : { a: string; } & B + + aPlusB.b +>aPlusB.b : string +>aPlusB : { a: string; } & B +>b : string + + aPlusB.a +>aPlusB.a : string +>aPlusB : { a: string; } & B +>a : string + +}) + +combined(comb => { +>combined(comb => { comb.b comb.a}) : any +>combined : (fn: (combined: { a: string; } & B) => void) => any +>comb => { comb.b comb.a} : (comb: { a: string; } & B) => void +>comb : { a: string; } & B + + comb.b +>comb.b : string +>comb : { a: string; } & B +>b : string + + comb.a +>comb.a : string +>comb : { a: string; } & B +>a : string + +}) + +// Repro from #19091 + +declare function f(a: T): { a: typeof a }; +>f : (a: T) => { a: T; } +>T : T +>a : T +>T : T +>a : T +>a : T + +let n: number = f(2).a; +>n : number +>f(2).a : number +>f(2) : { a: number; } +>f : (a: T) => { a: T; } +>2 : 2 +>a : number + diff --git a/tests/baselines/reference/inferFromGenericFunctionReturnTypes1.symbols b/tests/baselines/reference/inferFromGenericFunctionReturnTypes1.symbols index e18c80afcde..3060f44009b 100644 --- a/tests/baselines/reference/inferFromGenericFunctionReturnTypes1.symbols +++ b/tests/baselines/reference/inferFromGenericFunctionReturnTypes1.symbols @@ -124,9 +124,9 @@ function compose(...fns: ((x: T) => T)[]): (x: T) => T { return (x: T) => fns.reduce((prev, fn) => fn(prev), x); >x : Symbol(x, Decl(inferFromGenericFunctionReturnTypes1.ts, 27, 10)) >T : Symbol(T, Decl(inferFromGenericFunctionReturnTypes1.ts, 26, 17)) ->fns.reduce : Symbol(Array.reduce, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>fns.reduce : Symbol(Array.reduce, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >fns : Symbol(fns, Decl(inferFromGenericFunctionReturnTypes1.ts, 26, 20)) ->reduce : Symbol(Array.reduce, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>reduce : Symbol(Array.reduce, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >prev : Symbol(prev, Decl(inferFromGenericFunctionReturnTypes1.ts, 27, 31)) >fn : Symbol(fn, Decl(inferFromGenericFunctionReturnTypes1.ts, 27, 36)) >fn : Symbol(fn, Decl(inferFromGenericFunctionReturnTypes1.ts, 27, 36)) diff --git a/tests/baselines/reference/inferFromGenericFunctionReturnTypes1.types b/tests/baselines/reference/inferFromGenericFunctionReturnTypes1.types index dfbe6c2f2b6..9484b3aaa19 100644 --- a/tests/baselines/reference/inferFromGenericFunctionReturnTypes1.types +++ b/tests/baselines/reference/inferFromGenericFunctionReturnTypes1.types @@ -131,9 +131,9 @@ function compose(...fns: ((x: T) => T)[]): (x: T) => T { >x : T >T : T >fns.reduce((prev, fn) => fn(prev), x) : T ->fns.reduce : { (callbackfn: (previousValue: (x: T) => T, currentValue: (x: T) => T, currentIndex: number, array: ((x: T) => T)[]) => (x: T) => T, initialValue?: (x: T) => T): (x: T) => T; (callbackfn: (previousValue: U, currentValue: (x: T) => T, currentIndex: number, array: ((x: T) => T)[]) => U, initialValue: U): U; } +>fns.reduce : { (callbackfn: (previousValue: (x: T) => T, currentValue: (x: T) => T, currentIndex: number, array: ((x: T) => T)[]) => (x: T) => T): (x: T) => T; (callbackfn: (previousValue: (x: T) => T, currentValue: (x: T) => T, currentIndex: number, array: ((x: T) => T)[]) => (x: T) => T, initialValue: (x: T) => T): (x: T) => T; (callbackfn: (previousValue: U, currentValue: (x: T) => T, currentIndex: number, array: ((x: T) => T)[]) => U, initialValue: U): U; } >fns : ((x: T) => T)[] ->reduce : { (callbackfn: (previousValue: (x: T) => T, currentValue: (x: T) => T, currentIndex: number, array: ((x: T) => T)[]) => (x: T) => T, initialValue?: (x: T) => T): (x: T) => T; (callbackfn: (previousValue: U, currentValue: (x: T) => T, currentIndex: number, array: ((x: T) => T)[]) => U, initialValue: U): U; } +>reduce : { (callbackfn: (previousValue: (x: T) => T, currentValue: (x: T) => T, currentIndex: number, array: ((x: T) => T)[]) => (x: T) => T): (x: T) => T; (callbackfn: (previousValue: (x: T) => T, currentValue: (x: T) => T, currentIndex: number, array: ((x: T) => T)[]) => (x: T) => T, initialValue: (x: T) => T): (x: T) => T; (callbackfn: (previousValue: U, currentValue: (x: T) => T, currentIndex: number, array: ((x: T) => T)[]) => U, initialValue: U): U; } >(prev, fn) => fn(prev) : (prev: T, fn: (x: T) => T) => T >prev : T >fn : (x: T) => T diff --git a/tests/baselines/reference/inferFromGenericFunctionReturnTypes2.symbols b/tests/baselines/reference/inferFromGenericFunctionReturnTypes2.symbols index 7e4fe043b93..f7189682273 100644 --- a/tests/baselines/reference/inferFromGenericFunctionReturnTypes2.symbols +++ b/tests/baselines/reference/inferFromGenericFunctionReturnTypes2.symbols @@ -292,9 +292,9 @@ function compose(...fns: ((x: T) => T)[]): (x: T) => T { return (x: T) => fns.reduce((prev, fn) => fn(prev), x); >x : Symbol(x, Decl(inferFromGenericFunctionReturnTypes2.ts, 49, 10)) >T : Symbol(T, Decl(inferFromGenericFunctionReturnTypes2.ts, 48, 17)) ->fns.reduce : Symbol(Array.reduce, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>fns.reduce : Symbol(Array.reduce, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >fns : Symbol(fns, Decl(inferFromGenericFunctionReturnTypes2.ts, 48, 20)) ->reduce : Symbol(Array.reduce, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>reduce : Symbol(Array.reduce, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >prev : Symbol(prev, Decl(inferFromGenericFunctionReturnTypes2.ts, 49, 31)) >fn : Symbol(fn, Decl(inferFromGenericFunctionReturnTypes2.ts, 49, 36)) >fn : Symbol(fn, Decl(inferFromGenericFunctionReturnTypes2.ts, 49, 36)) diff --git a/tests/baselines/reference/inferFromGenericFunctionReturnTypes2.types b/tests/baselines/reference/inferFromGenericFunctionReturnTypes2.types index cf7752e237e..a36b7ed35be 100644 --- a/tests/baselines/reference/inferFromGenericFunctionReturnTypes2.types +++ b/tests/baselines/reference/inferFromGenericFunctionReturnTypes2.types @@ -358,9 +358,9 @@ function compose(...fns: ((x: T) => T)[]): (x: T) => T { >x : T >T : T >fns.reduce((prev, fn) => fn(prev), x) : T ->fns.reduce : { (callbackfn: (previousValue: (x: T) => T, currentValue: (x: T) => T, currentIndex: number, array: ((x: T) => T)[]) => (x: T) => T, initialValue?: (x: T) => T): (x: T) => T; (callbackfn: (previousValue: U, currentValue: (x: T) => T, currentIndex: number, array: ((x: T) => T)[]) => U, initialValue: U): U; } +>fns.reduce : { (callbackfn: (previousValue: (x: T) => T, currentValue: (x: T) => T, currentIndex: number, array: ((x: T) => T)[]) => (x: T) => T): (x: T) => T; (callbackfn: (previousValue: (x: T) => T, currentValue: (x: T) => T, currentIndex: number, array: ((x: T) => T)[]) => (x: T) => T, initialValue: (x: T) => T): (x: T) => T; (callbackfn: (previousValue: U, currentValue: (x: T) => T, currentIndex: number, array: ((x: T) => T)[]) => U, initialValue: U): U; } >fns : ((x: T) => T)[] ->reduce : { (callbackfn: (previousValue: (x: T) => T, currentValue: (x: T) => T, currentIndex: number, array: ((x: T) => T)[]) => (x: T) => T, initialValue?: (x: T) => T): (x: T) => T; (callbackfn: (previousValue: U, currentValue: (x: T) => T, currentIndex: number, array: ((x: T) => T)[]) => U, initialValue: U): U; } +>reduce : { (callbackfn: (previousValue: (x: T) => T, currentValue: (x: T) => T, currentIndex: number, array: ((x: T) => T)[]) => (x: T) => T): (x: T) => T; (callbackfn: (previousValue: (x: T) => T, currentValue: (x: T) => T, currentIndex: number, array: ((x: T) => T)[]) => (x: T) => T, initialValue: (x: T) => T): (x: T) => T; (callbackfn: (previousValue: U, currentValue: (x: T) => T, currentIndex: number, array: ((x: T) => T)[]) => U, initialValue: U): U; } >(prev, fn) => fn(prev) : (prev: T, fn: (x: T) => T) => T >prev : T >fn : (x: T) => T diff --git a/tests/baselines/reference/inferredIndexerOnNamespaceImport.js b/tests/baselines/reference/inferredIndexerOnNamespaceImport.js new file mode 100644 index 00000000000..10fbc0890b7 --- /dev/null +++ b/tests/baselines/reference/inferredIndexerOnNamespaceImport.js @@ -0,0 +1,28 @@ +//// [tests/cases/compiler/inferredIndexerOnNamespaceImport.ts] //// + +//// [foo.ts] +export const x = 3; +export const y = 5; + +//// [bar.ts] +import * as foo from "./foo"; + +function f(map: { [k: string]: number }) { + // ... +} + +f(foo); + +//// [foo.js] +"use strict"; +exports.__esModule = true; +exports.x = 3; +exports.y = 5; +//// [bar.js] +"use strict"; +exports.__esModule = true; +var foo = require("./foo"); +function f(map) { + // ... +} +f(foo); diff --git a/tests/baselines/reference/inferredIndexerOnNamespaceImport.symbols b/tests/baselines/reference/inferredIndexerOnNamespaceImport.symbols new file mode 100644 index 00000000000..ea0337ee9c2 --- /dev/null +++ b/tests/baselines/reference/inferredIndexerOnNamespaceImport.symbols @@ -0,0 +1,23 @@ +=== tests/cases/compiler/foo.ts === +export const x = 3; +>x : Symbol(x, Decl(foo.ts, 0, 12)) + +export const y = 5; +>y : Symbol(y, Decl(foo.ts, 1, 12)) + +=== tests/cases/compiler/bar.ts === +import * as foo from "./foo"; +>foo : Symbol(foo, Decl(bar.ts, 0, 6)) + +function f(map: { [k: string]: number }) { +>f : Symbol(f, Decl(bar.ts, 0, 29)) +>map : Symbol(map, Decl(bar.ts, 2, 11)) +>k : Symbol(k, Decl(bar.ts, 2, 19)) + + // ... +} + +f(foo); +>f : Symbol(f, Decl(bar.ts, 0, 29)) +>foo : Symbol(foo, Decl(bar.ts, 0, 6)) + diff --git a/tests/baselines/reference/inferredIndexerOnNamespaceImport.types b/tests/baselines/reference/inferredIndexerOnNamespaceImport.types new file mode 100644 index 00000000000..4a88b2330a0 --- /dev/null +++ b/tests/baselines/reference/inferredIndexerOnNamespaceImport.types @@ -0,0 +1,26 @@ +=== tests/cases/compiler/foo.ts === +export const x = 3; +>x : 3 +>3 : 3 + +export const y = 5; +>y : 5 +>5 : 5 + +=== tests/cases/compiler/bar.ts === +import * as foo from "./foo"; +>foo : typeof foo + +function f(map: { [k: string]: number }) { +>f : (map: { [k: string]: number; }) => void +>map : { [k: string]: number; } +>k : string + + // ... +} + +f(foo); +>f(foo) : void +>f : (map: { [k: string]: number; }) => void +>foo : typeof foo + diff --git a/tests/baselines/reference/jsFileCompilationBindMultipleDefaultExports.errors.txt b/tests/baselines/reference/jsFileCompilationBindMultipleDefaultExports.errors.txt index 9a9a7a12db9..246b8f20cac 100644 --- a/tests/baselines/reference/jsFileCompilationBindMultipleDefaultExports.errors.txt +++ b/tests/baselines/reference/jsFileCompilationBindMultipleDefaultExports.errors.txt @@ -1,6 +1,6 @@ tests/cases/compiler/a.js(1,22): error TS2528: A module cannot have multiple default exports. tests/cases/compiler/a.js(1,22): error TS2652: Merged declaration 'a' cannot include a default export declaration. Consider adding a separate 'export default a' declaration instead. -tests/cases/compiler/a.js(3,1): error TS2528: A module cannot have multiple default exports. +tests/cases/compiler/a.js(3,15): error TS2528: A module cannot have multiple default exports. tests/cases/compiler/a.js(3,16): error TS1109: Expression expected. tests/cases/compiler/a.js(3,20): error TS2652: Merged declaration 'a' cannot include a default export declaration. Consider adding a separate 'export default a' declaration instead. @@ -13,7 +13,7 @@ tests/cases/compiler/a.js(3,20): error TS2652: Merged declaration 'a' cannot inc !!! error TS2652: Merged declaration 'a' cannot include a default export declaration. Consider adding a separate 'export default a' declaration instead. } export default var a = 10; - ~~~~~~~~~~~~~~ + !!! error TS2528: A module cannot have multiple default exports. ~~~ !!! error TS1109: Expression expected. diff --git a/tests/baselines/reference/jsFileCompilationRestParamJsDocFunction.types b/tests/baselines/reference/jsFileCompilationRestParamJsDocFunction.types index 54bc7938689..72c3388f226 100644 --- a/tests/baselines/reference/jsFileCompilationRestParamJsDocFunction.types +++ b/tests/baselines/reference/jsFileCompilationRestParamJsDocFunction.types @@ -10,7 +10,7 @@ * @returns {*} Returns the result of `func`. */ function apply(func, thisArg, args) { ->apply : (func: Function, thisArg: any, ...args: any[]) => any +>apply : (func: Function, thisArg: any, args: any[]) => any >func : Function >thisArg : any >args : any[] @@ -84,5 +84,5 @@ function apply(func, thisArg, args) { } export default apply; ->apply : (func: Function, thisArg: any, ...args: any[]) => any +>apply : (func: Function, thisArg: any, args: any[]) => any diff --git a/tests/baselines/reference/jsdocAugments_notAClass.errors.txt b/tests/baselines/reference/jsdocAugments_notAClass.errors.txt index 9f8528f0cd8..daf20aaf884 100644 --- a/tests/baselines/reference/jsdocAugments_notAClass.errors.txt +++ b/tests/baselines/reference/jsdocAugments_notAClass.errors.txt @@ -1,4 +1,4 @@ -/b.js(3,10): error TS8022: JSDoc '@augments' is not attached to a class declaration. +/b.js(3,10): error TS8022: JSDoc '@augments' is not attached to a class. ==== /b.js (1 errors) ==== @@ -6,5 +6,5 @@ /** @augments A */ function b() {} ~ -!!! error TS8022: JSDoc '@augments' is not attached to a class declaration. +!!! error TS8022: JSDoc '@augments' is not attached to a class. \ No newline at end of file diff --git a/tests/baselines/reference/jsdocPrefixPostfixParsing.types b/tests/baselines/reference/jsdocPrefixPostfixParsing.types index b5ddec68cba..9961af48e27 100644 --- a/tests/baselines/reference/jsdocPrefixPostfixParsing.types +++ b/tests/baselines/reference/jsdocPrefixPostfixParsing.types @@ -16,7 +16,7 @@ * @param {...number?[]!} k - (number[] | null)[] */ function f(x, y, z, a, b, c, d, e, f, g, h, i, j, k) { ->f : (x: number[], y: number[], z: number[], a: (number | null)[], b: number[] | null, c: number[] | null, d: number[] | null, ...e: (number | null)[], f: number[] | null, g: number[] | null, h: number[] | null, i: number[][], j: number[][] | null, k: (number[] | null)[]) => void +>f : (x: number[], y: number[], z: number[], a: (number | null)[], b: number[] | null, c: number[] | null, d: number[] | null, e: (number | null)[], f: number[] | null, g: number[] | null, h: number[] | null, i: number[][], j: number[][] | null, k: (number[] | null)[]) => void >x : number[] >y : number[] >z : number[] diff --git a/tests/baselines/reference/jsdocTypedef_propertyWithNoType.symbols b/tests/baselines/reference/jsdocTypedef_propertyWithNoType.symbols new file mode 100644 index 00000000000..0bac06e2e61 --- /dev/null +++ b/tests/baselines/reference/jsdocTypedef_propertyWithNoType.symbols @@ -0,0 +1,11 @@ +=== /a.js === +/** + * @typedef Foo + * @property foo + */ + +/** @type {Foo} */ +const x = { foo: 0 }; +>x : Symbol(x, Decl(a.js, 6, 5)) +>foo : Symbol(foo, Decl(a.js, 6, 11)) + diff --git a/tests/baselines/reference/jsdocTypedef_propertyWithNoType.types b/tests/baselines/reference/jsdocTypedef_propertyWithNoType.types new file mode 100644 index 00000000000..7d7326fc80c --- /dev/null +++ b/tests/baselines/reference/jsdocTypedef_propertyWithNoType.types @@ -0,0 +1,13 @@ +=== /a.js === +/** + * @typedef Foo + * @property foo + */ + +/** @type {Foo} */ +const x = { foo: 0 }; +>x : { foo: any; } +>{ foo: 0 } : { foo: number; } +>foo : number +>0 : 0 + diff --git a/tests/baselines/reference/metadataOfClassFromAlias.js b/tests/baselines/reference/metadataOfClassFromAlias.js index 307702cd7bf..77ae5c33898 100644 --- a/tests/baselines/reference/metadataOfClassFromAlias.js +++ b/tests/baselines/reference/metadataOfClassFromAlias.js @@ -43,7 +43,7 @@ var ClassA = /** @class */ (function () { } __decorate([ annotation(), - __metadata("design:type", Object) + __metadata("design:type", auxiliry_1.SomeClass) ], ClassA.prototype, "array", void 0); return ClassA; }()); diff --git a/tests/baselines/reference/metadataOfUnionWithNull.js b/tests/baselines/reference/metadataOfUnionWithNull.js index 80d24709b73..7bf9aeb8650 100644 --- a/tests/baselines/reference/metadataOfUnionWithNull.js +++ b/tests/baselines/reference/metadataOfUnionWithNull.js @@ -63,15 +63,15 @@ var B = /** @class */ (function () { } __decorate([ PropDeco, - __metadata("design:type", Object) + __metadata("design:type", String) ], B.prototype, "x"); __decorate([ PropDeco, - __metadata("design:type", Object) + __metadata("design:type", Boolean) ], B.prototype, "y"); __decorate([ PropDeco, - __metadata("design:type", Object) + __metadata("design:type", String) ], B.prototype, "z"); __decorate([ PropDeco, @@ -87,11 +87,11 @@ var B = /** @class */ (function () { ], B.prototype, "c"); __decorate([ PropDeco, - __metadata("design:type", Object) + __metadata("design:type", void 0) ], B.prototype, "d"); __decorate([ PropDeco, - __metadata("design:type", Object) + __metadata("design:type", typeof Symbol === "function" ? Symbol : Object) ], B.prototype, "e"); __decorate([ PropDeco, @@ -99,15 +99,15 @@ var B = /** @class */ (function () { ], B.prototype, "f"); __decorate([ PropDeco, - __metadata("design:type", Object) + __metadata("design:type", A) ], B.prototype, "g"); __decorate([ PropDeco, - __metadata("design:type", Object) + __metadata("design:type", B) ], B.prototype, "h"); __decorate([ PropDeco, - __metadata("design:type", Object) + __metadata("design:type", typeof Symbol === "function" ? Symbol : Object) ], B.prototype, "j"); return B; }()); diff --git a/tests/baselines/reference/multipleDefaultExports01.errors.txt b/tests/baselines/reference/multipleDefaultExports01.errors.txt index b53d4113ded..eff0203387c 100644 --- a/tests/baselines/reference/multipleDefaultExports01.errors.txt +++ b/tests/baselines/reference/multipleDefaultExports01.errors.txt @@ -1,6 +1,6 @@ tests/cases/conformance/es6/modules/m1.ts(1,22): error TS2528: A module cannot have multiple default exports. tests/cases/conformance/es6/modules/m1.ts(5,25): error TS2528: A module cannot have multiple default exports. -tests/cases/conformance/es6/modules/m1.ts(10,1): error TS2528: A module cannot have multiple default exports. +tests/cases/conformance/es6/modules/m1.ts(10,16): error TS2528: A module cannot have multiple default exports. tests/cases/conformance/es6/modules/m2.ts(3,1): error TS2348: Value of type 'typeof foo' is not callable. Did you mean to include 'new'? @@ -19,7 +19,7 @@ tests/cases/conformance/es6/modules/m2.ts(3,1): error TS2348: Value of type 'typ var x = 10; export default x; - ~~~~~~~~~~~~~~~~~ + ~ !!! error TS2528: A module cannot have multiple default exports. ==== tests/cases/conformance/es6/modules/m2.ts (1 errors) ==== diff --git a/tests/baselines/reference/multipleExportAssignments.errors.txt b/tests/baselines/reference/multipleExportAssignments.errors.txt index 5fbabc2b4db..c9f5eb7cf79 100644 --- a/tests/baselines/reference/multipleExportAssignments.errors.txt +++ b/tests/baselines/reference/multipleExportAssignments.errors.txt @@ -1,5 +1,5 @@ -tests/cases/compiler/multipleExportAssignments.ts(13,1): error TS2300: Duplicate identifier 'export='. -tests/cases/compiler/multipleExportAssignments.ts(14,1): error TS2300: Duplicate identifier 'export='. +tests/cases/compiler/multipleExportAssignments.ts(13,10): error TS2300: Duplicate identifier 'export='. +tests/cases/compiler/multipleExportAssignments.ts(14,10): error TS2300: Duplicate identifier 'export='. ==== tests/cases/compiler/multipleExportAssignments.ts (2 errors) ==== @@ -16,10 +16,10 @@ tests/cases/compiler/multipleExportAssignments.ts(14,1): error TS2300: Duplicate test2(): connectModule; }; export = server; - ~~~~~~~~~~~~~~~~ + ~~~~~~ !!! error TS2300: Duplicate identifier 'export='. export = connectExport; - ~~~~~~~~~~~~~~~~~~~~~~~ + ~~~~~~~~~~~~~ !!! error TS2300: Duplicate identifier 'export='. \ No newline at end of file diff --git a/tests/baselines/reference/multipleExportAssignmentsInAmbientDeclaration.errors.txt b/tests/baselines/reference/multipleExportAssignmentsInAmbientDeclaration.errors.txt index c6427a5cc28..792e2dd5968 100644 --- a/tests/baselines/reference/multipleExportAssignmentsInAmbientDeclaration.errors.txt +++ b/tests/baselines/reference/multipleExportAssignmentsInAmbientDeclaration.errors.txt @@ -1,5 +1,5 @@ -tests/cases/compiler/multipleExportAssignmentsInAmbientDeclaration.ts(4,5): error TS2300: Duplicate identifier 'export='. -tests/cases/compiler/multipleExportAssignmentsInAmbientDeclaration.ts(5,5): error TS2300: Duplicate identifier 'export='. +tests/cases/compiler/multipleExportAssignmentsInAmbientDeclaration.ts(4,14): error TS2300: Duplicate identifier 'export='. +tests/cases/compiler/multipleExportAssignmentsInAmbientDeclaration.ts(5,14): error TS2300: Duplicate identifier 'export='. ==== tests/cases/compiler/multipleExportAssignmentsInAmbientDeclaration.ts (2 errors) ==== @@ -7,9 +7,9 @@ tests/cases/compiler/multipleExportAssignmentsInAmbientDeclaration.ts(5,5): erro var a: number var b: number; export = a; - ~~~~~~~~~~~ + ~ !!! error TS2300: Duplicate identifier 'export='. export = b; - ~~~~~~~~~~~ + ~ !!! error TS2300: Duplicate identifier 'export='. } \ No newline at end of file diff --git a/tests/baselines/reference/mutuallyRecursiveCallbacks.errors.txt b/tests/baselines/reference/mutuallyRecursiveCallbacks.errors.txt new file mode 100644 index 00000000000..0682caad5b8 --- /dev/null +++ b/tests/baselines/reference/mutuallyRecursiveCallbacks.errors.txt @@ -0,0 +1,24 @@ +tests/cases/compiler/mutuallyRecursiveCallbacks.ts(7,1): error TS2322: Type '(bar: Bar) => void' is not assignable to type 'Bar<{}>'. + Types of parameters 'bar' and 'foo' are incompatible. + Types of parameters 'bar' and 'foo' are incompatible. + Type 'Foo<{}>' is not assignable to type 'Bar<{}>'. + Types of parameters 'bar' and 'foo' are incompatible. + Type 'void' is not assignable to type 'Foo<{}>'. + + +==== tests/cases/compiler/mutuallyRecursiveCallbacks.ts (1 errors) ==== + // Repro from #18277 + + interface Foo { (bar: Bar): void }; + type Bar = (foo: Foo) => Foo; + declare function foo(bar: Bar): void; + declare var bar: Bar<{}>; + bar = foo; + ~~~ +!!! error TS2322: Type '(bar: Bar) => void' is not assignable to type 'Bar<{}>'. +!!! error TS2322: Types of parameters 'bar' and 'foo' are incompatible. +!!! error TS2322: Types of parameters 'bar' and 'foo' are incompatible. +!!! error TS2322: Type 'Foo<{}>' is not assignable to type 'Bar<{}>'. +!!! error TS2322: Types of parameters 'bar' and 'foo' are incompatible. +!!! error TS2322: Type 'void' is not assignable to type 'Foo<{}>'. + \ No newline at end of file diff --git a/tests/baselines/reference/mutuallyRecursiveCallbacks.js b/tests/baselines/reference/mutuallyRecursiveCallbacks.js new file mode 100644 index 00000000000..df52508df7a --- /dev/null +++ b/tests/baselines/reference/mutuallyRecursiveCallbacks.js @@ -0,0 +1,14 @@ +//// [mutuallyRecursiveCallbacks.ts] +// Repro from #18277 + +interface Foo { (bar: Bar): void }; +type Bar = (foo: Foo) => Foo; +declare function foo(bar: Bar): void; +declare var bar: Bar<{}>; +bar = foo; + + +//// [mutuallyRecursiveCallbacks.js] +// Repro from #18277 +; +bar = foo; diff --git a/tests/baselines/reference/mutuallyRecursiveCallbacks.symbols b/tests/baselines/reference/mutuallyRecursiveCallbacks.symbols new file mode 100644 index 00000000000..50cb0c0dea0 --- /dev/null +++ b/tests/baselines/reference/mutuallyRecursiveCallbacks.symbols @@ -0,0 +1,34 @@ +=== tests/cases/compiler/mutuallyRecursiveCallbacks.ts === +// Repro from #18277 + +interface Foo { (bar: Bar): void }; +>Foo : Symbol(Foo, Decl(mutuallyRecursiveCallbacks.ts, 0, 0)) +>T : Symbol(T, Decl(mutuallyRecursiveCallbacks.ts, 2, 14)) +>bar : Symbol(bar, Decl(mutuallyRecursiveCallbacks.ts, 2, 20)) +>Bar : Symbol(Bar, Decl(mutuallyRecursiveCallbacks.ts, 2, 41)) +>T : Symbol(T, Decl(mutuallyRecursiveCallbacks.ts, 2, 14)) + +type Bar = (foo: Foo) => Foo; +>Bar : Symbol(Bar, Decl(mutuallyRecursiveCallbacks.ts, 2, 41)) +>T : Symbol(T, Decl(mutuallyRecursiveCallbacks.ts, 3, 9)) +>foo : Symbol(foo, Decl(mutuallyRecursiveCallbacks.ts, 3, 15)) +>Foo : Symbol(Foo, Decl(mutuallyRecursiveCallbacks.ts, 0, 0)) +>T : Symbol(T, Decl(mutuallyRecursiveCallbacks.ts, 3, 9)) +>Foo : Symbol(Foo, Decl(mutuallyRecursiveCallbacks.ts, 0, 0)) +>T : Symbol(T, Decl(mutuallyRecursiveCallbacks.ts, 3, 9)) + +declare function foo(bar: Bar): void; +>foo : Symbol(foo, Decl(mutuallyRecursiveCallbacks.ts, 3, 38)) +>T : Symbol(T, Decl(mutuallyRecursiveCallbacks.ts, 4, 21)) +>bar : Symbol(bar, Decl(mutuallyRecursiveCallbacks.ts, 4, 24)) +>Bar : Symbol(Bar, Decl(mutuallyRecursiveCallbacks.ts, 2, 41)) +>T : Symbol(T, Decl(mutuallyRecursiveCallbacks.ts, 4, 21)) + +declare var bar: Bar<{}>; +>bar : Symbol(bar, Decl(mutuallyRecursiveCallbacks.ts, 5, 11)) +>Bar : Symbol(Bar, Decl(mutuallyRecursiveCallbacks.ts, 2, 41)) + +bar = foo; +>bar : Symbol(bar, Decl(mutuallyRecursiveCallbacks.ts, 5, 11)) +>foo : Symbol(foo, Decl(mutuallyRecursiveCallbacks.ts, 3, 38)) + diff --git a/tests/baselines/reference/mutuallyRecursiveCallbacks.types b/tests/baselines/reference/mutuallyRecursiveCallbacks.types new file mode 100644 index 00000000000..4a7b4dd0493 --- /dev/null +++ b/tests/baselines/reference/mutuallyRecursiveCallbacks.types @@ -0,0 +1,35 @@ +=== tests/cases/compiler/mutuallyRecursiveCallbacks.ts === +// Repro from #18277 + +interface Foo { (bar: Bar): void }; +>Foo : Foo +>T : T +>bar : Bar +>Bar : Bar +>T : T + +type Bar = (foo: Foo) => Foo; +>Bar : Bar +>T : T +>foo : Foo +>Foo : Foo +>T : T +>Foo : Foo +>T : T + +declare function foo(bar: Bar): void; +>foo : (bar: Bar) => void +>T : T +>bar : Bar +>Bar : Bar +>T : T + +declare var bar: Bar<{}>; +>bar : Bar<{}> +>Bar : Bar + +bar = foo; +>bar = foo : (bar: Bar) => void +>bar : Bar<{}> +>foo : (bar: Bar) => void + diff --git a/tests/baselines/reference/noUnusedLocals_selfReference.errors.txt b/tests/baselines/reference/noUnusedLocals_selfReference.errors.txt index e4a0d478cb4..603bc54d448 100644 --- a/tests/baselines/reference/noUnusedLocals_selfReference.errors.txt +++ b/tests/baselines/reference/noUnusedLocals_selfReference.errors.txt @@ -1,14 +1,22 @@ tests/cases/compiler/noUnusedLocals_selfReference.ts(3,10): error TS6133: 'f' is declared but its value is never read. -tests/cases/compiler/noUnusedLocals_selfReference.ts(4,7): error TS6133: 'C' is declared but its value is never read. -tests/cases/compiler/noUnusedLocals_selfReference.ts(7,6): error TS6133: 'E' is declared but its value is never read. +tests/cases/compiler/noUnusedLocals_selfReference.ts(5,14): error TS6133: 'g' is declared but its value is never read. +tests/cases/compiler/noUnusedLocals_selfReference.ts(9,7): error TS6133: 'C' is declared but its value is never read. +tests/cases/compiler/noUnusedLocals_selfReference.ts(12,6): error TS6133: 'E' is declared but its value is never read. -==== tests/cases/compiler/noUnusedLocals_selfReference.ts (3 errors) ==== +==== tests/cases/compiler/noUnusedLocals_selfReference.ts (4 errors) ==== export {}; // Make this a module scope, so these are local variables. - function f() { f; } + function f() { ~ !!! error TS6133: 'f' is declared but its value is never read. + f; + function g() { + ~ +!!! error TS6133: 'g' is declared but its value is never read. + g; + } + } class C { ~ !!! error TS6133: 'C' is declared but its value is never read. diff --git a/tests/baselines/reference/noUnusedLocals_selfReference.js b/tests/baselines/reference/noUnusedLocals_selfReference.js index 5f206fbc3dc..a8f3d6a8aed 100644 --- a/tests/baselines/reference/noUnusedLocals_selfReference.js +++ b/tests/baselines/reference/noUnusedLocals_selfReference.js @@ -1,7 +1,12 @@ //// [noUnusedLocals_selfReference.ts] export {}; // Make this a module scope, so these are local variables. -function f() { f; } +function f() { + f; + function g() { + g; + } +} class C { m() { C; } } @@ -19,7 +24,12 @@ P; //// [noUnusedLocals_selfReference.js] "use strict"; exports.__esModule = true; -function f() { f; } +function f() { + f; + function g() { + g; + } +} var C = /** @class */ (function () { function C() { } diff --git a/tests/baselines/reference/noUnusedLocals_selfReference.symbols b/tests/baselines/reference/noUnusedLocals_selfReference.symbols index dcd815b2619..015a78d87d3 100644 --- a/tests/baselines/reference/noUnusedLocals_selfReference.symbols +++ b/tests/baselines/reference/noUnusedLocals_selfReference.symbols @@ -1,43 +1,52 @@ === tests/cases/compiler/noUnusedLocals_selfReference.ts === export {}; // Make this a module scope, so these are local variables. -function f() { f; } ->f : Symbol(f, Decl(noUnusedLocals_selfReference.ts, 0, 10)) +function f() { >f : Symbol(f, Decl(noUnusedLocals_selfReference.ts, 0, 10)) + f; +>f : Symbol(f, Decl(noUnusedLocals_selfReference.ts, 0, 10)) + + function g() { +>g : Symbol(g, Decl(noUnusedLocals_selfReference.ts, 3, 6)) + + g; +>g : Symbol(g, Decl(noUnusedLocals_selfReference.ts, 3, 6)) + } +} class C { ->C : Symbol(C, Decl(noUnusedLocals_selfReference.ts, 2, 19)) +>C : Symbol(C, Decl(noUnusedLocals_selfReference.ts, 7, 1)) m() { C; } ->m : Symbol(C.m, Decl(noUnusedLocals_selfReference.ts, 3, 9)) ->C : Symbol(C, Decl(noUnusedLocals_selfReference.ts, 2, 19)) +>m : Symbol(C.m, Decl(noUnusedLocals_selfReference.ts, 8, 9)) +>C : Symbol(C, Decl(noUnusedLocals_selfReference.ts, 7, 1)) } enum E { A = 0, B = E.A } ->E : Symbol(E, Decl(noUnusedLocals_selfReference.ts, 5, 1)) ->A : Symbol(E.A, Decl(noUnusedLocals_selfReference.ts, 6, 8)) ->B : Symbol(E.B, Decl(noUnusedLocals_selfReference.ts, 6, 15)) ->E.A : Symbol(E.A, Decl(noUnusedLocals_selfReference.ts, 6, 8)) ->E : Symbol(E, Decl(noUnusedLocals_selfReference.ts, 5, 1)) ->A : Symbol(E.A, Decl(noUnusedLocals_selfReference.ts, 6, 8)) +>E : Symbol(E, Decl(noUnusedLocals_selfReference.ts, 10, 1)) +>A : Symbol(E.A, Decl(noUnusedLocals_selfReference.ts, 11, 8)) +>B : Symbol(E.B, Decl(noUnusedLocals_selfReference.ts, 11, 15)) +>E.A : Symbol(E.A, Decl(noUnusedLocals_selfReference.ts, 11, 8)) +>E : Symbol(E, Decl(noUnusedLocals_selfReference.ts, 10, 1)) +>A : Symbol(E.A, Decl(noUnusedLocals_selfReference.ts, 11, 8)) // Does not detect mutual recursion. function g() { D; } ->g : Symbol(g, Decl(noUnusedLocals_selfReference.ts, 6, 25)) ->D : Symbol(D, Decl(noUnusedLocals_selfReference.ts, 9, 19)) +>g : Symbol(g, Decl(noUnusedLocals_selfReference.ts, 11, 25)) +>D : Symbol(D, Decl(noUnusedLocals_selfReference.ts, 14, 19)) class D { m() { g; } } ->D : Symbol(D, Decl(noUnusedLocals_selfReference.ts, 9, 19)) ->m : Symbol(D.m, Decl(noUnusedLocals_selfReference.ts, 10, 9)) ->g : Symbol(g, Decl(noUnusedLocals_selfReference.ts, 6, 25)) +>D : Symbol(D, Decl(noUnusedLocals_selfReference.ts, 14, 19)) +>m : Symbol(D.m, Decl(noUnusedLocals_selfReference.ts, 15, 9)) +>g : Symbol(g, Decl(noUnusedLocals_selfReference.ts, 11, 25)) // Does not work on private methods. class P { private m() { this.m; } } ->P : Symbol(P, Decl(noUnusedLocals_selfReference.ts, 10, 22)) ->m : Symbol(P.m, Decl(noUnusedLocals_selfReference.ts, 13, 9)) ->this.m : Symbol(P.m, Decl(noUnusedLocals_selfReference.ts, 13, 9)) ->this : Symbol(P, Decl(noUnusedLocals_selfReference.ts, 10, 22)) ->m : Symbol(P.m, Decl(noUnusedLocals_selfReference.ts, 13, 9)) +>P : Symbol(P, Decl(noUnusedLocals_selfReference.ts, 15, 22)) +>m : Symbol(P.m, Decl(noUnusedLocals_selfReference.ts, 18, 9)) +>this.m : Symbol(P.m, Decl(noUnusedLocals_selfReference.ts, 18, 9)) +>this : Symbol(P, Decl(noUnusedLocals_selfReference.ts, 15, 22)) +>m : Symbol(P.m, Decl(noUnusedLocals_selfReference.ts, 18, 9)) P; ->P : Symbol(P, Decl(noUnusedLocals_selfReference.ts, 10, 22)) +>P : Symbol(P, Decl(noUnusedLocals_selfReference.ts, 15, 22)) diff --git a/tests/baselines/reference/noUnusedLocals_selfReference.types b/tests/baselines/reference/noUnusedLocals_selfReference.types index 7d2741c5681..7e75062db34 100644 --- a/tests/baselines/reference/noUnusedLocals_selfReference.types +++ b/tests/baselines/reference/noUnusedLocals_selfReference.types @@ -1,10 +1,19 @@ === tests/cases/compiler/noUnusedLocals_selfReference.ts === export {}; // Make this a module scope, so these are local variables. -function f() { f; } ->f : () => void +function f() { >f : () => void + f; +>f : () => void + + function g() { +>g : () => void + + g; +>g : () => void + } +} class C { >C : C diff --git a/tests/baselines/reference/objectRestParameter.types b/tests/baselines/reference/objectRestParameter.types index 3d0d1bb619b..831ac9df59f 100644 --- a/tests/baselines/reference/objectRestParameter.types +++ b/tests/baselines/reference/objectRestParameter.types @@ -77,7 +77,7 @@ class C { } function foobar({ bar={}, ...opts }: any = {}) { >foobar : ({ bar, ...opts }?: any) => void ->bar : {} +>bar : any >{} : {} >opts : any >{} : {} diff --git a/tests/baselines/reference/objectRestParameterES5.types b/tests/baselines/reference/objectRestParameterES5.types index e0ebee39317..1b8dd29e29e 100644 --- a/tests/baselines/reference/objectRestParameterES5.types +++ b/tests/baselines/reference/objectRestParameterES5.types @@ -77,7 +77,7 @@ class C { } function foobar({ bar={}, ...opts }: any = {}) { >foobar : ({ bar, ...opts }?: any) => void ->bar : {} +>bar : any >{} : {} >opts : any >{} : {} diff --git a/tests/baselines/reference/objectSpreadIndexSignature.errors.txt b/tests/baselines/reference/objectSpreadIndexSignature.errors.txt new file mode 100644 index 00000000000..ee7425909c2 --- /dev/null +++ b/tests/baselines/reference/objectSpreadIndexSignature.errors.txt @@ -0,0 +1,19 @@ +tests/cases/conformance/types/spread/objectSpreadIndexSignature.ts(6,1): error TS7017: Element implicitly has an 'any' type because type '{ b: number; a: number; }' has no index signature. + + +==== tests/cases/conformance/types/spread/objectSpreadIndexSignature.ts (1 errors) ==== + declare let indexed1: { [n: string]: number; a: number; }; + declare let indexed2: { [n: string]: boolean; c: boolean; }; + declare let indexed3: { [n: string]: number }; + let i = { ...indexed1, b: 11 }; + // only indexed has indexer, so i[101]: any + i[101]; + ~~~~~~ +!!! error TS7017: Element implicitly has an 'any' type because type '{ b: number; a: number; }' has no index signature. + let ii = { ...indexed1, ...indexed2 }; + // both have indexer, so i[1001]: number | boolean + ii[1001]; + + declare const b: boolean; + indexed3 = { ...b ? indexed3 : undefined }; + \ No newline at end of file diff --git a/tests/baselines/reference/objectSpreadIndexSignature.js b/tests/baselines/reference/objectSpreadIndexSignature.js index 22e92e6a844..283129036da 100644 --- a/tests/baselines/reference/objectSpreadIndexSignature.js +++ b/tests/baselines/reference/objectSpreadIndexSignature.js @@ -1,23 +1,20 @@ //// [objectSpreadIndexSignature.ts] -interface Indexed { - [n: string]: number; - a: number; -} -interface Indexed2 { - [n: string]: boolean; - c: boolean; -} -let indexed: Indexed; -let indexed2: Indexed2; -let i = { ...indexed, b: 11 }; +declare let indexed1: { [n: string]: number; a: number; }; +declare let indexed2: { [n: string]: boolean; c: boolean; }; +declare let indexed3: { [n: string]: number }; +let i = { ...indexed1, b: 11 }; // only indexed has indexer, so i[101]: any i[101]; -let ii = { ...indexed, ...indexed2 }; +let ii = { ...indexed1, ...indexed2 }; // both have indexer, so i[1001]: number | boolean ii[1001]; + +declare const b: boolean; +indexed3 = { ...b ? indexed3 : undefined }; //// [objectSpreadIndexSignature.js] +"use strict"; var __assign = (this && this.__assign) || Object.assign || function(t) { for (var s, i = 1, n = arguments.length; i < n; i++) { s = arguments[i]; @@ -26,11 +23,10 @@ var __assign = (this && this.__assign) || Object.assign || function(t) { } return t; }; -var indexed; -var indexed2; -var i = __assign({}, indexed, { b: 11 }); +var i = __assign({}, indexed1, { b: 11 }); // only indexed has indexer, so i[101]: any i[101]; -var ii = __assign({}, indexed, indexed2); +var ii = __assign({}, indexed1, indexed2); // both have indexer, so i[1001]: number | boolean ii[1001]; +indexed3 = __assign({}, b ? indexed3 : undefined); diff --git a/tests/baselines/reference/objectSpreadIndexSignature.symbols b/tests/baselines/reference/objectSpreadIndexSignature.symbols index cd64b157196..d08cfff53ff 100644 --- a/tests/baselines/reference/objectSpreadIndexSignature.symbols +++ b/tests/baselines/reference/objectSpreadIndexSignature.symbols @@ -1,45 +1,42 @@ === tests/cases/conformance/types/spread/objectSpreadIndexSignature.ts === -interface Indexed { ->Indexed : Symbol(Indexed, Decl(objectSpreadIndexSignature.ts, 0, 0)) +declare let indexed1: { [n: string]: number; a: number; }; +>indexed1 : Symbol(indexed1, Decl(objectSpreadIndexSignature.ts, 0, 11)) +>n : Symbol(n, Decl(objectSpreadIndexSignature.ts, 0, 25)) +>a : Symbol(a, Decl(objectSpreadIndexSignature.ts, 0, 44)) - [n: string]: number; ->n : Symbol(n, Decl(objectSpreadIndexSignature.ts, 1, 5)) +declare let indexed2: { [n: string]: boolean; c: boolean; }; +>indexed2 : Symbol(indexed2, Decl(objectSpreadIndexSignature.ts, 1, 11)) +>n : Symbol(n, Decl(objectSpreadIndexSignature.ts, 1, 25)) +>c : Symbol(c, Decl(objectSpreadIndexSignature.ts, 1, 45)) - a: number; ->a : Symbol(Indexed.a, Decl(objectSpreadIndexSignature.ts, 1, 24)) -} -interface Indexed2 { ->Indexed2 : Symbol(Indexed2, Decl(objectSpreadIndexSignature.ts, 3, 1)) +declare let indexed3: { [n: string]: number }; +>indexed3 : Symbol(indexed3, Decl(objectSpreadIndexSignature.ts, 2, 11)) +>n : Symbol(n, Decl(objectSpreadIndexSignature.ts, 2, 25)) - [n: string]: boolean; ->n : Symbol(n, Decl(objectSpreadIndexSignature.ts, 5, 5)) - - c: boolean; ->c : Symbol(Indexed2.c, Decl(objectSpreadIndexSignature.ts, 5, 25)) -} -let indexed: Indexed; ->indexed : Symbol(indexed, Decl(objectSpreadIndexSignature.ts, 8, 3)) ->Indexed : Symbol(Indexed, Decl(objectSpreadIndexSignature.ts, 0, 0)) - -let indexed2: Indexed2; ->indexed2 : Symbol(indexed2, Decl(objectSpreadIndexSignature.ts, 9, 3)) ->Indexed2 : Symbol(Indexed2, Decl(objectSpreadIndexSignature.ts, 3, 1)) - -let i = { ...indexed, b: 11 }; ->i : Symbol(i, Decl(objectSpreadIndexSignature.ts, 10, 3)) ->indexed : Symbol(indexed, Decl(objectSpreadIndexSignature.ts, 8, 3)) ->b : Symbol(b, Decl(objectSpreadIndexSignature.ts, 10, 21)) +let i = { ...indexed1, b: 11 }; +>i : Symbol(i, Decl(objectSpreadIndexSignature.ts, 3, 3)) +>indexed1 : Symbol(indexed1, Decl(objectSpreadIndexSignature.ts, 0, 11)) +>b : Symbol(b, Decl(objectSpreadIndexSignature.ts, 3, 22)) // only indexed has indexer, so i[101]: any i[101]; ->i : Symbol(i, Decl(objectSpreadIndexSignature.ts, 10, 3)) +>i : Symbol(i, Decl(objectSpreadIndexSignature.ts, 3, 3)) -let ii = { ...indexed, ...indexed2 }; ->ii : Symbol(ii, Decl(objectSpreadIndexSignature.ts, 13, 3)) ->indexed : Symbol(indexed, Decl(objectSpreadIndexSignature.ts, 8, 3)) ->indexed2 : Symbol(indexed2, Decl(objectSpreadIndexSignature.ts, 9, 3)) +let ii = { ...indexed1, ...indexed2 }; +>ii : Symbol(ii, Decl(objectSpreadIndexSignature.ts, 6, 3)) +>indexed1 : Symbol(indexed1, Decl(objectSpreadIndexSignature.ts, 0, 11)) +>indexed2 : Symbol(indexed2, Decl(objectSpreadIndexSignature.ts, 1, 11)) // both have indexer, so i[1001]: number | boolean ii[1001]; ->ii : Symbol(ii, Decl(objectSpreadIndexSignature.ts, 13, 3)) +>ii : Symbol(ii, Decl(objectSpreadIndexSignature.ts, 6, 3)) + +declare const b: boolean; +>b : Symbol(b, Decl(objectSpreadIndexSignature.ts, 10, 13)) + +indexed3 = { ...b ? indexed3 : undefined }; +>indexed3 : Symbol(indexed3, Decl(objectSpreadIndexSignature.ts, 2, 11)) +>b : Symbol(b, Decl(objectSpreadIndexSignature.ts, 10, 13)) +>indexed3 : Symbol(indexed3, Decl(objectSpreadIndexSignature.ts, 2, 11)) +>undefined : Symbol(undefined) diff --git a/tests/baselines/reference/objectSpreadIndexSignature.types b/tests/baselines/reference/objectSpreadIndexSignature.types index 5eebc2ffa02..eff3b04b8f6 100644 --- a/tests/baselines/reference/objectSpreadIndexSignature.types +++ b/tests/baselines/reference/objectSpreadIndexSignature.types @@ -1,34 +1,22 @@ === tests/cases/conformance/types/spread/objectSpreadIndexSignature.ts === -interface Indexed { ->Indexed : Indexed - - [n: string]: number; +declare let indexed1: { [n: string]: number; a: number; }; +>indexed1 : { [n: string]: number; a: number; } >n : string - - a: number; >a : number -} -interface Indexed2 { ->Indexed2 : Indexed2 - [n: string]: boolean; +declare let indexed2: { [n: string]: boolean; c: boolean; }; +>indexed2 : { [n: string]: boolean; c: boolean; } +>n : string +>c : boolean + +declare let indexed3: { [n: string]: number }; +>indexed3 : { [n: string]: number; } >n : string - c: boolean; ->c : boolean -} -let indexed: Indexed; ->indexed : Indexed ->Indexed : Indexed - -let indexed2: Indexed2; ->indexed2 : Indexed2 ->Indexed2 : Indexed2 - -let i = { ...indexed, b: 11 }; +let i = { ...indexed1, b: 11 }; >i : { b: number; a: number; } ->{ ...indexed, b: 11 } : { b: number; a: number; } ->indexed : Indexed +>{ ...indexed1, b: 11 } : { b: number; a: number; } +>indexed1 : { [n: string]: number; a: number; } >b : number >11 : 11 @@ -38,11 +26,11 @@ i[101]; >i : { b: number; a: number; } >101 : 101 -let ii = { ...indexed, ...indexed2 }; +let ii = { ...indexed1, ...indexed2 }; >ii : { [x: string]: number | boolean; c: boolean; a: number; } ->{ ...indexed, ...indexed2 } : { [x: string]: number | boolean; c: boolean; a: number; } ->indexed : Indexed ->indexed2 : Indexed2 +>{ ...indexed1, ...indexed2 } : { [x: string]: number | boolean; c: boolean; a: number; } +>indexed1 : { [n: string]: number; a: number; } +>indexed2 : { [n: string]: boolean; c: boolean; } // both have indexer, so i[1001]: number | boolean ii[1001]; @@ -50,3 +38,15 @@ ii[1001]; >ii : { [x: string]: number | boolean; c: boolean; a: number; } >1001 : 1001 +declare const b: boolean; +>b : boolean + +indexed3 = { ...b ? indexed3 : undefined }; +>indexed3 = { ...b ? indexed3 : undefined } : {} | { [n: string]: number; } +>indexed3 : { [n: string]: number; } +>{ ...b ? indexed3 : undefined } : {} | { [n: string]: number; } +>b ? indexed3 : undefined : { [n: string]: number; } | undefined +>b : boolean +>indexed3 : { [n: string]: number; } +>undefined : undefined + diff --git a/tests/baselines/reference/parserharness.symbols b/tests/baselines/reference/parserharness.symbols index 94ae5c87901..8382d6ab41a 100644 --- a/tests/baselines/reference/parserharness.symbols +++ b/tests/baselines/reference/parserharness.symbols @@ -4692,7 +4692,7 @@ module Harness { var minDistFromStart = entries.map(x => x.editRange.minChar).reduce((prev, current) => Math.min(prev, current)); >minDistFromStart : Symbol(minDistFromStart, Decl(parserharness.ts, 1595, 15)) ->entries.map(x => x.editRange.minChar).reduce : Symbol(Array.reduce, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>entries.map(x => x.editRange.minChar).reduce : Symbol(Array.reduce, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >entries.map : Symbol(Array.map, Decl(lib.d.ts, --, --)) >entries : Symbol(entries, Decl(parserharness.ts, 1593, 15)) >map : Symbol(Array.map, Decl(lib.d.ts, --, --)) @@ -4700,7 +4700,7 @@ module Harness { >x.editRange : Symbol(editRange, Decl(parserharness.ts, 1547, 44)) >x : Symbol(x, Decl(parserharness.ts, 1595, 47)) >editRange : Symbol(editRange, Decl(parserharness.ts, 1547, 44)) ->reduce : Symbol(Array.reduce, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>reduce : Symbol(Array.reduce, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >prev : Symbol(prev, Decl(parserharness.ts, 1595, 81)) >current : Symbol(current, Decl(parserharness.ts, 1595, 86)) >Math.min : Symbol(Math.min, Decl(lib.d.ts, --, --)) @@ -4711,7 +4711,7 @@ module Harness { var minDistFromEnd = entries.map(x => x.length - x.editRange.limChar).reduce((prev, current) => Math.min(prev, current)); >minDistFromEnd : Symbol(minDistFromEnd, Decl(parserharness.ts, 1596, 15)) ->entries.map(x => x.length - x.editRange.limChar).reduce : Symbol(Array.reduce, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>entries.map(x => x.length - x.editRange.limChar).reduce : Symbol(Array.reduce, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >entries.map : Symbol(Array.map, Decl(lib.d.ts, --, --)) >entries : Symbol(entries, Decl(parserharness.ts, 1593, 15)) >map : Symbol(Array.map, Decl(lib.d.ts, --, --)) @@ -4722,7 +4722,7 @@ module Harness { >x.editRange : Symbol(editRange, Decl(parserharness.ts, 1547, 44)) >x : Symbol(x, Decl(parserharness.ts, 1596, 45)) >editRange : Symbol(editRange, Decl(parserharness.ts, 1547, 44)) ->reduce : Symbol(Array.reduce, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>reduce : Symbol(Array.reduce, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >prev : Symbol(prev, Decl(parserharness.ts, 1596, 90)) >current : Symbol(current, Decl(parserharness.ts, 1596, 95)) >Math.min : Symbol(Math.min, Decl(lib.d.ts, --, --)) @@ -4733,7 +4733,7 @@ module Harness { var aggDelta = entries.map(x => x.editRange.delta).reduce((prev, current) => prev + current); >aggDelta : Symbol(aggDelta, Decl(parserharness.ts, 1597, 15)) ->entries.map(x => x.editRange.delta).reduce : Symbol(Array.reduce, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>entries.map(x => x.editRange.delta).reduce : Symbol(Array.reduce, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >entries.map : Symbol(Array.map, Decl(lib.d.ts, --, --)) >entries : Symbol(entries, Decl(parserharness.ts, 1593, 15)) >map : Symbol(Array.map, Decl(lib.d.ts, --, --)) @@ -4741,7 +4741,7 @@ module Harness { >x.editRange : Symbol(editRange, Decl(parserharness.ts, 1547, 44)) >x : Symbol(x, Decl(parserharness.ts, 1597, 39)) >editRange : Symbol(editRange, Decl(parserharness.ts, 1547, 44)) ->reduce : Symbol(Array.reduce, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>reduce : Symbol(Array.reduce, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >prev : Symbol(prev, Decl(parserharness.ts, 1597, 71)) >current : Symbol(current, Decl(parserharness.ts, 1597, 76)) >prev : Symbol(prev, Decl(parserharness.ts, 1597, 71)) diff --git a/tests/baselines/reference/parserharness.types b/tests/baselines/reference/parserharness.types index 2fd260f5d2b..6ea78e22f2f 100644 --- a/tests/baselines/reference/parserharness.types +++ b/tests/baselines/reference/parserharness.types @@ -6604,7 +6604,7 @@ module Harness { var minDistFromStart = entries.map(x => x.editRange.minChar).reduce((prev, current) => Math.min(prev, current)); >minDistFromStart : any >entries.map(x => x.editRange.minChar).reduce((prev, current) => Math.min(prev, current)) : any ->entries.map(x => x.editRange.minChar).reduce : { (callbackfn: (previousValue: any, currentValue: any, currentIndex: number, array: any[]) => any, initialValue?: any): any; (callbackfn: (previousValue: U, currentValue: any, currentIndex: number, array: any[]) => U, initialValue: U): U; } +>entries.map(x => x.editRange.minChar).reduce : { (callbackfn: (previousValue: any, currentValue: any, currentIndex: number, array: any[]) => any): any; (callbackfn: (previousValue: any, currentValue: any, currentIndex: number, array: any[]) => any, initialValue: any): any; (callbackfn: (previousValue: U, currentValue: any, currentIndex: number, array: any[]) => U, initialValue: U): U; } >entries.map(x => x.editRange.minChar) : any[] >entries.map : (callbackfn: (value: { length: number; editRange: any; }, index: number, array: { length: number; editRange: any; }[]) => U, thisArg?: any) => U[] >entries : { length: number; editRange: any; }[] @@ -6616,7 +6616,7 @@ module Harness { >x : { length: number; editRange: any; } >editRange : any >minChar : any ->reduce : { (callbackfn: (previousValue: any, currentValue: any, currentIndex: number, array: any[]) => any, initialValue?: any): any; (callbackfn: (previousValue: U, currentValue: any, currentIndex: number, array: any[]) => U, initialValue: U): U; } +>reduce : { (callbackfn: (previousValue: any, currentValue: any, currentIndex: number, array: any[]) => any): any; (callbackfn: (previousValue: any, currentValue: any, currentIndex: number, array: any[]) => any, initialValue: any): any; (callbackfn: (previousValue: U, currentValue: any, currentIndex: number, array: any[]) => U, initialValue: U): U; } >(prev, current) => Math.min(prev, current) : (prev: any, current: any) => number >prev : any >current : any @@ -6630,7 +6630,7 @@ module Harness { var minDistFromEnd = entries.map(x => x.length - x.editRange.limChar).reduce((prev, current) => Math.min(prev, current)); >minDistFromEnd : number >entries.map(x => x.length - x.editRange.limChar).reduce((prev, current) => Math.min(prev, current)) : number ->entries.map(x => x.length - x.editRange.limChar).reduce : { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue?: number): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; } +>entries.map(x => x.length - x.editRange.limChar).reduce : { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number): number; (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue: number): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; } >entries.map(x => x.length - x.editRange.limChar) : number[] >entries.map : (callbackfn: (value: { length: number; editRange: any; }, index: number, array: { length: number; editRange: any; }[]) => U, thisArg?: any) => U[] >entries : { length: number; editRange: any; }[] @@ -6646,7 +6646,7 @@ module Harness { >x : { length: number; editRange: any; } >editRange : any >limChar : any ->reduce : { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue?: number): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; } +>reduce : { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number): number; (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue: number): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; } >(prev, current) => Math.min(prev, current) : (prev: number, current: number) => number >prev : number >current : number @@ -6660,7 +6660,7 @@ module Harness { var aggDelta = entries.map(x => x.editRange.delta).reduce((prev, current) => prev + current); >aggDelta : any >entries.map(x => x.editRange.delta).reduce((prev, current) => prev + current) : any ->entries.map(x => x.editRange.delta).reduce : { (callbackfn: (previousValue: any, currentValue: any, currentIndex: number, array: any[]) => any, initialValue?: any): any; (callbackfn: (previousValue: U, currentValue: any, currentIndex: number, array: any[]) => U, initialValue: U): U; } +>entries.map(x => x.editRange.delta).reduce : { (callbackfn: (previousValue: any, currentValue: any, currentIndex: number, array: any[]) => any): any; (callbackfn: (previousValue: any, currentValue: any, currentIndex: number, array: any[]) => any, initialValue: any): any; (callbackfn: (previousValue: U, currentValue: any, currentIndex: number, array: any[]) => U, initialValue: U): U; } >entries.map(x => x.editRange.delta) : any[] >entries.map : (callbackfn: (value: { length: number; editRange: any; }, index: number, array: { length: number; editRange: any; }[]) => U, thisArg?: any) => U[] >entries : { length: number; editRange: any; }[] @@ -6672,7 +6672,7 @@ module Harness { >x : { length: number; editRange: any; } >editRange : any >delta : any ->reduce : { (callbackfn: (previousValue: any, currentValue: any, currentIndex: number, array: any[]) => any, initialValue?: any): any; (callbackfn: (previousValue: U, currentValue: any, currentIndex: number, array: any[]) => U, initialValue: U): U; } +>reduce : { (callbackfn: (previousValue: any, currentValue: any, currentIndex: number, array: any[]) => any): any; (callbackfn: (previousValue: any, currentValue: any, currentIndex: number, array: any[]) => any, initialValue: any): any; (callbackfn: (previousValue: U, currentValue: any, currentIndex: number, array: any[]) => U, initialValue: U): U; } >(prev, current) => prev + current : (prev: any, current: any) => any >prev : any >current : any diff --git a/tests/baselines/reference/potentiallyUncalledDecorators.errors.txt b/tests/baselines/reference/potentiallyUncalledDecorators.errors.txt new file mode 100644 index 00000000000..9028ebe0377 --- /dev/null +++ b/tests/baselines/reference/potentiallyUncalledDecorators.errors.txt @@ -0,0 +1,174 @@ +tests/cases/compiler/potentiallyUncalledDecorators.ts(4,5): error TS1329: 'Input' accepts too few arguments to be used as a decorator here. Did you mean to call it first and write '@Input()'? +tests/cases/compiler/potentiallyUncalledDecorators.ts(35,1): error TS1329: 'noArgs' accepts too few arguments to be used as a decorator here. Did you mean to call it first and write '@noArgs()'? +tests/cases/compiler/potentiallyUncalledDecorators.ts(37,5): error TS1329: 'noArgs' accepts too few arguments to be used as a decorator here. Did you mean to call it first and write '@noArgs()'? +tests/cases/compiler/potentiallyUncalledDecorators.ts(38,5): error TS1329: 'noArgs' accepts too few arguments to be used as a decorator here. Did you mean to call it first and write '@noArgs()'? +tests/cases/compiler/potentiallyUncalledDecorators.ts(41,1): error TS1238: Unable to resolve signature of class decorator when called as an expression. + Type 'OmniDecorator' is not assignable to type 'typeof B'. + Type 'OmniDecorator' provides no match for the signature 'new (): B'. +tests/cases/compiler/potentiallyUncalledDecorators.ts(43,5): error TS1236: The return type of a property decorator function must be either 'void' or 'any'. + Unable to resolve signature of property decorator when called as an expression. +tests/cases/compiler/potentiallyUncalledDecorators.ts(44,5): error TS1241: Unable to resolve signature of method decorator when called as an expression. + Type 'OmniDecorator' has no properties in common with type 'TypedPropertyDescriptor<() => void>'. +tests/cases/compiler/potentiallyUncalledDecorators.ts(47,1): error TS1238: Unable to resolve signature of class decorator when called as an expression. + Type 'OmniDecorator' is not assignable to type 'typeof C'. + Type 'OmniDecorator' provides no match for the signature 'new (): C'. +tests/cases/compiler/potentiallyUncalledDecorators.ts(49,5): error TS1329: 'oneOptional' accepts too few arguments to be used as a decorator here. Did you mean to call it first and write '@oneOptional()'? +tests/cases/compiler/potentiallyUncalledDecorators.ts(50,5): error TS1329: 'oneOptional' accepts too few arguments to be used as a decorator here. Did you mean to call it first and write '@oneOptional()'? +tests/cases/compiler/potentiallyUncalledDecorators.ts(53,1): error TS1238: Unable to resolve signature of class decorator when called as an expression. + Type 'OmniDecorator' is not assignable to type 'typeof D'. + Type 'OmniDecorator' provides no match for the signature 'new (): D'. +tests/cases/compiler/potentiallyUncalledDecorators.ts(55,5): error TS1236: The return type of a property decorator function must be either 'void' or 'any'. + Unable to resolve signature of property decorator when called as an expression. +tests/cases/compiler/potentiallyUncalledDecorators.ts(56,5): error TS1241: Unable to resolve signature of method decorator when called as an expression. + Type 'OmniDecorator' has no properties in common with type 'TypedPropertyDescriptor<() => void>'. +tests/cases/compiler/potentiallyUncalledDecorators.ts(59,1): error TS1238: Unable to resolve signature of class decorator when called as an expression. + Type 'OmniDecorator' is not assignable to type 'typeof E'. + Type 'OmniDecorator' provides no match for the signature 'new (): E'. +tests/cases/compiler/potentiallyUncalledDecorators.ts(61,5): error TS1236: The return type of a property decorator function must be either 'void' or 'any'. + Unable to resolve signature of property decorator when called as an expression. +tests/cases/compiler/potentiallyUncalledDecorators.ts(62,5): error TS1241: Unable to resolve signature of method decorator when called as an expression. + Type 'OmniDecorator' has no properties in common with type 'TypedPropertyDescriptor<() => void>'. +tests/cases/compiler/potentiallyUncalledDecorators.ts(65,1): error TS1238: Unable to resolve signature of class decorator when called as an expression. + Type 'OmniDecorator' is not assignable to type 'typeof F'. + Type 'OmniDecorator' provides no match for the signature 'new (): F'. +tests/cases/compiler/potentiallyUncalledDecorators.ts(67,5): error TS1236: The return type of a property decorator function must be either 'void' or 'any'. + Unable to resolve signature of property decorator when called as an expression. +tests/cases/compiler/potentiallyUncalledDecorators.ts(68,5): error TS1241: Unable to resolve signature of method decorator when called as an expression. + Type 'OmniDecorator' has no properties in common with type 'TypedPropertyDescriptor<() => void>'. + + +==== tests/cases/compiler/potentiallyUncalledDecorators.ts (19 errors) ==== + // Angular-style Input/Output API: + declare function Input(bindingPropertyName?: string): any; + class FooComponent { + @Input foo: string; + ~~~~~~ +!!! error TS1329: 'Input' accepts too few arguments to be used as a decorator here. Did you mean to call it first and write '@Input()'? + } + + // Glimmer-style tracked API: + declare const tracked: PropertyDecorator & { (...watchedProperties: string[]): any; } + + class Person { + @tracked person; any; + } + + class MultiplyByTwo { + args: any; + @tracked('args') + get multiplied() { + return this.args.number * 2; + } + } + + // Other fun stuff. + + interface OmniDecorator extends MethodDecorator, ClassDecorator, PropertyDecorator { + } + + declare function noArgs(): OmniDecorator; + declare function allRest(...args: any[]): OmniDecorator; + declare function oneOptional(x?: any): OmniDecorator; + declare function twoOptional(x?: any, y?: any): OmniDecorator; + declare function threeOptional(x?: any, y?: any, z?: any): OmniDecorator; + declare function oneOptionalWithRest(x?: any, ...args: any[]): OmniDecorator; + declare const anyDec: any; + + @noArgs + ~~~~~~~ +!!! error TS1329: 'noArgs' accepts too few arguments to be used as a decorator here. Did you mean to call it first and write '@noArgs()'? + class A { + @noArgs foo: any; + ~~~~~~~ +!!! error TS1329: 'noArgs' accepts too few arguments to be used as a decorator here. Did you mean to call it first and write '@noArgs()'? + @noArgs bar() { } + ~~~~~~~ +!!! error TS1329: 'noArgs' accepts too few arguments to be used as a decorator here. Did you mean to call it first and write '@noArgs()'? + } + + @allRest + ~~~~~~~~ +!!! error TS1238: Unable to resolve signature of class decorator when called as an expression. +!!! error TS1238: Type 'OmniDecorator' is not assignable to type 'typeof B'. +!!! error TS1238: Type 'OmniDecorator' provides no match for the signature 'new (): B'. + class B { + @allRest foo: any; + ~~~~~~~~ +!!! error TS1236: The return type of a property decorator function must be either 'void' or 'any'. +!!! error TS1236: Unable to resolve signature of property decorator when called as an expression. + @allRest bar() { } + ~~~~~~~~ +!!! error TS1241: Unable to resolve signature of method decorator when called as an expression. +!!! error TS1241: Type 'OmniDecorator' has no properties in common with type 'TypedPropertyDescriptor<() => void>'. + } + + @oneOptional + ~~~~~~~~~~~~ +!!! error TS1238: Unable to resolve signature of class decorator when called as an expression. +!!! error TS1238: Type 'OmniDecorator' is not assignable to type 'typeof C'. +!!! error TS1238: Type 'OmniDecorator' provides no match for the signature 'new (): C'. + class C { + @oneOptional foo: any; + ~~~~~~~~~~~~ +!!! error TS1329: 'oneOptional' accepts too few arguments to be used as a decorator here. Did you mean to call it first and write '@oneOptional()'? + @oneOptional bar() { } + ~~~~~~~~~~~~ +!!! error TS1329: 'oneOptional' accepts too few arguments to be used as a decorator here. Did you mean to call it first and write '@oneOptional()'? + } + + @twoOptional + ~~~~~~~~~~~~ +!!! error TS1238: Unable to resolve signature of class decorator when called as an expression. +!!! error TS1238: Type 'OmniDecorator' is not assignable to type 'typeof D'. +!!! error TS1238: Type 'OmniDecorator' provides no match for the signature 'new (): D'. + class D { + @twoOptional foo: any; + ~~~~~~~~~~~~ +!!! error TS1236: The return type of a property decorator function must be either 'void' or 'any'. +!!! error TS1236: Unable to resolve signature of property decorator when called as an expression. + @twoOptional bar() { } + ~~~~~~~~~~~~ +!!! error TS1241: Unable to resolve signature of method decorator when called as an expression. +!!! error TS1241: Type 'OmniDecorator' has no properties in common with type 'TypedPropertyDescriptor<() => void>'. + } + + @threeOptional + ~~~~~~~~~~~~~~ +!!! error TS1238: Unable to resolve signature of class decorator when called as an expression. +!!! error TS1238: Type 'OmniDecorator' is not assignable to type 'typeof E'. +!!! error TS1238: Type 'OmniDecorator' provides no match for the signature 'new (): E'. + class E { + @threeOptional foo: any; + ~~~~~~~~~~~~~~ +!!! error TS1236: The return type of a property decorator function must be either 'void' or 'any'. +!!! error TS1236: Unable to resolve signature of property decorator when called as an expression. + @threeOptional bar() { } + ~~~~~~~~~~~~~~ +!!! error TS1241: Unable to resolve signature of method decorator when called as an expression. +!!! error TS1241: Type 'OmniDecorator' has no properties in common with type 'TypedPropertyDescriptor<() => void>'. + } + + @oneOptionalWithRest + ~~~~~~~~~~~~~~~~~~~~ +!!! error TS1238: Unable to resolve signature of class decorator when called as an expression. +!!! error TS1238: Type 'OmniDecorator' is not assignable to type 'typeof F'. +!!! error TS1238: Type 'OmniDecorator' provides no match for the signature 'new (): F'. + class F { + @oneOptionalWithRest foo: any; + ~~~~~~~~~~~~~~~~~~~~ +!!! error TS1236: The return type of a property decorator function must be either 'void' or 'any'. +!!! error TS1236: Unable to resolve signature of property decorator when called as an expression. + @oneOptionalWithRest bar() { } + ~~~~~~~~~~~~~~~~~~~~ +!!! error TS1241: Unable to resolve signature of method decorator when called as an expression. +!!! error TS1241: Type 'OmniDecorator' has no properties in common with type 'TypedPropertyDescriptor<() => void>'. + } + + @anyDec + class G { + @anyDec foo: any; + @anyDec bar() { } + } + + export { }; + \ No newline at end of file diff --git a/tests/baselines/reference/potentiallyUncalledDecorators.js b/tests/baselines/reference/potentiallyUncalledDecorators.js new file mode 100644 index 00000000000..b69f848a8c9 --- /dev/null +++ b/tests/baselines/reference/potentiallyUncalledDecorators.js @@ -0,0 +1,189 @@ +//// [potentiallyUncalledDecorators.ts] +// Angular-style Input/Output API: +declare function Input(bindingPropertyName?: string): any; +class FooComponent { + @Input foo: string; +} + +// Glimmer-style tracked API: +declare const tracked: PropertyDecorator & { (...watchedProperties: string[]): any; } + +class Person { + @tracked person; any; +} + +class MultiplyByTwo { + args: any; + @tracked('args') + get multiplied() { + return this.args.number * 2; + } +} + +// Other fun stuff. + +interface OmniDecorator extends MethodDecorator, ClassDecorator, PropertyDecorator { +} + +declare function noArgs(): OmniDecorator; +declare function allRest(...args: any[]): OmniDecorator; +declare function oneOptional(x?: any): OmniDecorator; +declare function twoOptional(x?: any, y?: any): OmniDecorator; +declare function threeOptional(x?: any, y?: any, z?: any): OmniDecorator; +declare function oneOptionalWithRest(x?: any, ...args: any[]): OmniDecorator; +declare const anyDec: any; + +@noArgs +class A { + @noArgs foo: any; + @noArgs bar() { } +} + +@allRest +class B { + @allRest foo: any; + @allRest bar() { } +} + +@oneOptional +class C { + @oneOptional foo: any; + @oneOptional bar() { } +} + +@twoOptional +class D { + @twoOptional foo: any; + @twoOptional bar() { } +} + +@threeOptional +class E { + @threeOptional foo: any; + @threeOptional bar() { } +} + +@oneOptionalWithRest +class F { + @oneOptionalWithRest foo: any; + @oneOptionalWithRest bar() { } +} + +@anyDec +class G { + @anyDec foo: any; + @anyDec bar() { } +} + +export { }; + + +//// [potentiallyUncalledDecorators.js] +var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; +}; +class FooComponent { +} +__decorate([ + Input +], FooComponent.prototype, "foo", void 0); +class Person { +} +__decorate([ + tracked +], Person.prototype, "person", void 0); +class MultiplyByTwo { + get multiplied() { + return this.args.number * 2; + } +} +__decorate([ + tracked('args') +], MultiplyByTwo.prototype, "multiplied", null); +let A = class A { + bar() { } +}; +__decorate([ + noArgs +], A.prototype, "foo", void 0); +__decorate([ + noArgs +], A.prototype, "bar", null); +A = __decorate([ + noArgs +], A); +let B = class B { + bar() { } +}; +__decorate([ + allRest +], B.prototype, "foo", void 0); +__decorate([ + allRest +], B.prototype, "bar", null); +B = __decorate([ + allRest +], B); +let C = class C { + bar() { } +}; +__decorate([ + oneOptional +], C.prototype, "foo", void 0); +__decorate([ + oneOptional +], C.prototype, "bar", null); +C = __decorate([ + oneOptional +], C); +let D = class D { + bar() { } +}; +__decorate([ + twoOptional +], D.prototype, "foo", void 0); +__decorate([ + twoOptional +], D.prototype, "bar", null); +D = __decorate([ + twoOptional +], D); +let E = class E { + bar() { } +}; +__decorate([ + threeOptional +], E.prototype, "foo", void 0); +__decorate([ + threeOptional +], E.prototype, "bar", null); +E = __decorate([ + threeOptional +], E); +let F = class F { + bar() { } +}; +__decorate([ + oneOptionalWithRest +], F.prototype, "foo", void 0); +__decorate([ + oneOptionalWithRest +], F.prototype, "bar", null); +F = __decorate([ + oneOptionalWithRest +], F); +let G = class G { + bar() { } +}; +__decorate([ + anyDec +], G.prototype, "foo", void 0); +__decorate([ + anyDec +], G.prototype, "bar", null); +G = __decorate([ + anyDec +], G); diff --git a/tests/baselines/reference/potentiallyUncalledDecorators.symbols b/tests/baselines/reference/potentiallyUncalledDecorators.symbols new file mode 100644 index 00000000000..38fe3f3dc52 --- /dev/null +++ b/tests/baselines/reference/potentiallyUncalledDecorators.symbols @@ -0,0 +1,200 @@ +=== tests/cases/compiler/potentiallyUncalledDecorators.ts === +// Angular-style Input/Output API: +declare function Input(bindingPropertyName?: string): any; +>Input : Symbol(Input, Decl(potentiallyUncalledDecorators.ts, 0, 0)) +>bindingPropertyName : Symbol(bindingPropertyName, Decl(potentiallyUncalledDecorators.ts, 1, 23)) + +class FooComponent { +>FooComponent : Symbol(FooComponent, Decl(potentiallyUncalledDecorators.ts, 1, 58)) + + @Input foo: string; +>Input : Symbol(Input, Decl(potentiallyUncalledDecorators.ts, 0, 0)) +>foo : Symbol(FooComponent.foo, Decl(potentiallyUncalledDecorators.ts, 2, 20)) +} + +// Glimmer-style tracked API: +declare const tracked: PropertyDecorator & { (...watchedProperties: string[]): any; } +>tracked : Symbol(tracked, Decl(potentiallyUncalledDecorators.ts, 7, 13)) +>PropertyDecorator : Symbol(PropertyDecorator, Decl(lib.es5.d.ts, --, --)) +>watchedProperties : Symbol(watchedProperties, Decl(potentiallyUncalledDecorators.ts, 7, 46)) + +class Person { +>Person : Symbol(Person, Decl(potentiallyUncalledDecorators.ts, 7, 85)) + + @tracked person; any; +>tracked : Symbol(tracked, Decl(potentiallyUncalledDecorators.ts, 7, 13)) +>person : Symbol(Person.person, Decl(potentiallyUncalledDecorators.ts, 9, 14)) +>any : Symbol(Person.any, Decl(potentiallyUncalledDecorators.ts, 10, 20)) +} + +class MultiplyByTwo { +>MultiplyByTwo : Symbol(MultiplyByTwo, Decl(potentiallyUncalledDecorators.ts, 11, 1)) + + args: any; +>args : Symbol(MultiplyByTwo.args, Decl(potentiallyUncalledDecorators.ts, 13, 21)) + + @tracked('args') +>tracked : Symbol(tracked, Decl(potentiallyUncalledDecorators.ts, 7, 13)) + + get multiplied() { +>multiplied : Symbol(MultiplyByTwo.multiplied, Decl(potentiallyUncalledDecorators.ts, 14, 14)) + + return this.args.number * 2; +>this.args : Symbol(MultiplyByTwo.args, Decl(potentiallyUncalledDecorators.ts, 13, 21)) +>this : Symbol(MultiplyByTwo, Decl(potentiallyUncalledDecorators.ts, 11, 1)) +>args : Symbol(MultiplyByTwo.args, Decl(potentiallyUncalledDecorators.ts, 13, 21)) + } +} + +// Other fun stuff. + +interface OmniDecorator extends MethodDecorator, ClassDecorator, PropertyDecorator { +>OmniDecorator : Symbol(OmniDecorator, Decl(potentiallyUncalledDecorators.ts, 19, 1)) +>MethodDecorator : Symbol(MethodDecorator, Decl(lib.es5.d.ts, --, --)) +>ClassDecorator : Symbol(ClassDecorator, Decl(lib.es5.d.ts, --, --)) +>PropertyDecorator : Symbol(PropertyDecorator, Decl(lib.es5.d.ts, --, --)) +} + +declare function noArgs(): OmniDecorator; +>noArgs : Symbol(noArgs, Decl(potentiallyUncalledDecorators.ts, 24, 1)) +>OmniDecorator : Symbol(OmniDecorator, Decl(potentiallyUncalledDecorators.ts, 19, 1)) + +declare function allRest(...args: any[]): OmniDecorator; +>allRest : Symbol(allRest, Decl(potentiallyUncalledDecorators.ts, 26, 41)) +>args : Symbol(args, Decl(potentiallyUncalledDecorators.ts, 27, 25)) +>OmniDecorator : Symbol(OmniDecorator, Decl(potentiallyUncalledDecorators.ts, 19, 1)) + +declare function oneOptional(x?: any): OmniDecorator; +>oneOptional : Symbol(oneOptional, Decl(potentiallyUncalledDecorators.ts, 27, 56)) +>x : Symbol(x, Decl(potentiallyUncalledDecorators.ts, 28, 29)) +>OmniDecorator : Symbol(OmniDecorator, Decl(potentiallyUncalledDecorators.ts, 19, 1)) + +declare function twoOptional(x?: any, y?: any): OmniDecorator; +>twoOptional : Symbol(twoOptional, Decl(potentiallyUncalledDecorators.ts, 28, 53)) +>x : Symbol(x, Decl(potentiallyUncalledDecorators.ts, 29, 29)) +>y : Symbol(y, Decl(potentiallyUncalledDecorators.ts, 29, 37)) +>OmniDecorator : Symbol(OmniDecorator, Decl(potentiallyUncalledDecorators.ts, 19, 1)) + +declare function threeOptional(x?: any, y?: any, z?: any): OmniDecorator; +>threeOptional : Symbol(threeOptional, Decl(potentiallyUncalledDecorators.ts, 29, 62)) +>x : Symbol(x, Decl(potentiallyUncalledDecorators.ts, 30, 31)) +>y : Symbol(y, Decl(potentiallyUncalledDecorators.ts, 30, 39)) +>z : Symbol(z, Decl(potentiallyUncalledDecorators.ts, 30, 48)) +>OmniDecorator : Symbol(OmniDecorator, Decl(potentiallyUncalledDecorators.ts, 19, 1)) + +declare function oneOptionalWithRest(x?: any, ...args: any[]): OmniDecorator; +>oneOptionalWithRest : Symbol(oneOptionalWithRest, Decl(potentiallyUncalledDecorators.ts, 30, 73)) +>x : Symbol(x, Decl(potentiallyUncalledDecorators.ts, 31, 37)) +>args : Symbol(args, Decl(potentiallyUncalledDecorators.ts, 31, 45)) +>OmniDecorator : Symbol(OmniDecorator, Decl(potentiallyUncalledDecorators.ts, 19, 1)) + +declare const anyDec: any; +>anyDec : Symbol(anyDec, Decl(potentiallyUncalledDecorators.ts, 32, 13)) + +@noArgs +>noArgs : Symbol(noArgs, Decl(potentiallyUncalledDecorators.ts, 24, 1)) + +class A { +>A : Symbol(A, Decl(potentiallyUncalledDecorators.ts, 32, 26)) + + @noArgs foo: any; +>noArgs : Symbol(noArgs, Decl(potentiallyUncalledDecorators.ts, 24, 1)) +>foo : Symbol(A.foo, Decl(potentiallyUncalledDecorators.ts, 35, 9)) + + @noArgs bar() { } +>noArgs : Symbol(noArgs, Decl(potentiallyUncalledDecorators.ts, 24, 1)) +>bar : Symbol(A.bar, Decl(potentiallyUncalledDecorators.ts, 36, 21)) +} + +@allRest +>allRest : Symbol(allRest, Decl(potentiallyUncalledDecorators.ts, 26, 41)) + +class B { +>B : Symbol(B, Decl(potentiallyUncalledDecorators.ts, 38, 1)) + + @allRest foo: any; +>allRest : Symbol(allRest, Decl(potentiallyUncalledDecorators.ts, 26, 41)) +>foo : Symbol(B.foo, Decl(potentiallyUncalledDecorators.ts, 41, 9)) + + @allRest bar() { } +>allRest : Symbol(allRest, Decl(potentiallyUncalledDecorators.ts, 26, 41)) +>bar : Symbol(B.bar, Decl(potentiallyUncalledDecorators.ts, 42, 22)) +} + +@oneOptional +>oneOptional : Symbol(oneOptional, Decl(potentiallyUncalledDecorators.ts, 27, 56)) + +class C { +>C : Symbol(C, Decl(potentiallyUncalledDecorators.ts, 44, 1)) + + @oneOptional foo: any; +>oneOptional : Symbol(oneOptional, Decl(potentiallyUncalledDecorators.ts, 27, 56)) +>foo : Symbol(C.foo, Decl(potentiallyUncalledDecorators.ts, 47, 9)) + + @oneOptional bar() { } +>oneOptional : Symbol(oneOptional, Decl(potentiallyUncalledDecorators.ts, 27, 56)) +>bar : Symbol(C.bar, Decl(potentiallyUncalledDecorators.ts, 48, 26)) +} + +@twoOptional +>twoOptional : Symbol(twoOptional, Decl(potentiallyUncalledDecorators.ts, 28, 53)) + +class D { +>D : Symbol(D, Decl(potentiallyUncalledDecorators.ts, 50, 1)) + + @twoOptional foo: any; +>twoOptional : Symbol(twoOptional, Decl(potentiallyUncalledDecorators.ts, 28, 53)) +>foo : Symbol(D.foo, Decl(potentiallyUncalledDecorators.ts, 53, 9)) + + @twoOptional bar() { } +>twoOptional : Symbol(twoOptional, Decl(potentiallyUncalledDecorators.ts, 28, 53)) +>bar : Symbol(D.bar, Decl(potentiallyUncalledDecorators.ts, 54, 26)) +} + +@threeOptional +>threeOptional : Symbol(threeOptional, Decl(potentiallyUncalledDecorators.ts, 29, 62)) + +class E { +>E : Symbol(E, Decl(potentiallyUncalledDecorators.ts, 56, 1)) + + @threeOptional foo: any; +>threeOptional : Symbol(threeOptional, Decl(potentiallyUncalledDecorators.ts, 29, 62)) +>foo : Symbol(E.foo, Decl(potentiallyUncalledDecorators.ts, 59, 9)) + + @threeOptional bar() { } +>threeOptional : Symbol(threeOptional, Decl(potentiallyUncalledDecorators.ts, 29, 62)) +>bar : Symbol(E.bar, Decl(potentiallyUncalledDecorators.ts, 60, 28)) +} + +@oneOptionalWithRest +>oneOptionalWithRest : Symbol(oneOptionalWithRest, Decl(potentiallyUncalledDecorators.ts, 30, 73)) + +class F { +>F : Symbol(F, Decl(potentiallyUncalledDecorators.ts, 62, 1)) + + @oneOptionalWithRest foo: any; +>oneOptionalWithRest : Symbol(oneOptionalWithRest, Decl(potentiallyUncalledDecorators.ts, 30, 73)) +>foo : Symbol(F.foo, Decl(potentiallyUncalledDecorators.ts, 65, 9)) + + @oneOptionalWithRest bar() { } +>oneOptionalWithRest : Symbol(oneOptionalWithRest, Decl(potentiallyUncalledDecorators.ts, 30, 73)) +>bar : Symbol(F.bar, Decl(potentiallyUncalledDecorators.ts, 66, 34)) +} + +@anyDec +>anyDec : Symbol(anyDec, Decl(potentiallyUncalledDecorators.ts, 32, 13)) + +class G { +>G : Symbol(G, Decl(potentiallyUncalledDecorators.ts, 68, 1)) + + @anyDec foo: any; +>anyDec : Symbol(anyDec, Decl(potentiallyUncalledDecorators.ts, 32, 13)) +>foo : Symbol(G.foo, Decl(potentiallyUncalledDecorators.ts, 71, 9)) + + @anyDec bar() { } +>anyDec : Symbol(anyDec, Decl(potentiallyUncalledDecorators.ts, 32, 13)) +>bar : Symbol(G.bar, Decl(potentiallyUncalledDecorators.ts, 72, 21)) +} + +export { }; + diff --git a/tests/baselines/reference/potentiallyUncalledDecorators.types b/tests/baselines/reference/potentiallyUncalledDecorators.types new file mode 100644 index 00000000000..cad861fc7b4 --- /dev/null +++ b/tests/baselines/reference/potentiallyUncalledDecorators.types @@ -0,0 +1,206 @@ +=== tests/cases/compiler/potentiallyUncalledDecorators.ts === +// Angular-style Input/Output API: +declare function Input(bindingPropertyName?: string): any; +>Input : (bindingPropertyName?: string) => any +>bindingPropertyName : string + +class FooComponent { +>FooComponent : FooComponent + + @Input foo: string; +>Input : (bindingPropertyName?: string) => any +>foo : string +} + +// Glimmer-style tracked API: +declare const tracked: PropertyDecorator & { (...watchedProperties: string[]): any; } +>tracked : PropertyDecorator & ((...watchedProperties: string[]) => any) +>PropertyDecorator : PropertyDecorator +>watchedProperties : string[] + +class Person { +>Person : Person + + @tracked person; any; +>tracked : PropertyDecorator & ((...watchedProperties: string[]) => any) +>person : any +>any : any +} + +class MultiplyByTwo { +>MultiplyByTwo : MultiplyByTwo + + args: any; +>args : any + + @tracked('args') +>tracked('args') : any +>tracked : PropertyDecorator & ((...watchedProperties: string[]) => any) +>'args' : "args" + + get multiplied() { +>multiplied : number + + return this.args.number * 2; +>this.args.number * 2 : number +>this.args.number : any +>this.args : any +>this : this +>args : any +>number : any +>2 : 2 + } +} + +// Other fun stuff. + +interface OmniDecorator extends MethodDecorator, ClassDecorator, PropertyDecorator { +>OmniDecorator : OmniDecorator +>MethodDecorator : MethodDecorator +>ClassDecorator : ClassDecorator +>PropertyDecorator : PropertyDecorator +} + +declare function noArgs(): OmniDecorator; +>noArgs : () => OmniDecorator +>OmniDecorator : OmniDecorator + +declare function allRest(...args: any[]): OmniDecorator; +>allRest : (...args: any[]) => OmniDecorator +>args : any[] +>OmniDecorator : OmniDecorator + +declare function oneOptional(x?: any): OmniDecorator; +>oneOptional : (x?: any) => OmniDecorator +>x : any +>OmniDecorator : OmniDecorator + +declare function twoOptional(x?: any, y?: any): OmniDecorator; +>twoOptional : (x?: any, y?: any) => OmniDecorator +>x : any +>y : any +>OmniDecorator : OmniDecorator + +declare function threeOptional(x?: any, y?: any, z?: any): OmniDecorator; +>threeOptional : (x?: any, y?: any, z?: any) => OmniDecorator +>x : any +>y : any +>z : any +>OmniDecorator : OmniDecorator + +declare function oneOptionalWithRest(x?: any, ...args: any[]): OmniDecorator; +>oneOptionalWithRest : (x?: any, ...args: any[]) => OmniDecorator +>x : any +>args : any[] +>OmniDecorator : OmniDecorator + +declare const anyDec: any; +>anyDec : any + +@noArgs +>noArgs : () => OmniDecorator + +class A { +>A : A + + @noArgs foo: any; +>noArgs : () => OmniDecorator +>foo : any + + @noArgs bar() { } +>noArgs : () => OmniDecorator +>bar : () => void +} + +@allRest +>allRest : (...args: any[]) => OmniDecorator + +class B { +>B : B + + @allRest foo: any; +>allRest : (...args: any[]) => OmniDecorator +>foo : any + + @allRest bar() { } +>allRest : (...args: any[]) => OmniDecorator +>bar : () => void +} + +@oneOptional +>oneOptional : (x?: any) => OmniDecorator + +class C { +>C : C + + @oneOptional foo: any; +>oneOptional : (x?: any) => OmniDecorator +>foo : any + + @oneOptional bar() { } +>oneOptional : (x?: any) => OmniDecorator +>bar : () => void +} + +@twoOptional +>twoOptional : (x?: any, y?: any) => OmniDecorator + +class D { +>D : D + + @twoOptional foo: any; +>twoOptional : (x?: any, y?: any) => OmniDecorator +>foo : any + + @twoOptional bar() { } +>twoOptional : (x?: any, y?: any) => OmniDecorator +>bar : () => void +} + +@threeOptional +>threeOptional : (x?: any, y?: any, z?: any) => OmniDecorator + +class E { +>E : E + + @threeOptional foo: any; +>threeOptional : (x?: any, y?: any, z?: any) => OmniDecorator +>foo : any + + @threeOptional bar() { } +>threeOptional : (x?: any, y?: any, z?: any) => OmniDecorator +>bar : () => void +} + +@oneOptionalWithRest +>oneOptionalWithRest : (x?: any, ...args: any[]) => OmniDecorator + +class F { +>F : F + + @oneOptionalWithRest foo: any; +>oneOptionalWithRest : (x?: any, ...args: any[]) => OmniDecorator +>foo : any + + @oneOptionalWithRest bar() { } +>oneOptionalWithRest : (x?: any, ...args: any[]) => OmniDecorator +>bar : () => void +} + +@anyDec +>anyDec : any + +class G { +>G : G + + @anyDec foo: any; +>anyDec : any +>foo : any + + @anyDec bar() { } +>anyDec : any +>bar : () => void +} + +export { }; + diff --git a/tests/baselines/reference/recursiveTypeRelations.symbols b/tests/baselines/reference/recursiveTypeRelations.symbols index 9f656a789ed..2c940df2487 100644 --- a/tests/baselines/reference/recursiveTypeRelations.symbols +++ b/tests/baselines/reference/recursiveTypeRelations.symbols @@ -89,12 +89,12 @@ export function css(styles: S, ...classNam >arg : Symbol(arg, Decl(recursiveTypeRelations.ts, 18, 30)) return Object.keys(arg).reduce((obj: ClassNameObject, key: keyof S) => { ->Object.keys(arg).reduce : Symbol(Array.reduce, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>Object.keys(arg).reduce : Symbol(Array.reduce, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >Object.keys : Symbol(ObjectConstructor.keys, Decl(lib.d.ts, --, --)) >Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >keys : Symbol(ObjectConstructor.keys, Decl(lib.d.ts, --, --)) >arg : Symbol(arg, Decl(recursiveTypeRelations.ts, 18, 30)) ->reduce : Symbol(Array.reduce, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>reduce : Symbol(Array.reduce, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >obj : Symbol(obj, Decl(recursiveTypeRelations.ts, 26, 55)) >key : Symbol(key, Decl(recursiveTypeRelations.ts, 26, 76)) >S : Symbol(S, Decl(recursiveTypeRelations.ts, 17, 20)) diff --git a/tests/baselines/reference/recursiveTypeRelations.types b/tests/baselines/reference/recursiveTypeRelations.types index 6def28d4461..110ff8175c4 100644 --- a/tests/baselines/reference/recursiveTypeRelations.types +++ b/tests/baselines/reference/recursiveTypeRelations.types @@ -102,13 +102,13 @@ export function css(styles: S, ...classNam return Object.keys(arg).reduce((obj: ClassNameObject, key: keyof S) => { >Object.keys(arg).reduce((obj: ClassNameObject, key: keyof S) => { const exportedClassName = styles[key]; obj[exportedClassName] = (arg as ClassNameMap)[key]; return obj; }, {}) : any ->Object.keys(arg).reduce : { (callbackfn: (previousValue: string, currentValue: string, currentIndex: number, array: string[]) => string, initialValue?: string): string; (callbackfn: (previousValue: U, currentValue: string, currentIndex: number, array: string[]) => U, initialValue: U): U; } +>Object.keys(arg).reduce : { (callbackfn: (previousValue: string, currentValue: string, currentIndex: number, array: string[]) => string): string; (callbackfn: (previousValue: string, currentValue: string, currentIndex: number, array: string[]) => string, initialValue: string): string; (callbackfn: (previousValue: U, currentValue: string, currentIndex: number, array: string[]) => U, initialValue: U): U; } >Object.keys(arg) : string[] >Object.keys : (o: {}) => string[] >Object : ObjectConstructor >keys : (o: {}) => string[] >arg : keyof S | (object & { [K in keyof S]?: boolean; }) ->reduce : { (callbackfn: (previousValue: string, currentValue: string, currentIndex: number, array: string[]) => string, initialValue?: string): string; (callbackfn: (previousValue: U, currentValue: string, currentIndex: number, array: string[]) => U, initialValue: U): U; } +>reduce : { (callbackfn: (previousValue: string, currentValue: string, currentIndex: number, array: string[]) => string): string; (callbackfn: (previousValue: string, currentValue: string, currentIndex: number, array: string[]) => string, initialValue: string): string; (callbackfn: (previousValue: U, currentValue: string, currentIndex: number, array: string[]) => U, initialValue: U): U; } >ClassNameObject : No type information available! >(obj: ClassNameObject, key: keyof S) => { const exportedClassName = styles[key]; obj[exportedClassName] = (arg as ClassNameMap)[key]; return obj; } : (obj: any, key: keyof S) => any >obj : any diff --git a/tests/baselines/reference/restInvalidArgumentType.types b/tests/baselines/reference/restInvalidArgumentType.types index 28162bcc7cc..39495008877 100644 --- a/tests/baselines/reference/restInvalidArgumentType.types +++ b/tests/baselines/reference/restInvalidArgumentType.types @@ -87,7 +87,7 @@ function f(p1: T, p2: T[]) { >p1 : T var {...r2} = p2; // OK ->r2 : { [n: number]: T; length: number; toString(): string; toLocaleString(): string; push(...items: T[]): number; pop(): T; concat(...items: ReadonlyArray[]): T[]; concat(...items: (T | ReadonlyArray)[]): T[]; join(separator?: string): string; reverse(): T[]; shift(): T; slice(start?: number, end?: number): T[]; sort(compareFn?: (a: T, b: T) => number): T[]; splice(start: number, deleteCount?: number): T[]; splice(start: number, deleteCount: number, ...items: T[]): T[]; unshift(...items: T[]): number; indexOf(searchElement: T, fromIndex?: number): number; lastIndexOf(searchElement: T, fromIndex?: number): number; every(callbackfn: (value: T, index: number, array: T[]) => boolean, thisArg?: any): boolean; some(callbackfn: (value: T, index: number, array: T[]) => boolean, thisArg?: any): boolean; forEach(callbackfn: (value: T, index: number, array: T[]) => void, thisArg?: any): void; map(callbackfn: (value: T, index: number, array: T[]) => U, thisArg?: any): U[]; filter(callbackfn: (value: T, index: number, array: T[]) => value is S, thisArg?: any): S[]; filter(callbackfn: (value: T, index: number, array: T[]) => any, thisArg?: any): T[]; reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T, initialValue?: T): T; reduce(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: T[]) => U, initialValue: U): U; reduceRight(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T, initialValue?: T): T; reduceRight(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: T[]) => U, initialValue: U): U; } +>r2 : { [n: number]: T; length: number; toString(): string; toLocaleString(): string; push(...items: T[]): number; pop(): T; concat(...items: ReadonlyArray[]): T[]; concat(...items: (T | ReadonlyArray)[]): T[]; join(separator?: string): string; reverse(): T[]; shift(): T; slice(start?: number, end?: number): T[]; sort(compareFn?: (a: T, b: T) => number): T[]; splice(start: number, deleteCount?: number): T[]; splice(start: number, deleteCount: number, ...items: T[]): T[]; unshift(...items: T[]): number; indexOf(searchElement: T, fromIndex?: number): number; lastIndexOf(searchElement: T, fromIndex?: number): number; every(callbackfn: (value: T, index: number, array: T[]) => boolean, thisArg?: any): boolean; some(callbackfn: (value: T, index: number, array: T[]) => boolean, thisArg?: any): boolean; forEach(callbackfn: (value: T, index: number, array: T[]) => void, thisArg?: any): void; map(callbackfn: (value: T, index: number, array: T[]) => U, thisArg?: any): U[]; filter(callbackfn: (value: T, index: number, array: T[]) => value is S, thisArg?: any): S[]; filter(callbackfn: (value: T, index: number, array: T[]) => any, thisArg?: any): T[]; reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T): T; reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T, initialValue: T): T; reduce(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: T[]) => U, initialValue: U): U; reduceRight(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T): T; reduceRight(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T, initialValue: T): T; reduceRight(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: T[]) => U, initialValue: U): U; } >p2 : T[] var {...r3} = t; // Error, generic type paramter diff --git a/tests/baselines/reference/returnTypeParameterWithModules.symbols b/tests/baselines/reference/returnTypeParameterWithModules.symbols index 7f8fab382a3..eb56940b604 100644 --- a/tests/baselines/reference/returnTypeParameterWithModules.symbols +++ b/tests/baselines/reference/returnTypeParameterWithModules.symbols @@ -13,11 +13,11 @@ module M1 { return Array.prototype.reduce.apply(ar, e ? [f, e] : [f]); >Array.prototype.reduce.apply : Symbol(Function.apply, Decl(lib.d.ts, --, --)) ->Array.prototype.reduce : Symbol(Array.reduce, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>Array.prototype.reduce : Symbol(Array.reduce, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >Array.prototype : Symbol(ArrayConstructor.prototype, Decl(lib.d.ts, --, --)) >Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >prototype : Symbol(ArrayConstructor.prototype, Decl(lib.d.ts, --, --)) ->reduce : Symbol(Array.reduce, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>reduce : Symbol(Array.reduce, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >apply : Symbol(Function.apply, Decl(lib.d.ts, --, --)) >ar : Symbol(ar, Decl(returnTypeParameterWithModules.ts, 1, 30)) >e : Symbol(e, Decl(returnTypeParameterWithModules.ts, 1, 36)) diff --git a/tests/baselines/reference/returnTypeParameterWithModules.types b/tests/baselines/reference/returnTypeParameterWithModules.types index 584c962a170..3aec0f14fcf 100644 --- a/tests/baselines/reference/returnTypeParameterWithModules.types +++ b/tests/baselines/reference/returnTypeParameterWithModules.types @@ -14,11 +14,11 @@ module M1 { return Array.prototype.reduce.apply(ar, e ? [f, e] : [f]); >Array.prototype.reduce.apply(ar, e ? [f, e] : [f]) : any >Array.prototype.reduce.apply : (this: Function, thisArg: any, argArray?: any) => any ->Array.prototype.reduce : { (callbackfn: (previousValue: any, currentValue: any, currentIndex: number, array: any[]) => any, initialValue?: any): any; (callbackfn: (previousValue: U, currentValue: any, currentIndex: number, array: any[]) => U, initialValue: U): U; } +>Array.prototype.reduce : { (callbackfn: (previousValue: any, currentValue: any, currentIndex: number, array: any[]) => any): any; (callbackfn: (previousValue: any, currentValue: any, currentIndex: number, array: any[]) => any, initialValue: any): any; (callbackfn: (previousValue: U, currentValue: any, currentIndex: number, array: any[]) => U, initialValue: U): U; } >Array.prototype : any[] >Array : ArrayConstructor >prototype : any[] ->reduce : { (callbackfn: (previousValue: any, currentValue: any, currentIndex: number, array: any[]) => any, initialValue?: any): any; (callbackfn: (previousValue: U, currentValue: any, currentIndex: number, array: any[]) => U, initialValue: U): U; } +>reduce : { (callbackfn: (previousValue: any, currentValue: any, currentIndex: number, array: any[]) => any): any; (callbackfn: (previousValue: any, currentValue: any, currentIndex: number, array: any[]) => any, initialValue: any): any; (callbackfn: (previousValue: U, currentValue: any, currentIndex: number, array: any[]) => U, initialValue: U): U; } >apply : (this: Function, thisArg: any, argArray?: any) => any >ar : any >e ? [f, e] : [f] : any[] diff --git a/tests/baselines/reference/spreadInvalidArgumentType.types b/tests/baselines/reference/spreadInvalidArgumentType.types index 1eebc00850f..244d8515893 100644 --- a/tests/baselines/reference/spreadInvalidArgumentType.types +++ b/tests/baselines/reference/spreadInvalidArgumentType.types @@ -89,8 +89,8 @@ function f(p1: T, p2: T[]) { >p1 : T var o2 = { ...p2 }; // OK ->o2 : { [n: number]: T; length: number; toString(): string; toLocaleString(): string; push(...items: T[]): number; pop(): T; concat(...items: ReadonlyArray[]): T[]; concat(...items: (T | ReadonlyArray)[]): T[]; join(separator?: string): string; reverse(): T[]; shift(): T; slice(start?: number, end?: number): T[]; sort(compareFn?: (a: T, b: T) => number): T[]; splice(start: number, deleteCount?: number): T[]; splice(start: number, deleteCount: number, ...items: T[]): T[]; unshift(...items: T[]): number; indexOf(searchElement: T, fromIndex?: number): number; lastIndexOf(searchElement: T, fromIndex?: number): number; every(callbackfn: (value: T, index: number, array: T[]) => boolean, thisArg?: any): boolean; some(callbackfn: (value: T, index: number, array: T[]) => boolean, thisArg?: any): boolean; forEach(callbackfn: (value: T, index: number, array: T[]) => void, thisArg?: any): void; map(callbackfn: (value: T, index: number, array: T[]) => U, thisArg?: any): U[]; filter(callbackfn: (value: T, index: number, array: T[]) => value is S, thisArg?: any): S[]; filter(callbackfn: (value: T, index: number, array: T[]) => any, thisArg?: any): T[]; reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T, initialValue?: T): T; reduce(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: T[]) => U, initialValue: U): U; reduceRight(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T, initialValue?: T): T; reduceRight(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: T[]) => U, initialValue: U): U; } ->{ ...p2 } : { [n: number]: T; length: number; toString(): string; toLocaleString(): string; push(...items: T[]): number; pop(): T; concat(...items: ReadonlyArray[]): T[]; concat(...items: (T | ReadonlyArray)[]): T[]; join(separator?: string): string; reverse(): T[]; shift(): T; slice(start?: number, end?: number): T[]; sort(compareFn?: (a: T, b: T) => number): T[]; splice(start: number, deleteCount?: number): T[]; splice(start: number, deleteCount: number, ...items: T[]): T[]; unshift(...items: T[]): number; indexOf(searchElement: T, fromIndex?: number): number; lastIndexOf(searchElement: T, fromIndex?: number): number; every(callbackfn: (value: T, index: number, array: T[]) => boolean, thisArg?: any): boolean; some(callbackfn: (value: T, index: number, array: T[]) => boolean, thisArg?: any): boolean; forEach(callbackfn: (value: T, index: number, array: T[]) => void, thisArg?: any): void; map(callbackfn: (value: T, index: number, array: T[]) => U, thisArg?: any): U[]; filter(callbackfn: (value: T, index: number, array: T[]) => value is S, thisArg?: any): S[]; filter(callbackfn: (value: T, index: number, array: T[]) => any, thisArg?: any): T[]; reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T, initialValue?: T): T; reduce(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: T[]) => U, initialValue: U): U; reduceRight(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T, initialValue?: T): T; reduceRight(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: T[]) => U, initialValue: U): U; } +>o2 : { [n: number]: T; length: number; toString(): string; toLocaleString(): string; push(...items: T[]): number; pop(): T; concat(...items: ReadonlyArray[]): T[]; concat(...items: (T | ReadonlyArray)[]): T[]; join(separator?: string): string; reverse(): T[]; shift(): T; slice(start?: number, end?: number): T[]; sort(compareFn?: (a: T, b: T) => number): T[]; splice(start: number, deleteCount?: number): T[]; splice(start: number, deleteCount: number, ...items: T[]): T[]; unshift(...items: T[]): number; indexOf(searchElement: T, fromIndex?: number): number; lastIndexOf(searchElement: T, fromIndex?: number): number; every(callbackfn: (value: T, index: number, array: T[]) => boolean, thisArg?: any): boolean; some(callbackfn: (value: T, index: number, array: T[]) => boolean, thisArg?: any): boolean; forEach(callbackfn: (value: T, index: number, array: T[]) => void, thisArg?: any): void; map(callbackfn: (value: T, index: number, array: T[]) => U, thisArg?: any): U[]; filter(callbackfn: (value: T, index: number, array: T[]) => value is S, thisArg?: any): S[]; filter(callbackfn: (value: T, index: number, array: T[]) => any, thisArg?: any): T[]; reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T): T; reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T, initialValue: T): T; reduce(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: T[]) => U, initialValue: U): U; reduceRight(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T): T; reduceRight(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T, initialValue: T): T; reduceRight(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: T[]) => U, initialValue: U): U; } +>{ ...p2 } : { [n: number]: T; length: number; toString(): string; toLocaleString(): string; push(...items: T[]): number; pop(): T; concat(...items: ReadonlyArray[]): T[]; concat(...items: (T | ReadonlyArray)[]): T[]; join(separator?: string): string; reverse(): T[]; shift(): T; slice(start?: number, end?: number): T[]; sort(compareFn?: (a: T, b: T) => number): T[]; splice(start: number, deleteCount?: number): T[]; splice(start: number, deleteCount: number, ...items: T[]): T[]; unshift(...items: T[]): number; indexOf(searchElement: T, fromIndex?: number): number; lastIndexOf(searchElement: T, fromIndex?: number): number; every(callbackfn: (value: T, index: number, array: T[]) => boolean, thisArg?: any): boolean; some(callbackfn: (value: T, index: number, array: T[]) => boolean, thisArg?: any): boolean; forEach(callbackfn: (value: T, index: number, array: T[]) => void, thisArg?: any): void; map(callbackfn: (value: T, index: number, array: T[]) => U, thisArg?: any): U[]; filter(callbackfn: (value: T, index: number, array: T[]) => value is S, thisArg?: any): S[]; filter(callbackfn: (value: T, index: number, array: T[]) => any, thisArg?: any): T[]; reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T): T; reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T, initialValue: T): T; reduce(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: T[]) => U, initialValue: U): U; reduceRight(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T): T; reduceRight(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T, initialValue: T): T; reduceRight(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: T[]) => U, initialValue: U): U; } >p2 : T[] var o3 = { ...t }; // Error, generic type paramter diff --git a/tests/baselines/reference/strictFunctionTypesErrors.errors.txt b/tests/baselines/reference/strictFunctionTypesErrors.errors.txt index 2827983bd5a..d8e36e43060 100644 --- a/tests/baselines/reference/strictFunctionTypesErrors.errors.txt +++ b/tests/baselines/reference/strictFunctionTypesErrors.errors.txt @@ -87,9 +87,24 @@ tests/cases/compiler/strictFunctionTypesErrors.ts(126,1): error TS2322: Type 'Cr tests/cases/compiler/strictFunctionTypesErrors.ts(127,1): error TS2322: Type 'Crate' is not assignable to type 'Crate'. Types of property 'item' are incompatible. Type 'Animal' is not assignable to type 'Dog'. +tests/cases/compiler/strictFunctionTypesErrors.ts(133,1): error TS2322: Type '(f: (x: Dog) => Dog) => void' is not assignable to type '(f: (x: Animal) => Animal) => void'. + Types of parameters 'f' and 'f' are incompatible. + Type 'Animal' is not assignable to type 'Dog'. +tests/cases/compiler/strictFunctionTypesErrors.ts(134,1): error TS2322: Type '(f: (x: Animal) => Animal) => void' is not assignable to type '(f: (x: Dog) => Dog) => void'. + Types of parameters 'f' and 'f' are incompatible. + Types of parameters 'x' and 'x' are incompatible. + Type 'Animal' is not assignable to type 'Dog'. +tests/cases/compiler/strictFunctionTypesErrors.ts(147,5): error TS2322: Type '(cb: (x: Animal) => Animal) => void' is not assignable to type '(cb: (x: Dog) => Animal) => void'. + Types of parameters 'cb' and 'cb' are incompatible. + Types of parameters 'x' and 'x' are incompatible. + Type 'Animal' is not assignable to type 'Dog'. +tests/cases/compiler/strictFunctionTypesErrors.ts(155,5): error TS2322: Type '(cb: (x: Animal) => Animal) => void' is not assignable to type '(cb: (x: Dog) => Animal) => void'. + Types of parameters 'cb' and 'cb' are incompatible. + Types of parameters 'x' and 'x' are incompatible. + Type 'Animal' is not assignable to type 'Dog'. -==== tests/cases/compiler/strictFunctionTypesErrors.ts (31 errors) ==== +==== tests/cases/compiler/strictFunctionTypesErrors.ts (35 errors) ==== export {} @@ -337,4 +352,51 @@ tests/cases/compiler/strictFunctionTypesErrors.ts(127,1): error TS2322: Type 'Cr !!! error TS2322: Type 'Crate' is not assignable to type 'Crate'. !!! error TS2322: Types of property 'item' are incompatible. !!! error TS2322: Type 'Animal' is not assignable to type 'Dog'. - \ No newline at end of file + + // Verify that callback parameters are strictly checked + + declare let fc1: (f: (x: Animal) => Animal) => void; + declare let fc2: (f: (x: Dog) => Dog) => void; + fc1 = fc2; // Error + ~~~ +!!! error TS2322: Type '(f: (x: Dog) => Dog) => void' is not assignable to type '(f: (x: Animal) => Animal) => void'. +!!! error TS2322: Types of parameters 'f' and 'f' are incompatible. +!!! error TS2322: Type 'Animal' is not assignable to type 'Dog'. + fc2 = fc1; // Error + ~~~ +!!! error TS2322: Type '(f: (x: Animal) => Animal) => void' is not assignable to type '(f: (x: Dog) => Dog) => void'. +!!! error TS2322: Types of parameters 'f' and 'f' are incompatible. +!!! error TS2322: Types of parameters 'x' and 'x' are incompatible. +!!! error TS2322: Type 'Animal' is not assignable to type 'Dog'. + + // Verify that callback parameters aren't loosely checked when types + // originate in method declarations + + namespace n1 { + class Foo { + static f1(x: Animal): Animal { throw "wat"; } + static f2(x: Dog): Animal { throw "wat"; }; + } + declare let f1: (cb: typeof Foo.f1) => void; + declare let f2: (cb: typeof Foo.f2) => void; + f1 = f2; + f2 = f1; // Error + ~~ +!!! error TS2322: Type '(cb: (x: Animal) => Animal) => void' is not assignable to type '(cb: (x: Dog) => Animal) => void'. +!!! error TS2322: Types of parameters 'cb' and 'cb' are incompatible. +!!! error TS2322: Types of parameters 'x' and 'x' are incompatible. +!!! error TS2322: Type 'Animal' is not assignable to type 'Dog'. + } + + namespace n2 { + type BivariantHack = { foo(x: Input): Output }["foo"]; + declare let f1: (cb: BivariantHack) => void; + declare let f2: (cb: BivariantHack) => void; + f1 = f2; + f2 = f1; // Error + ~~ +!!! error TS2322: Type '(cb: (x: Animal) => Animal) => void' is not assignable to type '(cb: (x: Dog) => Animal) => void'. +!!! error TS2322: Types of parameters 'cb' and 'cb' are incompatible. +!!! error TS2322: Types of parameters 'x' and 'x' are incompatible. +!!! error TS2322: Type 'Animal' is not assignable to type 'Dog'. + } \ No newline at end of file diff --git a/tests/baselines/reference/strictFunctionTypesErrors.js b/tests/baselines/reference/strictFunctionTypesErrors.js index 2be598f0ef9..d0608f6c1ac 100644 --- a/tests/baselines/reference/strictFunctionTypesErrors.js +++ b/tests/baselines/reference/strictFunctionTypesErrors.js @@ -126,7 +126,35 @@ declare let dogCrate: Crate; animalCrate = dogCrate; // Error dogCrate = animalCrate; // Error - + +// Verify that callback parameters are strictly checked + +declare let fc1: (f: (x: Animal) => Animal) => void; +declare let fc2: (f: (x: Dog) => Dog) => void; +fc1 = fc2; // Error +fc2 = fc1; // Error + +// Verify that callback parameters aren't loosely checked when types +// originate in method declarations + +namespace n1 { + class Foo { + static f1(x: Animal): Animal { throw "wat"; } + static f2(x: Dog): Animal { throw "wat"; }; + } + declare let f1: (cb: typeof Foo.f1) => void; + declare let f2: (cb: typeof Foo.f2) => void; + f1 = f2; + f2 = f1; // Error +} + +namespace n2 { + type BivariantHack = { foo(x: Input): Output }["foo"]; + declare let f1: (cb: BivariantHack) => void; + declare let f2: (cb: BivariantHack) => void; + f1 = f2; + f2 = f1; // Error +} //// [strictFunctionTypesErrors.js] "use strict"; @@ -186,3 +214,25 @@ dogComparer2 = animalComparer2; // Ok // Errors below should elaborate the reason for invariance animalCrate = dogCrate; // Error dogCrate = animalCrate; // Error +fc1 = fc2; // Error +fc2 = fc1; // Error +// Verify that callback parameters aren't loosely checked when types +// originate in method declarations +var n1; +(function (n1) { + var Foo = /** @class */ (function () { + function Foo() { + } + Foo.f1 = function (x) { throw "wat"; }; + Foo.f2 = function (x) { throw "wat"; }; + ; + return Foo; + }()); + f1 = f2; + f2 = f1; // Error +})(n1 || (n1 = {})); +var n2; +(function (n2) { + f1 = f2; + f2 = f1; // Error +})(n2 || (n2 = {})); diff --git a/tests/baselines/reference/strictFunctionTypesErrors.symbols b/tests/baselines/reference/strictFunctionTypesErrors.symbols index 30faf83d87e..c85c337ca44 100644 --- a/tests/baselines/reference/strictFunctionTypesErrors.symbols +++ b/tests/baselines/reference/strictFunctionTypesErrors.symbols @@ -400,3 +400,105 @@ dogCrate = animalCrate; // Error >dogCrate : Symbol(dogCrate, Decl(strictFunctionTypesErrors.ts, 121, 11)) >animalCrate : Symbol(animalCrate, Decl(strictFunctionTypesErrors.ts, 120, 11)) +// Verify that callback parameters are strictly checked + +declare let fc1: (f: (x: Animal) => Animal) => void; +>fc1 : Symbol(fc1, Decl(strictFunctionTypesErrors.ts, 130, 11)) +>f : Symbol(f, Decl(strictFunctionTypesErrors.ts, 130, 18)) +>x : Symbol(x, Decl(strictFunctionTypesErrors.ts, 130, 22)) +>Animal : Symbol(Animal, Decl(strictFunctionTypesErrors.ts, 87, 8)) +>Animal : Symbol(Animal, Decl(strictFunctionTypesErrors.ts, 87, 8)) + +declare let fc2: (f: (x: Dog) => Dog) => void; +>fc2 : Symbol(fc2, Decl(strictFunctionTypesErrors.ts, 131, 11)) +>f : Symbol(f, Decl(strictFunctionTypesErrors.ts, 131, 18)) +>x : Symbol(x, Decl(strictFunctionTypesErrors.ts, 131, 22)) +>Dog : Symbol(Dog, Decl(strictFunctionTypesErrors.ts, 89, 33)) +>Dog : Symbol(Dog, Decl(strictFunctionTypesErrors.ts, 89, 33)) + +fc1 = fc2; // Error +>fc1 : Symbol(fc1, Decl(strictFunctionTypesErrors.ts, 130, 11)) +>fc2 : Symbol(fc2, Decl(strictFunctionTypesErrors.ts, 131, 11)) + +fc2 = fc1; // Error +>fc2 : Symbol(fc2, Decl(strictFunctionTypesErrors.ts, 131, 11)) +>fc1 : Symbol(fc1, Decl(strictFunctionTypesErrors.ts, 130, 11)) + +// Verify that callback parameters aren't loosely checked when types +// originate in method declarations + +namespace n1 { +>n1 : Symbol(n1, Decl(strictFunctionTypesErrors.ts, 133, 10)) + + class Foo { +>Foo : Symbol(Foo, Decl(strictFunctionTypesErrors.ts, 138, 14)) + + static f1(x: Animal): Animal { throw "wat"; } +>f1 : Symbol(Foo.f1, Decl(strictFunctionTypesErrors.ts, 139, 15)) +>x : Symbol(x, Decl(strictFunctionTypesErrors.ts, 140, 18)) +>Animal : Symbol(Animal, Decl(strictFunctionTypesErrors.ts, 87, 8)) +>Animal : Symbol(Animal, Decl(strictFunctionTypesErrors.ts, 87, 8)) + + static f2(x: Dog): Animal { throw "wat"; }; +>f2 : Symbol(Foo.f2, Decl(strictFunctionTypesErrors.ts, 140, 53)) +>x : Symbol(x, Decl(strictFunctionTypesErrors.ts, 141, 18)) +>Dog : Symbol(Dog, Decl(strictFunctionTypesErrors.ts, 89, 33)) +>Animal : Symbol(Animal, Decl(strictFunctionTypesErrors.ts, 87, 8)) + } + declare let f1: (cb: typeof Foo.f1) => void; +>f1 : Symbol(f1, Decl(strictFunctionTypesErrors.ts, 143, 15)) +>cb : Symbol(cb, Decl(strictFunctionTypesErrors.ts, 143, 21)) +>Foo.f1 : Symbol(Foo.f1, Decl(strictFunctionTypesErrors.ts, 139, 15)) +>Foo : Symbol(Foo, Decl(strictFunctionTypesErrors.ts, 138, 14)) +>f1 : Symbol(Foo.f1, Decl(strictFunctionTypesErrors.ts, 139, 15)) + + declare let f2: (cb: typeof Foo.f2) => void; +>f2 : Symbol(f2, Decl(strictFunctionTypesErrors.ts, 144, 15)) +>cb : Symbol(cb, Decl(strictFunctionTypesErrors.ts, 144, 21)) +>Foo.f2 : Symbol(Foo.f2, Decl(strictFunctionTypesErrors.ts, 140, 53)) +>Foo : Symbol(Foo, Decl(strictFunctionTypesErrors.ts, 138, 14)) +>f2 : Symbol(Foo.f2, Decl(strictFunctionTypesErrors.ts, 140, 53)) + + f1 = f2; +>f1 : Symbol(f1, Decl(strictFunctionTypesErrors.ts, 143, 15)) +>f2 : Symbol(f2, Decl(strictFunctionTypesErrors.ts, 144, 15)) + + f2 = f1; // Error +>f2 : Symbol(f2, Decl(strictFunctionTypesErrors.ts, 144, 15)) +>f1 : Symbol(f1, Decl(strictFunctionTypesErrors.ts, 143, 15)) +} + +namespace n2 { +>n2 : Symbol(n2, Decl(strictFunctionTypesErrors.ts, 147, 1)) + + type BivariantHack = { foo(x: Input): Output }["foo"]; +>BivariantHack : Symbol(BivariantHack, Decl(strictFunctionTypesErrors.ts, 149, 14)) +>Input : Symbol(Input, Decl(strictFunctionTypesErrors.ts, 150, 23)) +>Output : Symbol(Output, Decl(strictFunctionTypesErrors.ts, 150, 29)) +>foo : Symbol(foo, Decl(strictFunctionTypesErrors.ts, 150, 41)) +>x : Symbol(x, Decl(strictFunctionTypesErrors.ts, 150, 46)) +>Input : Symbol(Input, Decl(strictFunctionTypesErrors.ts, 150, 23)) +>Output : Symbol(Output, Decl(strictFunctionTypesErrors.ts, 150, 29)) + + declare let f1: (cb: BivariantHack) => void; +>f1 : Symbol(f1, Decl(strictFunctionTypesErrors.ts, 151, 15)) +>cb : Symbol(cb, Decl(strictFunctionTypesErrors.ts, 151, 21)) +>BivariantHack : Symbol(BivariantHack, Decl(strictFunctionTypesErrors.ts, 149, 14)) +>Animal : Symbol(Animal, Decl(strictFunctionTypesErrors.ts, 87, 8)) +>Animal : Symbol(Animal, Decl(strictFunctionTypesErrors.ts, 87, 8)) + + declare let f2: (cb: BivariantHack) => void; +>f2 : Symbol(f2, Decl(strictFunctionTypesErrors.ts, 152, 15)) +>cb : Symbol(cb, Decl(strictFunctionTypesErrors.ts, 152, 21)) +>BivariantHack : Symbol(BivariantHack, Decl(strictFunctionTypesErrors.ts, 149, 14)) +>Dog : Symbol(Dog, Decl(strictFunctionTypesErrors.ts, 89, 33)) +>Animal : Symbol(Animal, Decl(strictFunctionTypesErrors.ts, 87, 8)) + + f1 = f2; +>f1 : Symbol(f1, Decl(strictFunctionTypesErrors.ts, 151, 15)) +>f2 : Symbol(f2, Decl(strictFunctionTypesErrors.ts, 152, 15)) + + f2 = f1; // Error +>f2 : Symbol(f2, Decl(strictFunctionTypesErrors.ts, 152, 15)) +>f1 : Symbol(f1, Decl(strictFunctionTypesErrors.ts, 151, 15)) +} diff --git a/tests/baselines/reference/strictFunctionTypesErrors.types b/tests/baselines/reference/strictFunctionTypesErrors.types index e4372d4b8fa..1890279258c 100644 --- a/tests/baselines/reference/strictFunctionTypesErrors.types +++ b/tests/baselines/reference/strictFunctionTypesErrors.types @@ -454,3 +454,113 @@ dogCrate = animalCrate; // Error >dogCrate : Crate >animalCrate : Crate +// Verify that callback parameters are strictly checked + +declare let fc1: (f: (x: Animal) => Animal) => void; +>fc1 : (f: (x: Animal) => Animal) => void +>f : (x: Animal) => Animal +>x : Animal +>Animal : Animal +>Animal : Animal + +declare let fc2: (f: (x: Dog) => Dog) => void; +>fc2 : (f: (x: Dog) => Dog) => void +>f : (x: Dog) => Dog +>x : Dog +>Dog : Dog +>Dog : Dog + +fc1 = fc2; // Error +>fc1 = fc2 : (f: (x: Dog) => Dog) => void +>fc1 : (f: (x: Animal) => Animal) => void +>fc2 : (f: (x: Dog) => Dog) => void + +fc2 = fc1; // Error +>fc2 = fc1 : (f: (x: Animal) => Animal) => void +>fc2 : (f: (x: Dog) => Dog) => void +>fc1 : (f: (x: Animal) => Animal) => void + +// Verify that callback parameters aren't loosely checked when types +// originate in method declarations + +namespace n1 { +>n1 : typeof n1 + + class Foo { +>Foo : Foo + + static f1(x: Animal): Animal { throw "wat"; } +>f1 : (x: Animal) => Animal +>x : Animal +>Animal : Animal +>Animal : Animal +>"wat" : "wat" + + static f2(x: Dog): Animal { throw "wat"; }; +>f2 : (x: Dog) => Animal +>x : Dog +>Dog : Dog +>Animal : Animal +>"wat" : "wat" + } + declare let f1: (cb: typeof Foo.f1) => void; +>f1 : (cb: (x: Animal) => Animal) => void +>cb : (x: Animal) => Animal +>Foo.f1 : (x: Animal) => Animal +>Foo : typeof Foo +>f1 : (x: Animal) => Animal + + declare let f2: (cb: typeof Foo.f2) => void; +>f2 : (cb: (x: Dog) => Animal) => void +>cb : (x: Dog) => Animal +>Foo.f2 : (x: Dog) => Animal +>Foo : typeof Foo +>f2 : (x: Dog) => Animal + + f1 = f2; +>f1 = f2 : (cb: (x: Dog) => Animal) => void +>f1 : (cb: (x: Animal) => Animal) => void +>f2 : (cb: (x: Dog) => Animal) => void + + f2 = f1; // Error +>f2 = f1 : (cb: (x: Animal) => Animal) => void +>f2 : (cb: (x: Dog) => Animal) => void +>f1 : (cb: (x: Animal) => Animal) => void +} + +namespace n2 { +>n2 : typeof n2 + + type BivariantHack = { foo(x: Input): Output }["foo"]; +>BivariantHack : (x: Input) => Output +>Input : Input +>Output : Output +>foo : (x: Input) => Output +>x : Input +>Input : Input +>Output : Output + + declare let f1: (cb: BivariantHack) => void; +>f1 : (cb: (x: Animal) => Animal) => void +>cb : (x: Animal) => Animal +>BivariantHack : (x: Input) => Output +>Animal : Animal +>Animal : Animal + + declare let f2: (cb: BivariantHack) => void; +>f2 : (cb: (x: Dog) => Animal) => void +>cb : (x: Dog) => Animal +>BivariantHack : (x: Input) => Output +>Dog : Dog +>Animal : Animal + + f1 = f2; +>f1 = f2 : (cb: (x: Dog) => Animal) => void +>f1 : (cb: (x: Animal) => Animal) => void +>f2 : (cb: (x: Dog) => Animal) => void + + f2 = f1; // Error +>f2 = f1 : (cb: (x: Animal) => Animal) => void +>f2 : (cb: (x: Dog) => Animal) => void +>f1 : (cb: (x: Animal) => Animal) => void +} diff --git a/tests/baselines/reference/typeAliasExport.symbols b/tests/baselines/reference/typeAliasExport.symbols index e019ca7a10b..5ffe181ca70 100644 --- a/tests/baselines/reference/typeAliasExport.symbols +++ b/tests/baselines/reference/typeAliasExport.symbols @@ -1,7 +1,7 @@ === tests/cases/compiler/typeAliasExport.ts === declare module "a" { export default undefined ->undefined : Symbol(default) +>undefined : Symbol(undefined) export var a; >a : Symbol(a, Decl(typeAliasExport.ts, 2, 12), Decl(typeAliasExport.ts, 2, 15)) diff --git a/tests/baselines/reference/unknownSymbolOffContextualType1.symbols b/tests/baselines/reference/unknownSymbolOffContextualType1.symbols index 1e19afeb6a0..3acf34ec9bf 100644 --- a/tests/baselines/reference/unknownSymbolOffContextualType1.symbols +++ b/tests/baselines/reference/unknownSymbolOffContextualType1.symbols @@ -61,9 +61,9 @@ function getMaxWidth(elementNames: string[]) { }); var maxWidth = widths.reduce(function (a, b) { >maxWidth : Symbol(maxWidth, Decl(unknownSymbolOffContextualType1.ts, 17, 7)) ->widths.reduce : Symbol(Array.reduce, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>widths.reduce : Symbol(Array.reduce, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >widths : Symbol(widths, Decl(unknownSymbolOffContextualType1.ts, 14, 7)) ->reduce : Symbol(Array.reduce, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>reduce : Symbol(Array.reduce, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >a : Symbol(a, Decl(unknownSymbolOffContextualType1.ts, 17, 43)) >b : Symbol(b, Decl(unknownSymbolOffContextualType1.ts, 17, 45)) diff --git a/tests/baselines/reference/unknownSymbolOffContextualType1.types b/tests/baselines/reference/unknownSymbolOffContextualType1.types index c6f05b69b74..7df3bd52cc9 100644 --- a/tests/baselines/reference/unknownSymbolOffContextualType1.types +++ b/tests/baselines/reference/unknownSymbolOffContextualType1.types @@ -72,9 +72,9 @@ function getMaxWidth(elementNames: string[]) { var maxWidth = widths.reduce(function (a, b) { >maxWidth : any >widths.reduce(function (a, b) { return a > b ? a : b; }) : any ->widths.reduce : { (callbackfn: (previousValue: any, currentValue: any, currentIndex: number, array: any[]) => any, initialValue?: any): any; (callbackfn: (previousValue: U, currentValue: any, currentIndex: number, array: any[]) => U, initialValue: U): U; } +>widths.reduce : { (callbackfn: (previousValue: any, currentValue: any, currentIndex: number, array: any[]) => any): any; (callbackfn: (previousValue: any, currentValue: any, currentIndex: number, array: any[]) => any, initialValue: any): any; (callbackfn: (previousValue: U, currentValue: any, currentIndex: number, array: any[]) => U, initialValue: U): U; } >widths : any[] ->reduce : { (callbackfn: (previousValue: any, currentValue: any, currentIndex: number, array: any[]) => any, initialValue?: any): any; (callbackfn: (previousValue: U, currentValue: any, currentIndex: number, array: any[]) => U, initialValue: U): U; } +>reduce : { (callbackfn: (previousValue: any, currentValue: any, currentIndex: number, array: any[]) => any): any; (callbackfn: (previousValue: any, currentValue: any, currentIndex: number, array: any[]) => any, initialValue: any): any; (callbackfn: (previousValue: U, currentValue: any, currentIndex: number, array: any[]) => U, initialValue: U): U; } >function (a, b) { return a > b ? a : b; } : (a: any, b: any) => any >a : any >b : any diff --git a/tests/baselines/reference/useObjectValuesAndEntries1.types b/tests/baselines/reference/useObjectValuesAndEntries1.types index 1b537ed063d..6ea45385bbc 100644 --- a/tests/baselines/reference/useObjectValuesAndEntries1.types +++ b/tests/baselines/reference/useObjectValuesAndEntries1.types @@ -10,9 +10,9 @@ var o = { a: 1, b: 2 }; for (var x of Object.values(o)) { >x : number >Object.values(o) : number[] ->Object.values : { (o: { [s: string]: T; }): T[]; (o: any): any[]; } +>Object.values : { (o: { [s: string]: T; } | { [n: number]: T; }): T[]; (o: any): any[]; } >Object : ObjectConstructor ->values : { (o: { [s: string]: T; }): T[]; (o: any): any[]; } +>values : { (o: { [s: string]: T; } | { [n: number]: T; }): T[]; (o: any): any[]; } >o : { a: number; b: number; } let y = x; @@ -23,25 +23,25 @@ for (var x of Object.values(o)) { var entries = Object.entries(o); // <-- entries: ['a' | 'b', number][] >entries : [string, number][] >Object.entries(o) : [string, number][] ->Object.entries : { (o: { [s: string]: T; }): [string, T][]; (o: any): [string, any][]; } +>Object.entries : { (o: { [s: string]: T; } | { [n: number]: T; }): [string, T][]; (o: any): [string, any][]; } >Object : ObjectConstructor ->entries : { (o: { [s: string]: T; }): [string, T][]; (o: any): [string, any][]; } +>entries : { (o: { [s: string]: T; } | { [n: number]: T; }): [string, T][]; (o: any): [string, any][]; } >o : { a: number; b: number; } var entries1 = Object.entries(1); // <-- entries: [string, any][] >entries1 : [string, any][] >Object.entries(1) : [string, any][] ->Object.entries : { (o: { [s: string]: T; }): [string, T][]; (o: any): [string, any][]; } +>Object.entries : { (o: { [s: string]: T; } | { [n: number]: T; }): [string, T][]; (o: any): [string, any][]; } >Object : ObjectConstructor ->entries : { (o: { [s: string]: T; }): [string, T][]; (o: any): [string, any][]; } +>entries : { (o: { [s: string]: T; } | { [n: number]: T; }): [string, T][]; (o: any): [string, any][]; } >1 : 1 var entries2 = Object.entries({a: true, b: 2}) // ['a' | 'b', number | boolean][] >entries2 : [string, number | boolean][] >Object.entries({a: true, b: 2}) : [string, number | boolean][] ->Object.entries : { (o: { [s: string]: T; }): [string, T][]; (o: any): [string, any][]; } +>Object.entries : { (o: { [s: string]: T; } | { [n: number]: T; }): [string, T][]; (o: any): [string, any][]; } >Object : ObjectConstructor ->entries : { (o: { [s: string]: T; }): [string, T][]; (o: any): [string, any][]; } +>entries : { (o: { [s: string]: T; } | { [n: number]: T; }): [string, T][]; (o: any): [string, any][]; } >{a: true, b: 2} : { a: true; b: 2; } >a : boolean >true : true @@ -51,8 +51,8 @@ var entries2 = Object.entries({a: true, b: 2}) // ['a' | 'b', number | boolean][ var entries3 = Object.entries({}) // [never, any][] >entries3 : [string, {}][] >Object.entries({}) : [string, {}][] ->Object.entries : { (o: { [s: string]: T; }): [string, T][]; (o: any): [string, any][]; } +>Object.entries : { (o: { [s: string]: T; } | { [n: number]: T; }): [string, T][]; (o: any): [string, any][]; } >Object : ObjectConstructor ->entries : { (o: { [s: string]: T; }): [string, T][]; (o: any): [string, any][]; } +>entries : { (o: { [s: string]: T; } | { [n: number]: T; }): [string, T][]; (o: any): [string, any][]; } >{} : {} diff --git a/tests/baselines/reference/useObjectValuesAndEntries4.types b/tests/baselines/reference/useObjectValuesAndEntries4.types index 85810bccd26..245803a24d4 100644 --- a/tests/baselines/reference/useObjectValuesAndEntries4.types +++ b/tests/baselines/reference/useObjectValuesAndEntries4.types @@ -10,9 +10,9 @@ var o = { a: 1, b: 2 }; for (var x of Object.values(o)) { >x : number >Object.values(o) : number[] ->Object.values : { (o: { [s: string]: T; }): T[]; (o: any): any[]; } +>Object.values : { (o: { [s: string]: T; } | { [n: number]: T; }): T[]; (o: any): any[]; } >Object : ObjectConstructor ->values : { (o: { [s: string]: T; }): T[]; (o: any): any[]; } +>values : { (o: { [s: string]: T; } | { [n: number]: T; }): T[]; (o: any): any[]; } >o : { a: number; b: number; } let y = x; @@ -23,8 +23,8 @@ for (var x of Object.values(o)) { var entries = Object.entries(o); >entries : [string, number][] >Object.entries(o) : [string, number][] ->Object.entries : { (o: { [s: string]: T; }): [string, T][]; (o: any): [string, any][]; } +>Object.entries : { (o: { [s: string]: T; } | { [n: number]: T; }): [string, T][]; (o: any): [string, any][]; } >Object : ObjectConstructor ->entries : { (o: { [s: string]: T; }): [string, T][]; (o: any): [string, any][]; } +>entries : { (o: { [s: string]: T; } | { [n: number]: T; }): [string, T][]; (o: any): [string, any][]; } >o : { a: number; b: number; } diff --git a/tests/cases/compiler/abstractPropertyInConstructor.ts b/tests/cases/compiler/abstractPropertyInConstructor.ts new file mode 100644 index 00000000000..457fdb473b1 --- /dev/null +++ b/tests/cases/compiler/abstractPropertyInConstructor.ts @@ -0,0 +1,24 @@ +abstract class AbstractClass { + constructor(str: string) { + this.method(parseInt(str)); + let val = this.prop.toLowerCase(); + + if (!str) { + this.prop = "Hello World"; + } + this.cb(str); + + const innerFunction = () => { + return this.prop; + } + } + + abstract prop: string; + abstract cb: (s: string) => void; + + abstract method(num: number): void; + + method2() { + this.prop = this.prop + "!"; + } +} diff --git a/tests/cases/compiler/arrayFind.ts b/tests/cases/compiler/arrayFind.ts new file mode 100644 index 00000000000..90883974766 --- /dev/null +++ b/tests/cases/compiler/arrayFind.ts @@ -0,0 +1,12 @@ +// @lib: es2015 + +// test fix for #18112, type guard predicates should narrow returned element +function isNumber(x: any): x is number { + return typeof x === "number"; +} + +const arrayOfStringsNumbersAndBooleans = ["string", false, 0, "strung", 1, true]; +const foundNumber: number | undefined = arrayOfStringsNumbersAndBooleans.find(isNumber); + +const readonlyArrayOfStringsNumbersAndBooleans = arrayOfStringsNumbersAndBooleans as ReadonlyArray; +const readonlyFoundNumber: number | undefined = readonlyArrayOfStringsNumbersAndBooleans.find(isNumber); diff --git a/tests/cases/compiler/asyncImportNestedYield.ts b/tests/cases/compiler/asyncImportNestedYield.ts new file mode 100644 index 00000000000..78b022e0797 --- /dev/null +++ b/tests/cases/compiler/asyncImportNestedYield.ts @@ -0,0 +1,4 @@ +// @lib: esnext +async function* foo() { + import((await import(yield "foo")).default); +} \ No newline at end of file diff --git a/tests/cases/compiler/castFunctionExpressionShouldBeParenthesized.ts b/tests/cases/compiler/castFunctionExpressionShouldBeParenthesized.ts new file mode 100644 index 00000000000..3fb1aaf7079 --- /dev/null +++ b/tests/cases/compiler/castFunctionExpressionShouldBeParenthesized.ts @@ -0,0 +1 @@ +(function a() { } as any)().foo() \ No newline at end of file diff --git a/tests/cases/compiler/complexRecursiveCollections.ts b/tests/cases/compiler/complexRecursiveCollections.ts index 68054aac0f9..ed8906ff441 100644 --- a/tests/cases/compiler/complexRecursiveCollections.ts +++ b/tests/cases/compiler/complexRecursiveCollections.ts @@ -1,5 +1,6 @@ +// @skipLibCheck: true // @lib: es6 -// @Filename: complex.d.ts +// @Filename: complex.ts interface Ara { t: T } interface Collection { map(mapper: (value: V, key: K, iter: this) => M): Collection; @@ -20,7 +21,7 @@ interface N2 extends N1 { flatMap(mapper: (value: T, key: void, iter: this) => Ara, context?: any): N2; toSeq(): N2; } -// @Filename: immutable.d.ts +// @Filename: immutable.ts // Test that complex recursive collections can pass the `extends` assignability check without // running out of memory. This bug was exposed in Typescript 2.4 when more generic signatures // started being checked. diff --git a/tests/cases/compiler/decoratorMetadataNoStrictNull.ts b/tests/cases/compiler/decoratorMetadataNoStrictNull.ts new file mode 100644 index 00000000000..4ac608ebd74 --- /dev/null +++ b/tests/cases/compiler/decoratorMetadataNoStrictNull.ts @@ -0,0 +1,8 @@ +// @experimentalDecorators: true +// @emitDecoratorMetadata: true +const dec = (obj: {}, prop: string) => undefined + +class Foo { + @dec public foo: string | null; + @dec public bar: string; +} \ No newline at end of file diff --git a/tests/cases/compiler/dynamicImportInDefaultExportExpression.ts b/tests/cases/compiler/dynamicImportInDefaultExportExpression.ts new file mode 100644 index 00000000000..0e6ad95886b --- /dev/null +++ b/tests/cases/compiler/dynamicImportInDefaultExportExpression.ts @@ -0,0 +1,7 @@ +// @skipLibCheck: true +// @lib: es6 +export default { + getInstance: function () { + return import('./foo2'); + } +} \ No newline at end of file diff --git a/tests/cases/compiler/dynamicImportWithNestedThis_es2015.ts b/tests/cases/compiler/dynamicImportWithNestedThis_es2015.ts new file mode 100644 index 00000000000..3c7f2936931 --- /dev/null +++ b/tests/cases/compiler/dynamicImportWithNestedThis_es2015.ts @@ -0,0 +1,14 @@ +// @lib: es2015 +// @target: es2015 +// @module: umd +// https://github.com/Microsoft/TypeScript/issues/17564 +class C { + private _path = './other'; + + dynamic() { + return import(this._path); + } +} + +const c = new C(); +c.dynamic(); \ No newline at end of file diff --git a/tests/cases/compiler/dynamicImportWithNestedThis_es5.ts b/tests/cases/compiler/dynamicImportWithNestedThis_es5.ts new file mode 100644 index 00000000000..5740c3f6694 --- /dev/null +++ b/tests/cases/compiler/dynamicImportWithNestedThis_es5.ts @@ -0,0 +1,14 @@ +// @lib: es2015 +// @target: es5 +// @module: umd +// https://github.com/Microsoft/TypeScript/issues/17564 +class C { + private _path = './other'; + + dynamic() { + return import(this._path); + } +} + +const c = new C(); +c.dynamic(); \ No newline at end of file diff --git a/tests/cases/compiler/excessPropertyCheckWithUnions.ts b/tests/cases/compiler/excessPropertyCheckWithUnions.ts new file mode 100644 index 00000000000..9a7968fe511 --- /dev/null +++ b/tests/cases/compiler/excessPropertyCheckWithUnions.ts @@ -0,0 +1,50 @@ +type ADT = { + tag: "A", + a1: string +} | { + tag: "D", + d20: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 +} | { + tag: "T", +} +let wrong: ADT = { tag: "T", a1: "extra" } +wrong = { tag: "A", d20: 12 } +wrong = { tag: "D" } + +type Ambiguous = { + tag: "A", + x: string +} | { + tag: "A", + y: number +} | { + tag: "B", + z: boolean +} | { + tag: "C" +} +let amb: Ambiguous +// no error for ambiguous tag, even when it could satisfy both constituents at once +amb = { tag: "A", x: "hi" } +amb = { tag: "A", y: 12 } +amb = { tag: "A", x: "hi", y: 12 } + +// correctly error on excess property 'extra', even when ambiguous +amb = { tag: "A", x: "hi", extra: 12 } +amb = { tag: "A", y: 12, extra: 12 } + +// assignability errors still work. +// But note that the error for `z: true` is the fallback one of reporting on +// the last constituent since assignability error reporting can't find a single best discriminant either. +amb = { tag: "A" } +amb = { tag: "A", z: true } + +type Overlapping = + | { a: 1, b: 1, first: string } + | { a: 2, second: string } + | { b: 3, third: string } +let over: Overlapping + +// these two are not reported because there are two discriminant properties +over = { a: 1, b: 1, first: "ok", second: "error" } +over = { a: 1, b: 1, first: "ok", third: "error" } diff --git a/tests/cases/compiler/genericDefaults.ts b/tests/cases/compiler/genericDefaults.ts index 624b44c0829..e7b9c95edeb 100644 --- a/tests/cases/compiler/genericDefaults.ts +++ b/tests/cases/compiler/genericDefaults.ts @@ -487,4 +487,7 @@ const t03c00 = (>x).a; const t03c01 = (>x).a; const t03c02 = (>x).a; const t03c03 = (>x).a; -const t03c04 = (>x).a; \ No newline at end of file +const t03c04 = (>x).a; + +// https://github.com/Microsoft/TypeScript/issues/16221 +interface SelfReference> {} \ No newline at end of file diff --git a/tests/cases/compiler/genericDefaultsErrors.ts b/tests/cases/compiler/genericDefaultsErrors.ts index 4ea42beb3da..9cdba888327 100644 --- a/tests/cases/compiler/genericDefaultsErrors.ts +++ b/tests/cases/compiler/genericDefaultsErrors.ts @@ -38,4 +38,7 @@ type i09t03 = i09<1, 2, 3>; // ok type i09t04 = i09<1, 2, 3, 4>; // error interface i10 { x: T; } // error -interface i10 {} \ No newline at end of file +interface i10 {} + +// https://github.com/Microsoft/TypeScript/issues/16221 +interface SelfReference {} \ No newline at end of file diff --git a/tests/cases/compiler/incorrectNumberOfTypeArgumentsDuringErrorReporting.ts b/tests/cases/compiler/incorrectNumberOfTypeArgumentsDuringErrorReporting.ts new file mode 100644 index 00000000000..2f6c8c71250 --- /dev/null +++ b/tests/cases/compiler/incorrectNumberOfTypeArgumentsDuringErrorReporting.ts @@ -0,0 +1,21 @@ +interface ObjA { + y?:string, +} + +interface ObjB {[key:string]:any} + +interface Opts {a:A, b:B} + +const fn = < + A extends ObjA, + B extends ObjB = ObjB +>(opts:Opts):string => 'Z' + +interface MyObjA { + x:string, +} + +fn({ + a: {x: 'X', y: 'Y'}, + b: {}, +}) diff --git a/tests/cases/compiler/indirectTypeParameterReferences.ts b/tests/cases/compiler/indirectTypeParameterReferences.ts new file mode 100644 index 00000000000..c8cb56ad5e7 --- /dev/null +++ b/tests/cases/compiler/indirectTypeParameterReferences.ts @@ -0,0 +1,29 @@ +// Repro from #19043 + +type B = {b: string} + +const flowtypes = (b: B) => { + type Combined = A & B + + const combined = (fn: (combined: Combined) => void) => null + const literal = (fn: (aPlusB: A & B) => void) => null + + return {combined, literal} +} + +const {combined, literal} = flowtypes<{a: string}>({b: 'b-value'}) + +literal(aPlusB => { + aPlusB.b + aPlusB.a +}) + +combined(comb => { + comb.b + comb.a +}) + +// Repro from #19091 + +declare function f(a: T): { a: typeof a }; +let n: number = f(2).a; diff --git a/tests/cases/compiler/inferredIndexerOnNamespaceImport.ts b/tests/cases/compiler/inferredIndexerOnNamespaceImport.ts new file mode 100644 index 00000000000..dd231361d27 --- /dev/null +++ b/tests/cases/compiler/inferredIndexerOnNamespaceImport.ts @@ -0,0 +1,12 @@ +// @filename: foo.ts +export const x = 3; +export const y = 5; + +// @filename: bar.ts +import * as foo from "./foo"; + +function f(map: { [k: string]: number }) { + // ... +} + +f(foo); \ No newline at end of file diff --git a/tests/cases/compiler/jsdocTypedef_propertyWithNoType.ts b/tests/cases/compiler/jsdocTypedef_propertyWithNoType.ts new file mode 100644 index 00000000000..bcabe980915 --- /dev/null +++ b/tests/cases/compiler/jsdocTypedef_propertyWithNoType.ts @@ -0,0 +1,12 @@ +// @allowJs: true +// @checkJs: true +// @noEmit: true + +// @Filename: /a.js +/** + * @typedef Foo + * @property foo + */ + +/** @type {Foo} */ +const x = { foo: 0 }; diff --git a/tests/cases/compiler/mutuallyRecursiveCallbacks.ts b/tests/cases/compiler/mutuallyRecursiveCallbacks.ts new file mode 100644 index 00000000000..94f2d285786 --- /dev/null +++ b/tests/cases/compiler/mutuallyRecursiveCallbacks.ts @@ -0,0 +1,7 @@ +// Repro from #18277 + +interface Foo { (bar: Bar): void }; +type Bar = (foo: Foo) => Foo; +declare function foo(bar: Bar): void; +declare var bar: Bar<{}>; +bar = foo; diff --git a/tests/cases/compiler/noUnusedLocals_selfReference.ts b/tests/cases/compiler/noUnusedLocals_selfReference.ts index 8eb528743c0..fc6b02b6006 100644 --- a/tests/cases/compiler/noUnusedLocals_selfReference.ts +++ b/tests/cases/compiler/noUnusedLocals_selfReference.ts @@ -2,7 +2,12 @@ export {}; // Make this a module scope, so these are local variables. -function f() { f; } +function f() { + f; + function g() { + g; + } +} class C { m() { C; } } diff --git a/tests/cases/compiler/potentiallyUncalledDecorators.ts b/tests/cases/compiler/potentiallyUncalledDecorators.ts new file mode 100644 index 00000000000..6e537686d0f --- /dev/null +++ b/tests/cases/compiler/potentiallyUncalledDecorators.ts @@ -0,0 +1,81 @@ +// @target: esnext +// @module: esnext +// @experimentalDecorators: true + +// Angular-style Input/Output API: +declare function Input(bindingPropertyName?: string): any; +class FooComponent { + @Input foo: string; +} + +// Glimmer-style tracked API: +declare const tracked: PropertyDecorator & { (...watchedProperties: string[]): any; } + +class Person { + @tracked person; any; +} + +class MultiplyByTwo { + args: any; + @tracked('args') + get multiplied() { + return this.args.number * 2; + } +} + +// Other fun stuff. + +interface OmniDecorator extends MethodDecorator, ClassDecorator, PropertyDecorator { +} + +declare function noArgs(): OmniDecorator; +declare function allRest(...args: any[]): OmniDecorator; +declare function oneOptional(x?: any): OmniDecorator; +declare function twoOptional(x?: any, y?: any): OmniDecorator; +declare function threeOptional(x?: any, y?: any, z?: any): OmniDecorator; +declare function oneOptionalWithRest(x?: any, ...args: any[]): OmniDecorator; +declare const anyDec: any; + +@noArgs +class A { + @noArgs foo: any; + @noArgs bar() { } +} + +@allRest +class B { + @allRest foo: any; + @allRest bar() { } +} + +@oneOptional +class C { + @oneOptional foo: any; + @oneOptional bar() { } +} + +@twoOptional +class D { + @twoOptional foo: any; + @twoOptional bar() { } +} + +@threeOptional +class E { + @threeOptional foo: any; + @threeOptional bar() { } +} + +@oneOptionalWithRest +class F { + @oneOptionalWithRest foo: any; + @oneOptionalWithRest bar() { } +} + +@anyDec +class G { + @anyDec foo: any; + @anyDec bar() { } +} + +export { }; diff --git a/tests/cases/compiler/strictFunctionTypesErrors.ts b/tests/cases/compiler/strictFunctionTypesErrors.ts index fbf1c0fa6da..3f86f2529c0 100644 --- a/tests/cases/compiler/strictFunctionTypesErrors.ts +++ b/tests/cases/compiler/strictFunctionTypesErrors.ts @@ -126,3 +126,32 @@ declare let dogCrate: Crate; animalCrate = dogCrate; // Error dogCrate = animalCrate; // Error + +// Verify that callback parameters are strictly checked + +declare let fc1: (f: (x: Animal) => Animal) => void; +declare let fc2: (f: (x: Dog) => Dog) => void; +fc1 = fc2; // Error +fc2 = fc1; // Error + +// Verify that callback parameters aren't loosely checked when types +// originate in method declarations + +namespace n1 { + class Foo { + static f1(x: Animal): Animal { throw "wat"; } + static f2(x: Dog): Animal { throw "wat"; }; + } + declare let f1: (cb: typeof Foo.f1) => void; + declare let f2: (cb: typeof Foo.f2) => void; + f1 = f2; + f2 = f1; // Error +} + +namespace n2 { + type BivariantHack = { foo(x: Input): Output }["foo"]; + declare let f1: (cb: BivariantHack) => void; + declare let f2: (cb: BivariantHack) => void; + f1 = f2; + f2 = f1; // Error +} \ No newline at end of file diff --git a/tests/cases/conformance/classes/classDeclarations/classExtendingNull.ts b/tests/cases/conformance/classes/classDeclarations/classExtendingNull.ts index 655cf44ed57..b00c047a379 100644 --- a/tests/cases/conformance/classes/classDeclarations/classExtendingNull.ts +++ b/tests/cases/conformance/classes/classDeclarations/classExtendingNull.ts @@ -1,2 +1,4 @@ class C1 extends null { } class C2 extends (null) { } +class C3 extends null { x = 1; } +class C4 extends (null) { x = 1; } \ No newline at end of file diff --git a/tests/cases/conformance/dynamicImport/importCallExpressionNestedAMD.ts b/tests/cases/conformance/dynamicImport/importCallExpressionNestedAMD.ts new file mode 100644 index 00000000000..1dbde4e1956 --- /dev/null +++ b/tests/cases/conformance/dynamicImport/importCallExpressionNestedAMD.ts @@ -0,0 +1,11 @@ +// @module: amd +// @target: es6 +// @skipLibCheck: true +// @lib: es6 +// @filename: foo.ts +export default "./foo"; + +// @filename: index.ts +async function foo() { + return await import((await import("./foo")).default); +} \ No newline at end of file diff --git a/tests/cases/conformance/dynamicImport/importCallExpressionNestedAMD2.ts b/tests/cases/conformance/dynamicImport/importCallExpressionNestedAMD2.ts new file mode 100644 index 00000000000..79540087a58 --- /dev/null +++ b/tests/cases/conformance/dynamicImport/importCallExpressionNestedAMD2.ts @@ -0,0 +1,11 @@ +// @module: amd +// @target: es5 +// @skipLibCheck: true +// @lib: es6 +// @filename: foo.ts +export default "./foo"; + +// @filename: index.ts +async function foo() { + return await import((await import("./foo")).default); +} \ No newline at end of file diff --git a/tests/cases/conformance/dynamicImport/importCallExpressionNestedCJS.ts b/tests/cases/conformance/dynamicImport/importCallExpressionNestedCJS.ts new file mode 100644 index 00000000000..5c99e56ecda --- /dev/null +++ b/tests/cases/conformance/dynamicImport/importCallExpressionNestedCJS.ts @@ -0,0 +1,11 @@ +// @module: commonjs +// @target: es6 +// @skipLibCheck: true +// @lib: es6 +// @filename: foo.ts +export default "./foo"; + +// @filename: index.ts +async function foo() { + return await import((await import("./foo")).default); +} \ No newline at end of file diff --git a/tests/cases/conformance/dynamicImport/importCallExpressionNestedCJS2.ts b/tests/cases/conformance/dynamicImport/importCallExpressionNestedCJS2.ts new file mode 100644 index 00000000000..0776053d668 --- /dev/null +++ b/tests/cases/conformance/dynamicImport/importCallExpressionNestedCJS2.ts @@ -0,0 +1,11 @@ +// @module: commonjs +// @target: es5 +// @skipLibCheck: true +// @lib: es6 +// @filename: foo.ts +export default "./foo"; + +// @filename: index.ts +async function foo() { + return await import((await import("./foo")).default); +} \ No newline at end of file diff --git a/tests/cases/conformance/dynamicImport/importCallExpressionNestedES2015.ts b/tests/cases/conformance/dynamicImport/importCallExpressionNestedES2015.ts new file mode 100644 index 00000000000..9708f466f5e --- /dev/null +++ b/tests/cases/conformance/dynamicImport/importCallExpressionNestedES2015.ts @@ -0,0 +1,11 @@ +// @module: es2015 +// @target: es6 +// @skipLibCheck: true +// @lib: es6 +// @filename: foo.ts +export default "./foo"; + +// @filename: index.ts +async function foo() { + return await import((await import("./foo")).default); +} \ No newline at end of file diff --git a/tests/cases/conformance/dynamicImport/importCallExpressionNestedES20152.ts b/tests/cases/conformance/dynamicImport/importCallExpressionNestedES20152.ts new file mode 100644 index 00000000000..c78b38db193 --- /dev/null +++ b/tests/cases/conformance/dynamicImport/importCallExpressionNestedES20152.ts @@ -0,0 +1,11 @@ +// @module: es2015 +// @target: es5 +// @skipLibCheck: true +// @lib: es6 +// @filename: foo.ts +export default "./foo"; + +// @filename: index.ts +async function foo() { + return await import((await import("./foo")).default); +} \ No newline at end of file diff --git a/tests/cases/conformance/dynamicImport/importCallExpressionNestedESNext.ts b/tests/cases/conformance/dynamicImport/importCallExpressionNestedESNext.ts new file mode 100644 index 00000000000..fffc12a7726 --- /dev/null +++ b/tests/cases/conformance/dynamicImport/importCallExpressionNestedESNext.ts @@ -0,0 +1,11 @@ +// @module: esnext +// @target: es6 +// @skipLibCheck: true +// @lib: es6 +// @filename: foo.ts +export default "./foo"; + +// @filename: index.ts +async function foo() { + return await import((await import("./foo")).default); +} \ No newline at end of file diff --git a/tests/cases/conformance/dynamicImport/importCallExpressionNestedESNext2.ts b/tests/cases/conformance/dynamicImport/importCallExpressionNestedESNext2.ts new file mode 100644 index 00000000000..246e9d931f0 --- /dev/null +++ b/tests/cases/conformance/dynamicImport/importCallExpressionNestedESNext2.ts @@ -0,0 +1,11 @@ +// @module: esnext +// @target: es5 +// @skipLibCheck: true +// @lib: es6 +// @filename: foo.ts +export default "./foo"; + +// @filename: index.ts +async function foo() { + return await import((await import("./foo")).default); +} \ No newline at end of file diff --git a/tests/cases/conformance/dynamicImport/importCallExpressionNestedSystem.ts b/tests/cases/conformance/dynamicImport/importCallExpressionNestedSystem.ts new file mode 100644 index 00000000000..04a11ac8169 --- /dev/null +++ b/tests/cases/conformance/dynamicImport/importCallExpressionNestedSystem.ts @@ -0,0 +1,11 @@ +// @module: system +// @target: es6 +// @skipLibCheck: true +// @lib: es6 +// @filename: foo.ts +export default "./foo"; + +// @filename: index.ts +async function foo() { + return await import((await import("./foo")).default); +} \ No newline at end of file diff --git a/tests/cases/conformance/dynamicImport/importCallExpressionNestedSystem2.ts b/tests/cases/conformance/dynamicImport/importCallExpressionNestedSystem2.ts new file mode 100644 index 00000000000..f8b2d4513ee --- /dev/null +++ b/tests/cases/conformance/dynamicImport/importCallExpressionNestedSystem2.ts @@ -0,0 +1,11 @@ +// @module: system +// @target: es5 +// @skipLibCheck: true +// @lib: es6 +// @filename: foo.ts +export default "./foo"; + +// @filename: index.ts +async function foo() { + return await import((await import("./foo")).default); +} \ No newline at end of file diff --git a/tests/cases/conformance/dynamicImport/importCallExpressionNestedUMD.ts b/tests/cases/conformance/dynamicImport/importCallExpressionNestedUMD.ts new file mode 100644 index 00000000000..8b900a7dbd6 --- /dev/null +++ b/tests/cases/conformance/dynamicImport/importCallExpressionNestedUMD.ts @@ -0,0 +1,11 @@ +// @module: umd +// @target: es6 +// @skipLibCheck: true +// @lib: es6 +// @filename: foo.ts +export default "./foo"; + +// @filename: index.ts +async function foo() { + return await import((await import("./foo")).default); +} \ No newline at end of file diff --git a/tests/cases/conformance/dynamicImport/importCallExpressionNestedUMD2.ts b/tests/cases/conformance/dynamicImport/importCallExpressionNestedUMD2.ts new file mode 100644 index 00000000000..e07dba0d2e5 --- /dev/null +++ b/tests/cases/conformance/dynamicImport/importCallExpressionNestedUMD2.ts @@ -0,0 +1,11 @@ +// @module: umd +// @target: es5 +// @skipLibCheck: true +// @lib: es6 +// @filename: foo.ts +export default "./foo"; + +// @filename: index.ts +async function foo() { + return await import((await import("./foo")).default); +} \ No newline at end of file diff --git a/tests/cases/conformance/jsx/checkJsxChildrenProperty1.tsx b/tests/cases/conformance/jsx/checkJsxChildrenProperty1.tsx index 70b58c03f6a..09c003c376c 100644 --- a/tests/cases/conformance/jsx/checkJsxChildrenProperty1.tsx +++ b/tests/cases/conformance/jsx/checkJsxChildrenProperty1.tsx @@ -1,6 +1,7 @@ // @filename: file.tsx // @jsx: preserve // @noLib: true +// @skipLibCheck: true // @libFiles: react.d.ts,lib.d.ts import React = require('react'); diff --git a/tests/cases/conformance/jsx/checkJsxChildrenProperty13.tsx b/tests/cases/conformance/jsx/checkJsxChildrenProperty13.tsx index 1584bf43159..0c2d2507864 100644 --- a/tests/cases/conformance/jsx/checkJsxChildrenProperty13.tsx +++ b/tests/cases/conformance/jsx/checkJsxChildrenProperty13.tsx @@ -1,6 +1,7 @@ // @filename: file.tsx // @jsx: preserve // @noLib: true +// @skipLibCheck: true // @libFiles: react.d.ts,lib.d.ts import React = require('react'); diff --git a/tests/cases/conformance/jsx/checkJsxChildrenProperty2.tsx b/tests/cases/conformance/jsx/checkJsxChildrenProperty2.tsx index 65bc0f50b12..632b9d5d849 100644 --- a/tests/cases/conformance/jsx/checkJsxChildrenProperty2.tsx +++ b/tests/cases/conformance/jsx/checkJsxChildrenProperty2.tsx @@ -1,6 +1,7 @@ // @filename: file.tsx // @jsx: preserve // @noLib: true +// @skipLibCheck: true // @libFiles: react.d.ts,lib.d.ts import React = require('react'); diff --git a/tests/cases/conformance/jsx/checkJsxChildrenProperty4.tsx b/tests/cases/conformance/jsx/checkJsxChildrenProperty4.tsx index 34877f2000c..277f2fb55c2 100644 --- a/tests/cases/conformance/jsx/checkJsxChildrenProperty4.tsx +++ b/tests/cases/conformance/jsx/checkJsxChildrenProperty4.tsx @@ -1,6 +1,7 @@ // @filename: file.tsx // @jsx: preserve // @noLib: true +// @skipLibCheck: true // @libFiles: react.d.ts,lib.d.ts import React = require('react'); diff --git a/tests/cases/conformance/jsx/checkJsxChildrenProperty6.tsx b/tests/cases/conformance/jsx/checkJsxChildrenProperty6.tsx index c7c709dd369..40801539f54 100644 --- a/tests/cases/conformance/jsx/checkJsxChildrenProperty6.tsx +++ b/tests/cases/conformance/jsx/checkJsxChildrenProperty6.tsx @@ -1,6 +1,7 @@ // @filename: file.tsx // @jsx: preserve // @noLib: true +// @skipLibCheck: true // @libFiles: react.d.ts,lib.d.ts import React = require('react'); diff --git a/tests/cases/conformance/jsx/checkJsxChildrenProperty7.tsx b/tests/cases/conformance/jsx/checkJsxChildrenProperty7.tsx index 82297737a11..0a5d120dd19 100644 --- a/tests/cases/conformance/jsx/checkJsxChildrenProperty7.tsx +++ b/tests/cases/conformance/jsx/checkJsxChildrenProperty7.tsx @@ -1,6 +1,7 @@ // @filename: file.tsx // @jsx: preserve // @noLib: true +// @skipLibCheck: true // @libFiles: react.d.ts,lib.d.ts import React = require('react'); diff --git a/tests/cases/conformance/jsx/checkJsxChildrenProperty8.tsx b/tests/cases/conformance/jsx/checkJsxChildrenProperty8.tsx index 44e9f7e0652..c9c5d70ae37 100644 --- a/tests/cases/conformance/jsx/checkJsxChildrenProperty8.tsx +++ b/tests/cases/conformance/jsx/checkJsxChildrenProperty8.tsx @@ -1,6 +1,7 @@ // @filename: file.tsx // @jsx: preserve // @noLib: true +// @skipLibCheck: true // @libFiles: react.d.ts,lib.d.ts import React = require('react'); diff --git a/tests/cases/conformance/jsx/checkJsxChildrenProperty9.tsx b/tests/cases/conformance/jsx/checkJsxChildrenProperty9.tsx index 5453262b7d4..7d3d65fbc6f 100644 --- a/tests/cases/conformance/jsx/checkJsxChildrenProperty9.tsx +++ b/tests/cases/conformance/jsx/checkJsxChildrenProperty9.tsx @@ -1,6 +1,7 @@ // @filename: file.tsx // @jsx: preserve // @noLib: true +// @skipLibCheck: true // @libFiles: react.d.ts,lib.d.ts import React = require('react'); diff --git a/tests/cases/conformance/jsx/commentEmittingInPreserveJsx1.tsx b/tests/cases/conformance/jsx/commentEmittingInPreserveJsx1.tsx index 323cd029189..ebdb36aed15 100644 --- a/tests/cases/conformance/jsx/commentEmittingInPreserveJsx1.tsx +++ b/tests/cases/conformance/jsx/commentEmittingInPreserveJsx1.tsx @@ -1,6 +1,7 @@ // @filename: file.tsx // @jsx: preserve // @noLib: true +// @skipLibCheck: true // @libFiles: react.d.ts,lib.d.ts import React = require('react'); diff --git a/tests/cases/conformance/jsx/tsxAttributeResolution15.tsx b/tests/cases/conformance/jsx/tsxAttributeResolution15.tsx index ce2e12fd2bb..01dedf4711e 100644 --- a/tests/cases/conformance/jsx/tsxAttributeResolution15.tsx +++ b/tests/cases/conformance/jsx/tsxAttributeResolution15.tsx @@ -1,6 +1,7 @@ // @filename: file.tsx // @jsx: preserve // @noLib: true +// @skipLibCheck: true // @libFiles: react.d.ts,lib.d.ts import React = require('react'); diff --git a/tests/cases/conformance/jsx/tsxAttributeResolution16.tsx b/tests/cases/conformance/jsx/tsxAttributeResolution16.tsx index 811a1b47174..15e8089a5ae 100644 --- a/tests/cases/conformance/jsx/tsxAttributeResolution16.tsx +++ b/tests/cases/conformance/jsx/tsxAttributeResolution16.tsx @@ -1,6 +1,7 @@ // @filename: file.tsx // @jsx: preserve // @noLib: true +// @skipLibCheck: true // @libFiles: react.d.ts,lib.d.ts import React = require('react'); diff --git a/tests/cases/conformance/jsx/tsxDefaultAttributesResolution1.tsx b/tests/cases/conformance/jsx/tsxDefaultAttributesResolution1.tsx index 03314b400ee..b80252bee1b 100644 --- a/tests/cases/conformance/jsx/tsxDefaultAttributesResolution1.tsx +++ b/tests/cases/conformance/jsx/tsxDefaultAttributesResolution1.tsx @@ -1,6 +1,7 @@ // @filename: file.tsx // @jsx: preserve // @noLib: true +// @skipLibCheck: true // @libFiles: react.d.ts,lib.d.ts import React = require('react'); diff --git a/tests/cases/conformance/jsx/tsxDefaultAttributesResolution2.tsx b/tests/cases/conformance/jsx/tsxDefaultAttributesResolution2.tsx index b00655b5a57..27b1e24e23f 100644 --- a/tests/cases/conformance/jsx/tsxDefaultAttributesResolution2.tsx +++ b/tests/cases/conformance/jsx/tsxDefaultAttributesResolution2.tsx @@ -1,6 +1,7 @@ // @filename: file.tsx // @jsx: preserve // @noLib: true +// @skipLibCheck: true // @libFiles: react.d.ts,lib.d.ts import React = require('react'); diff --git a/tests/cases/conformance/jsx/tsxDefaultAttributesResolution3.tsx b/tests/cases/conformance/jsx/tsxDefaultAttributesResolution3.tsx index 303e6ef891d..981cdabf464 100644 --- a/tests/cases/conformance/jsx/tsxDefaultAttributesResolution3.tsx +++ b/tests/cases/conformance/jsx/tsxDefaultAttributesResolution3.tsx @@ -1,6 +1,7 @@ // @filename: file.tsx // @jsx: preserve // @noLib: true +// @skipLibCheck: true // @libFiles: react.d.ts,lib.d.ts import React = require('react'); diff --git a/tests/cases/conformance/jsx/tsxGenericAttributesType1.tsx b/tests/cases/conformance/jsx/tsxGenericAttributesType1.tsx index e6b7fc18ef7..ebb80771856 100644 --- a/tests/cases/conformance/jsx/tsxGenericAttributesType1.tsx +++ b/tests/cases/conformance/jsx/tsxGenericAttributesType1.tsx @@ -1,6 +1,7 @@ // @filename: file.tsx // @jsx: preserve // @noLib: true +// @skipLibCheck: true // @libFiles: react.d.ts,lib.d.ts import React = require('react'); diff --git a/tests/cases/conformance/jsx/tsxGenericAttributesType2.tsx b/tests/cases/conformance/jsx/tsxGenericAttributesType2.tsx index 48acd55546f..0b226f9cf90 100644 --- a/tests/cases/conformance/jsx/tsxGenericAttributesType2.tsx +++ b/tests/cases/conformance/jsx/tsxGenericAttributesType2.tsx @@ -1,6 +1,7 @@ // @filename: file.tsx // @jsx: preserve // @noLib: true +// @skipLibCheck: true // @libFiles: react.d.ts,lib.d.ts import React = require('react'); diff --git a/tests/cases/conformance/jsx/tsxGenericAttributesType3.tsx b/tests/cases/conformance/jsx/tsxGenericAttributesType3.tsx index b683c5e7970..28364b93afc 100644 --- a/tests/cases/conformance/jsx/tsxGenericAttributesType3.tsx +++ b/tests/cases/conformance/jsx/tsxGenericAttributesType3.tsx @@ -1,6 +1,7 @@ // @filename: file.tsx // @jsx: preserve // @noLib: true +// @skipLibCheck: true // @libFiles: react.d.ts,lib.d.ts import React = require('react'); diff --git a/tests/cases/conformance/jsx/tsxGenericAttributesType5.tsx b/tests/cases/conformance/jsx/tsxGenericAttributesType5.tsx index d0215da7397..ba8d9a284ca 100644 --- a/tests/cases/conformance/jsx/tsxGenericAttributesType5.tsx +++ b/tests/cases/conformance/jsx/tsxGenericAttributesType5.tsx @@ -1,6 +1,7 @@ // @filename: file.tsx // @jsx: preserve // @noLib: true +// @skipLibCheck: true // @libFiles: react.d.ts,lib.d.ts import React = require('react'); diff --git a/tests/cases/conformance/jsx/tsxGenericAttributesType6.tsx b/tests/cases/conformance/jsx/tsxGenericAttributesType6.tsx index d70df8a0cf7..22634ae9f7d 100644 --- a/tests/cases/conformance/jsx/tsxGenericAttributesType6.tsx +++ b/tests/cases/conformance/jsx/tsxGenericAttributesType6.tsx @@ -1,6 +1,7 @@ // @filename: file.tsx // @jsx: preserve // @noLib: true +// @skipLibCheck: true // @libFiles: react.d.ts,lib.d.ts import React = require('react'); diff --git a/tests/cases/conformance/jsx/tsxGenericAttributesType7.tsx b/tests/cases/conformance/jsx/tsxGenericAttributesType7.tsx index 3044fda23df..07c6f05da1c 100644 --- a/tests/cases/conformance/jsx/tsxGenericAttributesType7.tsx +++ b/tests/cases/conformance/jsx/tsxGenericAttributesType7.tsx @@ -1,6 +1,7 @@ // @filename: file.tsx // @jsx: preserve // @noLib: true +// @skipLibCheck: true // @libFiles: react.d.ts,lib.d.ts import React = require('react'); diff --git a/tests/cases/conformance/jsx/tsxGenericAttributesType8.tsx b/tests/cases/conformance/jsx/tsxGenericAttributesType8.tsx index b1d3a7445c8..77d391f7f39 100644 --- a/tests/cases/conformance/jsx/tsxGenericAttributesType8.tsx +++ b/tests/cases/conformance/jsx/tsxGenericAttributesType8.tsx @@ -1,6 +1,7 @@ // @filename: file.tsx // @jsx: preserve // @noLib: true +// @skipLibCheck: true // @libFiles: react.d.ts,lib.d.ts import React = require('react'); diff --git a/tests/cases/conformance/jsx/tsxGenericAttributesType9.tsx b/tests/cases/conformance/jsx/tsxGenericAttributesType9.tsx index 32a1af66f84..5a3f2b19845 100644 --- a/tests/cases/conformance/jsx/tsxGenericAttributesType9.tsx +++ b/tests/cases/conformance/jsx/tsxGenericAttributesType9.tsx @@ -1,6 +1,7 @@ // @filename: file.tsx // @jsx: preserve // @noLib: true +// @skipLibCheck: true // @libFiles: react.d.ts,lib.d.ts import React = require('react'); diff --git a/tests/cases/conformance/jsx/tsxReactComponentWithDefaultTypeParameter1.tsx b/tests/cases/conformance/jsx/tsxReactComponentWithDefaultTypeParameter1.tsx index 5a8434dfe64..9d9ae5442cd 100644 --- a/tests/cases/conformance/jsx/tsxReactComponentWithDefaultTypeParameter1.tsx +++ b/tests/cases/conformance/jsx/tsxReactComponentWithDefaultTypeParameter1.tsx @@ -1,6 +1,7 @@ // @filename: file.tsx // @jsx: preserve // @noLib: true +// @skipLibCheck: true // @libFiles: react.d.ts,lib.d.ts import React = require('react'); diff --git a/tests/cases/conformance/jsx/tsxReactComponentWithDefaultTypeParameter2.tsx b/tests/cases/conformance/jsx/tsxReactComponentWithDefaultTypeParameter2.tsx index 2aa4afc2e2e..84c4ffcef45 100644 --- a/tests/cases/conformance/jsx/tsxReactComponentWithDefaultTypeParameter2.tsx +++ b/tests/cases/conformance/jsx/tsxReactComponentWithDefaultTypeParameter2.tsx @@ -1,6 +1,7 @@ // @filename: file.tsx // @jsx: preserve // @noLib: true +// @skipLibCheck: true // @libFiles: react.d.ts,lib.d.ts import React = require('react'); diff --git a/tests/cases/conformance/jsx/tsxReactComponentWithDefaultTypeParameter3.tsx b/tests/cases/conformance/jsx/tsxReactComponentWithDefaultTypeParameter3.tsx index e4a045f1362..abae7e36853 100644 --- a/tests/cases/conformance/jsx/tsxReactComponentWithDefaultTypeParameter3.tsx +++ b/tests/cases/conformance/jsx/tsxReactComponentWithDefaultTypeParameter3.tsx @@ -1,6 +1,7 @@ // @filename: file.tsx // @jsx: preserve // @noLib: true +// @skipLibCheck: true // @libFiles: react.d.ts,lib.d.ts import React = require('react'); diff --git a/tests/cases/conformance/jsx/tsxSpreadAttributesResolution1.tsx b/tests/cases/conformance/jsx/tsxSpreadAttributesResolution1.tsx index a14a7ffe59c..dfaaa8b3b72 100644 --- a/tests/cases/conformance/jsx/tsxSpreadAttributesResolution1.tsx +++ b/tests/cases/conformance/jsx/tsxSpreadAttributesResolution1.tsx @@ -1,6 +1,7 @@ // @filename: file.tsx // @jsx: preserve // @noLib: true +// @skipLibCheck: true // @libFiles: react.d.ts,lib.d.ts import React = require('react'); diff --git a/tests/cases/conformance/jsx/tsxSpreadAttributesResolution10.tsx b/tests/cases/conformance/jsx/tsxSpreadAttributesResolution10.tsx index 6410f075ae9..733731731e4 100644 --- a/tests/cases/conformance/jsx/tsxSpreadAttributesResolution10.tsx +++ b/tests/cases/conformance/jsx/tsxSpreadAttributesResolution10.tsx @@ -1,6 +1,7 @@ // @filename: file.tsx // @jsx: preserve // @noLib: true +// @skipLibCheck: true // @libFiles: react.d.ts,lib.d.ts import React = require('react'); diff --git a/tests/cases/conformance/jsx/tsxSpreadAttributesResolution11.tsx b/tests/cases/conformance/jsx/tsxSpreadAttributesResolution11.tsx index c8008623441..458cac5bc98 100644 --- a/tests/cases/conformance/jsx/tsxSpreadAttributesResolution11.tsx +++ b/tests/cases/conformance/jsx/tsxSpreadAttributesResolution11.tsx @@ -1,6 +1,7 @@ // @filename: file.tsx // @jsx: preserve // @noLib: true +// @skipLibCheck: true // @libFiles: react.d.ts,lib.d.ts import React = require('react'); diff --git a/tests/cases/conformance/jsx/tsxSpreadAttributesResolution12.tsx b/tests/cases/conformance/jsx/tsxSpreadAttributesResolution12.tsx index 457a3f29810..4e0baa8677b 100644 --- a/tests/cases/conformance/jsx/tsxSpreadAttributesResolution12.tsx +++ b/tests/cases/conformance/jsx/tsxSpreadAttributesResolution12.tsx @@ -1,6 +1,7 @@ // @filename: file.tsx // @jsx: preserve // @noLib: true +// @skipLibCheck: true // @libFiles: react.d.ts,lib.d.ts import React = require('react'); diff --git a/tests/cases/conformance/jsx/tsxSpreadAttributesResolution13.tsx b/tests/cases/conformance/jsx/tsxSpreadAttributesResolution13.tsx index b665654514c..a9ebb4caba4 100644 --- a/tests/cases/conformance/jsx/tsxSpreadAttributesResolution13.tsx +++ b/tests/cases/conformance/jsx/tsxSpreadAttributesResolution13.tsx @@ -1,6 +1,7 @@ // @filename: file.tsx // @jsx: preserve // @noLib: true +// @skipLibCheck: true // @libFiles: react.d.ts,lib.d.ts import React = require('react'); diff --git a/tests/cases/conformance/jsx/tsxSpreadAttributesResolution14.tsx b/tests/cases/conformance/jsx/tsxSpreadAttributesResolution14.tsx index b9edcc8ab75..5bfe228d10a 100644 --- a/tests/cases/conformance/jsx/tsxSpreadAttributesResolution14.tsx +++ b/tests/cases/conformance/jsx/tsxSpreadAttributesResolution14.tsx @@ -1,6 +1,7 @@ // @filename: file.tsx // @jsx: preserve // @noLib: true +// @skipLibCheck: true // @libFiles: react.d.ts,lib.d.ts import React = require('react'); diff --git a/tests/cases/conformance/jsx/tsxSpreadAttributesResolution15.tsx b/tests/cases/conformance/jsx/tsxSpreadAttributesResolution15.tsx index 5ede01c0eab..2ee07507c08 100644 --- a/tests/cases/conformance/jsx/tsxSpreadAttributesResolution15.tsx +++ b/tests/cases/conformance/jsx/tsxSpreadAttributesResolution15.tsx @@ -1,6 +1,7 @@ // @filename: file.tsx // @jsx: preserve // @noLib: true +// @skipLibCheck: true // @libFiles: react.d.ts,lib.d.ts import React = require('react'); diff --git a/tests/cases/conformance/jsx/tsxSpreadAttributesResolution16.tsx b/tests/cases/conformance/jsx/tsxSpreadAttributesResolution16.tsx index 98616661857..d197e29fed3 100644 --- a/tests/cases/conformance/jsx/tsxSpreadAttributesResolution16.tsx +++ b/tests/cases/conformance/jsx/tsxSpreadAttributesResolution16.tsx @@ -1,6 +1,7 @@ // @filename: file.tsx // @jsx: preserve // @noLib: true +// @skipLibCheck: true // @libFiles: react.d.ts,lib.d.ts import React = require('react'); diff --git a/tests/cases/conformance/jsx/tsxSpreadAttributesResolution2.tsx b/tests/cases/conformance/jsx/tsxSpreadAttributesResolution2.tsx index 7ec1d871189..f32b367b718 100644 --- a/tests/cases/conformance/jsx/tsxSpreadAttributesResolution2.tsx +++ b/tests/cases/conformance/jsx/tsxSpreadAttributesResolution2.tsx @@ -1,6 +1,7 @@ // @filename: file.tsx // @jsx: preserve // @noLib: true +// @skipLibCheck: true // @libFiles: react.d.ts,lib.d.ts import React = require('react'); diff --git a/tests/cases/conformance/jsx/tsxSpreadAttributesResolution4.tsx b/tests/cases/conformance/jsx/tsxSpreadAttributesResolution4.tsx index 8afec4b69c8..3d39a1a7cc9 100644 --- a/tests/cases/conformance/jsx/tsxSpreadAttributesResolution4.tsx +++ b/tests/cases/conformance/jsx/tsxSpreadAttributesResolution4.tsx @@ -1,6 +1,7 @@ // @filename: file.tsx // @jsx: preserve // @noLib: true +// @skipLibCheck: true // @libFiles: react.d.ts,lib.d.ts import React = require('react'); diff --git a/tests/cases/conformance/jsx/tsxSpreadAttributesResolution5.tsx b/tests/cases/conformance/jsx/tsxSpreadAttributesResolution5.tsx index 22045c81451..dcea930fa25 100644 --- a/tests/cases/conformance/jsx/tsxSpreadAttributesResolution5.tsx +++ b/tests/cases/conformance/jsx/tsxSpreadAttributesResolution5.tsx @@ -1,6 +1,7 @@ // @filename: file.tsx // @jsx: preserve // @noLib: true +// @skipLibCheck: true // @libFiles: react.d.ts,lib.d.ts import React = require('react'); diff --git a/tests/cases/conformance/jsx/tsxSpreadAttributesResolution6.tsx b/tests/cases/conformance/jsx/tsxSpreadAttributesResolution6.tsx index 35a190e10cc..5c7d9448d12 100644 --- a/tests/cases/conformance/jsx/tsxSpreadAttributesResolution6.tsx +++ b/tests/cases/conformance/jsx/tsxSpreadAttributesResolution6.tsx @@ -1,6 +1,7 @@ // @filename: file.tsx // @jsx: preserve // @noLib: true +// @skipLibCheck: true // @libFiles: react.d.ts,lib.d.ts import React = require('react'); diff --git a/tests/cases/conformance/jsx/tsxSpreadAttributesResolution7.tsx b/tests/cases/conformance/jsx/tsxSpreadAttributesResolution7.tsx index 55e3222c022..34cd8254b7a 100644 --- a/tests/cases/conformance/jsx/tsxSpreadAttributesResolution7.tsx +++ b/tests/cases/conformance/jsx/tsxSpreadAttributesResolution7.tsx @@ -1,6 +1,7 @@ // @filename: file.tsx // @jsx: preserve // @noLib: true +// @skipLibCheck: true // @libFiles: react.d.ts,lib.d.ts import React = require('react'); diff --git a/tests/cases/conformance/jsx/tsxSpreadAttributesResolution8.tsx b/tests/cases/conformance/jsx/tsxSpreadAttributesResolution8.tsx index 937678605d6..04e61e32eb9 100644 --- a/tests/cases/conformance/jsx/tsxSpreadAttributesResolution8.tsx +++ b/tests/cases/conformance/jsx/tsxSpreadAttributesResolution8.tsx @@ -1,6 +1,7 @@ // @filename: file.tsx // @jsx: preserve // @noLib: true +// @skipLibCheck: true // @libFiles: react.d.ts,lib.d.ts import React = require('react'); diff --git a/tests/cases/conformance/jsx/tsxSpreadAttributesResolution9.tsx b/tests/cases/conformance/jsx/tsxSpreadAttributesResolution9.tsx index 9f2a63a56b6..c14003774c2 100644 --- a/tests/cases/conformance/jsx/tsxSpreadAttributesResolution9.tsx +++ b/tests/cases/conformance/jsx/tsxSpreadAttributesResolution9.tsx @@ -1,6 +1,7 @@ // @filename: file.tsx // @jsx: preserve // @noLib: true +// @skipLibCheck: true // @libFiles: react.d.ts,lib.d.ts import React = require('react'); diff --git a/tests/cases/conformance/jsx/tsxStatelessFunctionComponentOverload3.tsx b/tests/cases/conformance/jsx/tsxStatelessFunctionComponentOverload3.tsx index e4e8fe9f096..1c2afd82533 100644 --- a/tests/cases/conformance/jsx/tsxStatelessFunctionComponentOverload3.tsx +++ b/tests/cases/conformance/jsx/tsxStatelessFunctionComponentOverload3.tsx @@ -2,6 +2,7 @@ // @jsx: preserve // @module: amd // @noLib: true +// @skipLibCheck: true // @libFiles: react.d.ts,lib.d.ts interface Context { diff --git a/tests/cases/conformance/jsx/tsxStatelessFunctionComponentOverload4.tsx b/tests/cases/conformance/jsx/tsxStatelessFunctionComponentOverload4.tsx index b96073b4cc0..93ac29e4d84 100644 --- a/tests/cases/conformance/jsx/tsxStatelessFunctionComponentOverload4.tsx +++ b/tests/cases/conformance/jsx/tsxStatelessFunctionComponentOverload4.tsx @@ -2,6 +2,7 @@ // @jsx: preserve // @module: amd // @noLib: true +// @skipLibCheck: true // @libFiles: react.d.ts,lib.d.ts import React = require('react') diff --git a/tests/cases/conformance/jsx/tsxStatelessFunctionComponentOverload5.tsx b/tests/cases/conformance/jsx/tsxStatelessFunctionComponentOverload5.tsx index 34be082b3c8..b32393c44ce 100644 --- a/tests/cases/conformance/jsx/tsxStatelessFunctionComponentOverload5.tsx +++ b/tests/cases/conformance/jsx/tsxStatelessFunctionComponentOverload5.tsx @@ -2,6 +2,7 @@ // @jsx: preserve // @module: amd // @noLib: true +// @skipLibCheck: true // @libFiles: react.d.ts,lib.d.ts import React = require('react') diff --git a/tests/cases/conformance/jsx/tsxStatelessFunctionComponentWithDefaultTypeParameter1.tsx b/tests/cases/conformance/jsx/tsxStatelessFunctionComponentWithDefaultTypeParameter1.tsx index f1a0fa20e0e..d9256ee6607 100644 --- a/tests/cases/conformance/jsx/tsxStatelessFunctionComponentWithDefaultTypeParameter1.tsx +++ b/tests/cases/conformance/jsx/tsxStatelessFunctionComponentWithDefaultTypeParameter1.tsx @@ -2,6 +2,7 @@ // @jsx: preserve // @module: amd // @noLib: true +// @skipLibCheck: true // @libFiles: react.d.ts,lib.d.ts import React = require('react') diff --git a/tests/cases/conformance/jsx/tsxStatelessFunctionComponentWithDefaultTypeParameter2.tsx b/tests/cases/conformance/jsx/tsxStatelessFunctionComponentWithDefaultTypeParameter2.tsx index cfc1fbb5794..2117aedfac1 100644 --- a/tests/cases/conformance/jsx/tsxStatelessFunctionComponentWithDefaultTypeParameter2.tsx +++ b/tests/cases/conformance/jsx/tsxStatelessFunctionComponentWithDefaultTypeParameter2.tsx @@ -2,6 +2,7 @@ // @jsx: preserve // @module: amd // @noLib: true +// @skipLibCheck: true // @libFiles: react.d.ts,lib.d.ts import React = require('react') diff --git a/tests/cases/conformance/jsx/tsxStatelessFunctionComponents2.tsx b/tests/cases/conformance/jsx/tsxStatelessFunctionComponents2.tsx index d2a6586b436..01e848f574e 100644 --- a/tests/cases/conformance/jsx/tsxStatelessFunctionComponents2.tsx +++ b/tests/cases/conformance/jsx/tsxStatelessFunctionComponents2.tsx @@ -1,6 +1,7 @@ // @filename: file.tsx // @jsx: preserve // @noLib: true +// @skipLibCheck: true // @libFiles: react.d.ts,lib.d.ts import React = require('react'); diff --git a/tests/cases/conformance/jsx/tsxStatelessFunctionComponents3.tsx b/tests/cases/conformance/jsx/tsxStatelessFunctionComponents3.tsx index 48ce5fb5efb..9490e913f92 100644 --- a/tests/cases/conformance/jsx/tsxStatelessFunctionComponents3.tsx +++ b/tests/cases/conformance/jsx/tsxStatelessFunctionComponents3.tsx @@ -2,6 +2,7 @@ // @jsx: preserve // @module: amd // @noLib: true +// @skipLibCheck: true // @libFiles: react.d.ts,lib.d.ts import React = require('react'); diff --git a/tests/cases/conformance/jsx/tsxStatelessFunctionComponentsWithTypeArguments1.tsx b/tests/cases/conformance/jsx/tsxStatelessFunctionComponentsWithTypeArguments1.tsx index f910ef665e6..75b9915853b 100644 --- a/tests/cases/conformance/jsx/tsxStatelessFunctionComponentsWithTypeArguments1.tsx +++ b/tests/cases/conformance/jsx/tsxStatelessFunctionComponentsWithTypeArguments1.tsx @@ -2,6 +2,7 @@ // @jsx: preserve // @module: amd // @noLib: true +// @skipLibCheck: true // @libFiles: react.d.ts,lib.d.ts import React = require('react') diff --git a/tests/cases/conformance/jsx/tsxStatelessFunctionComponentsWithTypeArguments4.tsx b/tests/cases/conformance/jsx/tsxStatelessFunctionComponentsWithTypeArguments4.tsx index 4be582dab5c..6cd88999425 100644 --- a/tests/cases/conformance/jsx/tsxStatelessFunctionComponentsWithTypeArguments4.tsx +++ b/tests/cases/conformance/jsx/tsxStatelessFunctionComponentsWithTypeArguments4.tsx @@ -2,6 +2,7 @@ // @jsx: preserve // @module: amd // @noLib: true +// @skipLibCheck: true // @libFiles: react.d.ts,lib.d.ts import React = require('react') diff --git a/tests/cases/conformance/jsx/tsxStatelessFunctionComponentsWithTypeArguments5.tsx b/tests/cases/conformance/jsx/tsxStatelessFunctionComponentsWithTypeArguments5.tsx index c19bfdf43bd..dcc87018818 100644 --- a/tests/cases/conformance/jsx/tsxStatelessFunctionComponentsWithTypeArguments5.tsx +++ b/tests/cases/conformance/jsx/tsxStatelessFunctionComponentsWithTypeArguments5.tsx @@ -2,6 +2,7 @@ // @jsx: preserve // @module: amd // @noLib: true +// @skipLibCheck: true // @libFiles: react.d.ts,lib.d.ts import React = require('react') diff --git a/tests/cases/conformance/jsx/tsxUnionElementType1.tsx b/tests/cases/conformance/jsx/tsxUnionElementType1.tsx index 300f0e95172..91457469a8d 100644 --- a/tests/cases/conformance/jsx/tsxUnionElementType1.tsx +++ b/tests/cases/conformance/jsx/tsxUnionElementType1.tsx @@ -1,6 +1,7 @@ // @filename: file.tsx // @jsx: react // @noLib: true +// @skipLibCheck: true // @libFiles: react.d.ts,lib.d.ts import React = require('react'); diff --git a/tests/cases/conformance/jsx/tsxUnionElementType2.tsx b/tests/cases/conformance/jsx/tsxUnionElementType2.tsx index 6a9ccd42b2e..ae0c0843b81 100644 --- a/tests/cases/conformance/jsx/tsxUnionElementType2.tsx +++ b/tests/cases/conformance/jsx/tsxUnionElementType2.tsx @@ -1,6 +1,7 @@ // @filename: file.tsx // @jsx: react // @noLib: true +// @skipLibCheck: true // @libFiles: react.d.ts,lib.d.ts import React = require('react'); diff --git a/tests/cases/conformance/jsx/tsxUnionElementType3.tsx b/tests/cases/conformance/jsx/tsxUnionElementType3.tsx index 5582150bf8c..6e021bc99fa 100644 --- a/tests/cases/conformance/jsx/tsxUnionElementType3.tsx +++ b/tests/cases/conformance/jsx/tsxUnionElementType3.tsx @@ -1,6 +1,7 @@ // @filename: file.tsx // @jsx: react // @noLib: true +// @skipLibCheck: true // @libFiles: react.d.ts,lib.d.ts import React = require('react'); diff --git a/tests/cases/conformance/jsx/tsxUnionElementType4.tsx b/tests/cases/conformance/jsx/tsxUnionElementType4.tsx index 725f93643c1..e7d7b6ff5ff 100644 --- a/tests/cases/conformance/jsx/tsxUnionElementType4.tsx +++ b/tests/cases/conformance/jsx/tsxUnionElementType4.tsx @@ -1,6 +1,7 @@ // @filename: file.tsx // @jsx: react // @noLib: true +// @skipLibCheck: true // @libFiles: react.d.ts,lib.d.ts import React = require('react'); diff --git a/tests/cases/conformance/jsx/tsxUnionElementType5.tsx b/tests/cases/conformance/jsx/tsxUnionElementType5.tsx index 9341bc5805a..2f3d96f4ecc 100644 --- a/tests/cases/conformance/jsx/tsxUnionElementType5.tsx +++ b/tests/cases/conformance/jsx/tsxUnionElementType5.tsx @@ -1,6 +1,7 @@ // @filename: file.tsx // @jsx: react // @noLib: true +// @skipLibCheck: true // @libFiles: react.d.ts,lib.d.ts import React = require('react'); diff --git a/tests/cases/conformance/jsx/tsxUnionElementType6.tsx b/tests/cases/conformance/jsx/tsxUnionElementType6.tsx index 99d7b980894..e4d2514dbd4 100644 --- a/tests/cases/conformance/jsx/tsxUnionElementType6.tsx +++ b/tests/cases/conformance/jsx/tsxUnionElementType6.tsx @@ -1,6 +1,7 @@ // @filename: file.tsx // @jsx: react // @noLib: true +// @skipLibCheck: true // @libFiles: react.d.ts,lib.d.ts import React = require('react'); diff --git a/tests/cases/conformance/jsx/tsxUnionTypeComponent2.tsx b/tests/cases/conformance/jsx/tsxUnionTypeComponent2.tsx index dbd14f6c27f..394e5e07d34 100644 --- a/tests/cases/conformance/jsx/tsxUnionTypeComponent2.tsx +++ b/tests/cases/conformance/jsx/tsxUnionTypeComponent2.tsx @@ -1,6 +1,7 @@ // @filename: file.tsx // @jsx: react // @noLib: true +// @skipLibCheck: true // @libFiles: react.d.ts,lib.d.ts import React = require('react'); diff --git a/tests/cases/conformance/types/contextualTypes/jsxAttributes/contextuallyTypedStringLiteralsInJsxAttributes02.tsx b/tests/cases/conformance/types/contextualTypes/jsxAttributes/contextuallyTypedStringLiteralsInJsxAttributes02.tsx index 1fa798c850f..53171833d9d 100644 --- a/tests/cases/conformance/types/contextualTypes/jsxAttributes/contextuallyTypedStringLiteralsInJsxAttributes02.tsx +++ b/tests/cases/conformance/types/contextualTypes/jsxAttributes/contextuallyTypedStringLiteralsInJsxAttributes02.tsx @@ -2,6 +2,7 @@ // @jsx: preserve // @module: amd // @noLib: true +// @skipLibCheck: true // @libFiles: react.d.ts,lib.d.ts import React = require('react') diff --git a/tests/cases/conformance/types/spread/objectSpreadIndexSignature.ts b/tests/cases/conformance/types/spread/objectSpreadIndexSignature.ts index ae46f2547d5..83649d465f1 100644 --- a/tests/cases/conformance/types/spread/objectSpreadIndexSignature.ts +++ b/tests/cases/conformance/types/spread/objectSpreadIndexSignature.ts @@ -1,16 +1,13 @@ -interface Indexed { - [n: string]: number; - a: number; -} -interface Indexed2 { - [n: string]: boolean; - c: boolean; -} -let indexed: Indexed; -let indexed2: Indexed2; -let i = { ...indexed, b: 11 }; +// @strict: true +declare let indexed1: { [n: string]: number; a: number; }; +declare let indexed2: { [n: string]: boolean; c: boolean; }; +declare let indexed3: { [n: string]: number }; +let i = { ...indexed1, b: 11 }; // only indexed has indexer, so i[101]: any i[101]; -let ii = { ...indexed, ...indexed2 }; +let ii = { ...indexed1, ...indexed2 }; // both have indexer, so i[1001]: number | boolean ii[1001]; + +declare const b: boolean; +indexed3 = { ...b ? indexed3 : undefined }; diff --git a/tests/cases/fourslash/codeFixAddForgottenDecoratorCall01.ts b/tests/cases/fourslash/codeFixAddForgottenDecoratorCall01.ts new file mode 100644 index 00000000000..17ae7f626f0 --- /dev/null +++ b/tests/cases/fourslash/codeFixAddForgottenDecoratorCall01.ts @@ -0,0 +1,14 @@ +/// + +////declare function foo(): (...args: any[]) => void; +////class C { +//// [|@foo|] +//// bar() { +//// +//// } +////} + +verify.codeFix({ + description: "Call decorator expression.", + newRangeContent: `@foo()` +}); diff --git a/tests/cases/fourslash/codeFixAddMissingMember4.ts b/tests/cases/fourslash/codeFixAddMissingMember4.ts index cfbec8977f6..a17b777ae5f 100644 --- a/tests/cases/fourslash/codeFixAddMissingMember4.ts +++ b/tests/cases/fourslash/codeFixAddMissingMember4.ts @@ -15,12 +15,11 @@ verify.codeFix({ description: "Initialize property 'foo' in the constructor.", index: 0, - // TODO: GH#18741 and GH#18445 + // TODO: GH#18445 newFileContent: `class C { constructor() { - \r -this.foo = undefined;\r -} + this.foo = undefined;\r + } method() { this.foo === 10; } diff --git a/tests/cases/fourslash/codeFixAddMissingMember5.ts b/tests/cases/fourslash/codeFixAddMissingMember5.ts index 804a3910a8c..562c4a10f21 100644 --- a/tests/cases/fourslash/codeFixAddMissingMember5.ts +++ b/tests/cases/fourslash/codeFixAddMissingMember5.ts @@ -13,11 +13,12 @@ verify.codeFix({ description: "Initialize static property 'foo'.", index: 0, - // TODO: GH#18743 and GH#18445 + // TODO: GH#18445 newFileContent: `class C { static method() { ()=>{ this.foo === 10 }; } -}C.foo = undefined;\r +}\r +C.foo = undefined;\r ` }); diff --git a/tests/cases/fourslash/codeFixAddMissingMember6.ts b/tests/cases/fourslash/codeFixAddMissingMember6.ts index 2598014dde5..32525066657 100644 --- a/tests/cases/fourslash/codeFixAddMissingMember6.ts +++ b/tests/cases/fourslash/codeFixAddMissingMember6.ts @@ -13,12 +13,11 @@ verify.codeFix({ description: "Initialize property 'foo' in the constructor.", index: 0, - // TODO: GH#18741 and GH#18445 + // TODO: GH#18445 newFileContent: `class C { constructor() { - \r -this.foo = undefined;\r -} + this.foo = undefined;\r + } prop = ()=>{ this.foo === 10 }; }` }); diff --git a/tests/cases/fourslash/codeFixAddMissingMember7.ts b/tests/cases/fourslash/codeFixAddMissingMember7.ts index 4ed9c9293d7..014ab6102dd 100644 --- a/tests/cases/fourslash/codeFixAddMissingMember7.ts +++ b/tests/cases/fourslash/codeFixAddMissingMember7.ts @@ -11,9 +11,10 @@ verify.codeFix({ description: "Initialize static property 'foo'.", index: 2, - // TODO: GH#18743 and GH#18445 + // TODO: GH#18445 newFileContent: `class C { static p = ()=>{ this.foo === 10 }; -}C.foo = undefined;\r +}\r +C.foo = undefined;\r ` }); diff --git a/tests/cases/fourslash/codeFixChangeExtendsToImplements.ts b/tests/cases/fourslash/codeFixChangeExtendsToImplements.ts index bfaedf2818a..bf3b8b7b8a4 100644 --- a/tests/cases/fourslash/codeFixChangeExtendsToImplements.ts +++ b/tests/cases/fourslash/codeFixChangeExtendsToImplements.ts @@ -3,4 +3,7 @@ //// interface I {} //// [|/* */ class /* */ C /* */ extends /* */ I|]{} -verify.rangeAfterCodeFix("/* */ class /* */ C /* */ implements /* */ I"); \ No newline at end of file +verify.codeFix({ + description: "Change 'extends' to 'implements'.", + newRangeContent: "/* */ class /* */ C /* */ implements /* */ I", +}); diff --git a/tests/cases/fourslash/codeFixChangeExtendsToImplementsAbstractModifier.ts b/tests/cases/fourslash/codeFixChangeExtendsToImplementsAbstractModifier.ts index 5f5ca93c28f..7f309a22965 100644 --- a/tests/cases/fourslash/codeFixChangeExtendsToImplementsAbstractModifier.ts +++ b/tests/cases/fourslash/codeFixChangeExtendsToImplementsAbstractModifier.ts @@ -5,4 +5,8 @@ //// [|abstract class A extends I1 implements I2|] { } -verify.rangeAfterCodeFix("abstract class A implements I1, I2"); \ No newline at end of file +verify.codeFix({ + description: "Change 'extends' to 'implements'.", + // TODO: GH#18794 + newRangeContent: "abstract class A implements I1 , I2", +}); diff --git a/tests/cases/fourslash/codeFixChangeExtendsToImplementsTypeParams.ts b/tests/cases/fourslash/codeFixChangeExtendsToImplementsTypeParams.ts index 869bd1a5dc0..2cca0b277fd 100644 --- a/tests/cases/fourslash/codeFixChangeExtendsToImplementsTypeParams.ts +++ b/tests/cases/fourslash/codeFixChangeExtendsToImplementsTypeParams.ts @@ -3,4 +3,7 @@ ////interface I { x: X} ////[|class C extends I|]{} -verify.rangeAfterCodeFix("class C implements I"); \ No newline at end of file +verify.codeFix({ + description: "Change 'extends' to 'implements'.", + newRangeContent: "class C implements I", +}); diff --git a/tests/cases/fourslash/codeFixChangeExtendsToImplementsWithDecorator.ts b/tests/cases/fourslash/codeFixChangeExtendsToImplementsWithDecorator.ts index 9671f41def3..e031251ac1b 100644 --- a/tests/cases/fourslash/codeFixChangeExtendsToImplementsWithDecorator.ts +++ b/tests/cases/fourslash/codeFixChangeExtendsToImplementsWithDecorator.ts @@ -10,4 +10,8 @@ //// @sealed //// [|class A extends I1 implements I2 { }|] -verify.rangeAfterCodeFix("class A implements I1, I2 { }"); \ No newline at end of file +verify.codeFix({ + description: "Change 'extends' to 'implements'.", + // TODO: GH#18794 + newRangeContent: "class A implements I1 , I2 { }", +}); diff --git a/tests/cases/fourslash/codeFixChangeJSDocSyntax1.ts b/tests/cases/fourslash/codeFixChangeJSDocSyntax1.ts index 93107ef669b..1a4e967df45 100644 --- a/tests/cases/fourslash/codeFixChangeJSDocSyntax1.ts +++ b/tests/cases/fourslash/codeFixChangeJSDocSyntax1.ts @@ -1,4 +1,7 @@ /// //// var x: [|?|] = 12; -verify.rangeAfterCodeFix("any"); +verify.codeFix({ + description: "Change '?' to 'any'.", + newRangeContent: "any", +}); diff --git a/tests/cases/fourslash/codeFixChangeJSDocSyntax10.ts b/tests/cases/fourslash/codeFixChangeJSDocSyntax10.ts index 3e6754588fd..12ddb66c6fd 100644 --- a/tests/cases/fourslash/codeFixChangeJSDocSyntax10.ts +++ b/tests/cases/fourslash/codeFixChangeJSDocSyntax10.ts @@ -2,4 +2,10 @@ /// //// function f(x: [|number?|]) { //// } -verify.rangeAfterCodeFix("number | null", /*includeWhiteSpace*/ false, /*errorCode*/ 8020, 0); + +verify.codeFix({ + description: "Change 'number?' to 'number | null'.", + errorCode: 8020, + index: 0, + newRangeContent: "number | null", +}); diff --git a/tests/cases/fourslash/codeFixChangeJSDocSyntax11.ts b/tests/cases/fourslash/codeFixChangeJSDocSyntax11.ts index 7ac80125775..8edcbb35da2 100644 --- a/tests/cases/fourslash/codeFixChangeJSDocSyntax11.ts +++ b/tests/cases/fourslash/codeFixChangeJSDocSyntax11.ts @@ -2,4 +2,10 @@ /// //// var f = function f(x: [|string?|]) { //// } -verify.rangeAfterCodeFix("string | null | undefined", /*includeWhiteSpace*/ false, /*errorCode*/ 8020, 1); + +verify.codeFix({ + description: "Change 'string?' to 'string | null | undefined'.", + errorCode: 8020, + index: 1, + newRangeContent: "string | null | undefined", +}); diff --git a/tests/cases/fourslash/codeFixChangeJSDocSyntax12.ts b/tests/cases/fourslash/codeFixChangeJSDocSyntax12.ts index 37eb5df41ee..a2221897aa8 100644 --- a/tests/cases/fourslash/codeFixChangeJSDocSyntax12.ts +++ b/tests/cases/fourslash/codeFixChangeJSDocSyntax12.ts @@ -3,4 +3,10 @@ ////class C { //// p: [|*|] ////} -verify.rangeAfterCodeFix("any", /*includeWhiteSpace*/ false, /*errorCode*/ 8020, 0); + +verify.codeFix({ + description: "Change '*' to 'any'.", + errorCode: 8020, + index: 0, + newRangeContent: "any", +}); diff --git a/tests/cases/fourslash/codeFixChangeJSDocSyntax13.ts b/tests/cases/fourslash/codeFixChangeJSDocSyntax13.ts index 5b374b508f1..65fef47feda 100644 --- a/tests/cases/fourslash/codeFixChangeJSDocSyntax13.ts +++ b/tests/cases/fourslash/codeFixChangeJSDocSyntax13.ts @@ -3,4 +3,10 @@ ////class C { //// p: [|*|] = 12 ////} -verify.rangeAfterCodeFix("any", /*includeWhiteSpace*/ false, /*errorCode*/ 8020, 0); + +verify.codeFix({ + description: "Change '*' to 'any'.", + errorCode: 8020, + index: 0, + newRangeContent: "any", +}); diff --git a/tests/cases/fourslash/codeFixChangeJSDocSyntax14.ts b/tests/cases/fourslash/codeFixChangeJSDocSyntax14.ts index 69478fc3abc..71f21dd8301 100644 --- a/tests/cases/fourslash/codeFixChangeJSDocSyntax14.ts +++ b/tests/cases/fourslash/codeFixChangeJSDocSyntax14.ts @@ -2,4 +2,9 @@ /// //// var x = 12 as [|number?|]; -verify.rangeAfterCodeFix("number | null", /*includeWhiteSpace*/ false, /*errorCode*/ 8020, 0); +verify.codeFix({ + description: "Change 'number?' to 'number | null'.", + errorCode: 8020, + index: 0, + newRangeContent: "number | null", +}); diff --git a/tests/cases/fourslash/codeFixChangeJSDocSyntax15.ts b/tests/cases/fourslash/codeFixChangeJSDocSyntax15.ts index 9482830c19d..b0e8c069e1e 100644 --- a/tests/cases/fourslash/codeFixChangeJSDocSyntax15.ts +++ b/tests/cases/fourslash/codeFixChangeJSDocSyntax15.ts @@ -2,4 +2,9 @@ //// var f = <[|function(number?): number|]>(x => x); // note: without --strict, number? --> number, not number | null -verify.rangeAfterCodeFix("(arg0: number) => number", /*includeWhiteSpace*/ false, /*errorCode*/ 8020, 0); +verify.codeFix({ + description: "Change 'function(number?): number' to '(arg0: number) => number'.", + errorCode: 8020, + index: 0, + newRangeContent: "(arg0: number) => number", +}); diff --git a/tests/cases/fourslash/codeFixChangeJSDocSyntax16.ts b/tests/cases/fourslash/codeFixChangeJSDocSyntax16.ts index 111aec1dce7..264e490d961 100644 --- a/tests/cases/fourslash/codeFixChangeJSDocSyntax16.ts +++ b/tests/cases/fourslash/codeFixChangeJSDocSyntax16.ts @@ -1,4 +1,7 @@ /// //// var f: { [K in keyof number]: [|*|] }; -verify.rangeAfterCodeFix("any"); +verify.codeFix({ + description: "Change '*' to 'any'.", + newRangeContent: "any", +}); diff --git a/tests/cases/fourslash/codeFixChangeJSDocSyntax17.ts b/tests/cases/fourslash/codeFixChangeJSDocSyntax17.ts index 6a3ce2ed3df..63973222a8a 100644 --- a/tests/cases/fourslash/codeFixChangeJSDocSyntax17.ts +++ b/tests/cases/fourslash/codeFixChangeJSDocSyntax17.ts @@ -1,3 +1,7 @@ /// //// declare function index(ix: number): [|*|]; -verify.rangeAfterCodeFix("any"); + +verify.codeFix({ + description: "Change '*' to 'any'.", + newRangeContent: "any", +}); diff --git a/tests/cases/fourslash/codeFixChangeJSDocSyntax18.ts b/tests/cases/fourslash/codeFixChangeJSDocSyntax18.ts index 30a3815516a..31b04bef0f6 100644 --- a/tests/cases/fourslash/codeFixChangeJSDocSyntax18.ts +++ b/tests/cases/fourslash/codeFixChangeJSDocSyntax18.ts @@ -1,3 +1,7 @@ /// //// var index: { (ix: number): [|?|] }; -verify.rangeAfterCodeFix("any"); + +verify.codeFix({ + description: "Change '?' to 'any'.", + newRangeContent: "any", +}); diff --git a/tests/cases/fourslash/codeFixChangeJSDocSyntax19.ts b/tests/cases/fourslash/codeFixChangeJSDocSyntax19.ts index e6344881227..d254cf6d8dd 100644 --- a/tests/cases/fourslash/codeFixChangeJSDocSyntax19.ts +++ b/tests/cases/fourslash/codeFixChangeJSDocSyntax19.ts @@ -1,3 +1,7 @@ /// //// var index: { new (ix: number): [|?|] }; -verify.rangeAfterCodeFix("any"); + +verify.codeFix({ + description: "Change '?' to 'any'.", + newRangeContent: "any", +}); diff --git a/tests/cases/fourslash/codeFixChangeJSDocSyntax2.ts b/tests/cases/fourslash/codeFixChangeJSDocSyntax2.ts index 333b108538f..d2dc0986a59 100644 --- a/tests/cases/fourslash/codeFixChangeJSDocSyntax2.ts +++ b/tests/cases/fourslash/codeFixChangeJSDocSyntax2.ts @@ -1,4 +1,7 @@ /// //// var x: [|*|] = 12; -verify.rangeAfterCodeFix("any"); +verify.codeFix({ + description: "Change '*' to 'any'.", + newRangeContent: "any", +}); diff --git a/tests/cases/fourslash/codeFixChangeJSDocSyntax20.ts b/tests/cases/fourslash/codeFixChangeJSDocSyntax20.ts index dc153730841..32cfe73fd4a 100644 --- a/tests/cases/fourslash/codeFixChangeJSDocSyntax20.ts +++ b/tests/cases/fourslash/codeFixChangeJSDocSyntax20.ts @@ -1,3 +1,7 @@ /// //// var index = { get p(): [|*|] { return 12 } }; -verify.rangeAfterCodeFix("any"); + +verify.codeFix({ + description: "Change '*' to 'any'.", + newRangeContent: "any", +}); diff --git a/tests/cases/fourslash/codeFixChangeJSDocSyntax21.ts b/tests/cases/fourslash/codeFixChangeJSDocSyntax21.ts index 442414e4577..efb53d53009 100644 --- a/tests/cases/fourslash/codeFixChangeJSDocSyntax21.ts +++ b/tests/cases/fourslash/codeFixChangeJSDocSyntax21.ts @@ -1,3 +1,7 @@ /// //// var index = { set p(x: [|*|]) { } }; -verify.rangeAfterCodeFix("any"); + +verify.codeFix({ + description: "Change '*' to 'any'.", + newRangeContent: "any", +}); diff --git a/tests/cases/fourslash/codeFixChangeJSDocSyntax22.ts b/tests/cases/fourslash/codeFixChangeJSDocSyntax22.ts index c575f1ca7ce..06ff23c3cf5 100644 --- a/tests/cases/fourslash/codeFixChangeJSDocSyntax22.ts +++ b/tests/cases/fourslash/codeFixChangeJSDocSyntax22.ts @@ -1,3 +1,7 @@ /// //// var index: { [s: string]: [|*|] }; -verify.rangeAfterCodeFix("any"); + +verify.codeFix({ + description: "Change '*' to 'any'.", + newRangeContent: "any", +}); diff --git a/tests/cases/fourslash/codeFixChangeJSDocSyntax23.ts b/tests/cases/fourslash/codeFixChangeJSDocSyntax23.ts index 7ab70e18ee7..29a49ff641c 100644 --- a/tests/cases/fourslash/codeFixChangeJSDocSyntax23.ts +++ b/tests/cases/fourslash/codeFixChangeJSDocSyntax23.ts @@ -3,4 +3,8 @@ //// m(): [|*|] { //// } ////} -verify.rangeAfterCodeFix("any"); + +verify.codeFix({ + description: "Change '*' to 'any'.", + newRangeContent: "any", +}); diff --git a/tests/cases/fourslash/codeFixChangeJSDocSyntax24.ts b/tests/cases/fourslash/codeFixChangeJSDocSyntax24.ts index 7ea2d1f6faf..6c9a840a373 100644 --- a/tests/cases/fourslash/codeFixChangeJSDocSyntax24.ts +++ b/tests/cases/fourslash/codeFixChangeJSDocSyntax24.ts @@ -2,4 +2,8 @@ ////declare class C { //// m(): [|*|]; ////} -verify.rangeAfterCodeFix("any"); + +verify.codeFix({ + description: "Change '*' to 'any'.", + newRangeContent: "any", +}); diff --git a/tests/cases/fourslash/codeFixChangeJSDocSyntax25.ts b/tests/cases/fourslash/codeFixChangeJSDocSyntax25.ts index 6486a70417e..74a7ea9fa18 100644 --- a/tests/cases/fourslash/codeFixChangeJSDocSyntax25.ts +++ b/tests/cases/fourslash/codeFixChangeJSDocSyntax25.ts @@ -2,4 +2,8 @@ ////declare class C { //// p: [|*|]; ////} -verify.rangeAfterCodeFix("any"); + +verify.codeFix({ + description: "Change '*' to 'any'.", + newRangeContent: "any", +}); diff --git a/tests/cases/fourslash/codeFixChangeJSDocSyntax26.ts b/tests/cases/fourslash/codeFixChangeJSDocSyntax26.ts index dc31f1dfffd..4287539173a 100644 --- a/tests/cases/fourslash/codeFixChangeJSDocSyntax26.ts +++ b/tests/cases/fourslash/codeFixChangeJSDocSyntax26.ts @@ -2,4 +2,8 @@ ////class C { //// p: [|*|] = 12; ////} -verify.rangeAfterCodeFix("any"); + +verify.codeFix({ + description: "Change '*' to 'any'.", + newRangeContent: "any", +}); diff --git a/tests/cases/fourslash/codeFixChangeJSDocSyntax27.ts b/tests/cases/fourslash/codeFixChangeJSDocSyntax27.ts index a259b2dd719..998a9ebd28a 100644 --- a/tests/cases/fourslash/codeFixChangeJSDocSyntax27.ts +++ b/tests/cases/fourslash/codeFixChangeJSDocSyntax27.ts @@ -1,4 +1,10 @@ // @strict: true /// ////type T = [|...number?|]; -verify.rangeAfterCodeFix("number[] | null", /*includeWhiteSpace*/ false, /*errorCode*/ 8020, 0); + +verify.codeFix({ + description: "Change '...number?' to 'number[] | null'.", + errorCode: 8020, + index: 0, + newRangeContent: "number[] | null", +}); diff --git a/tests/cases/fourslash/codeFixChangeJSDocSyntax3.ts b/tests/cases/fourslash/codeFixChangeJSDocSyntax3.ts index f3b02cb84f1..2c804edb615 100644 --- a/tests/cases/fourslash/codeFixChangeJSDocSyntax3.ts +++ b/tests/cases/fourslash/codeFixChangeJSDocSyntax3.ts @@ -1,4 +1,7 @@ /// //// var x: [|......number[][]|] = 12; -verify.rangeAfterCodeFix("number[][][][]"); +verify.codeFix({ + description: "Change '......number[][]' to 'number[][][][]'.", + newRangeContent: "number[][][][]", +}); diff --git a/tests/cases/fourslash/codeFixChangeJSDocSyntax4.ts b/tests/cases/fourslash/codeFixChangeJSDocSyntax4.ts index e9522331d38..f2df4abfd33 100644 --- a/tests/cases/fourslash/codeFixChangeJSDocSyntax4.ts +++ b/tests/cases/fourslash/codeFixChangeJSDocSyntax4.ts @@ -1,4 +1,7 @@ /// //// var x: [|Array.|] = 12; -verify.rangeAfterCodeFix("number[]"); +verify.codeFix({ + description: "Change 'Array.' to 'number[]'.", + newRangeContent: "number[]", +}); diff --git a/tests/cases/fourslash/codeFixChangeJSDocSyntax5.ts b/tests/cases/fourslash/codeFixChangeJSDocSyntax5.ts index 6f46f3082e1..39cca325a4c 100644 --- a/tests/cases/fourslash/codeFixChangeJSDocSyntax5.ts +++ b/tests/cases/fourslash/codeFixChangeJSDocSyntax5.ts @@ -2,4 +2,9 @@ /// //// var x: [|?number|] = 12; -verify.rangeAfterCodeFix("number | null", /*includeWhiteSpace*/ false, /*errorCode*/ 8020, 0); +verify.codeFix({ + description: "Change '?number' to 'number | null'.", + errorCode: 8020, + index: 0, + newRangeContent: "number | null", +}); diff --git a/tests/cases/fourslash/codeFixChangeJSDocSyntax6.ts b/tests/cases/fourslash/codeFixChangeJSDocSyntax6.ts index 8af9f09d99d..da692d723bb 100644 --- a/tests/cases/fourslash/codeFixChangeJSDocSyntax6.ts +++ b/tests/cases/fourslash/codeFixChangeJSDocSyntax6.ts @@ -2,4 +2,8 @@ /// //// var x: [|number?|] = 12; -verify.rangeAfterCodeFix("number | null | undefined", /*includeWhiteSpace*/ undefined, /*errorCode*/ undefined, 1); +verify.codeFix({ + description: "Change 'number?' to 'number | null | undefined'.", + index: 1, + newRangeContent: "number | null | undefined", +}); diff --git a/tests/cases/fourslash/codeFixChangeJSDocSyntax7.ts b/tests/cases/fourslash/codeFixChangeJSDocSyntax7.ts index c80d08b3bac..1d557896fe9 100644 --- a/tests/cases/fourslash/codeFixChangeJSDocSyntax7.ts +++ b/tests/cases/fourslash/codeFixChangeJSDocSyntax7.ts @@ -1,4 +1,7 @@ /// //// var x: [|!number|] = 12; -verify.rangeAfterCodeFix("number"); +verify.codeFix({ + description: "Change '!number' to 'number'.", + newRangeContent: "number", +}); diff --git a/tests/cases/fourslash/codeFixChangeJSDocSyntax8.ts b/tests/cases/fourslash/codeFixChangeJSDocSyntax8.ts index 0fa7ddf229c..c35badc88cf 100644 --- a/tests/cases/fourslash/codeFixChangeJSDocSyntax8.ts +++ b/tests/cases/fourslash/codeFixChangeJSDocSyntax8.ts @@ -1,4 +1,7 @@ /// //// var x: [|function(this: number, number): string|] = 12; -verify.rangeAfterCodeFix("(this: number, arg1: number) => string"); +verify.codeFix({ + description: "Change 'function(this: number, number): string' to '(this: number, arg1: number) => string'.", + newRangeContent: "(this: number, arg1: number) => string", +}); diff --git a/tests/cases/fourslash/codeFixChangeJSDocSyntax9.ts b/tests/cases/fourslash/codeFixChangeJSDocSyntax9.ts index 061ded158ea..6ce049b6a42 100644 --- a/tests/cases/fourslash/codeFixChangeJSDocSyntax9.ts +++ b/tests/cases/fourslash/codeFixChangeJSDocSyntax9.ts @@ -1,4 +1,7 @@ /// //// var x: [|function(new: number)|] = 12; -verify.rangeAfterCodeFix("new () => number"); +verify.codeFix({ + description: "Change 'function(new: number)' to 'new () => number'.", + newRangeContent: "new () => number", +}); diff --git a/tests/cases/fourslash/codeFixClassExprClassImplementClassFunctionVoidInferred.ts b/tests/cases/fourslash/codeFixClassExprClassImplementClassFunctionVoidInferred.ts index 2568111fb90..b582c5e8960 100644 --- a/tests/cases/fourslash/codeFixClassExprClassImplementClassFunctionVoidInferred.ts +++ b/tests/cases/fourslash/codeFixClassExprClassImplementClassFunctionVoidInferred.ts @@ -1,13 +1,16 @@ /// -//// class A { -//// f() {} -//// } +////class A { +//// f() {} +////} //// -//// let B = class implements A {[| |]} +////let B = class implements A {[| |]} -verify.rangeAfterCodeFix(` -f(): void{ - throw new Error("Method not implemented."); -} -`); +verify.codeFix({ + description: "Implement interface 'A'.", + // TODO: GH#18795 + newRangeContent: `f(): void {\r + throw new Error("Method not implemented.");\r +}\r + ` +}); diff --git a/tests/cases/fourslash/codeFixClassExprExtendsAbstractExpressionWithTypeArgs.ts b/tests/cases/fourslash/codeFixClassExprExtendsAbstractExpressionWithTypeArgs.ts index a7690b4f5bf..198cb9ea673 100644 --- a/tests/cases/fourslash/codeFixClassExprExtendsAbstractExpressionWithTypeArgs.ts +++ b/tests/cases/fourslash/codeFixClassExprExtendsAbstractExpressionWithTypeArgs.ts @@ -1,14 +1,17 @@ /// -//// function foo(a: T) { -//// abstract class C { -//// abstract a: T | U; -//// } -//// return C; -//// } +////function foo(a: T) { +//// abstract class C { +//// abstract a: T | U; +//// } +//// return C; +////} //// -//// let B = class extends foo("s") {[| |]} +////let B = class extends foo("s") {[| |]} -verify.rangeAfterCodeFix(` -a: string | number; -`); +verify.codeFix({ + description: "Implement inherited abstract class.", + // TODO: GH#18795 + newRangeContent: `a: string | number;\r + ` +}); diff --git a/tests/cases/fourslash/codeFixClassExtendAbstractExpressionWithTypeArgs.ts b/tests/cases/fourslash/codeFixClassExtendAbstractExpressionWithTypeArgs.ts index 5796bea6fb4..ed574348b9f 100644 --- a/tests/cases/fourslash/codeFixClassExtendAbstractExpressionWithTypeArgs.ts +++ b/tests/cases/fourslash/codeFixClassExtendAbstractExpressionWithTypeArgs.ts @@ -1,14 +1,17 @@ /// -//// function foo(a: T) { -//// abstract class C { -//// abstract a: T | U; -//// } -//// return C; -//// } +////function foo(a: T) { +//// abstract class C { +//// abstract a: T | U; +//// } +//// return C; +////} //// -//// class B extends foo("s") {[| |]} +////class B extends foo("s") {[| |]} -verify.rangeAfterCodeFix(` -a: string | number; -`); \ No newline at end of file +verify.codeFix({ + description: "Implement inherited abstract class.", + // TODO: GH#18795 + newRangeContent: `a: string | number;\r + ` +}); diff --git a/tests/cases/fourslash/codeFixClassExtendAbstractGetterSetter.ts b/tests/cases/fourslash/codeFixClassExtendAbstractGetterSetter.ts index bc437c93bcd..3522b1d39da 100644 --- a/tests/cases/fourslash/codeFixClassExtendAbstractGetterSetter.ts +++ b/tests/cases/fourslash/codeFixClassExtendAbstractGetterSetter.ts @@ -1,31 +1,34 @@ /// -//// abstract class A { -//// private _a: string; +////abstract class A { +//// private _a: string; //// -//// abstract get a(): number | string; -//// abstract get b(): this; -//// abstract get c(): A; +//// abstract get a(): number | string; +//// abstract get b(): this; +//// abstract get c(): A; //// -//// abstract set d(arg: number | string); -//// abstract set e(arg: this); -//// abstract set f(arg: A); +//// abstract set d(arg: number | string); +//// abstract set e(arg: this); +//// abstract set f(arg: A); //// -//// abstract get g(): string; -//// abstract set g(newName: string); -//// } -//// -//// // Don't need to add anything in this case. -//// abstract class B extends A {} -//// -//// class C extends A {[| |]} +//// abstract get g(): string; +//// abstract set g(newName: string); +////} +//// +////// Don't need to add anything in this case. +////abstract class B extends A {} +//// +////class C extends A {[| |]} -verify.rangeAfterCodeFix(` - a: string | number; - b: this; - c: A; - d: string | number; - e: this; - f: A; - g: string; -`); +verify.codeFix({ + description: "Implement inherited abstract class.", + // TODO: GH#18795 + newRangeContent: `a: string | number;\r +b: this;\r +c: A;\r +d: string | number;\r +e: this;\r +f: A;\r +g: string;\r + ` +}); diff --git a/tests/cases/fourslash/codeFixClassExtendAbstractMethod.ts b/tests/cases/fourslash/codeFixClassExtendAbstractMethod.ts index 7e51e2216dc..de9500552ab 100644 --- a/tests/cases/fourslash/codeFixClassExtendAbstractMethod.ts +++ b/tests/cases/fourslash/codeFixClassExtendAbstractMethod.ts @@ -1,24 +1,27 @@ /// -//// abstract class A { +////abstract class A { //// abstract f(a: number, b: string): boolean; //// abstract f(a: number, b: string): this; //// abstract f(a: string, b: number): Function; //// abstract f(a: string): Function; //// abstract foo(): number; -//// } +////} //// -//// class C extends A {[| |]} +////class C extends A {[| |]} -verify.rangeAfterCodeFix(` - f(a: number, b: string): boolean; - f(a: number, b: string): this; - f(a: string, b: number): Function; - f(a: string): Function; - f(a: any, b?: any) { - throw new Error("Method not implemented."); - } - foo(): number { - throw new Error("Method not implemented."); - } -`); +verify.codeFix({ + description: "Implement inherited abstract class.", + // TODO: GH#18795 + newRangeContent: `f(a: number, b: string): boolean;\r +f(a: number, b: string): this;\r +f(a: string, b: number): Function;\r +f(a: string): Function;\r +f(a: any, b?: any) {\r + throw new Error("Method not implemented.");\r +}\r +foo(): number {\r + throw new Error("Method not implemented.");\r +}\r + ` +}); diff --git a/tests/cases/fourslash/codeFixClassExtendAbstractMethodThis.ts b/tests/cases/fourslash/codeFixClassExtendAbstractMethodThis.ts index a462ac98121..e33338b45a9 100644 --- a/tests/cases/fourslash/codeFixClassExtendAbstractMethodThis.ts +++ b/tests/cases/fourslash/codeFixClassExtendAbstractMethodThis.ts @@ -1,13 +1,16 @@ /// -//// abstract class A { +////abstract class A { //// abstract f(): this; -//// } +////} //// -//// class C extends A {[| |]} +////class C extends A {[| |]} -verify.rangeAfterCodeFix(` - f(): this { - throw new Error("Method not implemented."); - } -`); +verify.codeFix({ + description: "Implement inherited abstract class.", + // TODO: GH#18795 + newRangeContent: `f(): this {\r + throw new Error("Method not implemented.");\r +}\r + ` +}); diff --git a/tests/cases/fourslash/codeFixClassExtendAbstractMethodTypeParamsInstantiateNumber.ts b/tests/cases/fourslash/codeFixClassExtendAbstractMethodTypeParamsInstantiateNumber.ts index c1a55e88034..395d9348b79 100644 --- a/tests/cases/fourslash/codeFixClassExtendAbstractMethodTypeParamsInstantiateNumber.ts +++ b/tests/cases/fourslash/codeFixClassExtendAbstractMethodTypeParamsInstantiateNumber.ts @@ -1,12 +1,16 @@ /// -//// abstract class A { +////abstract class A { //// abstract f(x: T): T; -//// } +////} //// -//// class C extends A {[| |]} +////class C extends A {[| |]} -verify.rangeAfterCodeFix(`f(x: number): number{ - throw new Error("Method not implemented."); -} -`); \ No newline at end of file +verify.codeFix({ + description: "Implement inherited abstract class.", + // TODO: GH#18795 + newRangeContent: `f(x: number): number {\r + throw new Error("Method not implemented.");\r +}\r + ` +}); diff --git a/tests/cases/fourslash/codeFixClassExtendAbstractMethodTypeParamsInstantiateU.ts b/tests/cases/fourslash/codeFixClassExtendAbstractMethodTypeParamsInstantiateU.ts index c2ec5ff8035..408406a9efe 100644 --- a/tests/cases/fourslash/codeFixClassExtendAbstractMethodTypeParamsInstantiateU.ts +++ b/tests/cases/fourslash/codeFixClassExtendAbstractMethodTypeParamsInstantiateU.ts @@ -1,12 +1,16 @@ /// -//// abstract class A { +////abstract class A { //// abstract f(x: T): T; -//// } +////} //// -//// class C extends A {[| |]} +////class C extends A {[| |]} -verify.rangeAfterCodeFix(`f(x: U): U{ - throw new Error("Method not implemented."); -} -`); \ No newline at end of file +verify.codeFix({ + description: "Implement inherited abstract class.", + // TODO: GH#18795 + newRangeContent: `f(x: U): U {\r + throw new Error("Method not implemented.");\r +}\r + ` +}); diff --git a/tests/cases/fourslash/codeFixClassExtendAbstractProperty.ts b/tests/cases/fourslash/codeFixClassExtendAbstractProperty.ts index 701903d6770..fbdb13f4f2c 100644 --- a/tests/cases/fourslash/codeFixClassExtendAbstractProperty.ts +++ b/tests/cases/fourslash/codeFixClassExtendAbstractProperty.ts @@ -1,15 +1,18 @@ /// -//// abstract class A { +////abstract class A { //// abstract x: number; //// abstract y: this; //// abstract z: A; -//// } +////} //// -//// class C extends A {[| |]} +////class C extends A {[| |]} -verify.rangeAfterCodeFix(` - x: number; - y: this; - z: A; -`); +verify.codeFix({ + description: "Implement inherited abstract class.", + // TODO: GH#18795 + newRangeContent: `x: number;\r +y: this;\r +z: A;\r + ` +}); diff --git a/tests/cases/fourslash/codeFixInferFromUsage.ts b/tests/cases/fourslash/codeFixInferFromUsage.ts new file mode 100644 index 00000000000..5de8d989799 --- /dev/null +++ b/tests/cases/fourslash/codeFixInferFromUsage.ts @@ -0,0 +1,9 @@ +/// + +// @noImplicitAny: true +////[|var foo;|] +////function f() { +//// foo += 2; +////} + +verify.rangeAfterCodeFix("var foo: number;",/*includeWhiteSpace*/ undefined, /*errorCode*/ undefined, 0); \ No newline at end of file diff --git a/tests/cases/fourslash/codeFixInferFromUsageGetter.ts b/tests/cases/fourslash/codeFixInferFromUsageGetter.ts new file mode 100644 index 00000000000..f83eed1432d --- /dev/null +++ b/tests/cases/fourslash/codeFixInferFromUsageGetter.ts @@ -0,0 +1,10 @@ +/// + +// @noImplicitAny: true +////declare class C { +//// [|get x();|] +////} +////} +////(new C).x = 1; + +verify.rangeAfterCodeFix("get x(): number;", undefined, undefined, 0); \ No newline at end of file diff --git a/tests/cases/fourslash/codeFixInferFromUsageGetter2.ts b/tests/cases/fourslash/codeFixInferFromUsageGetter2.ts new file mode 100644 index 00000000000..a50d471ad12 --- /dev/null +++ b/tests/cases/fourslash/codeFixInferFromUsageGetter2.ts @@ -0,0 +1,11 @@ +/// + +// @noImplicitAny: true +////class C { +//// [|get x() |]{ +//// return undefined; +//// } +////} +////(new C).x = 1; + +verify.rangeAfterCodeFix("get x(): number", undefined, undefined, 0); \ No newline at end of file diff --git a/tests/cases/fourslash/codeFixInferFromUsageInaccessibleTypes.ts b/tests/cases/fourslash/codeFixInferFromUsageInaccessibleTypes.ts new file mode 100644 index 00000000000..ae9106be8c4 --- /dev/null +++ b/tests/cases/fourslash/codeFixInferFromUsageInaccessibleTypes.ts @@ -0,0 +1,20 @@ +/// + +// @noImplicitAny: true +////function f1([|a |]) { } +////function h1() { +//// class C { p: number }; +//// f1({ ofTypeC: new C() }); +////} +//// +////function f2([|a |]) { } +////function h2() { +//// interface I { a: number } +//// var i: I = {a : 1}; +//// f2(i); +//// f2(2); +//// f2(false); +////} +//// + +verify.not.codeFixAvailable(); diff --git a/tests/cases/fourslash/codeFixInferFromUsageMember.ts b/tests/cases/fourslash/codeFixInferFromUsageMember.ts new file mode 100644 index 00000000000..c82542e5e3f --- /dev/null +++ b/tests/cases/fourslash/codeFixInferFromUsageMember.ts @@ -0,0 +1,11 @@ +/// + +// @noImplicitAny: true +////class C { +//// [|p;|] +//// method() { +//// this.p.push(10); +//// } +////} + +verify.rangeAfterCodeFix("p: number[];"); \ No newline at end of file diff --git a/tests/cases/fourslash/codeFixInferFromUsageMember2.ts b/tests/cases/fourslash/codeFixInferFromUsageMember2.ts new file mode 100644 index 00000000000..486112935ee --- /dev/null +++ b/tests/cases/fourslash/codeFixInferFromUsageMember2.ts @@ -0,0 +1,10 @@ +/// + +// @noImplicitAny: true +////interface I { +//// [|p;|] +////} +////var i: I; +////i.p = 0; + +verify.rangeAfterCodeFix("p: number;"); \ No newline at end of file diff --git a/tests/cases/fourslash/codeFixInferFromUsageMember3.ts b/tests/cases/fourslash/codeFixInferFromUsageMember3.ts new file mode 100644 index 00000000000..49f2cb66c18 --- /dev/null +++ b/tests/cases/fourslash/codeFixInferFromUsageMember3.ts @@ -0,0 +1,9 @@ +/// + +// @noImplicitAny: true +////class C { +//// constructor([|public p)|] { } +////} +////new C("string"); + +verify.rangeAfterCodeFix("public p: string)"); diff --git a/tests/cases/fourslash/codeFixInferFromUsageMultipleParameters.ts b/tests/cases/fourslash/codeFixInferFromUsageMultipleParameters.ts new file mode 100644 index 00000000000..89e2c935e87 --- /dev/null +++ b/tests/cases/fourslash/codeFixInferFromUsageMultipleParameters.ts @@ -0,0 +1,9 @@ +/// + +// @noImplicitAny: true +//// function f([|a, b, c, d: number, e = 0, ...d |]) { +//// } +//// f(1, "string", { a: 1 }, {shouldNotBeHere: 2}, {shouldNotBeHere: 2}, 3, "string"); + + +verify.rangeAfterCodeFix("a: number, b: string, c: { a: number; }, d: number, e = 0, ...d: (string | number)[]", /*includeWhiteSpace*/ false, /*errorCode*/ undefined, /*index*/ 1); diff --git a/tests/cases/fourslash/codeFixInferFromUsageOptionalParam.ts b/tests/cases/fourslash/codeFixInferFromUsageOptionalParam.ts new file mode 100644 index 00000000000..f10de4bb03a --- /dev/null +++ b/tests/cases/fourslash/codeFixInferFromUsageOptionalParam.ts @@ -0,0 +1,9 @@ +/// + +// @noImplicitAny: true +////function f([|a? |]){ +////} +////f(); +////f(1); + +verify.rangeAfterCodeFix("a?: number"); \ No newline at end of file diff --git a/tests/cases/fourslash/codeFixInferFromUsageOptionalParam2.ts b/tests/cases/fourslash/codeFixInferFromUsageOptionalParam2.ts new file mode 100644 index 00000000000..2ca820e0327 --- /dev/null +++ b/tests/cases/fourslash/codeFixInferFromUsageOptionalParam2.ts @@ -0,0 +1,8 @@ +/// + +// @noImplicitAny: true +////function f([|a? |]){ +//// if (a < 9) return; +////} + +verify.rangeAfterCodeFix("a?: number"); \ No newline at end of file diff --git a/tests/cases/fourslash/codeFixInferFromUsageRestParam.ts b/tests/cases/fourslash/codeFixInferFromUsageRestParam.ts new file mode 100644 index 00000000000..963f84d6515 --- /dev/null +++ b/tests/cases/fourslash/codeFixInferFromUsageRestParam.ts @@ -0,0 +1,11 @@ +/// + +// @noImplicitAny: true +////function f(a: number, [|...rest |]){ +////} +////f(1); +////f(2, "s1"); +////f(3, "s1", "s2"); +////f(3, "s1", "s2", "s3", "s4"); + +verify.rangeAfterCodeFix("...rest: string[]"); \ No newline at end of file diff --git a/tests/cases/fourslash/codeFixInferFromUsageRestParam2.ts b/tests/cases/fourslash/codeFixInferFromUsageRestParam2.ts new file mode 100644 index 00000000000..ae826240228 --- /dev/null +++ b/tests/cases/fourslash/codeFixInferFromUsageRestParam2.ts @@ -0,0 +1,11 @@ +/// + +// @noImplicitAny: true +////function f(a: number, [|...rest |]){ +////} +////f(1); +////f(2, "s1"); +////f(3, false, "s2"); +////f(4, "s1", "s2", false, "s4"); + +verify.rangeAfterCodeFix("...rest: (string | boolean)[]"); \ No newline at end of file diff --git a/tests/cases/fourslash/codeFixInferFromUsageRestParam3.ts b/tests/cases/fourslash/codeFixInferFromUsageRestParam3.ts new file mode 100644 index 00000000000..4752176a324 --- /dev/null +++ b/tests/cases/fourslash/codeFixInferFromUsageRestParam3.ts @@ -0,0 +1,8 @@ +/// + +// @noImplicitAny: true +////function f(a: number, [|...rest |]){ +//// rest.push(22); +////} + +verify.rangeAfterCodeFix("...rest: number[]"); \ No newline at end of file diff --git a/tests/cases/fourslash/codeFixInferFromUsageSetter.ts b/tests/cases/fourslash/codeFixInferFromUsageSetter.ts new file mode 100644 index 00000000000..f515cd5a906 --- /dev/null +++ b/tests/cases/fourslash/codeFixInferFromUsageSetter.ts @@ -0,0 +1,10 @@ +/// + +// @noImplicitAny: true +////class C { +//// set [|x(v)|] { +//// } +////} +////(new C).x = 1; + +verify.rangeAfterCodeFix("x(v: number)", undefined, undefined, 0); \ No newline at end of file diff --git a/tests/cases/fourslash/codeFixInferFromUsageSetter2.ts b/tests/cases/fourslash/codeFixInferFromUsageSetter2.ts new file mode 100644 index 00000000000..a1169a03df1 --- /dev/null +++ b/tests/cases/fourslash/codeFixInferFromUsageSetter2.ts @@ -0,0 +1,10 @@ +/// + +// @noImplicitAny: true +////class C { +//// set [|x(v)|] { +//// } +////} +////(new C).x = 1; + +verify.rangeAfterCodeFix("x(v: number)", undefined, undefined, 1); \ No newline at end of file diff --git a/tests/cases/fourslash/codeFixInferFromUsageVariable.ts b/tests/cases/fourslash/codeFixInferFromUsageVariable.ts new file mode 100644 index 00000000000..f89b8c867f9 --- /dev/null +++ b/tests/cases/fourslash/codeFixInferFromUsageVariable.ts @@ -0,0 +1,9 @@ +/// + +// @noImplicitAny: true +////[|var x;|] +////function f() { +//// x++; +////} + +verify.rangeAfterCodeFix("var x: number;", /*includeWhiteSpace*/ undefined, /*errorCode*/ undefined, 0); \ No newline at end of file diff --git a/tests/cases/fourslash/codeFixInferFromUsageVariable2.ts b/tests/cases/fourslash/codeFixInferFromUsageVariable2.ts new file mode 100644 index 00000000000..bf8e2bb07e5 --- /dev/null +++ b/tests/cases/fourslash/codeFixInferFromUsageVariable2.ts @@ -0,0 +1,13 @@ +/// + +// @noImplicitAny: true +////[|var x; +////function f() { +//// x++; +////}|] + +verify.rangeAfterCodeFix(`var x: number; +function f() { + x++; +} +`, /*includeWhiteSpace*/ undefined, /*errorCode*/ undefined, 1); \ No newline at end of file diff --git a/tests/cases/fourslash/completionEntryForClassMembers3.ts b/tests/cases/fourslash/completionEntryForClassMembers3.ts new file mode 100644 index 00000000000..a27c5959e6d --- /dev/null +++ b/tests/cases/fourslash/completionEntryForClassMembers3.ts @@ -0,0 +1,32 @@ +/// + +////interface IFoo { +//// bar(): void; +////} +////class Foo1 implements IFoo { +//// zap() { } +//// /*1*/ +////} +////class Foo2 implements IFoo { +//// zap() { } +//// b/*2*/() { } +////} +////class Foo3 implements IFoo { +//// zap() { } +//// b/*3*/: any; +////} +const allowedKeywordCount = verify.allowedClassElementKeywords.length; +function verifyHasBar() { + verify.completionListContains("bar", "(method) IFoo.bar(): void", /*documentation*/ undefined, "method"); + verify.completionListContainsClassElementKeywords(); + verify.completionListCount(allowedKeywordCount + 1); +} + +goTo.marker("1"); +verifyHasBar(); +edit.insert("b"); +verifyHasBar(); +goTo.marker("2"); +verifyHasBar(); +goTo.marker("3"); +verifyHasBar(); \ No newline at end of file diff --git a/tests/cases/fourslash/convertFunctionToEs6Class_asyncMethods.ts b/tests/cases/fourslash/convertFunctionToEs6Class_asyncMethods.ts new file mode 100644 index 00000000000..ed230d50435 --- /dev/null +++ b/tests/cases/fourslash/convertFunctionToEs6Class_asyncMethods.ts @@ -0,0 +1,27 @@ +/// + +// @allowNonTsExtensions: true +// @Filename: test123.js +////export function /**/MyClass() { +////} +////MyClass.prototype.foo = async function() { +//// await 2; +////} +////MyClass.bar = async function() { +//// await 3; +////} + +verify.applicableRefactorAvailableAtMarker(""); +verify.fileAfterApplyingRefactorAtMarker("", +`export class MyClass { + constructor() { + } + async foo() { + await 2; + } + static async bar() { + await 3; + } +} +`, +'Convert to ES2015 class', 'convert'); diff --git a/tests/cases/fourslash/convertFunctionToEs6Class_exportModifier1.ts b/tests/cases/fourslash/convertFunctionToEs6Class_exportModifier1.ts new file mode 100644 index 00000000000..940a68a05b6 --- /dev/null +++ b/tests/cases/fourslash/convertFunctionToEs6Class_exportModifier1.ts @@ -0,0 +1,19 @@ +/// + +// @allowNonTsExtensions: true +// @Filename: test123.js +////export function /**/MyClass() { +////} +////MyClass.prototype.foo = function() { +////} + +verify.applicableRefactorAvailableAtMarker(""); +verify.fileAfterApplyingRefactorAtMarker("", +`export class MyClass { + constructor() { + } + foo() { + } +} +`, +'Convert to ES2015 class', 'convert'); diff --git a/tests/cases/fourslash/convertFunctionToEs6Class_exportModifier2.ts b/tests/cases/fourslash/convertFunctionToEs6Class_exportModifier2.ts new file mode 100644 index 00000000000..fb1276d4f03 --- /dev/null +++ b/tests/cases/fourslash/convertFunctionToEs6Class_exportModifier2.ts @@ -0,0 +1,19 @@ +/// + +// @allowNonTsExtensions: true +// @Filename: test123.js +////export const /**/foo = function() { +////}; +////foo.prototype.instanceMethod = function() { +////}; + +verify.applicableRefactorAvailableAtMarker(""); +verify.fileAfterApplyingRefactorAtMarker("", +`export class foo { + constructor() { + } + instanceMethod() { + } +} +`, +'Convert to ES2015 class', 'convert'); diff --git a/tests/cases/fourslash/extract-method-empty-namespace.ts b/tests/cases/fourslash/extract-method-empty-namespace.ts index bef4cdd12fe..1655efccbb8 100644 --- a/tests/cases/fourslash/extract-method-empty-namespace.ts +++ b/tests/cases/fourslash/extract-method-empty-namespace.ts @@ -12,6 +12,7 @@ edit.applyRefactor({ newContent: `function f() { /*RENAME*/newFunction(); } + function newFunction() { namespace N { } } diff --git a/tests/cases/fourslash/extract-method-formatting.ts b/tests/cases/fourslash/extract-method-formatting.ts index d4c2836e815..d1f550f794e 100644 --- a/tests/cases/fourslash/extract-method-formatting.ts +++ b/tests/cases/fourslash/extract-method-formatting.ts @@ -13,6 +13,7 @@ edit.applyRefactor({ newContent: `function f(x: number): number { return /*RENAME*/newFunction(x); } + function newFunction(x: number) { switch (x) { case 0: diff --git a/tests/cases/fourslash/extract-method-uniqueName.ts b/tests/cases/fourslash/extract-method-uniqueName.ts index 4271d9e84d2..a02b2c5ec96 100644 --- a/tests/cases/fourslash/extract-method-uniqueName.ts +++ b/tests/cases/fourslash/extract-method-uniqueName.ts @@ -11,10 +11,10 @@ edit.applyRefactor({ actionName: "function_scope_0", actionDescription: "Extract to function in global scope", newContent: -`/*RENAME*/newFunction_1(); +`// newFunction +/*RENAME*/newFunction_1(); function newFunction_1() { - // newFunction 1 + 1; } ` diff --git a/tests/cases/fourslash/extract-method10.ts b/tests/cases/fourslash/extract-method10.ts index ed92e6b06ac..d2b9aeb0123 100644 --- a/tests/cases/fourslash/extract-method10.ts +++ b/tests/cases/fourslash/extract-method10.ts @@ -11,6 +11,7 @@ edit.applyRefactor({ newContent: `export {}; // Make this a module (x => x)(/*RENAME*/newFunction())(1); + function newFunction(): (x: any) => any { return x => x; } diff --git a/tests/cases/fourslash/extract-method14.ts b/tests/cases/fourslash/extract-method14.ts index ea051aabbe7..11ea1f1b3fd 100644 --- a/tests/cases/fourslash/extract-method14.ts +++ b/tests/cases/fourslash/extract-method14.ts @@ -18,10 +18,11 @@ edit.applyRefactor({ newContent: `function foo() { var i = 10; - var __return: any; + let __return; ({ __return, i } = /*RENAME*/newFunction(i)); return __return; } + function newFunction(i) { return { __return: i++, i }; } diff --git a/tests/cases/fourslash/extract-method15.ts b/tests/cases/fourslash/extract-method15.ts index e46ff39ad6a..1b33a46b9a4 100644 --- a/tests/cases/fourslash/extract-method15.ts +++ b/tests/cases/fourslash/extract-method15.ts @@ -18,6 +18,7 @@ edit.applyRefactor({ var i = 10; i = /*RENAME*/newFunction(i); } + function newFunction(i: number) { i++; return i; diff --git a/tests/cases/fourslash/extract-method18.ts b/tests/cases/fourslash/extract-method18.ts index d53e79f4930..0a488a04106 100644 --- a/tests/cases/fourslash/extract-method18.ts +++ b/tests/cases/fourslash/extract-method18.ts @@ -18,6 +18,7 @@ edit.applyRefactor({ const x = { m: 1 }; /*RENAME*/newFunction(x); } + function newFunction(x: { m: number; }) { x.m = 3; } diff --git a/tests/cases/fourslash/extract-method2.ts b/tests/cases/fourslash/extract-method2.ts index 7f197d4775b..419d6379075 100644 --- a/tests/cases/fourslash/extract-method2.ts +++ b/tests/cases/fourslash/extract-method2.ts @@ -24,6 +24,7 @@ edit.applyRefactor({ } } } + function newFunction(m: number, j: string, k: { x: string; }) { return m + j + k; } diff --git a/tests/cases/fourslash/extract-method20.ts b/tests/cases/fourslash/extract-method20.ts index 75927f0fd5c..bd137c55d19 100644 --- a/tests/cases/fourslash/extract-method20.ts +++ b/tests/cases/fourslash/extract-method20.ts @@ -10,5 +10,6 @@ //// } goTo.select('a', 'b') -verify.refactorAvailable('Extract Symbol', 'function_scope_0'); -verify.not.refactorAvailable('Extract Symbol', 'function_scope_1'); +verify.not.refactorAvailable('Extract Symbol', 'function_scope_0'); +verify.refactorAvailable('Extract Symbol', 'function_scope_1'); +verify.not.refactorAvailable('Extract Symbol', 'function_scope_2'); diff --git a/tests/cases/fourslash/extract-method24.ts b/tests/cases/fourslash/extract-method24.ts index 8c750edd9f9..66ca5ecb227 100644 --- a/tests/cases/fourslash/extract-method24.ts +++ b/tests/cases/fourslash/extract-method24.ts @@ -17,6 +17,7 @@ edit.applyRefactor({ let x = 0; console.log(/*RENAME*/newFunction(a, x)); } + function newFunction(a: number[], x: number): any { return a[x]; } diff --git a/tests/cases/fourslash/extract-method7.ts b/tests/cases/fourslash/extract-method7.ts index 2998b6bbee3..38bc86cb5dc 100644 --- a/tests/cases/fourslash/extract-method7.ts +++ b/tests/cases/fourslash/extract-method7.ts @@ -14,6 +14,7 @@ edit.applyRefactor({ newContent: `function fn(x = /*RENAME*/newFunction()) { } + function newFunction() { return 3; } diff --git a/tests/cases/fourslash/findAllRefsDefaultImportThroughNamespace.ts b/tests/cases/fourslash/findAllRefsDefaultImportThroughNamespace.ts index e5f77631324..1411a106c89 100644 --- a/tests/cases/fourslash/findAllRefsDefaultImportThroughNamespace.ts +++ b/tests/cases/fourslash/findAllRefsDefaultImportThroughNamespace.ts @@ -1,7 +1,7 @@ /// // @Filename: /a.ts -////export default function [|{| "isWriteAccess": true, "isDefinition": true |}f|]() {} +////export [|{| "isWriteAccess": true, "isDefinition": true |}default|] function [|{| "isWriteAccess": true, "isDefinition": true |}f|]() {} // @Filename: /b.ts ////export import a = require("./a"); @@ -13,16 +13,17 @@ ////declare const x: { [|{| "isWriteAccess": true, "isDefinition": true |}default|]: number }; ////x.[|default|]; -const [r0, r1, r2, r3] = test.ranges(); +const [r0, r1, r2, r3, r4] = test.ranges(); -verify.singleReferenceGroup("function f(): void", [r0, r1]); -verify.singleReferenceGroup("(property) default: number", [r2, r3]); +verify.referenceGroups([r0], [{ definition: "function f(): void", ranges: [r1, r2] }]); +verify.singleReferenceGroup("function f(): void", [r1, r2]); +verify.singleReferenceGroup("(property) default: number", [r3, r4]); -verify.rangesAreRenameLocations([r0]); +verify.rangesAreRenameLocations([r1]); // Can't rename a default import. -goTo.rangeStart(r1); +goTo.rangeStart(r2); verify.renameInfoFailed(); // Can rename a default property. -verify.rangesAreRenameLocations([r2, r3]); +verify.rangesAreRenameLocations([r3, r4]); diff --git a/tests/cases/fourslash/findAllRefsForDefaultExport04.ts b/tests/cases/fourslash/findAllRefsForDefaultExport04.ts index 1b5eb7a282d..093910d1cb5 100644 --- a/tests/cases/fourslash/findAllRefsForDefaultExport04.ts +++ b/tests/cases/fourslash/findAllRefsForDefaultExport04.ts @@ -14,12 +14,10 @@ verify.referenceGroups([r0, r2], [ { definition: "import a", ranges: [r3, r4] } ]); verify.referenceGroups(r1, [ - // TODO:GH#17990 - { definition: "import default", ranges: [r1] }, + { definition: "export default a", ranges: [r1] }, { definition: "import a", ranges: [r3, r4] }, ]); verify.referenceGroups([r3, r4], [ { definition: "import a", ranges: [r3, r4] }, - // TODO:GH#17990 - { definition: "import default", ranges: [r1] }, + { definition: "export default a", ranges: [r1] }, ]); diff --git a/tests/cases/fourslash/getOccurrencesIsDefinitionOfComputedProperty.ts b/tests/cases/fourslash/getOccurrencesIsDefinitionOfComputedProperty.ts index 7d6cb0a48af..329a72c30fd 100644 --- a/tests/cases/fourslash/getOccurrencesIsDefinitionOfComputedProperty.ts +++ b/tests/cases/fourslash/getOccurrencesIsDefinitionOfComputedProperty.ts @@ -6,4 +6,8 @@ const ranges = test.ranges(); const [r0, r1, r2] = ranges; verify.referenceGroups(r0, [{ definition: '(property) ["foo"]: number', ranges }]); -verify.referenceGroups([r1, r2], undefined); // TODO: fix +verify.referenceGroups([r1, r2], [ + // TODO: these are the same thing, should be in the same group. + { definition: "(property) [\"foo\"]: number", ranges: [r0] }, + { definition: "(property) [\"foo\"]: number", ranges: [r1, r2] }, +]); diff --git a/tests/cases/fourslash/jsDocAugments.ts b/tests/cases/fourslash/jsDocAugments.ts index 1938cd0e2aa..cd2190e5486 100644 --- a/tests/cases/fourslash/jsDocAugments.ts +++ b/tests/cases/fourslash/jsDocAugments.ts @@ -20,4 +20,3 @@ goTo.marker(); verify.quickInfoIs("(local var) x: string"); - diff --git a/tests/cases/fourslash/jsDocAugmentsAndExtends.ts b/tests/cases/fourslash/jsDocAugmentsAndExtends.ts new file mode 100644 index 00000000000..10f33260268 --- /dev/null +++ b/tests/cases/fourslash/jsDocAugmentsAndExtends.ts @@ -0,0 +1,37 @@ +/// + +// @allowJs: true +// @checkJs: true +// @Filename: dummy.js + +//// /** +//// * @augments {Thing} +//// * @extends {Thing} +//// */ +//// class MyStringThing extends Thing { +//// constructor() { +//// super(); +//// var x = this.mine; +//// x/**/; +//// } +//// } + +// @Filename: declarations.d.ts +//// declare class Thing { +//// mine: T; +//// } + +// if more than one tag is present, report an error and take the type of the first entry. + +goTo.marker(); +verify.quickInfoIs("(local var) x: number"); +verify.getSemanticDiagnostics( +`[ + { + "message": "Class declarations cannot have more than one \`@augments\` or \`@extends\` tag.", + "start": 36, + "length": 24, + "category": "error", + "code": 8025 + } +]`); \ No newline at end of file diff --git a/tests/cases/fourslash/jsDocExtends.ts b/tests/cases/fourslash/jsDocExtends.ts new file mode 100644 index 00000000000..6bce5569533 --- /dev/null +++ b/tests/cases/fourslash/jsDocExtends.ts @@ -0,0 +1,22 @@ +/// + +// @allowJs: true +// @Filename: dummy.js + +//// /** +//// * @extends {Thing} +//// */ +//// class MyStringThing extends Thing { +//// constructor() { +//// var x = this.mine; +//// x/**/; +//// } +//// } + +// @Filename: declarations.d.ts +//// declare class Thing { +//// mine: T; +//// } + +goTo.marker(); +verify.quickInfoIs("(local var) x: string"); diff --git a/tests/cases/fourslash/server/projectInfo01.ts b/tests/cases/fourslash/server/projectInfo01.ts index 0d8707bf8a1..036aa5f0d4d 100644 --- a/tests/cases/fourslash/server/projectInfo01.ts +++ b/tests/cases/fourslash/server/projectInfo01.ts @@ -14,11 +14,11 @@ ////console.log("nothing"); goTo.file("a.ts") -verify.ProjectInfo(["lib.d.ts", "a.ts"]) +verify.ProjectInfo(["/lib.d.ts", "a.ts"]) goTo.file("b.ts") -verify.ProjectInfo(["lib.d.ts", "a.ts", "b.ts"]) +verify.ProjectInfo(["/lib.d.ts", "a.ts", "b.ts"]) goTo.file("c.ts") -verify.ProjectInfo(["lib.d.ts", "a.ts", "b.ts", "c.ts"]) +verify.ProjectInfo(["/lib.d.ts", "a.ts", "b.ts", "c.ts"]) goTo.file("d.ts") -verify.ProjectInfo(["lib.d.ts", "d.ts"]) +verify.ProjectInfo(["/lib.d.ts", "d.ts"]) diff --git a/tests/cases/fourslash/server/projectInfo02.ts b/tests/cases/fourslash/server/projectInfo02.ts index 3077deb453c..fb7c9cf8257 100644 --- a/tests/cases/fourslash/server/projectInfo02.ts +++ b/tests/cases/fourslash/server/projectInfo02.ts @@ -10,4 +10,4 @@ ////{ "files": ["a.ts", "b.ts"] } goTo.file("a.ts") -verify.ProjectInfo(["lib.d.ts", "a.ts", "b.ts", "tsconfig.json"]) +verify.ProjectInfo(["/lib.d.ts", "a.ts", "b.ts", "tsconfig.json"]) diff --git a/tests/cases/fourslash/server/projectWithNonExistentFiles.ts b/tests/cases/fourslash/server/projectWithNonExistentFiles.ts index 0e263d9aca6..a52c5f8918f 100644 --- a/tests/cases/fourslash/server/projectWithNonExistentFiles.ts +++ b/tests/cases/fourslash/server/projectWithNonExistentFiles.ts @@ -10,4 +10,4 @@ ////{ "files": ["a.ts", "c.ts", "b.ts"] } goTo.file("a.ts"); -verify.ProjectInfo(["lib.d.ts", "a.ts", "b.ts", "tsconfig.json"]) +verify.ProjectInfo(["/lib.d.ts", "a.ts", "b.ts", "tsconfig.json"]) diff --git a/tests/cases/fourslash/unusedMethodInClass1.ts b/tests/cases/fourslash/unusedMethodInClass1.ts index a5e3789c8af..175d95e2490 100644 --- a/tests/cases/fourslash/unusedMethodInClass1.ts +++ b/tests/cases/fourslash/unusedMethodInClass1.ts @@ -1,11 +1,12 @@ /// // @noUnusedLocals: true -////[| class greeter { +////class greeter { //// private function1() { //// } -////} |] +////} -verify.rangeAfterCodeFix(` -class greeter { -}`); +verify.codeFix({ + description: `Remove declaration for: 'function1'.`, + newFileContent: "class greeter {\n}", +}); diff --git a/tests/cases/fourslash/unusedMethodInClass2.ts b/tests/cases/fourslash/unusedMethodInClass2.ts index cce621236d4..884f7ecce4e 100644 --- a/tests/cases/fourslash/unusedMethodInClass2.ts +++ b/tests/cases/fourslash/unusedMethodInClass2.ts @@ -1,15 +1,17 @@ /// // @noUnusedLocals: true -//// [| class greeter { +////class greeter { //// public function2() { //// } //// private function1() { //// } -////} |] +////} -verify.rangeAfterCodeFix(` -class greeter { +verify.codeFix({ + description: `Remove declaration for: 'function1'.`, + newFileContent: `class greeter { public function2() { } -}`); +}`, +}); diff --git a/tests/cases/fourslash/unusedMethodInClass3.ts b/tests/cases/fourslash/unusedMethodInClass3.ts index ccf98c4bbc5..f76a1acde09 100644 --- a/tests/cases/fourslash/unusedMethodInClass3.ts +++ b/tests/cases/fourslash/unusedMethodInClass3.ts @@ -1,11 +1,12 @@ /// // @noUnusedLocals: true -////[|class greeter { +////class greeter { //// private function1 = function() { //// } -////} |] +////} -verify.rangeAfterCodeFix(` -class greeter { -}`); +verify.codeFix({ + description: `Remove declaration for: 'function1'.`, + newFileContent: "class greeter {\n}", +}); diff --git a/tests/cases/fourslash/unusedMethodInClass4.ts b/tests/cases/fourslash/unusedMethodInClass4.ts index 962b80f5bc1..9f882a3b76e 100644 --- a/tests/cases/fourslash/unusedMethodInClass4.ts +++ b/tests/cases/fourslash/unusedMethodInClass4.ts @@ -8,5 +8,9 @@ //// } |] ////} -verify.rangeAfterCodeFix(`public function2(){ -}`); +verify.codeFix({ + description: `Remove declaration for: 'function1'.`, + newRangeContent: `public function2(){ + } +`, +}); diff --git a/tests/cases/fourslash/unusedMethodInClass5.ts b/tests/cases/fourslash/unusedMethodInClass5.ts index 806e619817f..c53a31b5d36 100644 --- a/tests/cases/fourslash/unusedMethodInClass5.ts +++ b/tests/cases/fourslash/unusedMethodInClass5.ts @@ -1,8 +1,11 @@ /// // @noUnusedLocals: true -//// [|class C { -//// private ["string"] (){} -//// }|] +////class C { +//// private ["string"] (){} +////} -verify.rangeAfterCodeFix("class C { }"); \ No newline at end of file +verify.codeFix({ + description: `Remove declaration for: '"string"'.`, + newFileContent: "class C {\n}", +}); diff --git a/tests/cases/fourslash/unusedMethodInClass6.ts b/tests/cases/fourslash/unusedMethodInClass6.ts index d223b3d6857..eef00d1cdd0 100644 --- a/tests/cases/fourslash/unusedMethodInClass6.ts +++ b/tests/cases/fourslash/unusedMethodInClass6.ts @@ -1,8 +1,11 @@ /// // @noUnusedLocals: true -//// [|class C { -//// private "string" (){} -//// }|] +////class C { +//// private "string" (){} +////} -verify.rangeAfterCodeFix("class C { }"); \ No newline at end of file +verify.codeFix({ + description: `Remove declaration for: '"string"'.`, + newFileContent: "class C {\n}", +}); diff --git a/tests/cases/fourslash/unusedNamespaceInNamespace.ts b/tests/cases/fourslash/unusedNamespaceInNamespace.ts index 802336454c6..4391a6a158c 100644 --- a/tests/cases/fourslash/unusedNamespaceInNamespace.ts +++ b/tests/cases/fourslash/unusedNamespaceInNamespace.ts @@ -1,13 +1,13 @@ /// // @noUnusedLocals: true -//// [|namespace A { +////namespace A { //// namespace B { -//// } -//// }|] - -verify.rangeAfterCodeFix(` -namespace A { -} -`); +//// } +////} +verify.codeFix({ + description: "Remove declaration for: 'B'.", + newFileContent: `namespace A { +}`, +}); diff --git a/tests/cases/fourslash/unusedParameterInConstructor1.ts b/tests/cases/fourslash/unusedParameterInConstructor1.ts index 33fe34c7e61..46a8c1f3b52 100644 --- a/tests/cases/fourslash/unusedParameterInConstructor1.ts +++ b/tests/cases/fourslash/unusedParameterInConstructor1.ts @@ -5,4 +5,8 @@ //// [|constructor(private p1: string, public p2: boolean, public p3: any, p5)|] { p5; } //// } -verify.rangeAfterCodeFix("constructor(public p2: boolean, public p3: any, p5)", /*includeWhiteSpace*/ false, /*errorCode*/ undefined, /*index*/ 0); \ No newline at end of file +verify.codeFix({ + description: "Remove declaration for: 'p1'.", + index: 0, + newRangeContent: "constructor(public p2: boolean, public p3: any, p5)", +}); diff --git a/tests/cases/fourslash/unusedParameterInConstructor1AddUnderscore.ts b/tests/cases/fourslash/unusedParameterInConstructor1AddUnderscore.ts index 31882978951..634561a5c65 100644 --- a/tests/cases/fourslash/unusedParameterInConstructor1AddUnderscore.ts +++ b/tests/cases/fourslash/unusedParameterInConstructor1AddUnderscore.ts @@ -5,4 +5,8 @@ //// [|constructor(private p1: string, public p2: boolean, public p3: any, p5) |] { p5; } //// } -verify.rangeAfterCodeFix("constructor(private _p1: string, public p2: boolean, public p3: any, p5)", /*includeWhiteSpace*/ false, /*errorCode*/ undefined, /*index*/ 1); \ No newline at end of file +verify.codeFix({ + description: "Prefix 'p1' with an underscore.", + index: 1, + newRangeContent: "constructor(private _p1: string, public p2: boolean, public p3: any, p5)", +}); diff --git a/tests/cases/fourslash/unusedParameterInConstructor2.ts b/tests/cases/fourslash/unusedParameterInConstructor2.ts index 71595a9c81c..b8208bb5359 100644 --- a/tests/cases/fourslash/unusedParameterInConstructor2.ts +++ b/tests/cases/fourslash/unusedParameterInConstructor2.ts @@ -5,4 +5,8 @@ //// [|constructor(public p1: string, private p2: boolean, public p3: any, p5)|] { p5; } //// } -verify.rangeAfterCodeFix("constructor(public p1: string, public p3: any, p5)", /*includeWhiteSpace*/ false, /*errorCode*/ undefined, /*index*/ 0); \ No newline at end of file +verify.codeFix({ + description: "Remove declaration for: 'p2'.", + index: 0, + newRangeContent: "constructor(public p1: string, public p3: any, p5)", +}); diff --git a/tests/cases/fourslash/unusedParameterInConstructor3.ts b/tests/cases/fourslash/unusedParameterInConstructor3.ts index 3da0e85407f..c36f24595a7 100644 --- a/tests/cases/fourslash/unusedParameterInConstructor3.ts +++ b/tests/cases/fourslash/unusedParameterInConstructor3.ts @@ -5,4 +5,8 @@ //// [|constructor(public p1: string, public p2: boolean, private p3: any, p5)|] { p5; } //// } -verify.rangeAfterCodeFix("constructor(public p1: string, public p2: boolean, p5)", /*includeWhiteSpace*/ false, /*errorCode*/ undefined, /*index*/ 0); \ No newline at end of file +verify.codeFix({ + description: "Remove declaration for: 'p3'.", + index: 0, + newRangeContent: "constructor(public p1: string, public p2: boolean, p5)", +}); diff --git a/tests/cases/fourslash/unusedParameterInConstructor4.ts b/tests/cases/fourslash/unusedParameterInConstructor4.ts index 860a7befa9b..99e98d64cda 100644 --- a/tests/cases/fourslash/unusedParameterInConstructor4.ts +++ b/tests/cases/fourslash/unusedParameterInConstructor4.ts @@ -5,4 +5,8 @@ //// [|constructor(private readonly p2: boolean, p5)|] { p5; } //// } -verify.rangeAfterCodeFix("constructor(p5)", /*includeWhiteSpace*/ false, /*errorCode*/ undefined, /*index*/ 0); \ No newline at end of file +verify.codeFix({ + description: "Remove declaration for: 'p2'.", + index: 0, + newRangeContent: "constructor(p5)", +}); diff --git a/tests/cases/fourslash/unusedParameterInFunction1.ts b/tests/cases/fourslash/unusedParameterInFunction1.ts index bc6f081ecaa..3f979f78766 100644 --- a/tests/cases/fourslash/unusedParameterInFunction1.ts +++ b/tests/cases/fourslash/unusedParameterInFunction1.ts @@ -4,4 +4,8 @@ ////function [|greeter( x)|] { ////} -verify.rangeAfterCodeFix("greeter()", /*includeWhiteSpace*/ false, /*errorCode*/ undefined, /*index*/ 0); +verify.codeFix({ + description: "Remove declaration for: 'x'.", + index: 0, + newRangeContent: "greeter()", +}); diff --git a/tests/cases/fourslash/unusedParameterInFunction1AddUnderscore.ts b/tests/cases/fourslash/unusedParameterInFunction1AddUnderscore.ts index 137625869c8..c248c5e1a94 100644 --- a/tests/cases/fourslash/unusedParameterInFunction1AddUnderscore.ts +++ b/tests/cases/fourslash/unusedParameterInFunction1AddUnderscore.ts @@ -4,4 +4,8 @@ ////function [|greeter( x) |] { ////} -verify.rangeAfterCodeFix("greeter( _x)", /*includeWhiteSpace*/ false, /*errorCode*/ undefined, /*index*/ 1); +verify.codeFix({ + description: "Prefix 'x' with an underscore.", + index: 1, + newRangeContent: "greeter( _x)", +}); diff --git a/tests/cases/fourslash/unusedParameterInFunction2.ts b/tests/cases/fourslash/unusedParameterInFunction2.ts index 6d1a772b0a8..74d95c99221 100644 --- a/tests/cases/fourslash/unusedParameterInFunction2.ts +++ b/tests/cases/fourslash/unusedParameterInFunction2.ts @@ -5,4 +5,8 @@ //// use(x); ////} -verify.rangeAfterCodeFix("greeter(x)", /*includeWhiteSpace*/ false, /*errorCode*/ undefined, /*index*/ 0); \ No newline at end of file +verify.codeFix({ + description: "Remove declaration for: 'y'.", + index: 0, + newRangeContent: "greeter(x)", +}); diff --git a/tests/cases/fourslash/unusedParameterInFunction3.ts b/tests/cases/fourslash/unusedParameterInFunction3.ts index dcbe53163db..30dc2a94060 100644 --- a/tests/cases/fourslash/unusedParameterInFunction3.ts +++ b/tests/cases/fourslash/unusedParameterInFunction3.ts @@ -5,4 +5,8 @@ //// y++; ////} -verify.rangeAfterCodeFix("greeter(y)", /*includeWhiteSpace*/ false, /*errorCode*/ undefined, /*index*/ 0); \ No newline at end of file +verify.codeFix({ + description: "Remove declaration for: 'x'.", + index: 0, + newRangeContent: "greeter(y)", +}); diff --git a/tests/cases/fourslash/unusedParameterInFunction4.ts b/tests/cases/fourslash/unusedParameterInFunction4.ts index e3ee2585384..87b5880ba70 100644 --- a/tests/cases/fourslash/unusedParameterInFunction4.ts +++ b/tests/cases/fourslash/unusedParameterInFunction4.ts @@ -5,4 +5,8 @@ //// use(x, z); ////} -verify.rangeAfterCodeFix("function greeter(x,z)", /*includeWhiteSpace*/ false, /*errorCode*/ undefined, /*index*/ 0); \ No newline at end of file +verify.codeFix({ + description: "Remove declaration for: 'y'.", + index: 0, + newRangeContent: "function greeter(x,z) ", +}); diff --git a/tests/cases/fourslash/unusedParameterInLambda1.ts b/tests/cases/fourslash/unusedParameterInLambda1.ts index a5f735c7016..325502ebb6d 100644 --- a/tests/cases/fourslash/unusedParameterInLambda1.ts +++ b/tests/cases/fourslash/unusedParameterInLambda1.ts @@ -6,4 +6,8 @@ //// [|return (x:number) => {}|] //// } -verify.rangeAfterCodeFix("return () => {}", /*includeWhiteSpace*/ false, /*errorCode*/ undefined, /*index*/ 0); +verify.codeFix({ + description: "Remove declaration for: 'x'.", + index: 0, + newRangeContent: "return () => {}", +}); diff --git a/tests/cases/fourslash/unusedParameterInLambda1AddUnderscore.ts b/tests/cases/fourslash/unusedParameterInLambda1AddUnderscore.ts index 916c32d82eb..1b05c66dd2f 100644 --- a/tests/cases/fourslash/unusedParameterInLambda1AddUnderscore.ts +++ b/tests/cases/fourslash/unusedParameterInLambda1AddUnderscore.ts @@ -6,4 +6,8 @@ //// [|return (x:number) => {} |] //// } -verify.rangeAfterCodeFix("return (_x:number) => {}", /*includeWhiteSpace*/ false, /*errorCode*/ undefined, /*index*/ 1); +verify.codeFix({ + description: "Prefix 'x' with an underscore.", + index: 1, + newRangeContent: "return (_x:number) => {}", +}); diff --git a/tests/cases/fourslash/unusedTypeAliasInNamespace1.ts b/tests/cases/fourslash/unusedTypeAliasInNamespace1.ts index 2314ebbe447..13c87f6afd6 100644 --- a/tests/cases/fourslash/unusedTypeAliasInNamespace1.ts +++ b/tests/cases/fourslash/unusedTypeAliasInNamespace1.ts @@ -1,11 +1,14 @@ /// // @noUnusedLocals: true -//// [| namespace greeter { -//// type hw = "Hello" |"world"; -//// export type nw = "No" | "Way"; -//// } |] +////namespace greeter { +//// type hw = "Hello" |"world"; +//// export type nw = "No" | "Way"; +////} -verify.rangeAfterCodeFix(`namespace greeter { +verify.codeFix({ + description: "Remove declaration for: 'hw'.", + newFileContent: `namespace greeter { export type nw = "No" | "Way"; -}`); +}`, +}); diff --git a/tests/cases/fourslash/unusedTypeParametersInClass1.ts b/tests/cases/fourslash/unusedTypeParametersInClass1.ts index 322921ab471..6574362511f 100644 --- a/tests/cases/fourslash/unusedTypeParametersInClass1.ts +++ b/tests/cases/fourslash/unusedTypeParametersInClass1.ts @@ -4,4 +4,7 @@ ////[|class greeter |] { ////} -verify.rangeAfterCodeFix("class greeter"); \ No newline at end of file +verify.codeFix({ + description: "Remove declaration for: 'T'.", + newRangeContent: "class greeter ", +}); diff --git a/tests/cases/fourslash/unusedTypeParametersInClass2.ts b/tests/cases/fourslash/unusedTypeParametersInClass2.ts index feaf9d3a14b..3cb984a11ec 100644 --- a/tests/cases/fourslash/unusedTypeParametersInClass2.ts +++ b/tests/cases/fourslash/unusedTypeParametersInClass2.ts @@ -5,4 +5,7 @@ //// public a: X; ////} -verify.rangeAfterCodeFix("class greeter"); \ No newline at end of file +verify.codeFix({ + description: "Remove declaration for: 'Y'.", + newRangeContent: "class greeter ", +}); diff --git a/tests/cases/fourslash/unusedTypeParametersInClass3.ts b/tests/cases/fourslash/unusedTypeParametersInClass3.ts index b1151265fe3..13ebc352cb0 100644 --- a/tests/cases/fourslash/unusedTypeParametersInClass3.ts +++ b/tests/cases/fourslash/unusedTypeParametersInClass3.ts @@ -6,4 +6,7 @@ //// public b: Z; ////} -verify.rangeAfterCodeFix("class greeter"); +verify.codeFix({ + description: "Remove declaration for: 'Y'.", + newRangeContent: "class greeter ", +}); diff --git a/tests/cases/fourslash/unusedTypeParametersInFunction1.ts b/tests/cases/fourslash/unusedTypeParametersInFunction1.ts index a11156badaa..b7289fc1e0a 100644 --- a/tests/cases/fourslash/unusedTypeParametersInFunction1.ts +++ b/tests/cases/fourslash/unusedTypeParametersInFunction1.ts @@ -3,4 +3,7 @@ // @noUnusedLocals: true //// [|function f1() {}|] -verify.rangeAfterCodeFix("function f1() {}"); +verify.codeFix({ + description: "Remove declaration for: 'T'.", + newRangeContent: "function f1() {}", +}); diff --git a/tests/cases/fourslash/unusedTypeParametersInFunction2.ts b/tests/cases/fourslash/unusedTypeParametersInFunction2.ts index a011f093dab..e2851b34605 100644 --- a/tests/cases/fourslash/unusedTypeParametersInFunction2.ts +++ b/tests/cases/fourslash/unusedTypeParametersInFunction2.ts @@ -3,4 +3,7 @@ // @noUnusedLocals: true //// [|function f1(a: X) {a}|] -verify.rangeAfterCodeFix("function f1(a: X) {a}"); +verify.codeFix({ + description: "Remove declaration for: 'Y'.", + newRangeContent: "function f1(a: X) {a}", +}); diff --git a/tests/cases/fourslash/unusedTypeParametersInFunction3.ts b/tests/cases/fourslash/unusedTypeParametersInFunction3.ts index 6dc56ccc7cb..4be2dc5feb3 100644 --- a/tests/cases/fourslash/unusedTypeParametersInFunction3.ts +++ b/tests/cases/fourslash/unusedTypeParametersInFunction3.ts @@ -3,4 +3,7 @@ // @noUnusedLocals: true //// [|function f1(a: X) {a;var b:Z;b}|] -verify.rangeAfterCodeFix("function f1(a: X) {a;var b:Z;b}"); +verify.codeFix({ + description: "Remove declaration for: 'Y'.", + newRangeContent: "function f1(a: X) {a;var b:Z;b}", +}); diff --git a/tests/cases/fourslash/unusedTypeParametersInInterface1.ts b/tests/cases/fourslash/unusedTypeParametersInInterface1.ts index b5363b369be..bc3a95d63b6 100644 --- a/tests/cases/fourslash/unusedTypeParametersInInterface1.ts +++ b/tests/cases/fourslash/unusedTypeParametersInInterface1.ts @@ -4,4 +4,7 @@ // @noUnusedParameters: true //// [|interface I {}|] -verify.rangeAfterCodeFix("interface I {}"); \ No newline at end of file +verify.codeFix({ + description: "Remove declaration for: 'T'.", + newRangeContent: "interface I {}", +}); diff --git a/tests/cases/fourslash/unusedTypeParametersInLambda1.ts b/tests/cases/fourslash/unusedTypeParametersInLambda1.ts index 01c1ebd24f5..3d7310d6ae6 100644 --- a/tests/cases/fourslash/unusedTypeParametersInLambda1.ts +++ b/tests/cases/fourslash/unusedTypeParametersInLambda1.ts @@ -6,4 +6,7 @@ //// [|return (x:number) => {x}|] //// } -verify.rangeAfterCodeFix("return (x:number) => {x}"); +verify.codeFix({ + description: "Remove declaration for: 'T'.", + newRangeContent: "return(x:number) => {x}", +}); diff --git a/tests/cases/fourslash/unusedTypeParametersInLambda2.ts b/tests/cases/fourslash/unusedTypeParametersInLambda2.ts index e5a4acc31c5..b2b89d3373e 100644 --- a/tests/cases/fourslash/unusedTypeParametersInLambda2.ts +++ b/tests/cases/fourslash/unusedTypeParametersInLambda2.ts @@ -6,4 +6,7 @@ //// [|new (a: T): void;|] //// } -verify.rangeAfterCodeFix("new (a: T): void;"); +verify.codeFix({ + description: "Remove declaration for: 'U'.", + newRangeContent: "new (a: T): void;", +}); diff --git a/tests/cases/fourslash/unusedTypeParametersInLambda3.ts b/tests/cases/fourslash/unusedTypeParametersInLambda3.ts index e6d866dcb6a..1f994c45905 100644 --- a/tests/cases/fourslash/unusedTypeParametersInLambda3.ts +++ b/tests/cases/fourslash/unusedTypeParametersInLambda3.ts @@ -7,4 +7,7 @@ //// [|new (a: T): A;|] //// } -verify.rangeAfterCodeFix("new (a: T): A;"); +verify.codeFix({ + description: "Remove declaration for: 'K'.", + newRangeContent: "new (a: T): A;", +}); diff --git a/tests/cases/fourslash/unusedTypeParametersInLambda4.ts b/tests/cases/fourslash/unusedTypeParametersInLambda4.ts index 04bd7c7e9be..d5c01202d26 100644 --- a/tests/cases/fourslash/unusedTypeParametersInLambda4.ts +++ b/tests/cases/fourslash/unusedTypeParametersInLambda4.ts @@ -6,4 +6,7 @@ //// } //// [|var y: new (a:T)=>void;|] -verify.rangeAfterCodeFix("var y: new (a:T)=>void;"); \ No newline at end of file +verify.codeFix({ + description: "Remove declaration for: 'U'.", + newRangeContent: "var y: new (a:T)=>void;", +}); diff --git a/tests/cases/fourslash/unusedTypeParametersInMethod1.ts b/tests/cases/fourslash/unusedTypeParametersInMethod1.ts index bc14952eca9..f4d036f54f4 100644 --- a/tests/cases/fourslash/unusedTypeParametersInMethod1.ts +++ b/tests/cases/fourslash/unusedTypeParametersInMethod1.ts @@ -5,4 +5,7 @@ //// [|f1()|] {} //// } -verify.rangeAfterCodeFix("f1()"); \ No newline at end of file +verify.codeFix({ + description: "Remove declaration for: 'T'.", + newRangeContent: "f1()", +}); diff --git a/tests/cases/fourslash/unusedTypeParametersInMethod2.ts b/tests/cases/fourslash/unusedTypeParametersInMethod2.ts index c12fd53f66b..25556ebc57d 100644 --- a/tests/cases/fourslash/unusedTypeParametersInMethod2.ts +++ b/tests/cases/fourslash/unusedTypeParametersInMethod2.ts @@ -5,4 +5,7 @@ //// [|f1(a: U)|] {a;} //// } -verify.rangeAfterCodeFix("f1(a: U)"); \ No newline at end of file +verify.codeFix({ + description: "Remove declaration for: 'T'.", + newRangeContent: "f1(a: U)", +}); diff --git a/tests/cases/fourslash/unusedTypeParametersInMethods1.ts b/tests/cases/fourslash/unusedTypeParametersInMethods1.ts index d0b170491f5..62f22246431 100644 --- a/tests/cases/fourslash/unusedTypeParametersInMethods1.ts +++ b/tests/cases/fourslash/unusedTypeParametersInMethods1.ts @@ -5,4 +5,7 @@ //// [|public f1(a: X)|] { a; var b: Z; b } //// } -verify.rangeAfterCodeFix("public f1(a: X)"); +verify.codeFix({ + description: "Remove declaration for: 'Y'.", + newRangeContent: "public f1(a: X)", +}); diff --git a/tests/cases/fourslash/unusedVariableInBlocks.ts b/tests/cases/fourslash/unusedVariableInBlocks.ts index 2a33d0c4cf5..fe3c002916b 100644 --- a/tests/cases/fourslash/unusedVariableInBlocks.ts +++ b/tests/cases/fourslash/unusedVariableInBlocks.ts @@ -1,15 +1,18 @@ /// // @noUnusedLocals: true -//// function f1 () { +////function f1 () { //// [|let x = 10; //// { //// let x = 11; //// } //// x;|] -//// } +////} -verify.rangeAfterCodeFix(`let x = 10; - { - } - x;`); +verify.codeFix({ + description: "Remove declaration for: 'x'.", + newRangeContent: `let x = 10; + { + } + x;`, +}); diff --git a/tests/cases/fourslash/unusedVariableInClass1.ts b/tests/cases/fourslash/unusedVariableInClass1.ts index 8b0ca0db727..e4cec171e8e 100644 --- a/tests/cases/fourslash/unusedVariableInClass1.ts +++ b/tests/cases/fourslash/unusedVariableInClass1.ts @@ -5,4 +5,7 @@ //// [|private greeting: string;|] ////} -verify.rangeAfterCodeFix(""); +verify.codeFix({ + description: "Remove declaration for: 'greeting'.", + newRangeContent: "", +}); diff --git a/tests/cases/fourslash/unusedVariableInClass2.ts b/tests/cases/fourslash/unusedVariableInClass2.ts index 6503dd02872..1f632a43ce8 100644 --- a/tests/cases/fourslash/unusedVariableInClass2.ts +++ b/tests/cases/fourslash/unusedVariableInClass2.ts @@ -6,4 +6,7 @@ //// private greeting: string;|] ////} -verify.rangeAfterCodeFix("public greeting1;"); +verify.codeFix({ + description: "Remove declaration for: 'greeting'.", + newRangeContent: "public greeting1;\n", +}); diff --git a/tests/cases/fourslash/unusedVariableInClass3.ts b/tests/cases/fourslash/unusedVariableInClass3.ts index 3ac306170a2..eec4e6bbe8f 100644 --- a/tests/cases/fourslash/unusedVariableInClass3.ts +++ b/tests/cases/fourslash/unusedVariableInClass3.ts @@ -5,4 +5,7 @@ //// private X = function() {}; ////|]} -verify.rangeAfterCodeFix(""); +verify.codeFix({ + description: "Remove declaration for: 'X'.", + newRangeContent: "\n", +}); diff --git a/tests/cases/fourslash/unusedVariableInForLoop1FS.ts b/tests/cases/fourslash/unusedVariableInForLoop1FS.ts index 760d8487b34..2a4feffd474 100644 --- a/tests/cases/fourslash/unusedVariableInForLoop1FS.ts +++ b/tests/cases/fourslash/unusedVariableInForLoop1FS.ts @@ -7,5 +7,7 @@ //// } //// } -verify.rangeAfterCodeFix("for(; ;)"); - +verify.codeFix({ + description: "Remove declaration for: 'i'.", + newRangeContent: "for(; ;) ", +}); diff --git a/tests/cases/fourslash/unusedVariableInForLoop2FS.ts b/tests/cases/fourslash/unusedVariableInForLoop2FS.ts index a16f21e8417..d913ae5ce94 100644 --- a/tests/cases/fourslash/unusedVariableInForLoop2FS.ts +++ b/tests/cases/fourslash/unusedVariableInForLoop2FS.ts @@ -7,4 +7,7 @@ //// } //// } -verify.rangeAfterCodeFix("for(var i = 0; ;i++)"); +verify.codeFix({ + description: "Remove declaration for: 'j'.", + newRangeContent: "for(var i = 0; ;i++)", +}); diff --git a/tests/cases/fourslash/unusedVariableInForLoop3FS.ts b/tests/cases/fourslash/unusedVariableInForLoop3FS.ts index 07d13307ca7..6f3beae5c74 100644 --- a/tests/cases/fourslash/unusedVariableInForLoop3FS.ts +++ b/tests/cases/fourslash/unusedVariableInForLoop3FS.ts @@ -7,4 +7,7 @@ //// } //// } -verify.rangeAfterCodeFix("for(var i = 0, k=0; ;i++,k++)"); \ No newline at end of file +verify.codeFix({ + description: "Remove declaration for: 'j'.", + newRangeContent: "for(var i = 0, k=0; ;i++, k++)", +}); diff --git a/tests/cases/fourslash/unusedVariableInForLoop4FS.ts b/tests/cases/fourslash/unusedVariableInForLoop4FS.ts index d54f8baaa3d..661012958d4 100644 --- a/tests/cases/fourslash/unusedVariableInForLoop4FS.ts +++ b/tests/cases/fourslash/unusedVariableInForLoop4FS.ts @@ -7,4 +7,7 @@ //// } //// } -verify.rangeAfterCodeFix("for(var j = 0, k=0; ;j++,k++)"); +verify.codeFix({ + description: "Remove declaration for: 'i'.", + newRangeContent: "for(var j= 0, k=0; ;j++, k++) ", +}); diff --git a/tests/cases/fourslash/unusedVariableInForLoop5FSAddUnderscore.ts b/tests/cases/fourslash/unusedVariableInForLoop5FSAddUnderscore.ts index 2948bfab207..87783ff67fc 100644 --- a/tests/cases/fourslash/unusedVariableInForLoop5FSAddUnderscore.ts +++ b/tests/cases/fourslash/unusedVariableInForLoop5FSAddUnderscore.ts @@ -7,4 +7,7 @@ //// } //// } -verify.rangeAfterCodeFix(`for (const _elem in ["a", "b", "c"])`, /*includeWhiteSpace*/ true, /*errorCode*/ 0); +verify.codeFix({ + description: "Prefix 'elem' with an underscore.", + newRangeContent: 'for (const _elem in ["a", "b", "c"])' +}); diff --git a/tests/cases/fourslash/unusedVariableInForLoop6FS.ts b/tests/cases/fourslash/unusedVariableInForLoop6FS.ts index fa1948438bc..9661514d431 100644 --- a/tests/cases/fourslash/unusedVariableInForLoop6FS.ts +++ b/tests/cases/fourslash/unusedVariableInForLoop6FS.ts @@ -7,5 +7,8 @@ //// } //// } -verify.rangeAfterCodeFix("const {} of ", /*includeWhiteSpace*/ false, /*errorCode*/ undefined, /*index*/ 0); - +verify.codeFix({ + description: "Remove declaration for: 'elem'.", + index: 0, + newRangeContent: "const {} of", +}); diff --git a/tests/cases/fourslash/unusedVariableInForLoop6FSAddUnderscore.ts b/tests/cases/fourslash/unusedVariableInForLoop6FSAddUnderscore.ts index 4faa6893b7f..9f8c7b19f99 100644 --- a/tests/cases/fourslash/unusedVariableInForLoop6FSAddUnderscore.ts +++ b/tests/cases/fourslash/unusedVariableInForLoop6FSAddUnderscore.ts @@ -7,5 +7,9 @@ //// } //// } -verify.rangeAfterCodeFix("const _elem of", /*includeWhiteSpace*/ false, /*errorCode*/ undefined, /*index*/ 1); +verify.codeFix({ + description: "Prefix 'elem' with an underscore.", + index: 1, + newRangeContent: "const _elem of" +}); diff --git a/tests/cases/fourslash/unusedVariableInForLoop7FS.ts b/tests/cases/fourslash/unusedVariableInForLoop7FS.ts index 7f99863ba46..c42bf8bc97a 100644 --- a/tests/cases/fourslash/unusedVariableInForLoop7FS.ts +++ b/tests/cases/fourslash/unusedVariableInForLoop7FS.ts @@ -9,8 +9,11 @@ ////}|] //// -verify.rangeAfterCodeFix(`{ +verify.codeFix({ + description: "Remove declaration for: 'x'.", + newRangeContent: `{ for (const elem of ["a", "b", "c"]) { elem; } -}`, /*includeWhiteSpace*/ true); +}` +}); diff --git a/tests/cases/fourslash/unusedVariableInModule1.ts b/tests/cases/fourslash/unusedVariableInModule1.ts index e9fe9515e6d..7a0a3ad8601 100644 --- a/tests/cases/fourslash/unusedVariableInModule1.ts +++ b/tests/cases/fourslash/unusedVariableInModule1.ts @@ -6,4 +6,7 @@ //// [|var x: string; //// export var y: string;|] -verify.rangeAfterCodeFix("export var y: string;"); +verify.codeFix({ + description: "Remove declaration for: 'x'.", + newRangeContent: "export var y: string;", +}); diff --git a/tests/cases/fourslash/unusedVariableInModule2.ts b/tests/cases/fourslash/unusedVariableInModule2.ts index ac6e7120d8b..e8a1ae762d4 100644 --- a/tests/cases/fourslash/unusedVariableInModule2.ts +++ b/tests/cases/fourslash/unusedVariableInModule2.ts @@ -7,4 +7,7 @@ //// z; //// export var y: string; -verify.rangeAfterCodeFix("var z: number;"); +verify.codeFix({ + description: "Remove declaration for: 'x'.", + newRangeContent: "var z: number;", +}); diff --git a/tests/cases/fourslash/unusedVariableInModule3.ts b/tests/cases/fourslash/unusedVariableInModule3.ts index 0185b89e3a6..56b08f5499e 100644 --- a/tests/cases/fourslash/unusedVariableInModule3.ts +++ b/tests/cases/fourslash/unusedVariableInModule3.ts @@ -6,4 +6,7 @@ //// [|var x = function f1() {} //// export var y: string;|] -verify.rangeAfterCodeFix("export var y: string;"); +verify.codeFix({ + description: "Remove declaration for: 'x'.", + newRangeContent: "export var y: string;", +}); diff --git a/tests/cases/fourslash/unusedVariableInModule4.ts b/tests/cases/fourslash/unusedVariableInModule4.ts index 6d80d59c2ce..71890893b9e 100644 --- a/tests/cases/fourslash/unusedVariableInModule4.ts +++ b/tests/cases/fourslash/unusedVariableInModule4.ts @@ -7,4 +7,8 @@ //// x; //// export var y: string; -verify.rangeAfterCodeFix(`var x = function f1() {}`, /*includeWhiteSpace*/ false, /*errorCode*/ undefined, /*index*/ 0); +verify.codeFix({ + description: "Remove declaration for: 'm'.", + index: 0, + newRangeContent: `var x = function f1() {}`, +}); diff --git a/tests/cases/fourslash/unusedVariableInNamespace1.ts b/tests/cases/fourslash/unusedVariableInNamespace1.ts index c9f38473a51..6dd14233683 100644 --- a/tests/cases/fourslash/unusedVariableInNamespace1.ts +++ b/tests/cases/fourslash/unusedVariableInNamespace1.ts @@ -5,4 +5,7 @@ //// [|let a = "dummy entry";|] ////} -verify.rangeAfterCodeFix(""); +verify.codeFix({ + description: "Remove declaration for: 'a'.", + newRangeContent: "", +}); diff --git a/tests/cases/fourslash/unusedVariableInNamespace2.ts b/tests/cases/fourslash/unusedVariableInNamespace2.ts index 61fc3ec137c..9bf546f6f53 100644 --- a/tests/cases/fourslash/unusedVariableInNamespace2.ts +++ b/tests/cases/fourslash/unusedVariableInNamespace2.ts @@ -8,4 +8,7 @@ //// } ////} -verify.rangeAfterCodeFix(`let a = "dummy entry", c = 0;`); +verify.codeFix({ + description: "Remove declaration for: 'b'.", + newRangeContent: 'let a = "dummy entry", c = 0;', +}); diff --git a/tests/cases/fourslash/unusedVariableInNamespace3.ts b/tests/cases/fourslash/unusedVariableInNamespace3.ts index 7d2f3d251f3..85e1889c3e1 100644 --- a/tests/cases/fourslash/unusedVariableInNamespace3.ts +++ b/tests/cases/fourslash/unusedVariableInNamespace3.ts @@ -8,4 +8,7 @@ //// } ////} -verify.rangeAfterCodeFix(`let a = "dummy entry", b;`); +verify.codeFix({ + description: "Remove declaration for: 'c'.", + newRangeContent: 'let a = "dummy entry", b;', +});